1import{a as se}from"./chunk-WDSMTVWE.js";import{b as re,i as ae}from"./chunk-3CYMHF43.js";import"./chunk-FICEFW7Y.js";import"./chunk-PHV6OZDW.js";import"./chunk-7JUVBXEJ.js";import"./chunk-FTGPRD5H.js";import"./chunk-2ET2YIES.js";import"./chunk-4X6BDAJR.js";import"./chunk-YAUROO2Q.js";import"./chunk-XSVLRKD7.js";import"./chunk-A33ZCN6B.js";import"./chunk-EA2PFKMT.js";import"./chunk-XWUVL3PL.js";import"./chunk-PIBCMDAL.js";import"./chunk-VCZRDACA.js";import"./chunk-7YQDUNJC.js";import"./chunk-FOOCM4OQ.js";import"./chunk-ADU7DYTY.js";import"./chunk-X3ZONAHZ.js";import"./chunk-OYVOPGIL.js";import"./chunk-WONF54U2.js";import"./chunk-3T4EY44F.js";import"./chunk-6D4Q3VJ6.js";import"./chunk-CMOO4QVL.js";import"./chunk-44KZ3X6L.js";import"./chunk-GU4HI7VT.js";import"./chunk-A6VVC4LW.js";import"./chunk-VKGU5BQM.js";import"./chunk-2CL3H4WG.js";import"./chunk-RAYOOOGS.js";import"./chunk-5VRJQC37.js";import"./chunk-FEG7PXNV.js";import"./chunk-SP2BQJMC.js";import"./chunk-B43XB74X.js";import"./chunk-MUBDHY7D.js";import"./chunk-VJMH5IEE.js";import"./chunk-VZ2LUUPF.js";import"./chunk-LNPYSHQA.js";import"./chunk-E33SC2I4.js";import"./chunk-3RK6DDJD.js";import"./chunk-F6DMAPNX.js";import"./chunk-7USNV4OL.js";import"./chunk-STQB4ZI2.js";import"./chunk-CVW7G4XP.js";import"./chunk-JPBCOPWR.js";import"./chunk-VXSO4A2J.js";import"./chunk-RWNVJ2MI.js";import"./chunk-GQFDSDW4.js";import{b as oe}from"./chunk-QCMEAG5H.js";import"./chunk-VDPPGSWJ.js";import"./chunk-BMEQUL5P.js";import"./chunk-E7N4XFGP.js";import"./chunk-QARMK6DK.js";import"./chunk-JUIQFPVJ.js";import"./chunk-H2UQ245X.js";import"./chunk-VEI6YPNE.js";import"./chunk-6UEPFQTL.js";import"./chunk-ENHFKRMX.js";import"./chunk-63BPQD2G.js";import"./chunk-6ONQYEJN.js";import"./chunk-UAP3IS7C.js";import"./chunk-3AA5A3S3.js";import"./chunk-EDPJARKP.js";import"./chunk-UAIGZPJC.js";import"./chunk-HQBOEZ6I.js";import"./chunk-ZKR7HTI7.js";import"./chunk-FWQNVCY6.js";import"./chunk-XVVW6TGP.js";import"./chunk-JKXCNSY2.js";import"./chunk-WXBJ46HK.js";import{b as ne}from"./chunk-HNQJ7DYX.js";import"./chunk-KZHPCVG2.js";import"./chunk-RIQOBMUM.js";import{e as ie}from"./chunk-QXWF3QZO.js";import"./chunk-RHYC5D65.js";import"./chunk-GJGSG6UJ.js";import"./chunk-2NKGVEDR.js";import"./chunk-43GLJJHQ.js";import"./chunk-TGTHNBCY.js";import"./chunk-MKAT7EBQ.js";import"./chunk-R6PGBBXH.js";import{a as ee,b as te}from"./chunk-6YV5NK55.js";import"./chunk-ZPK2L6MP.js";import"./chunk-CUKYJX6T.js";import"./chunk-BYHWI43Y.js";import"./chunk-PRIB4SPQ.js";import"./chunk-I5JT6YOS.js";import"./chunk-L2FTYITK.js";import"./chunk-MYUUZNGW.js";import"./chunk-UWY4ASCO.js";import{B as W,Sb as Z,x as I}from"./chunk-FSJ7WDSS.js";import"./chunk-7DUBKFTH.js";import"./chunk-GAAUQAZR.js";import{u as G}from"./chunk-QARGNN2H.js";import{o as U}from"./chunk-QMPEVRXW.js";import"./chunk-L5N7QT47.js";import{f as L}from"./chunk-7YIJMX7J.js";import"./chunk-JKQTJFXZ.js";import"./chunk-6C4SUTIO.js";import"./chunk-HO3L3MQU.js";import"./chunk-7HWLSLYX.js";import"./chunk-MROTY4ZZ.js";import{a as z,b as K}from"./chunk-WYFT7GCZ.js";import"./chunk-B52T55U3.js";import"./chunk-2ZM3A6GC.js";import"./chunk-XAK5CNLX.js";import"./chunk-X7HKUFLI.js";import"./chunk-DDD7PCCC.js";import{f as J,g as X}from"./chunk-AHGGG6SZ.js";import"./chunk-Y6FPC7PY.js";import"./chunk-2CMK3MX3.js";import"./chunk-JHW7RPFK.js";import{X as $,Y as H,ua as Y}from"./chunk-3TGRFOSY.js";import{$b as m,C as B,E as S,Fd as y,Gd as k,Hd as M,Na as F,Tc as c,Ub as s,Uc as p,Vc as a,Wc as h,Ya as P,Za as C,ab as Q,de as E,ed as D,ee as N,hc as q,ic as x,ie as V,la as O,n as j,nc as u,od as T,qd as l,u as g,ud as _,vd as b,wd as v,ze as A}from"./chunk-MRINWV4H.js";import{a as f,b as w}from"./chunk-KTMQH2OG.js";var ue=["easydocTable"],fe=["countFiles"],ge=["exportToggle"],he=["exportNewSidePanel"];function _e(o,e){if(o&1&&h(0,"app-easydoc-table",6,2),o&2){let t=l();c("config",t.config)}}function be(o,e){if(o&1){let t=D();p(0,"div")(1,"button",7),T("click",function(){P(t);let n=l();return C(n.PendingNotificationsSetting())}),y(2),E(3,"translate"),a()()}o&2&&(s(2),M(" ",N(3,1,"Pending Notifications Setting")," "))}function ve(o,e){if(o&1){let t=D();p(0,"button",20,3),T("click",function(){P(t);let n=l().$implicit,r=l(2);return C(r.download(n))}),h(2,"i",21),y(3),E(4,"translate"),a()}o&2&&(s(3),M(" ",N(4,1,"Download")," "))}function ye(o,e){if(o&1){let t=D();p(0,"div",14)(1,"div",15)(2,"b"),y(3),a()(),p(4,"div",16)(5,"button",17),T("click",function(){let n=P(t),r=n.$implicit,pe=n.index,ce=l().$implicit,me=l();return C(me.removeEditSidePanel(ce,pe,r))}),h(6,"i",18),a(),u(7,ve,5,3,"button",19),a()()}if(o&2){let t=e.$implicit,i=l(2);s(3),k(i.getFileNameForEdit(t)),s(4),c("ngIf",i.isCanFileDownload(t))}}function we(o,e){o&1&&h(0,"app-button-spinner")}function Se(o,e){if(o&1&&(p(0,"div",8)(1,"div",9)(2,"div",10)(3,"h2"),y(4),E(5,"translate"),a()(),p(6,"div",11),u(7,ye,8,2,"div",12),a()(),u(8,we,1,0,"app-button-spinner",13),a()),o&2){let t=e.$implicit,i=l();c("hidden",!i.isFilesEditSidePanel(t)),s(4),k(N(5,4,"Attached File")),s(3),c("ngForOf",i.allFilesEditSidePanel(t)),s(),c("ngIf",i.isDownloading)}}var d,R=(d=class{constructor(e,t,i,n,r){this.cdr=e,this.currentUserState=t,this.popupsService=i,this.featuresPermissionsService=n,this.injector=r,this.managementTable="PensionReport",this.pensionStatus=[{name:"PENDING",value:"pending",classBadge:"label-light-warning",isTranslate:!0},{name:"received",value:"received",classBadge:"label-light-success",isTranslate:!0}],this.pensionStatusFilter=[{name:"NOT REQUIRED",value:"not-required",classBadge:"",isTranslate:!0},...this.pensionStatus],this.itemsForDeleted=[],this.isDownloading=!1}ngAfterViewInit(){this.config={header:{title:"Pension Report",breadcrumbs:se(this.featuresPermissionsService),buttons:[],toolbar:[{customHtml:this.exportToggle}]},table:{settings:{tableId:this.managementTable,url:`{api}
1/entity/${this.currentUserState.getCompanyId}/reports/pension`,method:W.post,customData:e=>e.data.map(t=>w(f({},t),{has_policy:t.status==="received"})),isWithoutDt:!0,search:!0,isShowBtnColumnsManagement:this.currentUserState.isAdmin,isCurrentItem:!0,edit:{functionCall:this.onHandleClickRow.bind(this)}},columns:[{name:"id",title:"ID",view:!1},{name:"employee_name",title:"Employee Full Name",view:!0},{name:"employee_id_number",title:"Employee ID Number",view:!0},{name:"policy_number",title:"Kupa Number",view:!0},{name:"company_legal_id",title:"Pension Legal ID",view:!0},{name:"due_date",title:"Due Date",render:"date",dateFormat:"DD/MM/YYYY",view:!0},{name:"has_policy",title:"Has Active Pension",render:"badge",localized:!0,filter:{active:!1,view:!1,data:[{name:"yes",value:!0,classBadge:"label-light-success"},{name:"yes",value:1,classBadge:"label-light-success"},{name:"no",value:!1},{name:"no",value:0},{name:"no",value:null}]},view:!0},{name:"status",title:"Pension Status",render:"badge",localized:!0,filter:{active:!0,view:!0,data:[{name:"all",value:""},...this.pensionStatusFilter]},view:!0},{name:"notes",title:"Notes",view:!0}]},form:{settings:{},new:{config:{functionUrl:e=>`{api}/profile/${e?.element?.profile_id}/pension`},rows:[{fields:[{name:"policy_number",title:"Kupa Number"},{name:"company_legal_id",title:"Pension Legal ID"}]},{fields:[...this.featuresPermissionsService.isEmployeeOnboardingRequireCubesFile?[{name:"cubes_file",title:"Cubes File",type:"file",colLg:6}]:[],{name:"due_date",title:"Pension Due Date",type:"date",colLg:6}]},{fields:[{name:"has_policy",title:"Has Active Pension",type:"toggle",ToggleTrueValue:1,ToggleFalseValue:0},{name:"status",title:"Pension Status",type:"select",defaultValue:this.pensionStatus?.[0]?.value,options:this.pensionStatus,validate:[L.required]}]},{fields:[{name:"notes",title:"Pension Notes",type:"textarea",rows:5,colLg:6}]}]},edit:{config:{functionUrl:e=>`{api}/profile/${e?.element?.profile_id}/pension`,functionSavedOnly:this.editEvent.bind(this),convertDataFromApi:this.convertDataFromApiEdit.bind(this)},rows:[{fields:[{name:"policy_number",title:"Kupa Number"},{name:"company_legal_id",title:"Pension Legal ID"}]},{fields:[{name:"due_date",title:"Pension Due Date",type:"date",colLg:6}]},{fields:[{name:"has_policy",title:"Has Active Pension",type:"toggle",ToggleTrueValue:1,ToggleFalseValue:0},{name:"status",title:"Pension Status",type:"select",defaultValue:this.pensionStatus?.[0]?.value,options:this.pensionStatus,validate:[L.required]}]},{fields:[{name:"notes",title:"Pension Notes",type:"textarea",rows:5,colLg:6}]},...this.featuresPermissionsService.isEmployeeOnboardingRequireCubesFile?[{fields:[{name:"cubes_file",title:"Cubes File",type:"file",isButtonForAddFile:!0,validate:[],colLg:6}]},{html:[{content:this.exportNewSidePanel}]}]:[]]}}},this.cdr.detectChanges()}PendingNotificationsSetting(){let e={entityId:this.currentUserState.getCompanyId};this.popupsService.show({modulePatch:import("./chunk-P5YIQ4I7.js"),moduleName:"PendingNotificationsSettingModule",modalParams:{backdrop:!0,modalDialogClass:"border-radius-10 mat-dialog-border-radius-i"},data:e})}onHandleClickRow(e){if(e.element?.id){this.easydocTable.openFormPanel(I.Edit,e.element);return}this.easydocTable.openFormPanel(I.New,e.element)}getSidePanelFileValue(e){return{isNewPanel:e.tableSide?.config?.type===I.New}}isFilesEditSidePanel(e){return this.allFilesEditSidePanel(e).length}allFilesEditSidePanel(e){let t=e?.element?.messages?.filter?.(n=>n.type!=="file"?!1:!this.itemsForDeleted.find(r=>r===n.id))??[],i=e.tableSide.file;return[...t,...i?[i]:[]]}getFileNameForEdit(e){return e?.content?.fileName||e?.name}isCanFileDownload(e){return e?.content?.url}removeEditSidePanel(e,t,i){if(i?.id){this.itemsForDeleted.push(i?.id);return}e.tableSide.file=void 0}download(e){this.isDownloading=!0,this.cdr.detectChanges(),this.currentUserState.downloadFile(e?.content?.url).pipe(K(this),O(()=>{this.isDownloading=!1,this.cdr.detectChanges()})).subscribe(t=>{if(!t.body)return;let i=document.createElement("a"),n=URL.createObjectURL(t.body);i.href=n,i.download=e?.content?.fileName,i.click(),URL.revokeObjectURL(n)},t=>{this.popupsService.showStatus(w(f({status:"error"},G(t,"error")),{back:"Ok, got it!"}))})}editEvent(e,t,i){let n=w(f({},e),{file:void 0});
1return this.currentUserState.putRequest(`{api}/profile/${t?.profile_id}/pension/${t?.id}`,n).pipe(S(r=>i?.file?this.addFiles(t?.profile_id,r.id,i?.file).pipe(B(()=>r)):g(r)),S(r=>this.itemsForDeleted.length?this.removeFiles(t?.profile_id,r.id,this.itemsForDeleted):g({})))}addFiles(e,t,i){return i?this.currentUserState.uploadFileToPension(e,t,"cubes",i):g({})}convertDataFromApiEdit(e){return this.itemsForDeleted=[],f({},e)}removeFiles(e,t,i){if(!i.length)return this.itemsForDeleted=[],g({});let n=i[0];i.splice(0,1);let r=i;return this.currentUserState.deleteFileToConversation(e,t,n).pipe(S(()=>(this.itemsForDeleted=r,this.removeFiles(e,t,r))))}},d.\u0275fac=function(t){return new(t||d)(m(A),m(Z),m(ie),m(ne),m(Q))},d.\u0275cmp=q({type:d,selectors:[["app-reports-employee-trainings"]],viewQuery:function(t,i){if(t&1&&(_(ue,5),_(fe,5),_(ge,5),_(he,5)),t&2){let n;b(n=v())&&(i.easydocTable=n.first),b(n=v())&&(i.countFiles=n.first),b(n=v())&&(i.exportToggle=n.first),b(n=v())&&(i.exportNewSidePanel=n.first)}},standalone:!1,decls:6,vars:1,consts:[["exportToggle",""],["exportNewSidePanel",""],["easydocTable",""],["DownloadFile",""],[1,"display-content"],[3,"config",4,"ngIf"],[3,"config"],["type","button",1,"btn","btn-sm","btn-light-primary","font-weight-bold",3,"click"],[3,"hidden"],[1,"attached-files"],[1,"form-group","row"],[1,"attached-files-list"],["class","attached-file form-group row",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"attached-file","form-group","row"],[1,"col-lg-6"],[1,"col","d-flex","justify-content-end"],[1,"btn","btn-icon","btn-light-danger",3,"click"],[1,"fas","fa-trash"],["type","button","class","download-file-btn btn btn-light-primary font-weight-bold ml-3",3,"click",4,"ngIf"],["type","button",1,"download-file-btn","btn","btn-light-primary","font-weight-bold","ml-3",3,"click"],[1,"far","fa-arrow-alt-circle-down"]],template:function(t,i){t&1&&(p(0,"div",4),u(1,_e,2,1,"app-easydoc-table",5),a(),u(2,be,4,3,"ng-template",null,0,V)(4,Se,9,6,"ng-template",null,1,V)),t&2&&(s(),c("ngIf",i.config))},dependencies:[$,H,re,ee,J],styles:["[_nghost-%COMP%]{display:contents}.btn-copy-link[_ngcontent-%COMP%]{margin-inline-start:2px}"],changeDetection:0}),d);R=j([z()],R);var Fe=[{path:"",component:R}],de=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=x({type:e}),e.\u0275inj=F({imports:[U.forChild(Fe),U]});let o=e;return o})();var Xe=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=x({type:e}),e.\u0275inj=F({imports:[Y,de,ae,X,oe,te]});let o=e;return o})();export{Xe as PensionReportModule};
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.