PageSourceSearch

https://doc.certilia.com/assets/BatchSigningView-7ilv-dmh.js

js certilia.com collected 2026-10-02 10:41:34 UTC 4,263 bytes, 1 lines download raw bytes

1import{C as F,P as L,o as q,h as p,j as a,k as o,g as i,w as s,u as m,aU as H,d as U,b2 as G,v as M,F as J,r as K,bq as V,a8 as D,A as f,B as r,E as $,c as d,m as u,a7 as Q,p as R}from"./index-DgVex_Lg.js";import{a as W}from"./dateFormat-D_KJnrpD.js";import{u as X}from"./useApiError-cJMyrlO7.js";import{E as Y}from"./EmptyState-DWQ1N6Pu.js";import{_ as Z}from"./_plugin-vue_export-helper-DlAUqK2U.js";const x={class:"page-header"},tt={class:"page-title"},et={class:"page-subtitle"},nt={class:"tab-toolbar"},at={class:"group-header"},it={class:"group-signer"},ot={class:"group-name"},st={class:"group-oib"},lt={class:"group-actions"},ct={key:0,class:"sel-count"},rt=["onClick"],dt={class:"contract-number"},ut={class:"contract-title"},bt={__name:"BatchSigningView",setup(gt){const{t:k}=F(),C=L(),O=$(()=>C.can("contracts_create")),w=$(()=>{var t;return!!((t=C.signingLimits)!=null&&t.card_multidoc)}),{showError:z}=X(),v=f([]),b=f(!1),S=f(null),g=f({}),A=$(()=>{const t={};for(const e of v.value)t[e.oib]||(t[e.oib]={oib:e.oib,name:`${e.first_name||""} ${e.last_name||""}`.trim(),canMobile:!!e.can_sign_mobile,steps:[]}),t[e.oib].steps.push(e);return Object.values(t)});function h(t){return g.value[t]||[]}function N(t,e){g.value={...g.value,[t]:e}}function P(t){return W(t)||"—"}async function y(){b.value=!0,g.value={};try{const{data:t}=await V.pendingSteps();v.value=t}catch{D.error(k("batchSigning.loadError"))}finally{b.value=!1}}async function T(t){const e=h(t);if(!(e.length<2)){S.value=t;try{await V.createBatch(e.map(c=>c.id)),D.success(k("batchSigning.initiated",{n:e.length})),await y()}catch(c){z(c,"batchSigning.initiateError")}finally{S.value=null}}}return q(y),(t,e)=>{const c=r("el-button"),B=r("el-icon"),E=r("el-tag"),I=r("el-tooltip"),_=r("el-table-column"),j=r("el-table");return d(),p("div",null,[a("div",x,[a("div",null,[a("h2",tt,o(t.$t("batchSigning.title")),1),a("p",et,o(t.$t("nav.desc.batchSigning")),1)])]),a("div",nt,[i(c,{loading:b.value,icon:m(H),onClick:y},{default:s(()=>[u(o(t.$t("common.refresh")),1)]),_:1},8,["loading","icon"])]),!b.value&&!v.value.length?(d(),U(Y,{key:0,title:t.$t("batchSigning.noPending"),description:t.$t("batchSigning.emptyDesc"),hint:t.$t("batchSigning.emptyHint"),"action-label":O.value?t.$t("batchSigning.emptyCta"):"","action-icon":m(G),onAction:e[0]||(e[0]=n=>t.$router.push("/contracts/new"))},null,8,["title","description","hint","action-label","action-icon"])):M("",!0),(d(!0),p(J,null,K(A.value,n=>(d(),p("div",{key:n.oib,class:"signer-group"},[a("div",at,[a("div",it,[i(B,null,{default:s(()=>[i(m(Q))]),_:1}),a("span",ot,o(n.name),1),a("span",st,"OIB: "+o(n.oib),1),i(E,{size:"small",type:n.canMobile?"success":"warning",style:{"flex-shrink":"0"}},{default:s(()=>[u(o(n.canMobile?t.$t("batchSigning.mobile"):t.$t("batchSigning.card")),1)]),_:2},1032,["type"])]),a("div",lt,[h(n.oib).length?(d(),p("span",ct,o(t.$t("batchSigning.selected",{n:h(n.oib).length})),1)):M("",!0),i(I,{content:t.$t("batchSigning.cardBatchTooltip"),disabled:n.canMobile||w.value,placement:"top"},{default:s(()=>[a("span",null,[i(c,{size:"small",type:"primary",plain:"",disabled:h(n.oib).length<2||!n.canMobile&&!w.value,loading:S.value===n.oib,onClick:l=>T(n.oib)},{default:s(()=>[i(B,null,{default:s(()=>[i(m(R))]),_:1}),u(" "+o(t.$t("batchSigning.batchSign")),1)]),_:1},8,["disabled","loading","onClick"])])]),_:2},1032,["content","disabled"])])]),i(j,{data:n.steps,size:"small",style:{width:"100%","margin-bottom":"4px"},onSelectionChange:l=>N(n.oib,l)},{default:s(()=>[i(_,{type:"selection",width:"44"}),i(_,{label:t.$t("batchSigning.colDocument"),"min-width":"200"},{default:s(({row:l})=>[a("a",{class:"contract-link",onClick:ht=>t.$router.push(`/contracts/${l.contract_id}`)},[a("span",dt,o(l.contract_number),1),a("span",ut,o(l.contract_title),1)],8,rt)]),_:1},8,["label"]),i(_,{label:t.$t("batchSigning.colStep"),width:"70",align:"center"},{default:s(({row:l})=>[i(E,{size:"small",type:"info"},{default:s(()=>[u(o(l.step_index+1),1)]),_:2},1024)]),_:1},8,["label"]),i(_,{label:t.$t("batchSigning.colSince"),width:"180"},{default:s(({row:l})=>[u(o(P(l.initiated_at)),1)]),_:1},8,["label"])]),_:1},8,["data","onSelectionChange"])]))),128))])}}},St=Z(bt,[["__scopeId","data-v-c72b5e00"]]);export{St as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.