1"use strict";(self.webpackChunkportal_meu_rh=self.webpackChunkportal_meu_rh||[]).push([[629],{46629:(xe,P,p)=>{p.r(P),p.d(P,{OccurrenceModule:()=>_e});var m=p(56610),S=p(76356),b=p(86731),u=p(19364),x=p(60564),g=p(73308),L=p(28116),e=p(23279),O=p(91132),H=p(14439),G=p(73123);function A(i,c){if(1&i&&e.nrm(0,"app-card-employee",4),2&i){const a=e.XpG();e.Y8G("image",a.imageAvatar)("name",null==a.employeeData?null:a.employeeData.name)}}var M=function(i){return i[i.Justify=1]="Justify",i[i.History=2]="History",i}(M||{});let w=(()=>{var i;class c{get tabsEnum(){return M}constructor(t,n,o){this.windowUtilService=t,this.router=n,this.teamManagementService=o,this.breadcrumbItems=[],this.currentTab=1,this.back=()=>this.windowUtilService.back()}ngOnInit(){var t=this;return(0,g.A)(function*(){yield t.initializeComponent()})()}navigateToJustify(t=(n=>null===(n=this.employeeData)||void 0===n?void 0:n.id)()){this.currentTab=M.Justify,this.router.navigate(["timesheet/occurrence/justifyException"],{queryParams:{employeeId:t}})}navigateToHistory(t=(n=>null===(n=this.employeeData)||void 0===n?void 0:n.id)()){this.currentTab=M.History,this.router.navigate(["timesheet/occurrence/historyException"],{queryParams:{employeeId:t}})}getEmployeeData(){var t=this;return(0,g.A)(function*(){const{employee:n,image:o}=t.teamManagementService.getEmployeeCard();t.employeeData=n,t.imageAvatar=o})()}initializeComponent(){var t=this;return(0,g.A)(function*(){t.getEmployeeData(),t.employeeData?t.navigateToJustify(t.employeeData.id):t.navigateToJustify()})()}}return(i=c).\u0275fac=function(t){return new(t||i)(e.rXU(O.i),e.rXU(x.Ix),e.rXU(L.A))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-occurrence"]],standalone:!1,decls:11,vars:13,consts:[["backIsVisible","viewIsMobile","pageTitle","l-occurrence",3,"backFunction","breadcrumbItems"],[1,"notif-sub-header"],[3,"image","name",4,"ngIf"],[3,"p-click","p-label","p-active"],[3,"image","name"]],template:function(t,n){1&t&&(e.j41(0,"app-page-header",0),e.bIt("backFunction",function(){return n.back()}),e.k0s(),e.j41(1,"div",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,A,1,2,"app-card-employee",2),e.j41(5,"po-tabs")(6,"po-tab",3),e.nI1(7,"translate"),e.bIt("p-click",function(){return n.navigateToJustify()}),e.k0s(),e.j41(8,"po-tab",3),e.nI1(9,"translate"),e.bIt("p-click",function(){return n.navigateToHistory()}),e.k0s()(),e.nrm(10,"router-outlet")),2&t&&(e.Y8G("breadcrumbItems",n.breadcrumbItems),e.R7$(2),e.JRh(e.bMT(3,7,"l-occurrence-sub-title")),e.R7$(2),e.Y8G("ngIf",n.employeeData),e.R7$(2),e.FS9("p-label",e.bMT(7,9,"l-justify")),e.Y8G("p-active",n.currentTab===n.tabsEnum.Justify),e.R7$(2),e.FS9("p-label",e.bMT(9,11,"im-salaryHistory")),e.Y8G("p-active",n.currentTab===n.tabsEnum.History))},dependencies:[u.OX9,u.pxt,H.K,G.y,m.bT,x.n3,b.D9],styles:["app-card-employee[_ngcontent-%COMP%] .po-container-content{margin-top:20px}"]}),c})();var v=p(12414),_=p(30322),D=p(2105),T=p(45312);const R="timesheet/clockings";let k=(()=>{var i;class c{constructor(t){this.serviceGeneric=t}getExceptionJustification(t,n,o,r,s=T.c.loggedUser){const h="".concat(R,"/exceptionJustification/").concat(s,"/"),d=[];return"string"==typeof r||r instanceof String?this.serviceGeneric.parseParams(d,"typeOccurrence",r):(this.serviceGeneric.parseParams(d,"isHistory",t),this.serviceGeneric.parseParams(d,"dtOccurrence",null==r?void 0:r.dtOccurrence),this.serviceGeneric.parseParams(d,"status",null==r?void 0:r.status),this.serviceGeneric.parseParams(d,"typeOccurrence",null==r?void 0:r.typeOccurrence),this.serviceGeneric.parseParams(d,"page",n),this.serviceGeneric.parseParams(d,"pageSize",o)),this.serviceGeneric.getWithQP(h,d)}setExceptionJustification(t,n=T.c.loggedUser){const o="".concat(R,"/exceptionJustification/include/").concat(n,"/");return this.serviceGeneric.postWithQP(o,t)}}return(i=c).\u0275fac=function(t){return new(t||i)(e.KVO(D.X))},i.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),c})();var F=p(52840),l=p(37928),C=p(37222),j=p(16104),I=p(76340),$=p(61288),z=p(30693),f=p(51454),E=p(753),J=p(63686);const V=["modal"],X=i=>({"disable-textarea":i});function Y(i,c){if(1&i&&(e.j41(0,"div"),e.nrm(1,"po-loading-overlay",9),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Y8G("p-screen-lock",a.screenLock)}}function N(i,c){if(1&i){const a=e.RV6();e.j41(0,"po-button",13),e.nI1(1,"translate"),e.bIt("p-click",function(){e.eBV(a);const n=e.XpG(2);return e.Njj(n.batchJustify())}),e.k0s()}2&i&&e.FS9("p-label",e.bMT(1,1,"l-batch-select"))}function B(i,c){if(1&i&&(e.j41(0,"div",10)(1,"span",11),e.EFF(2),e.nI1(3,"translate"),e.nI1(4,"date"),e.nI1(5,"date"),e.k0s(),e.DNE(6,N,2,3,"po-button",12),e.k0s()),2&i){const a=e.XpG();e.R7$(2),e.E5c(" ",e.bMT(3,4,"l-clocking-period")," ",e.brH(4,6,null==a.exceptions||null==a.exceptions.items[0]?null:a.exceptions.items[0].dtInitPeriod,"dd/MM/yyyy","UTC")," - ",e.brH(5,10,null==a.exceptions||null==a.exceptions.items[0]?null:a.exceptions.items[0].dtEndPeriod,"dd/MM/yyyy","UTC")," "),e.R7$(4),e.Y8G("ngIf",a.showLoadButton)}}function U(i,c){if(1&i){const a=e.RV6();e.qex(0),e.j41(1,"input",22),e.bIt("change",function(){e.eBV(a);const n=e.XpG().$implicit,o=e.XpG(2);return e.Njj(o.toggleSelected(n))}),e.k0s(),e.j41(2,"span")(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",23),e.EFF(7),e.nI1(8,"utcDate"),e.k0s()(),e.j41(9,"span",24)(10,"p"),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"p",23),e.EFF(14),e.k0s()(),e.j41(15,"span")(16,"p"),e.EFF(17),e.nI1(18,"translate"),e.k0s(),e.j41(19,"p",23),e.EFF(20),e.k0s()(),e.j41(21,"span")(22,"p"),e.EFF(23),e.nI1(24,"translate"),e.k0s(),e.j41(25,"p",23),e.EFF(26),e.k0s()(),e.j41(27,"span")(28,"p"),e.EFF(29),e.nI1(30,"translate"),e.k0s(),e.j41(31,"p",23),e.EFF(32),e.k0s()(),e.j41(33,"span",25)(34,"p"),e.EFF(35),e.nI1(36,"translate"),e.k0s(),e.nrm(37,"po-tag",26),e.k0s(),e.bVm()}if(2&i){const a=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.Y8G("checked",t.selectedMap.get(a)),e.R7$(3),e.JRh(e.bMT(5,14,"l-occurence-date")),e.R7$(3),e.JRh(e.i5U(8,16,a.dtOccurrence,"dd/MM/yyyy")),e.R7$(4),e.JRh(e.bMT(12,19,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(18,21,"l-initial-hour")),e.R7$(3),e.JRh(a.hourInit),e.R7$(3),e.JRh(e.bMT(24,23,"l-final-hour")),e.R7$(3),e.JRh(a.hourEnd),e.R7$(3),e.JRh(e.bMT(30,25,"l-total-hours")),e.R7$(3),e.JRh(a.totalHours),e.R7$(3),e.JRh(e.bMT(36,27,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function Q(i,c){if(1&i){const a=e.RV6();e.qex(0),e.j41(1,"div",27)(2,"input",22),e.bIt("change",function(){e.eBV(a);const n=e.XpG().$implicit,o=e.XpG(2);return e.Njj(o.toggleSelected(n))}),e.k0s(),e.j41(3,"span",24)(4,"p"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"p",23),e.EFF(8),e.k0s()(),e.j41(9,"span",25)(10,"p"),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.nrm(13,"po-tag",26),e.k0s()(),e.bVm()}if(2&i){const a=e.XpG().$implicit,t=e.XpG(2);e.R7$(2),e.Y8G("checked",t.selectedMap.get(a)),e.R7$(3),e.JRh(e.bMT(6,6,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(12,8,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function W(i,c){1&i&&e.nrm(0,"po-divider",28)}
1function K(i,c){if(1&i&&(e.j41(0,"div",29)(1,"div",30)(2,"span")(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",23),e.EFF(7),e.nI1(8,"utcDate"),e.k0s()(),e.j41(9,"span")(10,"p"),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"p",23),e.EFF(14),e.k0s()()(),e.j41(15,"div",30)(16,"span")(17,"p"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"p",23),e.EFF(21),e.k0s()(),e.j41(22,"span")(23,"p"),e.EFF(24),e.nI1(25,"translate"),e.k0s(),e.j41(26,"p",23),e.EFF(27),e.k0s()()(),e.nrm(28,"po-divider",31),e.k0s()),2&i){const a=e.XpG().$implicit;e.R7$(4),e.JRh(e.bMT(5,8,"l-occurence-date")),e.R7$(3),e.JRh(e.i5U(8,10,a.dtOccurrence,"dd/MM/yyyy")),e.R7$(4),e.JRh(e.bMT(12,13,"l-total-hours")),e.R7$(3),e.JRh(a.totalHours),e.R7$(4),e.JRh(e.bMT(19,15,"l-initial-hour")),e.R7$(3),e.JRh(a.hourInit),e.R7$(3),e.JRh(e.bMT(25,17,"l-final-hour")),e.R7$(3),e.JRh(a.hourEnd)}}function Z(i,c){if(1&i){const a=e.RV6();e.j41(0,"po-button",32),e.nI1(1,"translate"),e.bIt("p-click",function(){e.eBV(a);const n=e.XpG().$implicit,o=e.XpG(2);return e.Njj(o.editJustification(n,o.text))}),e.k0s()}2&i&&e.FS9("p-label",e.bMT(1,1,"l-edit"))}function q(i,c){if(1&i){const a=e.RV6();e.j41(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.DNE(3,
1U,38,29,"ng-container",2)(4,Q,14,10,"ng-container",2),e.k0s()(),e.j41(5,"div",15),e.DNE(6,W,1,0,"po-divider",16)(7,K,29,19,"div",17),e.j41(8,"po-textarea",18),e.nI1(9,"translate"),e.nI1(10,"translate"),e.bIt("p-change-model",function(n){e.eBV(a);const o=e.XpG(2);return e.Njj(o.setJustification(n))}),e.k0s(),e.j41(11,"div",19),e.DNE(12,Z,2,3,"po-button",20),e.j41(13,"po-button",21),e.nI1(14,"translate"),e.bIt("p-click",function(){const n=e.eBV(a).$implicit,o=e.XpG(2);return e.Njj(o.saveJustification(n))}),e.k0s()()()()}if(2&i){const a=c.$implicit,t=e.XpG(2);e.R7$(3),e.Y8G("ngIf",!t.viewIsMobile),e.R7$(),e.Y8G("ngIf",t.viewIsMobile),e.R7$(2),e.Y8G("ngIf",!t.viewIsMobile),e.R7$(),e.Y8G("ngIf",t.viewIsMobile),e.R7$(),e.FS9("p-label",e.bMT(9,12,"l-absence-type-justify")),e.FS9("p-placeholder",e.bMT(10,14,"l-type-here")),e.Y8G("ngModel",a.justify)("p-disabled",null!==a.justify)("ngClass",e.eq3(18,X,t.showTextarea)),e.R7$(4),e.Y8G("ngIf",null!==a.justify||t.showEditBtn),e.R7$(),e.FS9("p-label",e.bMT(14,16,"l-save-justify")),e.Y8G("p-disabled",t.justificationExceptionHasValue)}}function ee(i,c){if(1&i&&(e.j41(0,"mat-accordion"),e.DNE(1,q,15,20,"mat-expansion-panel",14),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Y8G("ngForOf",a.exceptions.items)}}function te(i,c){if(1&i){const a=e.RV6();e.j41(0,"div",33)(1,"po-button",34),e.nI1(2,"translate"),e.bIt("p-click",function(){e.eBV(a);const n=e.XpG();return e.Njj(n.showMore())}),e.k0s()()}if(2&i){const a=e.XpG();e.R7$(),e.FS9("p-label",e.bMT(2,2,"l-load-more-results")),e.Y8G("p-disabled",a.showMoreDisable)}}function ne(i,c){1&i&&(e.j41(0,"div",35),e.nrm(1,"img",36),e.j41(2,"h1",37),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",38),e.EFF(6),e.nI1(7,"translate"),e.k0s()()),2&i&&(e.R7$(3),e.JRh(e.bMT(4,2,"l-no-results")),e.R7$(3),e.JRh(e.bMT(7,4,"l-no-occurrences")))}function ae(i,c){if(1&i&&(e.j41(0,"div"),e.nrm(1,"po-loading-overlay",7),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Y8G("p-screen-lock",a.screenLock)}}function oe(i,c){if(1&i&&(e.qex(0),e.j41(1,"span")(2,"p"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",11),e.EFF(6),e.nI1(7,"utcDate"),e.k0s()(),e.j41(8,"span",12)(9,"p"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"p",11),e.EFF(13),e.k0s()(),e.j41(14,"span")(15,"p"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.j41(18,"p",11),e.EFF(19),e.k0s()(),e.j41(20,"span")(21,"p"),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.j41(24,"p",11),e.EFF(25),e.k0s()(),e.j41(26,"span")(27,"p"),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"p",11),e.EFF(31),e.k0s()(),e.j41(32,"span",13)(33,"p"),e.EFF(34),e.nI1(35,"translate"),e.k0s(),e.nrm(36,"po-tag",14),e.k0s(),e.bVm()),2&i){const a=e.XpG().$implicit,t=e.XpG();e.R7$(3),e.JRh(e.bMT(4,13,"l-occurence-date")),e.R7$(3),e.JRh(e.i5U(7,15,a.dtOccurrence,"dd/MM/yyyy")),e.R7$(4),e.JRh(e.bMT(11,18,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(17,20,"l-initial-hour")),e.R7$(3),e.JRh(a.hourInit),e.R7$(3),e.JRh(e.bMT(23,22,"l-final-hour")),e.R7$(3),e.JRh(a.hourEnd),e.R7$(3),e.JRh(e.bMT(29,24,"l-total-hours")),e.R7$(3),e.JRh(a.totalHours),e.R7$(3),e.JRh(e.bMT(35,26,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function re(i,c){if(1&i&&(e.qex(0),e.j41(1,"div",15)(2,"span",12)(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",11),e.EFF(7),e.k0s()(),e.j41(8,"span",13)(9,"p"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.nrm(12,"po-tag",14),e.k0s()(),e.bVm()),2&i){const a=e.XpG().$implicit,t=e.XpG();e.R7$(4),e.JRh(e.bMT(5,5,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(11,7,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function se(i,c){1&i&&e.nrm(0,"po-divider",16)}function ce(i,c){if(1&i&&(e.j41(0,"div",17)(1,"div",18)(2,"span")(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",11),e.EFF(7),e.nI1(8,"utcDate"),e.k0s()(),e.j41(9,"span")(10,"p"),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"p",11),e.EFF(14),e.k0s()()(),e.j41(15,"div",18)(16,"span")(17,"p"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"p",11),e.EFF(21),e.k0s()(),e.j41(22,"span")(23,"p"),e.EFF(24),e.nI1(25,"translate"),e.k0s(),e.j41(26,"p",11),e.EFF(27),e.k0s()()(),e.nrm(28,"po-divider",19),e.k0s()),2&i){const a=e.XpG().$implicit;e.R7$(4),e.JRh(e.bMT(5,8,"l-occurence-date")),e.R7$(3),e.JRh(e.i5U(8,10,a.dtOccurrence,"dd/MM/yyyy")),e.R7$(4),e.JRh(e.bMT(12,13,"l-total-hours")),e.R7$(3),e.JRh(a.totalHours),e.R7$(4),e.JRh(e.bMT(19,15,"l-initial-hour")),e.R7$(3),e.JRh(a.hourInit),e.R7$(3),e.JRh(e.bMT(25,17,"l-final-hour")),e.R7$(3),e.JRh(a.hourEnd)}}function le(i,c){if(1&i&&(e.j41(0,"div")(1,"h1",20),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"p",21),e.EFF(5),e.k0s()()),2&i){const a=e.XpG().$implicit;e.R7$(2),e.SpI(" ",e.bMT(3,2,"l-justification")," "),e.R7$(3),e.JRh(a.justify)}}function pe(i,c){if(1&i&&(e.j41(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.DNE(3,oe,37,28,"ng-container",1)(4,re,13,9,"ng-container",1),e.k0s()(),e.j41(5,"div",8),e.DNE(6,se,1,0,"po-divider",9)(7,ce,29,19,"div",10)(8,le,6,4,"div",1),e.k0s()()),2&i){const a=c.$implicit,t=e.XpG();e.R7$(3),e.Y8G("ngIf",!t.viewIsMobile),e.R7$(),e.Y8G("ngIf",t.viewIsMobile),e.R7$(2),e.Y8G("ngIf",!t.viewIsMobile),e.R7$(),e.Y8G("ngIf",t.viewIsMobile),e.R7$(),e.Y8G("ngIf",null!=(null==a?null:a.justify))}}function de(i,c){if(1&i){const a=e.RV6();e.j41(0,"po-button",24),e.nI1(1,"translate"),e.bIt("p-click",function(){e.eBV(a);const n=e.XpG(2);return e.Njj(n.showMore())}),e.k0s()}if(2&i){const a=e.XpG(2);e.FS9("p-label",e.bMT(1,2,"l-load-more-results")),e.Y8G("p-disabled",a.showMoreDisable)}}function ue(i,c){if(1&i&&(e.j41(0,"div",22),e.DNE(1,de,2,4,"po-button",23),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Y8G("ngIf",(null==a.exceptions||null==a.exceptions.items?null:a.exceptions.items.length)>0)}}function he(i,c){1&i&&(e.j41(0,"div",25),e.nrm(1,"img",26),e.j41(2,"h1",27),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",28),e.EFF(6),e.nI1(7,"translate"),e.k0s()()),2&i&&(e.R7$(3),e.JRh(e.bMT(4,2,"l-no-results")),e.R7$(3),e.JRh(e.bMT(7,4,"l-no-occurrences")))}
1const me=[{path:"",component:w,canActivate:[v.r],children:[{path:"justifyException",component:(()=>{var i;class c{constructor(t,n,o,r,s){this.occurrenceService=t,this.appTranslateService=n,this.windowUtilService=o,this.notificationService=r,this.route=s,this.quickSearchTypeOccurrenceMap=[{terms:["hora extra compensado","extra compensado","compensado"],typeOccurrence:l.E.ExtraHourCompensate},{terms:["hora extra feriado","extra feriado","feriado"],typeOccurrence:l.E.ExtraHourHoliday},{terms:["hora extra descanso","extra descanso","descanso"],typeOccurrence:l.E.ExtraHourRest},{terms:["atraso"],typeOccurrence:l.E.Delay},{terms:["falta"],typeOccurrence:l.E.Absence},{terms:["hora extra","extra"],typeOccurrence:l.E.ExtraHour}],this.pageListView=new F.O([]),this.currentFilter=null,this.isLoadingMore=!1,this.destroy$=new j.B,this.translatedTypeAndStatus={statusJustified:"",statusPending:"",Absence:"",Default:"",Delay:"",ExtraHour:"",ExtraHourCompensate:"",ExtraHourHoliday:"",ExtraHourRest:""},this.justificationExceptionHasValue=!0,this.screenLock=!0,this.showMoreDisable=!0,this.filters=[],this.actions=[],this.statusSelect=new Array,this.typeSelect=new Array,this.filterLiterals={},this.customLiterals={disclaimerGroupTitle:"",filterTitle:"",filterCancelLabel:"",filterConfirmLabel:"",quickSearchLabel:"",searchPlaceholder:""},this.loading=!0,this.showLoadButton=!1,this.showTextarea=void 0,this.showEditBtn=void 0,this.hasBatchJustification=!0,this.selectedMap=new Map,this.textAreaField="category",this.buildFormGroup=()=>{this.form=new C.gE({[this.textAreaField]:new C.MJ({disabled:!0})})}}ngOnInit(){var t=this;return(0,g.A)(function*(){t.pageListView.actualPage=1,t.watchEmployeeId(),yield t.initializeComponents(),t.buildFormGroup()})()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeModal(){var t=this;return(0,g.A)(function*(n=!0){t.confirm={action:()=>{t.setBatchJustification()},label:yield t.translateLabel("l-justify"),disabled:n},t.close={action:()=>{t.closeModal()},label:yield t.translateLabel("l-cancel")}}).apply(this,arguments)}closeModal(){this.batchJustificationException=null,this.modal.close()}setBatchJustification(){let t=[];this.exceptions.items.forEach(n=>{this.selectedMap.get(n)&&(n.justify=this.batchJustificationException,t=[...t,n])}),this.occurrenceService.setExceptionJustification(t,this.employeeId).then(n=>{this.modal.close(),this.batchJustificationException=null,this.selectedMap.clear(),this.initializeModal(!0),this.notificationService.showNotification("".concat(n.Message),u._yA.Success)})}initializeAdvancedFilter(){var t=this;return(0,g.A)(function*(){t.filterLiterals={filterConfirmLabel:yield t.translateLabel("l-filtrate"),searchPlaceholder:yield t.translateLabel("l-search-by-occurrence"),disclaimerGroupTitle:yield t.translateLabel("l-filter-applied")},t.statusSelect=[{label:yield t.translateLabel("l-status-pending"),value:1},{label:yield t.translateLabel("l-justified"),value:2},{label:"",value:0},{label:"",value:0},{label:"",value:0}],t.typeSelect=[{label:yield t.translateLabel("l-delay"),value:1},{label:yield t.translateLabel("l-absence"),value:2},{label:yield t.translateLabel("l-extra-hour"),value:3},{label:yield t.translateLabel("l-extra-hour-compensate"),value:4},{label:yield t.translateLabel("l-extra-hour-holiday"),value:5},{label:yield t.translateLabel("l-extra-hour-rest"),value:6}],t.filters=[{property:"dtOccurrence",label:yield t.translateLabel("l-occurence-date"),type:"date",maxValue:(new Date).toISOString().split("T")[0],gridColumns:t.viewIsMobile?12:6},{property:"typeOccurrence",label:yield t.translateLabel("l-occurrence-type"),options:t.typeSelect,gridColumns:t.viewIsMobile?12:6},{property:"status",label:yield t.translateLabel("l-demission-status"),gridColumns:t.viewIsMobile?12:6,options:t.statusSelect}]})()}watchEmployeeId(){var t,n,o;this.employeeId=null!==(t=null===(n=this.route.snapshot)||void 0===n||null===(n=n.queryParamMap)||void 0===n?void 0:n.get("employeeId"))&&void 0!==t?t:void 0,null===(o=this.route.queryParamMap)||void 0===o||o.pipe((0,I.Q)(this.destroy$)).subscribe(r=>{var s;return this.employeeId=null!==(s=r.get("employeeId"))&&void 0!==s?s:void 0})}loadExceptionJustifications(t){const n=t.filter&&Object.keys(t.filter).length>0?(0,_.A)({},t.filter):null;return t.append&&this.isLoadingMore?Promise.resolve():(t.append?this.isLoadingMore=!0:this.loading=!0,this.occurrenceService.getExceptionJustification(!1,t.page,this.pageListView.pageSize,n,this.employeeId).then(o=>{var r,s;this.currentFilter=n,this.pageListView.actualPage=t.page,this.exceptions=t.append?(0,_.A)((0,_.A)({},o),{},{items:[...null!==(r=null===(s=this.exceptions)||void 0===s?void 0:s.items)&&void 0!==r?r:[],...o.items]}):o,this.showMoreDisable=!(null!=o&&o.hasNext)}).finally(()=>{t.append?this.isLoadingMore=!1:this.loading=!1}))}getOccurrenceException(t=!0){return this.pageListView.actualPage=1,this.loadExceptionJustifications({page:1,append:!1,filter:t?null:this.currentFilter})}normalizeAdvancedFilter(t){const n=(0,_.A)({},t);return n.typeOccurrence&&(n.typeOccurrence=this.getTypeOccurrence(n.typeOccurrence)),n.status&&(n.status=1==n.status?l.n.Pending:l.n.Justified),n}normalizeQuickSearchText(t){return(null==t?void 0:t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g," "))||""}resolveQuickSearchTypeOccurrence(t){var n,o;const r=this.normalizeQuickSearchText(t);if(!r||r.length<2)return null;const s=[];
1return this.quickSearchTypeOccurrenceMap.forEach((h,d)=>{h.terms.forEach(y=>{y.startsWith(r)&&s.push({term:y,typeOccurrence:h.typeOccurrence,priority:d})})}),s.sort((h,d)=>h.term.length-d.term.length||h.priority-d.priority),null!==(n=null===(o=s[0])||void 0===o?void 0:o.typeOccurrence)&&void 0!==n?n:null}translatedStatus(){var t=this;return(0,g.A)(function*(){t.translatedTypeAndStatus={statusPending:yield t.translateLabel("l-status-pending"),statusJustified:yield t.translateLabel("l-justified"),Absence:yield t.translateLabel("l-absence"),Default:yield t.translateLabel("l-default"),Delay:yield t.translateLabel("l-delay"),ExtraHour:yield t.translateLabel("l-extra-hour"),ExtraHourCompensate:yield t.translateLabel("l-extra-hour-compensate"),ExtraHourHoliday:yield t.translateLabel("l-extra-hour-holiday"),ExtraHourRest:yield t.translateLabel("l-extra-hour-rest")}})()}getTypeOccurrence(t){switch(t){case 1:return l.E.Delay;case 2:return l.E.Absence;case 3:return l.E.ExtraHour;case 4:return l.E.ExtraHourCompensate;case 5:return l.E.ExtraHourHoliday;case 6:return l.E.ExtraHourRest}}initializeComponents(){var t=this;return(0,g.A)(function*(){t.initializeAdvancedFilter(),t.initializeModal(),t.translatedStatus(),yield t.getOccurrenceException(),t.isWebView()})()}isWebView(){this.viewIsMobile=this.windowUtilService.isMobileDevice()}translateLabel(t){return this.appTranslateService.getI18n(t)}getColorbyType(t){return"pending"===t?"warning-tag":"justified"===t?"info-tag":void 0}enableJustifyBtn(){this.initializeModal(!this.batchJustificationException)}getStatusTranslated(t){return"pending"===t?this.translatedTypeAndStatus.statusPending.toLowerCase():this.translatedTypeAndStatus.statusJustified.toLowerCase()}getOccurrenceTypeTranslated(t){switch(t){case"absence":return this.translatedTypeAndStatus.Absence;case"delay":return this.translatedTypeAndStatus.Delay;case"extraHour":return this.translatedTypeAndStatus.ExtraHour;case"extraHourCompensate":return this.translatedTypeAndStatus.ExtraHourCompensate;case"extraHourHoliday":return this.translatedTypeAndStatus.ExtraHourHoliday;case"extraHourRest":return this.translatedTypeAndStatus.ExtraHourRest;default:return this.translatedTypeAndStatus.Default}}saveJustification(t){var n;this.loading=!0,t.justify=null!==(n=t.justify)&&void 0!==n?n:this.justificationException,this.occurrenceService.setExceptionJustification([t],this.employeeId).then(s=>{const h=s.Message.includes("Erro");if(this.notificationService.showNotification(s.Message,h?u._yA.Error:u._yA.Success),!h)return this.justificationExceptionHasValue=!0,this.justificationException=void 0,this.exceptions=null,this.getOccurrenceException(!1)}).catch(s=>{this.notificationService.showNotification("".concat(s.status," - ").concat(s.statusText),u._yA.Error)}).finally(()=>{this.loading=!1})}setJustification(t){this.showTextarea=!1,this.justificationException=t,this.justificationExceptionHasValue=0===t.length}editJustification(t){t.justify=null,this.showTextarea=!1}batchJustify(){this.modal.open()}showMore(){this.isLoadingMore||this.showMoreDisable||this.loadExceptionJustifications({page:this.pageListView.actualPage+1,append:!0,filter:this.currentFilter})}onChangeDisclaimers(t){const n={};0===t.length?(this.exceptions=null,this.currentFilter=null,this.getOccurrenceException()):(t.forEach(o=>{n[o.property]=o.value}),this.onAdvancedSearch(n))}onQuickSearch(t){this.pageListView.actualPage=1,this.exceptions=null,this.showMoreDisable=!0;const n=this.normalizeQuickSearchText(t),o=this.resolveQuickSearchTypeOccurrence(t),r=o?{typeOccurrence:o}:null;return n?r?void this.loadExceptionJustifications({page:1,append:!1,filter:r}):(this.currentFilter=null,this.exceptions={hasNext:!1,items:[]},void(this.loading=!1)):(this.currentFilter=null,void this.getOccurrenceException())}onAdvancedSearch(t){this.pageListView.actualPage=1,this.exceptions=null,this.showMoreDisable=!0;const n=this.normalizeAdvancedFilter(t);n&&Object.keys(n).length>0?this.loadExceptionJustifications({page:1,append:!1,filter:n}):(this.currentFilter=null,this.getOccurrenceException())}toggleSelected(t){const n=this.selectedMap.get(t);this.selectedMap.set(t,!n),this.showLoadButton=!!Array.from(this.selectedMap.values()).some(o=>!0===o)}}return(i=c).\u0275fac=function(t){return new(t||i)(e.rXU(k),e.rXU($.F),e.rXU(O.i),e.rXU(z.J),e.rXU(x.nX))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-justify-exception"]],viewQuery:function(t,n){if(1&t&&e.GBs(V,5),2&t){let o;e.mGM(o=e.lsd())&&(n.modal=o.first)}},standalone:!1,decls:13,vars:19,consts:[["modal",""],[1,"search-holder"],[4,"ngIf"],["p-title"," ",3,"p-change-disclaimers","p-quick-search","p-advanced-search","p-filters","p-literals"],["class","header-info",4,"ngIf"],["class","po-row load-more",4,"ngIf"],["class","no-items-image",4,"ngIf"],[3,"p-title","p-primary-action","p-secondary-action"],["name","batchTextarea","p-maxlength","200",3,"ngModelChange","p-change-model","p-label","p-placeholder","ngModel"],[3,"p-screen-lock"],[1,"header-info"],[1,"period-header"],["p-kind","primary",3,"p-label","p-click",4,"ngIf"],["p-kind","primary",3,"p-click","p-label"],[4,"ngFor","ngForOf"],[1,"expanded-content"],["class","expansion-div
1ider",4,"ngIf"],["class","mobile-expanded-content",4,"ngIf"],["name","textarea","p-maxlength","200",3,"p-change-model","p-label","p-placeholder","ngModel","p-disabled","ngClass"],[1,"btns"],["p-kind","secondary",3,"p-label","p-click",4,"ngIf"],["p-kind","primary",1,"save-button",3,"p-click","p-label","p-disabled"],["type","checkbox",3,"change","checked"],[1,"data"],[1,"occurrence-type"],[1,"status-box"],[1,"data","status-pill",3,"p-value","ngClass"],[1,"mobile-header"],[1,"expansion-divider"],[1,"mobile-expanded-content"],[1,"mobile-info-row"],[1,"mobile-content-divider"],["p-kind","secondary",3,"p-click","p-label"],[1,"po-row","load-more"],[3,"p-click","p-label","p-disabled"],[1,"no-items-image"],["src","assets/img/push_noNotifications.png","alt",""],[1,"no-results_title"],[1,"no-results_text"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1),e.DNE(1,Y,2,1,"div",2),e.j41(2,"po-page-dynamic-search",3),e.bIt("p-change-disclaimers",function(s){return e.eBV(o),e.Njj(n.onChangeDisclaimers(s))})("p-quick-search",function(s){return e.eBV(o),e.Njj(n.onQuickSearch(s))})("p-advanced-search",function(s){return e.eBV(o),e.Njj(n.onAdvancedSearch(s))}),e.DNE(3,B,7,14,"div",4)(4,ee,2,1,"mat-accordion",2)(5,te,3,4,"div",5)(6,ne,8,6,"div",6),e.k0s()(),e.j41(7,"po-modal",7,0),e.nI1(9,"translate"),e.j41(10,"po-textarea",8),e.nI1(11,"translate"),e.nI1(12,"translate"),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.batchJustificationException,s)||(n.batchJustificationException=s),e.Njj(s)}),e.bIt("p-change-model",function(){return e.eBV(o),e.Njj(n.enableJustifyBtn())}),e.k0s()()}2&t&&(e.R7$(),e.Y8G("ngIf",n.loading),e.R7$(),e.Y8G("p-filters",n.filters)("p-literals",n.filterLiterals),e.R7$(),e.Y8G("ngIf",(null==n.exceptions||null==n.exceptions.items?null:n.exceptions.items.length)>0),e.R7$(),e.Y8G("ngIf",(null==n.exceptions||null==n.exceptions.items?null:n.exceptions.items.length)>0),e.R7$(),e.Y8G("ngIf",(null==n.exceptions||null==n.exceptions.items?null:n.exceptions.items.length)>0),e.R7$(),e.Y8G("ngIf",n.exceptions&&0===(null==n.exceptions.items?null:n.exceptions.items.length)),e.R7$(),e.FS9("p-title",e.bMT(9,13,"l-batch-justify")),e.Y8G("p-primary-action",n.confirm)("p-secondary-action",n.close),e.R7$(3),e.FS9("p-label",e.bMT(11,15,"l-absence-type-justify")),e.FS9("p-placeholder",e.bMT(12,17,"l-type-here")),e.R50("ngModel",n.batchJustificationException))},dependencies:[C.BC,C.vS,u.rmE,u.wDU,u.LH$,u.RZu,u.LgA,u.I3z,m.YU,m.Sq,m.bT,f.BS,f.GK,f.Z2,f.WN,E.z0,b.D9,J.B,m.vh],styles:["div.search-holder[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%] .po-tag{border-radius:24px!important}[_nghost-%COMP%] .mat-expansion-panel-header-title{justify-content:space-between}[_nghost-%COMP%] .mat-expansion-panel-header[_ngcontent-%COMP%]{margin-bottom:24px;margin-top:24px;border-radius:2px}[_nghost-%COMP%] .mat-expansion-panel[_ngcontent-%COMP%]{border-top:10px solid #0d729c;border-right:1px solid #ccc;border-bottom:1px solid #ccc;border-left:1px solid #ccc;padding:0 10px;margin-bottom:24px;border-radius:2px}po-divider.expansion-divider[_ngcontent-%COMP%]{width:98%;display:block;margin-left:auto;margin-right:auto}po-divider.expansion-divider[_ngcontent-%COMP%] .po-divider{border-color:#b6bdbf}input[type=checkbox][_ngcontent-%COMP%]{width:20px;height:20px;align-self:baseline;flex-shrink:0;z-index:1}p.data[_ngcontent-%COMP%]{font-size:.875rem;font-weight:700;line-height:1.5rem;text-align:left}span.occurrence-type[_ngcontent-%COMP%]{width:180px}span.status-box[_ngcontent-%COMP%]{width:81px}p.status-pill[_ngcontent-%COMP%]{padding:3px 0;border-radius:24px}[_nghost-%COMP%] .mat-expansion-indicator:after{height:.625rem;width:.625rem}[_nghost-%COMP%] .mat-expansion-indicator{display:flex!important;align-items:center;justify-content:center}span.period-header[_ngcontent-%COMP%]{font-size:.75rem;font-weight:700;line-height:1rem;text-align:left;color:#9da7a9;display:block}.warning-tag[_ngcontent-%COMP%] div.po-tag-info{background:#fcf6e3;color:#473400}.info-tag[_ngcontent-%COMP%] div.po-tag-info{color:#173782;background-color:#e3e9f7} po-button.save-button{margin-left:8px} .po-modal-footer{text-align:right} .po-modal-footer .po-button-modal-first-action{margin-left:8px}po-page-dynamic-search[_ngcontent-%COMP%] po-datepicker{margin-right:10px}po-page-dynamic-search[_ngcontent-%COMP%] .po-page{margin-left:-15px!important;width:100%}po-page-dynamic-search[_ngcontent-%COMP%] .po-page-list-filter-wrapper{float:left;margin:0}@media screen and (max-width: 480px){po-page-dynamic-search[_ngcontent-%COMP%] .po-page-list-filter-wrapper{margin:0}[_nghost-%COMP%] .mat-expansion-panel-header-title{display:flex;width:100%;align-items:flex-start}po-page-dynamic-search[_ngcontent-%COMP%] .po-page{width:108%}[_nghost-%COMP%] .mat-expansion-panel-header[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] .mat-expansion-indicator{position:absolute;top:12px;right:12px;margin:0!important}[_nghost-%COMP%] po-page-dynamic-search[_ngcontent-%COMP%] po-datepicker{margin-right:0}[_nghost-%COMP%] .po-page-list-actions{display:none}.mobile-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;width:calc(100% - 30px)}.mobile-header[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin-top:8px;flex-shrink:0}.mobile-header[_ngcontent-%COMP%] .occurrence-type[_ngcontent-%COMP%]{flex:1;min-width:0}.mobile-header[_ngcontent-%COMP%] .occurrence-type[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px;font-size:12px}.mobile-header[_ngcontent-%COMP%] .occurrence-type[_ngcontent-%COMP%] p.data[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.mobile-header[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.mobile-header[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px;font-size:12px}.mobile-header[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%] p.data[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.expanded-content[_ngcontent-%COMP%]{padding:0 16px}.mobile-expanded-content[_ngcontent-%COMP%]{margin-top:16px}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:16px}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px;font-size:12px;color:#666}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%] p.data[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:#333}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-content-divider[_ngcontent-%COMP%]{margin:16px 0}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-content-divider[_ngcontent-%COMP%] .po-divider{border-color:#b6bdbf}}po-page-dynamic-search[_ngcontent-%COMP%] .po-page-filter-content{width:390px}po-page-dynamic-search[_ngcontent-%COMP%] .po-disclaimer-group{dis
1play:flow-root}po-page-dynamic-search[_ngcontent-%COMP%] .po-page-header-container{display:block}.top-layer[_ngcontent-%COMP%], .mid-layer[_ngcontent-%COMP%], .bottom-layer[_ngcontent-%COMP%]{display:grid}.top-layer[_ngcontent-%COMP%] .occurrence-type[_ngcontent-%COMP%]{width:-webkit-max-content;width:max-content;margin:0 8px}.top-layer[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%]{width:95px;margin:0 auto}.mid-layer[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.bottom-layer[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:90%}.top-layer[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mid-layer[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .bottom-layer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px;margin:2px 0}.top-layer[_ngcontent-%COMP%]{grid-template-columns:-webkit-max-content 1fr 1fr;grid-template-columns:max-content 1fr 1fr}.mid-layer[_ngcontent-%COMP%], .bottom-layer[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.disable-textarea[_ngcontent-%COMP%] .po-textarea:disabled{background-color:#fff;color:#000;border:none!important;box-shadow:none!important;padding:0}po-textarea[_ngcontent-%COMP%] .po-textarea:disabled{background-color:#fafafa;color:#4a5c60;border:none!important;box-shadow:none!important;padding:0!important}.btns[_ngcontent-%COMP%]{float:right}div.header-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:24px}.no-items-image[_ngcontent-%COMP%]{max-width:453px;height:383px;margin:0 auto}.no-items-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.no-items-image[_ngcontent-%COMP%] h1.no-results_title[_ngcontent-%COMP%]{font-size:34px;font-weight:200;line-height:48px;text-align:center}.no-items-image[_ngcontent-%COMP%] p.no-results_text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24px;text-align:center}.load-more[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}@media screen and (max-width: 480px){.load-more[_ngcontent-%COMP%]{margin-bottom:52px}}"]}),c})(),canActivate:[v.r]},{path:"historyException",component:(()=>{var i;class c{constructor(t,n,o,r){this.occurrenceService=t,this.appTranslateService=n,this.windowUtilService=o,this.route=r,this.quickSearchTypeOccurrenceMap=[{terms:["hora extra compensado","extra compensado","compensado"],typeOccurrence:l.E.ExtraHourCompensate},{terms:["hora extra feriado","extra feriado","feriado"],typeOccurrence:l.E.ExtraHourHoliday},{terms:["hora extra descanso","extra descanso","descanso"],typeOccurrence:l.E.ExtraHourRest},{terms:["atraso"],typeOccurrence:l.E.Delay},{terms:["falta"],typeOccurrence:l.E.Absence},{terms:["hora extra","extra"],typeOccurrence:l.E.ExtraHour}],this.translatedTypeAndStatus={statusJustified:"",statusPending:"",Absence:"",Default:"",Delay:"",ExtraHour:"",ExtraHourCompensate:"",ExtraHourHoliday:"",ExtraHourRest:""},this.pageListView=new F.O([]),this.currentFilter=null,this.destroy$=new j.B,this.screenLock=!0,this.showMoreDisable=!0,this.filters=[],this.actions=[],this.statusSelect=new Array,this.typeSelect=new Array,this.filterLiterals={},this.customLiterals={disclaimerGroupTitle:"",filterTitle:"",filterCancelLabel:"",filterConfirmLabel:"",quickSearchLabel:"",searchPlaceholder:""},this.loading=!0,this.showLoadButton=!1}ngOnInit(){var t=this;return(0,g.A)(function*(){t.pageListView.actualPage=1,t.watchEmployeeId(),t.initializeComponents()})()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeComponents(){var t=this;return(0,g.A)(function*(){t.initializeAdvancedFilter(),t.translatedStatus(),yield t.getOccurrenceException(),t.isWebView()})()}isWebView(){this.viewIsMobile=this.windowUtilService.isMobileDevice()}initializeAdvancedFilter(){var t=this;return(0,g.A)(function*(){t.filterLiterals={filterConfirmLabel:yield t.translateLabel("l-filtrate"),searchPlaceholder:yield t.translateLabel("l-search-by-occurrence"),disclaimerGroupTitle:yield t.translateLabel("l-filter-applied")},t.statusSelect=[{label:yield t.translateLabel("l-status-pending"),value:1},{label:yield t.translateLabel("l-justified"),value:2},{label:"",value:0},{label:"",value:0},{label:"",value:0}],t.typeSelect=[{label:yield t.translateLabel("l-delay"),value:1},{label:yield t.translateLabel("l-absence"),value:2},{label:yield t.translateLabel("l-extra-hour"),value:3},{label:yield t.translateLabel("l-extra-hour-compensate"),value:4},{label:yield t.translateLabel("l-extra-hour-holiday"),value:5},{label:yield t.translateLabel("l-extra-hour-rest"),value:6}],t.filters=[{property:"dtOccurrence",label:yield t.translateLabel("l-occurence-date"),type:"date",maxValue:(new Date).toISOString().split("T")[0],gridColumns:t.viewIsMobile?12:6},{property:"typeOccurrence",label:yield t.translateLabel("l-occurrence-type"),options:t.typeSelect,gridColumns:t.viewIsMobile?12:6},{property:"status",label:yield t.translateLabel("l-demission-status"),gridColumns:t.viewIsMobile?12:6,options:t.statusSelect}]})()}translateLabel(t){return this.appTranslateService.getI18n(t)}watchEmployeeId(){var t,n,o;
1this.employeeId=null!==(t=null===(n=this.route.snapshot)||void 0===n||null===(n=n.queryParamMap)||void 0===n?void 0:n.get("employeeId"))&&void 0!==t?t:void 0,null===(o=this.route.queryParamMap)||void 0===o||o.pipe((0,I.Q)(this.destroy$)).subscribe(r=>{var s;return this.employeeId=null!==(s=r.get("employeeId"))&&void 0!==s?s:void 0})}loadHistoryExceptions(t,n=!1){return this.occurrenceService.getExceptionJustification(!0,t,this.pageListView.pageSize,this.currentFilter,this.employeeId).then(o=>{var r,s;this.pageListView.actualPage=t,this.exceptions=n?(0,_.A)((0,_.A)({},o),{},{items:[...null!==(r=null===(s=this.exceptions)||void 0===s?void 0:s.items)&&void 0!==r?r:[],...o.items]}):o,this.showMoreDisable=!(null!=o&&o.hasNext),this.showLoadButton=!this.showMoreDisable}).finally(()=>{this.loading=!1})}normalizeQuickSearchText(t){return(null==t?void 0:t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g," "))||""}resolveQuickSearchTypeOccurrence(t){var n,o;const r=this.normalizeQuickSearchText(t);if(!r||r.length<2)return null;const s=[];return this.quickSearchTypeOccurrenceMap.forEach((h,d)=>{h.terms.forEach(y=>{y.startsWith(r)&&s.push({term:y,typeOccurrence:h.typeOccurrence,priority:d})})}),s.sort((h,d)=>h.term.length-d.term.length||h.priority-d.priority),null!==(n=null===(o=s[0])||void 0===o?void 0:o.typeOccurrence)&&void 0!==n?n:null}getOccurrenceException(){return this.loadHistoryExceptions(this.pageListView.actualPage)}getColorbyType(t){return"pending"===t?"warning-tag":"justified"===t?"info-tag":void 0}translatedStatus(){var t=this;return(0,g.A)(function*(){t.translatedTypeAndStatus={statusPending:yield t.translateLabel("l-status-pending"),statusJustified:yield t.translateLabel("l-justified"),Absence:yield t.translateLabel("l-absence"),Default:yield t.translateLabel("l-default"),Delay:yield t.translateLabel("l-delay"),ExtraHour:yield t.translateLabel("l-extra-hour"),ExtraHourCompensate:yield t.translateLabel("l-extra-hour-compensate"),ExtraHourHoliday:yield t.translateLabel("l-extra-hour-holiday"),ExtraHourRest:yield t.translateLabel("l-extra-hour-rest")}})()}getStatusTranslated(t){return"pending"===t?this.translatedTypeAndStatus.statusPending:this.translatedTypeAndStatus.statusJustified}getOccurrenceTypeTranslated(t){switch(t){case"absence":return this.translatedTypeAndStatus.Absence;case"delay":return this.translatedTypeAndStatus.Delay;case"extraHour":return this.translatedTypeAndStatus.ExtraHour;case"extraHourCompensate":return this.translatedTypeAndStatus.ExtraHourCompensate;case"extraHourHoliday":return this.translatedTypeAndStatus.ExtraHourHoliday;case"extraHourRest":return this.translatedTypeAndStatus.ExtraHourRest;default:return this.translatedTypeAndStatus.Default}}showMore(){this.loadHistoryExceptions(this.pageListView.getNextPage(),!0)}onChangeDisclaimers(t){const n={};this.loading=!0,0===t.length?(this.exceptions=null,this.currentFilter=null,this.pageListView.actualPage=1,this.getOccurrenceException()):(t.forEach(o=>{n[o.property]=o.value}),this.onAdvancedSearch(n),this.loading=!1)}onQuickSearch(t){this.pageListView.actualPage=1,this.exceptions=null;const n=this.normalizeQuickSearchText(t),o=this.resolveQuickSearchTypeOccurrence(t);return this.currentFilter=o?{typeOccurrence:o}:null,n?this.currentFilter?(this.loading=!0,void this.loadHistoryExceptions(1)):(this.exceptions={hasNext:!1,items:[]},this.showMoreDisable=!0,void(this.loading=!1)):(this.loading=!0,void this.getOccurrenceException())}onAdvancedSearch(t){let n;this.loading=!0,this.pageListView.actualPage=1;const o=(0,_.A)({},t);o.typeOccurrence&&(n=this.getTypeOccurrence(o.typeOccurrence),o.typeOccurrence=n),o.status&&(o.status=1==o.status?l.n.Pending:l.n.Justified),o&&(this.currentFilter=Object.keys(o).length>0?o:null,this.occurrenceService.getExceptionJustification(!0,this.pageListView.actualPage,this.pageListView.pageSize,this.currentFilter,this.employeeId).then(r=>{this.exceptions=null,this.exceptions=r,this.showMoreDisable=!(null!=r&&r.hasNext),this.loading=!1}))}getTypeOccurrence(t){switch(t){case 1:return l.E.Delay;case 2:return l.E.Absence;case 3:return l.E.ExtraHour;case 4:return l.E.ExtraHourCompensate;case 5:return l.E.ExtraHourHoliday;case 6:return l.E.ExtraHourRest}}}return(i=c).\u0275fac=function(t){return new(t||i)(e.rXU(k),e.rXU($.F),e.rXU(O.i),e.rXU(x.nX))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-history-exception"]],standalone:!1,decls:7,vars:6,consts:[[1,"search-holder"],[4,"ngIf"],["p-title"," ",3,"p-change-disclaimers","p-quick-search","p-advanced-search","p-filters","p-literals"],[1,"example-headers-align"],[4,"ngFor","ngForOf"],["class","po-row",4,"ngIf"],["class","no-items-image",4,"ngIf"],[3,"p-screen-lock"],[1,"expanded-content"],["class","expansion-div
1ider",4,"ngIf"],["class","mobile-expanded-content",4,"ngIf"],[1,"data"],[1,"ocurrence-type"],[1,"status-box"],[1,"data","status-pill",3,"p-value","ngClass"],[1,"mobile-header"],[1,"expansion-divider"],[1,"mobile-expanded-content"],[1,"mobile-info-row"],[1,"mobile-content-divider"],[1,"justify"],[1,"justify-text"],[1,"po-row"],["class","po-offset-xl-4 po-offset-lg-4 po-offset-md-3 po-lg-4 po-md-6 po-sm-12 po-pb-5",3,"p-label","p-disabled","p-click",4,"ngIf"],[1,"po-offset-xl-4","po-offset-lg-4","po-offset-md-3","po-lg-4","po-md-6","po-sm-12","po-pb-5",3,"p-click","p-label","p-disabled"],[1,"no-items-image"],["src","assets/img/push_noNotifications.png","alt",""],[1,"no-results_title"],[1,"no-results_text"]],template:function(t,n){1&t&&(e.j41(0,"div",0),e.DNE(1,ae,2,1,"div",1),e.j41(2,"po-page-dynamic-search",2),e.bIt("p-change-disclaimers",function(r){return n.onChangeDisclaimers(r)})("p-quick-search",function(r){return n.onQuickSearch(r)})("p-advanced-search",function(r){return n.onAdvancedSearch(r)}),e.j41(3,"mat-accordion",3),e.DNE(4,pe,9,5,"mat-expansion-panel",4),e.k0s(),e.DNE(5,ue,2,1,"div",5)(6,he,8,6,"div",6),e.k0s()()),2&t&&(e.R7$(),e.Y8G("ngIf",n.loading),e.R7$(),e.Y8G("p-filters",n.filters)("p-literals",n.filterLiterals),e.R7$(2),e.Y8G("ngForOf",n.exceptions.items),e.R7$(),e.Y8G("ngIf",n.showLoadButton),e.R7$(),e.Y8G("ngIf",0===n.exceptions.items.length))},dependencies:[u.rmE,u.wDU,u.RZu,u.LgA,m.YU,m.Sq,m.bT,f.BS,f.GK,f.Z2,f.WN,E.z0,b.D9,J.B],styles:["div.search-holder[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%] .po-tag{border-radius:24px!important}[_nghost-%COMP%] .mat-expansion-panel-header-title{justify-content:space-between}[_nghost-%COMP%] .mat-expansion-panel-header[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:24px;border-radius:2px}[_nghost-%COMP%] .mat-expansion-panel[_ngcontent-%COMP%]{border-top:10px solid #0d729c;border-right:1px solid #ccc;border-bottom:1px solid #ccc;border-left:1px solid #ccc;margin-bottom:8px}input[type=checkbox][_ngcontent-%COMP%]{width:20px;height:20px}p.data[_ngcontent-%COMP%]{font-size:.875rem;font-weight:700;line-height:1.5rem;text-align:left}span.ocurrence-type[_ngcontent-%COMP%]{width:180px}span.status-box[_ngcontent-%COMP%]{width:81px}p.status-pill[_ngcontent-%COMP%]{padding:3px 0;border-radius:24px}[_nghost-%COMP%] .mat-expansion-indicator:after{height:.625rem;width:.625rem}[_nghost-%COMP%] .mat-expansion-indicator{display:flex!important;align-items:center;justify-content:center}span.period-header[_ngcontent-%COMP%]{font-size:.75rem;font-weight:700;line-height:1rem;text-align:left;color:#9da7a9;display:block;margin-bottom:24px}.warning-tag[_ngcontent-%COMP%] div.po-tag-info{background:#fcf6e3;color:#473400}.info-tag[_ngcontent-%COMP%] div.po-tag-info{color:#173782;background-color:#e3e9f7}.save-button[_ngcontent-%COMP%] .po-button{float:right;color:#fff}.save-button[_ngcontent-%COMP%] .po-button:disabled{background-color:#b2b2b2} .po-modal-footer{text-align:right} .po-modal-footer .po-button-modal-first-action{margin-left:8px}po-page-dynamic-search[_ngcontent-%COMP%] po-datepicker{margin-right:10px}po-page-dynamic-search[_ngcontent-%COMP%] .po-page{margin-left:-15px!important;width:100%}po-page-dynamic-search[_ngcontent-%COMP%] .po-page-list-filter-wrapper{float:left;margin:24px 0}@media screen and (max-width: 480px){po-page-dynamic-search[_ngcontent-%COMP%] .po-page-list-filter-wrapper{margin:0}[_nghost-%COMP%] .mat-expansion-panel-header-title{display:flex;width:100%;align-items:flex-start}po-page-dynamic-search[_ngcontent-%COMP%] .po-page{width:108%}[_nghost-%COMP%] .mat-expansion-panel-header[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] .mat-expansion-indicator{position:absolute;top:12px;right:12px;margin:0!important}[_nghost-%COMP%] po-page-dynamic-search[_ngcontent-%COMP%] po-datepicker{margin-right:0}[_nghost-%COMP%] .po-page-list-actions{display:none}po-page-dynamic-search[_ngcontent-%COMP%] .po-page-filter-content{width:100%!important;max-width:none!important}.mobile-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;width:calc(100% - 30px)}.mobile-header[_ngcontent-%COMP%] .ocurrence-type[_ngcontent-%COMP%]{flex:1;min-width:0}.mobile-header[_ngcontent-%COMP%] .ocurrence-type[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px;font-size:12px}.mobile-header[_ngcontent-%COMP%] .ocurrence-type[_ngcontent-%COMP%] p.data[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.mobile-header[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.mobile-header[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px;font-size:12px}.mobile-header[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%] p.data[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.expanded-content[_ngcontent-%COMP%]{padding:0 16px}.mobile-expanded-content[_ngcontent-%COMP%]{margin-top:16px}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:16px}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px;font-size:12px;color:#666}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-info-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%] p.data[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:#333}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-content-divider[_ngcontent-%COMP%]{margin:16px 0}.mobile-expanded-content[_ngcontent-%COMP%] .mobile-content-divider[_ngcontent-%COMP%] .po-divider{border-color:#b6bdbf}}po-page-dynamic-search[_ngcontent-%COMP%] .po-page-filter-content{width:390px}po-page-dynamic-search[_ngcontent-%COMP%] .po-disclaimer-group{dis
1play:flow-root}po-divider.mobile-divider[_ngcontent-%COMP%]{width:98%;display:block;margin-left:auto;margin-right:auto}po-divider.mobile-divider[_ngcontent-%COMP%] .po-divider{border-color:#b6bdbf;padding:0}.top-layer[_ngcontent-%COMP%] .ocurrence-type[_ngcontent-%COMP%]{width:130px}.top-layer[_ngcontent-%COMP%] .status-box[_ngcontent-%COMP%]{width:95px}.top-layer[_ngcontent-%COMP%], .mid-layer[_ngcontent-%COMP%], .bottom-layer[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.bottom-layer[_ngcontent-%COMP%]{width:90%}.top-layer[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mid-layer[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .bottom-layer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px}.no-items-image[_ngcontent-%COMP%]{width:453px;height:383px;margin:0 auto}.no-items-image[_ngcontent-%COMP%] h1.no-results_title[_ngcontent-%COMP%]{font-size:34px;font-weight:200;line-height:48px;text-align:center}.no-items-image[_ngcontent-%COMP%] p.no-results_text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24px;text-align:center}po-divider.expansion-divider[_ngcontent-%COMP%]{width:98%;display:block;margin-left:auto;margin-right:auto}po-divider.expansion-divider[_ngcontent-%COMP%] .po-divider{border-color:#b6bdbf}h1.justify[_ngcontent-%COMP%], p.justify-text[_ngcontent-%COMP%]{font-size:16px;font-weight:700;line-height:24px;text-align:left;color:#4a5c60;margin-left:12px}"]}),c})(),canActivate:[v.r]},{path:":employeeId",component:w,canActivate:[v.r]}]}];let fe=(()=>{var i;class c{}return(i=c).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[x.iI.forChild(me),x.iI]}),c})(),_e=(()=>{var i;class c{}return(i=c).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[S.h,b.h,u.Kgc,m.MD,fe,f.MY,E.S]}),c})()}}]);
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.