1import{_ as w,c as D,R as S}from"./index-rpK2Mxmx.js";import{X as F,a6 as a,ah as I,a5 as s,W as f,k as o,G as _,a3 as m,a2 as x,F as E,ac as A,ae as y}from"./vue-E3d3mecD.js";import{d as L}from"./datatableMixins-qxGvkUTU.js";import{P as T,q as K,r as O,s as W}from"./antd-C9qusGDu.js";import"./ckeditor-C5RZI2Xj.js";import"./lodash-BLIbnOd4.js";import"./moment-lgN9U01c.js";import"./filterDateRangeDropdown-BC9VS5Pe.js";import"./filterInputSearchDropdown-BahlBAH6.js";const N={mixins:[L],components:{EditOutlined:W,DeleteOutlined:O,RestOutlined:K,PlusOutlined:T},data(){var t;return{ROLES:S,datatableUrl:this.$constants.formW9Datatable,statusChangeUrl:this.$constants.formW9Update,columns:[{title:"Employee",key:"employee_name",slots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon",customRender:"employee_name"},customRender:({record:e})=>{var i;return((i=e==null?void 0:e.employee)==null?void 0:i.full_name)||"-"}},{title:"Created Date",dataIndex:"created_at",key:"created_at",sorter:!0,defaultSortOrder:"descend",customRender:({text:e})=>this.$customDate.ll(e)},{title:"Action",dataIndex:"action",key:"action",fixed:"right",slots:{customRender:"action"}}],activeTabKey:((t=this.$route.query)==null?void 0:t.status)??"0",tabList:[{key:"0",counts:0,text:"Under Review",status:0,slots:{tab:"customRender"}},{key:"1",counts:0,text:"Approved",status:1,slots:{tab:"customRender"}},{key:"2",counts:0,text:"Terminated",status:2,slots:{tab:"customRender"}}]}},methods:{...I("navbarCount",["setCountForKey"]),previewPDF(t){D.renderFile(this.$constants.formW9Preview,t.data,"application/pdf;base64").catch(e=>{this.$message.error(e)}).finally(()=>{this.pdfLoading=!1})},handleAddCommentEvent(t){this.$store.dispatch("drawer/open",{title:"Feedback",path:"admin.formW9.comment",record:t,callback:this.refresh})}},watch:{tabList:{handler(t){const e=t.find(i=>i.status===0);this.setCountForKey({key:"total_pending_form_w9",count:e.counts})},deep:!0}}};function $(t,e,i,z,l,u){const h=s("page-header"),b=s("xFilterInputSearchDropdown"),g=s("xFilterIcon"),p=s("a-space"),r=s("a-button"),d=s("a-tooltip"),k=s("a-popconfirm"),v=s("ant-data-table"),C=s("a-card"),R=s("a-layout-content");return f(),F(R,null,{default:a(()=>[o(h,null,{title:a(()=>[...e[1]||(e[1]=[_(" Form W-9 ",-1)])]),buttons:a(()=>[...e[2]||(e[2]=[])]),_:1}),o(C,{tabList:l.tabList,activeTabKey:l.activeTabKey,onTabChange:e[0]||(e[0]=n=>l.activeTabKey=n),size:"small"},{customRender:a(n=>[_(y(n.text)+" ("+y(n.counts)+") ",1)]),default:a(()=>[o(v,{columns:l.columns,rowKey:(n,c)=>n.id,dataSource:t.dataSource,pagination:t.pagination,loading:t.datatableLoading,onChange:t.handleTableChange,onRefresh:t.refresh,size:"small",scroll:t.scroll},{filterDropdown:a(n=>[o(b,{filterDropdown:n,onHandleSearch:t.handleDatatableSearch,onHandleReset:t.handleDatatableReset},null,8,["filterDropdown","onHandleSearch","onHandleReset"])]),filterIcon:a(n=>[o(g,{filterIcon:n},null,8,["filterIcon"])]),action:a(({record:n})=>[o(p,{size:1},{default:a(()=>[o(d,{title:"Preview W-9"},{default:a(()=>[o(r,{type:"link",size:"small",onClick:c=>u.previewPDF(n)},{default:a(()=>[o(p,null,{default:a(()=>[...e[3]||(e[3]=[m("i",{class:"ti ti-eye ti-lg"},null,-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024),n.status==0&&!t.$comman.hasRole([l.ROLES.ADMIN_VIEW_ONLY,l.ROLES.SECURITY_MANAGER])?(f(),x(E,{key:0},[o(k,{title:"Are you sure you want to approve this Form W-9 submission?","ok-text":"Yes","cancel-text":"No",onConfirm:c=>t.handleStatusChangeEvent({employee_id:n.employee_id})},{default:a(()=>[o(d,{title:"Approve"},{default:a(()=>[o(r,{size:"small",type:"link"},{default:a(()=>[...e[4]||(e[4]=[m("i",{class:"ti ti-check ti-lg",style:{color:"green"}},null,-1)])]),_:1})]),_:1})]),_:1},8,["onConfirm"]),o(d,{title:"Add Comment"},{default:a(()=>[o(r,{size:"small",type:"link",onClick:c=>u.handleAddCommentEvent(n)},{default:a(()=>[...e[5]||(e[5]=[m("i",{class:"ti ti-message ti-lg",style:{color:"darkorange"}},null,-1)])]),_:1},8,["onClick"])]),_:2},1024)],64)):A("",!0)]),_:2},1024)]),_:1},8,["columns","rowKey","dataSource","pagination","loading","onChange","onRefresh","scroll"])]),_:1},8,["tabList","activeTabKey"])]),_:1})}const X=w(N,[["render",$]]);export{X 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.