1"use strict";(self.webpackChunkportal_meu_rh=self.webpackChunkportal_meu_rh||[]).push([[3060],{13060(Ce,L,c){c.d(L,{OccurrenceModule:()=>be});var b=c(2002),A=c(11601),C=c(86731),h=c(45888),T=c(50502),m=c(73308),G=c(28116),e=c(56622),E=c(91132),M=c(41323),V=c(14439),z=c(73123);function D(i,s){if(1&i&&e.nrm(0,"app-card-employee",2),2&i){const a=e.XpG();e.Y8G("image",a.imageAvatar)("name",null==a.employeeData?null:a.employeeData.name)}}var v=function(i){return i[i.Justify=1]="Justify",i[i.History=2]="History",i}(v||{});let R=(()=>{var i;class s{get tabsEnum(){return v}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,m.A)(function*(){yield t.initializeComponent()})()}navigateToJustify(t=(n=>null===(n=this.employeeData)||void 0===n?void 0:n.id)()){this.currentTab=v.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=v.History,this.router.navigate(["timesheet/occurrence/historyException"],{queryParams:{employeeId:t}})}getEmployeeData(){var t=this;return(0,m.A)(function*(){const{employee:n,image:o}=t.teamManagementService.getEmployeeCard();t.employeeData=n,t.imageAvatar=o})()}initializeComponent(){var t=this;return(0,m.A)(function*(){t.getEmployeeData(),t.employeeData?t.navigateToJustify(t.employeeData.id):t.navigateToJustify()})()}}return(i=s).\u0275fac=function(t){return new(t||i)(e.rXU(E.i),e.rXU(M.Ix),e.rXU(G.A))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-occurrence"]],standalone:!1,decls:11,vars:15,consts:[["backIsVisible","viewIsMobile","pageTitle","l-occurrence",3,"backFunction","breadcrumbItems"],[1,"notif-sub-header"],[3,"image","name"],[3,"p-click","p-label","p-active"]],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.nVh(4,D,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,9,"l-occurrence-sub-title")),e.R7$(2),e.vxM(n.employeeData?4:-1),e.R7$(2),e.Y8G("p-label",e.mNQ(e.bMT(7,11,"l-justify")))("p-active",n.currentTab===n.tabsEnum.Justify),e.R7$(2),e.Y8G("p-label",e.mNQ(e.bMT(9,13,"im-salaryHistory")))("p-active",n.currentTab===n.tabsEnum.History))},dependencies:[h.OX9,h.pxt,V.K,z.y,M.n3,C.D9],styles:["app-card-employee[_ngcontent-%COMP%] .po-container-content{margin-top:20px}"]}),s})();var O=c(12414),x=c(30322),X=c(2105),k=c(45312),d=c(46296);const F="timesheet/clockings";let j=(()=>{var i;class s{constructor(t){this.serviceGeneric=t}getExceptionJustification(t,n,o,r,l=k.c.loggedUser){const g="".concat(F,"/exceptionJustification/").concat(l,"/"),u=[];return"string"==typeof r||r instanceof String?this.serviceGeneric.parseParams(u,"typeOccurrence",r):(this.serviceGeneric.parseParams(u,"isHistory",t),this.serviceGeneric.parseParams(u,"dtOccurrence",null==r?void 0:r.dtOccurrence),this.serviceGeneric.parseParams(u,"status",null==r?void 0:r.status),this.serviceGeneric.parseParams(u,"typeOccurrence",null==r?void 0:r.typeOccurrence),this.serviceGeneric.parseParams(u,"page",n),this.serviceGeneric.parseParams(u,"pageSize",o)),this.serviceGeneric.getWithQP(g,u)}setExceptionJustification(t,n=k.c.loggedUser){const o="".concat(F,"/exceptionJustification/include/").concat(n,"/");return this.serviceGeneric.postWithQP(o,t)}}return(i=s).\u0275fac=function(t){return new(t||i)(d.KVO(X.X))},i.\u0275prov=d.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),s})();var $=c(52840),_=function(i){return i.Justified="justified",i.Pending="pending",i}(_||{}),p=function(i){return i.Absence="absence",i.Default="default",i.Delay="delay",i.ExtraHour="extraHour",i.ExtraHourCompensate="extraHourCompensate",i.ExtraHourHoliday="extraHourHoliday",i.ExtraHourRest="extraHourRest",i}(p||{}),P=c(37222),J=c(16104),I=c(76340),S=c(61288),N=c(30693),f=c(92223),w=c(753),H=c(63686);const U=["modal"],B=i=>({"disable-textarea":i});function Q(i,s){if(1&i&&(e.j41(0,"div"),e.nrm(1,"po-loading-overlay",8),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Y8G("p-screen-lock",a.screenLock)}}
1function Y(i,s){if(1&i){const a=e.RV6();e.j41(0,"po-button",11),e.nI1(1,"translate"),e.bIt("p-click",function(){d.eBV(a);const n=e.XpG(2);return d.Njj(n.batchJustify())}),e.k0s()}2&i&&e.Y8G("p-label",e.mNQ(e.bMT(1,2,"l-batch-select")))}function W(i,s){if(1&i&&(e.j41(0,"div",3)(1,"span",9),e.EFF(2),e.nI1(3,"translate"),e.nI1(4,"date"),e.nI1(5,"date"),e.k0s(),e.nVh(6,Y,2,4,"po-button",10),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.vxM(a.showLoadButton?6:-1)}}function K(i,s){if(1&i){const a=e.RV6();e.j41(0,"input",20),e.bIt("change",function(){d.eBV(a);const n=e.XpG().$implicit,o=e.XpG(2);return d.Njj(o.toggleSelected(n))}),e.k0s(),e.j41(1,"span")(2,"p"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",21),e.EFF(6),e.nI1(7,"utcDate"),e.k0s()(),e.j41(8,"span",22)(9,"p"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"p",21),e.EFF(13),e.k0s()(),e.j41(14,"span")(15,"p"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.j41(18,"p",21),e.EFF(19),e.k0s()(),e.j41(20,"span")(21,"p"),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.j41(24,"p",21),e.EFF(25),e.k0s()(),e.j41(26,"span")(27,"p"),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"p",21),e.EFF(31),e.k0s()(),e.j41(32,"span",23)(33,"p"),e.EFF(34),e.nI1(35,"translate"),e.k0s(),e.nrm(36,"po-tag",24),e.k0s()}if(2&i){const a=e.XpG().$implicit,t=e.XpG(2);e.Y8G("checked",t.selectedMap.get(a)),e.R7$(3),e.JRh(e.bMT(4,14,"l-occurence-date")),e.R7$(3),e.JRh(e.i5U(7,16,a.dtOccurrence,"dd/MM/yyyy")),e.R7$(4),e.JRh(e.bMT(11,19,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(17,21,"l-initial-hour")),e.R7$(3),e.JRh(a.hourInit),e.R7$(3),e.JRh(e.bMT(23,23,"l-final-hour")),e.R7$(3),e.JRh(a.hourEnd),e.R7$(3),e.JRh(e.bMT(29,25,"l-total-hours")),e.R7$(3),e.JRh(a.totalHours),e.R7$(3),e.JRh(e.bMT(35,27,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function Z(i,s){if(1&i){const a=e.RV6();e.j41(0,"div",12)(1,"input",20),e.bIt("change",function(){d.eBV(a);const n=e.XpG().$implicit,o=e.XpG(2);return d.Njj(o.toggleSelected(n))}),e.k0s(),e.j41(2,"span",22)(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",21),e.EFF(7),e.k0s()(),e.j41(8,"span",23)(9,"p"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.nrm(12,"po-tag",24),e.k0s()()}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,6,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(11,8,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function q(i,s){1&i&&e.nrm(0,"po-divider",14)}function ee(i,s){if(1&i&&(e.j41(0,"div",15)(1,"div",25)(2,"span")(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",21),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",21),e.EFF(14),e.k0s()()(),e.j41(15,"div",25)(16,"span")(17,"p"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"p",21),e.EFF(21),e.k0s()(),e.j41(22,"span")(23,"p"),e.EFF(24),e.nI1(25,"translate"),e.k0s(),e.j41(26,"p",21),e.EFF(27),e.k0s()()(),e.nrm(28,"po-divider",26),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 te(i,s){if(1&i){const a=e.RV6();e.j41(0,"po-button",27),e.nI1(1,"translate"),e.bIt("p-click",function(){d.eBV(a);const n=e.XpG().$implicit,o=e.XpG(2);return d.Njj(o.editJustification(n,o.text))}),e.k0s()}2&i&&e.Y8G("p-label",e.mNQ(e.bMT(1,2,"l-edit")))}
1function ne(i,s){if(1&i){const a=e.RV6();e.j41(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.nVh(3,K,37,29),e.nVh(4,Z,13,10,"div",12),e.k0s()(),e.j41(5,"div",13),e.nVh(6,q,1,0,"po-divider",14),e.nVh(7,ee,29,19,"div",15),e.j41(8,"po-textarea",16),e.nI1(9,"translate"),e.nI1(10,"translate"),e.bIt("p-change-model",function(n){d.eBV(a);const o=e.XpG(2);return d.Njj(o.setJustification(n))}),e.k0s(),e.j41(11,"div",17),e.nVh(12,te,2,4,"po-button",18),e.j41(13,"po-button",19),e.nI1(14,"translate"),e.bIt("p-click",function(){const n=d.eBV(a).$implicit,o=e.XpG(2);return d.Njj(o.saveJustification(n))}),e.k0s()()()()}if(2&i){const a=s.$implicit,t=e.XpG(2);e.R7$(3),e.vxM(t.viewIsMobile?-1:3),e.R7$(),e.vxM(t.viewIsMobile?4:-1),e.R7$(2),e.vxM(t.viewIsMobile?-1:6),e.R7$(),e.vxM(t.viewIsMobile?7:-1),e.R7$(),e.Y8G("p-label",e.mNQ(e.bMT(9,15,"l-absence-type-justify")))("p-placeholder",e.mNQ(e.bMT(10,17,"l-type-here")))("ngModel",a.justify)("p-disabled",null!==a.justify)("ngClass",e.eq3(21,B,t.showTextarea)),e.R7$(4),e.vxM(null!==a.justify||t.showEditBtn?12:-1),e.R7$(),e.Y8G("p-label",e.mNQ(e.bMT(14,19,"l-save-justify")))("p-disabled",t.justificationExceptionHasValue)}}function ie(i,s){if(1&i&&(e.j41(0,"mat-accordion"),e.Z7z(1,ne,15,23,"mat-expansion-panel",null,e.fX1),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Dyx(a.exceptions.items)}}function ae(i,s){if(1&i){const a=e.RV6();e.j41(0,"div",4)(1,"po-button",28),e.nI1(2,"translate"),e.bIt("p-click",function(){d.eBV(a);const n=e.XpG();return d.Njj(n.showMore())}),e.k0s()()}if(2&i){const a=e.XpG();e.R7$(),e.Y8G("p-label",e.mNQ(e.bMT(2,3,"l-load-more-results")))("p-disabled",a.showMoreDisable)}}function oe(i,s){1&i&&(e.j41(0,"div",5),e.nrm(1,"img",29),e.j41(2,"h1",30),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",31),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")))}let re=(()=>{var i;class s{constructor(t,n,o,r,l){this.occurrenceService=t,this.appTranslateService=n,this.windowUtilService=o,this.notificationService=r,this.route=l,this.quickSearchTypeOccurrenceMap=[{terms:["hora extra compensado","extra compensado","compensado"],typeOccurrence:p.ExtraHourCompensate},{terms:["hora extra feriado","extra feriado","feriado"],typeOccurrence:p.ExtraHourHoliday},{terms:["hora extra descanso","extra descanso","descanso"],typeOccurrence:p.ExtraHourRest},{terms:["atraso"],typeOccurrence:p.Delay},{terms:["falta"],typeOccurrence:p.Absence},{terms:["hora extra","extra"],typeOccurrence:p.ExtraHour}],this.pageListView=new $.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 P.gE({[this.textAreaField]:new P.MJ({disabled:!0})})}}ngOnInit(){var t=this;return(0,m.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,m.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),h._yA.Success)})}initializeAdvancedFilter(){var t=this;return(0,m.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;
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 l;return this.employeeId=null!==(l=r.get("employeeId"))&&void 0!==l?l:void 0})}loadExceptionJustifications(t){const n=t.filter&&Object.keys(t.filter).length>0?(0,x.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,l;this.currentFilter=n,this.pageListView.actualPage=t.page,this.exceptions=t.append?(0,x.A)((0,x.A)({},o),{},{items:[...null!==(r=null===(l=this.exceptions)||void 0===l?void 0:l.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,x.A)({},t);return n.typeOccurrence&&(n.typeOccurrence=this.getTypeOccurrence(n.typeOccurrence)),n.status&&(n.status=1==n.status?_.Pending:_.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);return!r||r.length<2?null:null!==(n=null===(o=this.quickSearchTypeOccurrenceMap.flatMap((g,u)=>g.terms.filter(y=>y.startsWith(r)).map(y=>({term:y,typeOccurrence:g.typeOccurrence,priority:u}))).sort((g,u)=>g.term.length-u.term.length||g.priority-u.priority)[0])||void 0===o?void 0:o.typeOccurrence)&&void 0!==n?n:null}translatedStatus(){var t=this;return(0,m.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 p.Delay;case 2:return p.Absence;case 3:return p.ExtraHour;case 4:return p.ExtraHourCompensate;case 5:return p.ExtraHourHoliday;case 6:return p.ExtraHourRest}}initializeComponents(){var t=this;return(0,m.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(l=>{const g=l.Message.includes("Erro");if(this.notificationService.showNotification(l.Message,g?h._yA.Error:h._yA.Success),!g)return this.justificationExceptionHasValue=!0,this.justificationException=void 0,this.exceptions=null,this.getOccurrenceException(!1)}).catch(l=>{this.notificationService.showNotification("".concat(l.status," - ").concat(l.statusText),h._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=s).\u0275fac=function(t){return new(t||i)(e.rXU(j),e.rXU(S.F),e.rXU(E.i),e.rXU(N.J),e.rXU(M.nX))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-justify-exception"]],viewQuery:function(t,n){if(1&t&&e.GBs(U,5),2&t){let o;e.mGM(o=e.lsd())&&(n.modal=o.first)}},standalone:!1,decls:13,vars:22,consts:[["modal",""],[1,"search-holder"],["p-title"," ",3,"p-change-disclaimers","p-quick-search","p-advanced-search","p-filters","p-literals"],[1,"header-info"],[1,"po-row","load-more"],[1,"no-items-image"],[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,"period-header"],["p-kind","primary",3,"p-label"],["p-kind","primary",3,"p-click","p-label"],[1,"mobile-header"],[1,"expanded-content"],[1,"expansion-div
1ider"],[1,"mobile-expanded-content"],["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-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-info-row"],[1,"mobile-content-divider"],["p-kind","secondary",3,"p-click","p-label"],[3,"p-click","p-label","p-disabled"],["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.nVh(1,Q,2,1,"div"),e.j41(2,"po-page-dynamic-search",2),e.bIt("p-change-disclaimers",function(l){return n.onChangeDisclaimers(l)})("p-quick-search",function(l){return n.onQuickSearch(l)})("p-advanced-search",function(l){return n.onAdvancedSearch(l)}),e.nVh(3,W,7,14,"div",3),e.nVh(4,ie,3,0,"mat-accordion"),e.nVh(5,ae,3,5,"div",4),e.nVh(6,oe,8,6,"div",5),e.k0s()(),e.j41(7,"po-modal",6,0),e.nI1(9,"translate"),e.j41(10,"po-textarea",7),e.nI1(11,"translate"),e.nI1(12,"translate"),e.mxI("ngModelChange",function(l){return d.eBV(o),e.DH7(n.batchJustificationException,l)||(n.batchJustificationException=l),d.Njj(l)}),e.bIt("p-change-model",function(){return n.enableJustifyBtn()}),e.k0s()()}2&t&&(e.R7$(),e.vxM(n.loading?1:-1),e.R7$(),e.Y8G("p-filters",n.filters)("p-literals",n.filterLiterals),e.R7$(),e.vxM((null==n.exceptions||null==n.exceptions.items?null:n.exceptions.items.length)>0?3:-1),e.R7$(),e.vxM((null==n.exceptions||null==n.exceptions.items?null:n.exceptions.items.length)>0?4:-1),e.R7$(),e.vxM((null==n.exceptions||null==n.exceptions.items?null:n.exceptions.items.length)>0?5:-1),e.R7$(),e.vxM(n.exceptions&&0===(null==n.exceptions.items?null:n.exceptions.items.length)?6:-1),e.R7$(),e.Y8G("p-title",e.mNQ(e.bMT(9,16,"l-batch-justify")))("p-primary-action",n.confirm)("p-secondary-action",n.close),e.R7$(3),e.Y8G("p-label",e.mNQ(e.bMT(11,18,"l-absence-type-justify")))("p-placeholder",e.mNQ(e.bMT(12,20,"l-type-here"))),e.R50("ngModel",n.batchJustificationException))},dependencies:[P.BC,P.vS,h.rmE,h.wDU,h.LH$,h.RZu,h.LgA,h.I3z,b.YU,f.BS,f.GK,f.Z2,f.WN,w.z0,C.D9,H.B,b.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}}"]}),s})();function se(i,s){if(1&i&&(e.j41(0,"div"),e.nrm(1,"po-loading-overlay",5),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Y8G("p-screen-lock",a.screenLock)}}function le(i,s){if(1&i&&(e.j41(0,"span")(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"p",10),e.EFF(5),e.nI1(6,"utcDate"),e.k0s()(),e.j41(7,"span",11)(8,"p"),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.j41(11,"p",10),e.EFF(12),e.k0s()(),e.j41(13,"span")(14,"p"),e.EFF(15),e.nI1(16,"translate"),e.k0s(),e.j41(17,"p",10),e.EFF(18),e.k0s()(),e.j41(19,"span")(20,"p"),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.j41(23,"p",10),e.EFF(24),e.k0s()(),e.j41(25,"span")(26,"p"),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"p",10),e.EFF(30),e.k0s()(),e.j41(31,"span",12)(32,"p"),e.EFF(33),e.nI1(34,"translate"),e.k0s(),e.nrm(35,"po-tag",13),e.k0s()),2&i){const a=e.XpG().$implicit,t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,13,"l-occurence-date")),e.R7$(3),e.JRh(e.i5U(6,15,a.dtOccurrence,"dd/MM/yyyy")),e.R7$(4),e.JRh(e.bMT(10,18,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(16,20,"l-initial-hour")),e.R7$(3),e.JRh(a.hourInit),e.R7$(3),e.JRh(e.bMT(22,22,"l-final-hour")),e.R7$(3),e.JRh(a.hourEnd),e.R7$(3),e.JRh(e.bMT(28,24,"l-total-hours")),e.R7$(3),e.JRh(a.totalHours),e.R7$(3),e.JRh(e.bMT(34,26,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function ce(i,s){if(1&i&&(e.j41(0,"div",6)(1,"span",11)(2,"p"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",10),e.EFF(6),e.k0s()(),e.j41(7,"span",12)(8,"p"),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.nrm(11,"po-tag",13),e.k0s()()),2&i){const a=e.XpG().$implicit,t=e.XpG();e.R7$(3),e.JRh(e.bMT(4,5,"l-occurrence-type")),e.R7$(3),e.JRh(t.getOccurrenceTypeTranslated(a.typeOccurrence)),e.R7$(3),e.JRh(e.bMT(10,7,"l-status")),e.R7$(2),e.Y8G("p-value",t.getStatusTranslated(a.status))("ngClass",t.getColorbyType(a.status))}}function pe(i,s){1&i&&e.nrm(0,"po-divider",8)}function de(i,s){if(1&i&&(e.j41(0,"div",9)(1,"div",14)(2,"span")(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",10),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",10),e.EFF(14),e.k0s()()(),e.j41(15,"div",14)(16,"span")(17,"p"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"p",10),e.EFF(21),e.k0s()(),e.j41(22,"span")(23,"p"),e.EFF(24),e.nI1(25,"translate"),e.k0s(),e.j41(26,"p",10),e.EFF(27),e.k0s()()(),e.nrm(28,"po-divider",15),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)}}
1function ue(i,s){if(1&i&&(e.j41(0,"div")(1,"h1",16),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"p",17),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 he(i,s){if(1&i&&(e.j41(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.nVh(3,le,36,28),e.nVh(4,ce,12,9,"div",6),e.k0s()(),e.j41(5,"div",7),e.nVh(6,pe,1,0,"po-divider",8),e.nVh(7,de,29,19,"div",9),e.nVh(8,ue,6,4,"div"),e.k0s()()),2&i){const a=s.$implicit,t=e.XpG();e.R7$(3),e.vxM(t.viewIsMobile?-1:3),e.R7$(),e.vxM(t.viewIsMobile?4:-1),e.R7$(2),e.vxM(t.viewIsMobile?-1:6),e.R7$(),e.vxM(t.viewIsMobile?7:-1),e.R7$(),e.vxM(null!=(null==a?null:a.justify)?8:-1)}}function ge(i,s){if(1&i){const a=e.RV6();e.j41(0,"po-button",19),e.nI1(1,"translate"),e.bIt("p-click",function(){d.eBV(a);const n=e.XpG(2);return d.Njj(n.showMore())}),e.k0s()}if(2&i){const a=e.XpG(2);e.Y8G("p-label",e.mNQ(e.bMT(1,3,"l-load-more-results")))("p-disabled",a.showMoreDisable)}}function me(i,s){if(1&i&&(e.j41(0,"div",3),e.nVh(1,ge,2,5,"po-button",18),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.vxM((null==a.exceptions||null==a.exceptions.items?null:a.exceptions.items.length)>0?1:-1)}}function fe(i,s){1&i&&(e.j41(0,"div",4),e.nrm(1,"img",20),e.j41(2,"h1",21),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",22),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")))}const ye=[{path:"",component:R,canActivate:[O.r],children:[{path:"justifyException",component:re,canActivate:[O.r]},{path:"historyException",component:(()=>{var i;class s{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:p.ExtraHourCompensate},{terms:["hora extra feriado","extra feriado","feriado"],typeOccurrence:p.ExtraHourHoliday},{terms:["hora extra descanso","extra descanso","descanso"],typeOccurrence:p.ExtraHourRest},{terms:["atraso"],typeOccurrence:p.Delay},{terms:["falta"],typeOccurrence:p.Absence},{terms:["hora extra","extra"],typeOccurrence:p.ExtraHour}],this.translatedTypeAndStatus={statusJustified:"",statusPending:"",Absence:"",Default:"",Delay:"",ExtraHour:"",ExtraHourCompensate:"",ExtraHourHoliday:"",ExtraHourRest:""},this.pageListView=new $.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,m.A)(function*(){t.pageListView.actualPage=1,t.watchEmployeeId(),t.initializeComponents()})()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeComponents(){var t=this;return(0,m.A)(function*(){t.initializeAdvancedFilter(),t.translatedStatus(),yield t.getOccurrenceException(),t.isWebView()})()}isWebView(){this.viewIsMobile=this.windowUtilService.isMobileDevice()}initializeAdvancedFilter(){var t=this;return(0,m.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 l;return this.employeeId=null!==(l=r.get("employeeId"))&&void 0!==l?l:void 0})}loadHistoryExceptions(t,n=!1){return this.occurrenceService.getExceptionJustification(!0,t,this.pageListView.pageSize,this.currentFilter,this.employeeId).then(o=>{var r,l;this.pageListView.actualPage=t,this.exceptions=n?(0,x.A)((0,x.A)({},o),{},{items:[...null!==(r=null===(l=this.exceptions)||void 0===l?void 0:l.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);return!r||r.length<2?null:null!==(n=null===(o=this.quickSearchTypeOccurrenceMap.flatMap((g,u)=>g.terms.filter(y=>y.startsWith(r)).map(y=>({term:y,typeOccurrence:g.typeOccurrence,priority:u}))).sort((g,u)=>g.term.length-u.term.length||g.priority-u.priority)[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,m.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,x.A)({},t);o.typeOccurrence&&(n=this.getTypeOccurrence(o.typeOccurrence),o.typeOccurrence=n),o.status&&(o.status=1==o.status?_.Pending:_.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 p.Delay;case 2:return p.Absence;case 3:return p.ExtraHour;case 4:return p.ExtraHourCompensate;case 5:return p.ExtraHourHoliday;case 6:return p.ExtraHourRest}}}return(i=s).\u0275fac=function(t){return new(t||i)(e.rXU(j),e.rXU(S.F),e.rXU(E.i),e.rXU(M.nX))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-history-exception"]],standalone:!1,decls:8,vars:5,consts:[[1,"search-holder"],["p-title"," ",3,"p-change-disclaimers","p-quick-search","p-advanced-search","p-filters","p-literals"],[1,"example-headers-align"],[1,"po-row"],[1,"n
1o-items-image"],[3,"p-screen-lock"],[1,"mobile-header"],[1,"expanded-content"],[1,"expansion-divider"],[1,"mobile-expanded-content"],[1,"data"],[1,"ocurrence-type"],[1,"status-box"],[1,"data","status-pill",3,"p-value","ngClass"],[1,"mobile-info-row"],[1,"mobile-content-divider"],[1,"justify"],[1,"justify-text"],[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-label","p-disabled"],[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"],["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.nVh(1,se,2,1,"div"),e.j41(2,"po-page-dynamic-search",1),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",2),e.Z7z(4,he,9,5,"mat-expansion-panel",null,e.fX1),e.k0s(),e.nVh(6,me,2,1,"div",3),e.nVh(7,fe,8,6,"div",4),e.k0s()()),2&t&&(e.R7$(),e.vxM(n.loading?1:-1),e.R7$(),e.Y8G("p-filters",n.filters)("p-literals",n.filterLiterals),e.R7$(2),e.Dyx(n.exceptions.items),e.R7$(2),e.vxM(n.showLoadButton?6:-1),e.R7$(),e.vxM(0===n.exceptions.items.length?7:-1))},dependencies:[h.rmE,h.wDU,h.RZu,h.LgA,b.YU,f.BS,f.GK,f.Z2,f.WN,w.z0,C.D9,H.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}"]}),s})(),canActivate:[O.r]},{path:":employeeId",component:R,canActivate:[O.r]}]}];let _e=(()=>{var i;class s{}return(i=s).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=d.G2t({imports:[T.iI.forChild(ye),T.iI]}),s})(),be=(()=>{var i;class s{}return(i=s).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=d.G2t({imports:[A.h,C.h,h.Kgc,b.MD,_e,f.MY,w.S]}),s})()}}]);
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.