1"use strict";(self.webpackChunkportal_meu_rh=self.webpackChunkportal_meu_rh||[]).push([[543],{64543:(de,Z,s)=>{s.r(Z),s.d(Z,{OvertimeModule:()=>le});var _=s(88692),H=s(17914),x=s(15472),h=s(20092),c=s(81986),f=s(56707),O=s(32114),D=s(43743),q=s(40940),E=s(91061),C=s(51110),N=s(44852),e=s(64537),b=s(84479),M=s(36812);let U=(()=>{class o{constructor(t,i){this.navigationUtil=t,this.windowUtilService=i}ngOnInit(){}doNavigation(t){this.navigationUtil.doNavigation(t)}back(){this.windowUtilService.back()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(N._),e.Y36(b.g))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-overtime"]],decls:28,vars:13,consts:[[1,"container-fluid",3,"hidden"],["pageTitle","l-management-overtime",3,"backIsVisible","backFunction"],[1,"po-holder"],[1,"po-row"],[1,"po-sm-6","po-md-3","po-lg-3","po-xl-3"],[1,"card"],[1,"po-font-subtitle","text-number","text-negative-hour"],[1,"text-title"],[1,"divider"],[1,"po-sm-12","po-md-12","po-lg-12","po-xl-12","show-more","mouse-pointer",3,"click"],[1,"po-font-subtitle","text-number"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"app-page-header",1),e.NdJ("backFunction",function(){return i.back()}),e.qZA(),e.TgZ(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div")(7,"span",6),e._uU(8,"19h"),e.qZA(),e.TgZ(9,"h4",7),e._uU(10),e.ALo(11,"translate"),e.qZA()(),e.TgZ(12,"div",8)(13,"a",9),e.NdJ("click",function(){return i.doNavigation("overtime/pending")}),e._uU(14),e.ALo(15,"translate"),e.qZA()()()(),e.TgZ(16,"div",4)(17,"div",5)(18,"div")(19,"span",10),e._uU(20,"200h"),e.qZA(),e.TgZ(21,"h4",7),e._uU(22),e.ALo(23,"translate"),e.qZA()(),e.TgZ(24,"div",8)(25,"a",9),e.NdJ("click",function(){return i.doNavigation("")}),e._uU(26),e.ALo(27,"translate"),e.qZA()()()()()()()),2&t&&(e.xp6(1),e.Q6J("backIsVisible",!1),e.xp6(9),e.Oqu(e.lcZ(11,5,"l-pending-overtime")),e.xp6(4),e.Oqu(e.lcZ(15,7,"l-view-more")),e.xp6(8),e.Oqu(e.lcZ(23,9,"l-total-overtime")),e.xp6(4),e.Oqu(e.lcZ(27,11,"l-view-more")))},dependencies:[M.q,f.X$],styles:[".po-font-subtitle[_ngcontent-%COMP%]{margin:10px 10px 5px}.po-holder[_ngcontent-%COMP%]{margin:0}.divider[_ngcontent-%COMP%]{border-top:.5px solid #bbdefb;height:35px}.divider[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-align:center;padding:6px;font-family:NunitoSans-Bold;color:#0c9abe}.divider[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:link{text-decoration:none}.text-title[_ngcontent-%COMP%]{left:10px;top:6px;margin:5px 0 10px;color:#676868;font-family:NunitoSans;font-weight:300;font-size:1rem;text-align:left;position:absolute}.text-number[_ngcontent-%COMP%]{display:block;padding:20px 0;color:#2b3639;font-family:NunitoSans-ExtraLight;font-size:3.2rem;font-weight:100}@media screen and (max-width: 576px){.text-number[_ngcontent-%COMP%]{text-align:left;font-weight:400}}@media screen and (max-width: 320px){.text-number[_ngcontent-%COMP%]{margin:14px 10px 1px;font-size:1.4rem}}.text-negative-hour[_ngcontent-%COMP%]{color:#ba1a1a}[_nghost-%COMP%] .card{position:relative;margin-bottom:8px;padding-top:22px;background:#ffffff;box-shadow:0 2px 8px #e3e6f1;border-radius:6px;text-align:center}"]}),o})();var l=s(8239),A=s(92340),m=(()=>((m||(m={})).StatusEnum={Approved:"approved",Reproved:"reproved",Approving:"approving"},m))(),u=s(81483),J=s(33490),V=s(97983),I=s(36227),T=s(1927),P=s(81059),y=s(98348),S=s(32268),w=s(18648);function R(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",1)(1,"po-textarea",6),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.justification=n)}),e.ALo(2,"translate"),e.qZA()()}if(2&o){const t=e.oxw();e.xp6(1),e.s9C("p-label",e.lcZ(2,2,"l-justification")),e.Q6J("ngModel",t.justification)}}function j(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",1)(1,"po-select",7),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.reasonId=n)}),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()()}if(2&o){const t=e.oxw();e.xp6(1),e.s9C("p-label",e.lcZ(2,4,"l-reason")),e.s9C("p-placeholder",e.lcZ(3,6,"l-select-option")),e.Q6J("ngModel",t.reasonId)("p-options",t.reasonsOption)}}let L=(()=>{class o extends P.R{constructor(t){super(),this.overtimeService=t,this.reasonsOption=[],this.showReasons=!1,this.saveEvent=ne
1w e.vpe,this.closeDialogEvent=new e.vpe}ngOnInit(){super.ngOnInit()}closeDialog(){this.closeDialogEvent.emit()}save(){const t=u.Em.getTotalMilliseconds(this.init).toString(),i=u.Em.getTotalMilliseconds(this.end).toString(),n={date:this.overtime.date,employee:this.overtime.employee,init:t,end:i,id:this.overtime.id,status:m.StatusEnum.Approved,total:(Number(i)-Number(t)).toString(),type:this.overtime.type,justification:null,occasionalDays:this.overtime.occasionalDays};n.justification=this.showReasons?this.reasons.filter(a=>a.id===this.reasonId)[0]:{label:this.justification},this.saveEvent.emit(n),this.closeDialog()}initializeComponent(t){var i=this;return(0,l.Z)(function*(){yield i.loadReasons(),i.overtime=t,i.init=u.Em.getHoursByMilliseconds(t.init),i.end=u.Em.getHoursByMilliseconds(t.end),i.showReasons?i.reasonId=t.justification.id:i.justification=t.justification.label})()}loadReasons(){var t=this;return(0,l.Z)(function*(){t.showReasons=y.ZP.isErpDatasul(),t.showReasons&&(t.reasons=(yield t.overtimeService.loadReasons()).items,t.reasonsOption=t.reasons.map(i=>({label:i.label,value:i.id})))})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(T.K))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-partial-hours"]],outputs:{saveEvent:"saveEvent",closeDialogEvent:"closeDialogEvent"},features:[e.qOj],decls:39,vars:34,consts:[["pageTitle","l-adjustment-overtime",3,"backIsVisible","backFunction"],[1,"po-row"],[1,"po-row","input-row"],["type","text",1,"input-edit","po-sm-3","po-md-3","po-lg-4","po-xl-6",3,"ngModel","ngModelChange"],["class","po-row",4,"ngIf"],[1,"po-sm-12","po-md-12","po-lg-12","po-xl-12","no-padding",3,"p-label","p-click"],["name","textarea",1,"po-sm-12","po-md-12","po-lg-12","po-xl-12","no-padding",3,"ngModel","p-label","ngModelChange"],[1,"po-sm-12","po-md-12","po-lg-12","po-xl-12","no-padding",3,"ngModel","p-label","p-options","p-placeholder","ngModelChange"]],template:function(t,i){1&t&&(e.TgZ(0,"app-page-header",0),e.NdJ("backFunction",function(){return i.closeDialog()}),e.qZA(),e.TgZ(1,"div",1)(2,"strong"),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e.TgZ(5,"div",1)(6,"p"),e._uU(7),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"p"),e._uU(10),e.qZA()(),e.TgZ(11,"div",1)(12,"p"),e._uU(13),e.ALo(14,"translate"),e.qZA(),e.TgZ(15,"p"),e._uU(16),e.ALo(17,"utcDate"),e.qZA()(),e.TgZ(18,"div",1)(19,"p"),e._uU(20),e.ALo(21,"translate"),e.qZA(),e.TgZ(22,"p"),e._uU(23),e.ALo(24,"formatMillisecondsAsHour"),e.qZA()(),e.TgZ(25,"div",2)(26,"strong"),e._uU(27),e.ALo(28,"translate"),e.qZA(),e.TgZ(29,"input",3),e.NdJ("ngModelChange",function(a){return i.init=a}),e.qZA()(),e.TgZ(30,"div",2)(31,"strong"),e._uU(32),e.ALo(33,"translate"),e.qZA(),e.TgZ(34,"input",3),e.NdJ("ngModelChange",function(a){return i.end=a}),e.qZA()(),e.YNc(35,R,3,4,"div",4),e.YNc(36,j,4,8,"div",4),e.TgZ(37,"po-button",5),e.NdJ("p-click",function(){return i.save()}),e.ALo(38,"translate"),e.qZA()),2&t&&(e.Q6J("backIsVisible",i.viewIsMobile),e.xp6(3),e.Oqu(e.lcZ(4,15,"l-summary")),e.xp6(4),e.hij("",e.lcZ(8,17,"l-colaborator"),":"),e.xp6(3),e.Oqu(null==i.overtime||null==i.overtime.employee?null:i.overtime.employee.name),e.xp6(3),e.hij("",e.lcZ(14,19,"l-date"),":"),e.xp6(3),e.Oqu(e.xi3(17,21,null==i.overtime?null:i.overtime.date,"shortDate")),e.xp6(4),e.hij("",e.lcZ(21,24,"l-overtime-pay"),":"),e.xp6(3),e.Oqu(e.lcZ(24,26,null==i.overtime?null:i.overtime.total)),e.xp6(4),e.Oqu(e.lcZ(28,28,"l-initial")),e.xp6(2),e.Q6J("ngModel",i.init),e.xp6(3),e.Oqu(e.lcZ(33,30,"l-end")),e.xp6(2),e.Q6J("ngModel",i.end),e.xp6(1),e.Q6J("ngIf",!i.showReasons),e.xp6(1),e.Q6J("ngIf",i.showReasons),e.xp6(1),e.s9C("p-label",e.lcZ(38,32,"l-save")))},dependencies:[_.O5,h.Fj,h.JJ,h.On,c.bOz,c.C9q,c.gJm,M.q,f.X$,S.$,w.P],styles:[".input-edit[_ngcontent-%COMP%]{position:absolute;right:5%}.input-row[_ngcontent-%COMP%]{margin-bottom:25px}"]}),o})();var d=(()=>{return(o=d||(d={}))[o.Approve=0]="Approve",o[o.Reprove=1]="Reprove",o[o.ApproveMany=2]="ApproveMany",o[o.ReproveMany=3]="ReproveMany",d;var o})(),F=s(16213),k=s(6464),B=s(65241),Q=s(5998),G=s(39732),z=s(10690),Y=s(57706),$=s(70385),K=s(13235);function X(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",7)(1,"po-table",8),e.NdJ("p-all-selected",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.countSelected())})("p-all-unselected",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.countSelected())})("p-selected",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.countSelected())})("p-unselected",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.countSelected())})("p-show-more",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showMore())}),e.qZA()()}if(2&o){const t=e.oxw();e.xp6(1),e.Q6J("p-hide-select-all",!1)("p-sort",!0)("p-striped",!0)("p-columns",t.columns)("p-items",t.items)("p-actions",t.actions)("p-loading",t.loading)("p-show-more-disabled",t.showMoreDisable)("p-hide-text-overflow",!0)}}function W(o,r){if(1&o&&(e.TgZ(0,"div",19),e._UZ(1,"hr",20),e.TgZ(2,"label",21),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"strong",22),e._uU(6),e.ALo(7,"formatMillisecondsAsHour"),e.qZA()()),2&o){const t=e.oxw().$implicit;
1e.xp6(3),e.Oqu(e.lcZ(4,2,"l-initial")),e.xp6(3),e.Oqu(e.lcZ(7,4,t.init))}}function ee(o,r){if(1&o&&(e.TgZ(0,"div",19),e._UZ(1,"hr",20),e.TgZ(2,"label",21),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"strong",22),e._uU(6),e.ALo(7,"formatMillisecondsAsHour"),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(e.lcZ(4,2,"l-end-2")),e.xp6(3),e.Oqu(e.lcZ(7,4,t.end))}}function te(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",19),e._UZ(1,"hr",20),e.TgZ(2,"label",21),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"a",28),e.NdJ("click",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.openPartialHours(n))}),e._uU(6),e.ALo(7,"formatMillisecondsAsHour"),e.qZA()()}if(2&o){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(e.lcZ(4,2,"l-initial")),e.xp6(3),e.Oqu(e.lcZ(7,4,t.init))}}function ie(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",19),e._UZ(1,"hr",20),e.TgZ(2,"label",21),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"a",28),e.NdJ("click",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.openPartialHours(n))}),e._uU(6),e.ALo(7,"formatMillisecondsAsHour"),e.qZA()()}if(2&o){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(e.lcZ(4,2,"l-end-2")),e.xp6(3),e.Oqu(e.lcZ(7,4,t.end))}}function ne(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",11)(1,"app-expansion-card")(2,"div",12)(3,"div",13)(4,"po-checkbox",14),e.NdJ("ngModelChange",function(n){const p=e.CHM(t).$implicit;return e.KtG(p.checked=n)})("p-change",function(){const a=e.CHM(t).$implicit,p=e.oxw(2);return e.KtG(p.selectMobile(a))}),e.qZA()(),e.TgZ(5,"div",15)(6,"div",16)(7,"strong"),e._uU(8),e.ALo(9,"titleCase"),e.qZA()(),e.TgZ(10,"div",17),e._uU(11),e.qZA()()(),e.TgZ(12,"div",18)(13,"div",19),e._UZ(14,"hr",20),e.TgZ(15,"label",21),e._uU(16),e.ALo(17,"translate"),e.qZA(),e.TgZ(18,"strong",22),e._uU(19),e.ALo(20,"utcDate"),e.qZA()(),e.YNc(21,W,8,6,"div",23),e.YNc(22,ee,8,6,"div",23),e.YNc(23,te,8,6,"div",23),e.YNc(24,ie,8,6,"div",23),e.TgZ(25,"div",19),e._UZ(26,"hr",20),e.TgZ(27,"label",21),e._uU(28),e.ALo(29,"translate"),e.qZA(),e.TgZ(30,"strong",22),e._uU(31),e.ALo(32,"formatMillisecondsAsHour"),e.qZA()(),e.TgZ(33,"div",24),e._UZ(34,"hr",20),e.TgZ(35,"label",21),e._uU(36),e.ALo(37,"translate"),e.qZA(),e.TgZ(38,"strong",25),e._uU(39),e.qZA()(),e.TgZ(40,"div",19),e._UZ(41,"hr",20),e.TgZ(42,"label",21),e._uU(43),e.ALo(44,"translate"),e.qZA(),e.TgZ(45,"strong",26),e._uU(46),e.qZA()(),e.TgZ(47,"app-yes-or-no-buttons",27),e.NdJ("yes",function(){const a=e.CHM(t).$implicit,p=e.oxw(2);return e.KtG(p.approve(a))})("no",function(){const a=e.CHM(t).$implicit,p=e.oxw(2);return e.KtG(p.reprove(a))}),e.qZA()()()()}if(2&o){const t=r.$implicit,i=e.oxw(2);e.xp6(4),e.MGl("id","card-",i.i,""),e.Q6J("ngModel",t.checked),e.xp6(4),e.Oqu(e.lcZ(9,17,t.employee.name)),e.xp6(3),e.Oqu(t.employee.roleDescription),e.xp6(5),e.Oqu(e.l
1cZ(17,19,"l-date")),e.xp6(3),e.Oqu(e.xi3(20,21,t.date,"shortDate")),e.xp6(2),e.Q6J("ngIf",!(null!=i.partialHours&&i.partialHours.visible)),e.xp6(1),e.Q6J("ngIf",!(null!=i.partialHours&&i.partialHours.visible)),e.xp6(1),e.Q6J("ngIf",null==i.partialHours?null:i.partialHours.visible),e.xp6(1),e.Q6J("ngIf",null==i.partialHours?null:i.partialHours.visible),e.xp6(4),e.Oqu(e.lcZ(29,24,"l-total")),e.xp6(3),e.Oqu(e.lcZ(32,26,t.total)),e.xp6(5),e.Oqu(e.lcZ(37,28,"l-type")),e.xp6(3),e.Oqu(t.type.label),e.xp6(4),e.Oqu(e.lcZ(44,30,i.justificationLabelKey)),e.xp6(3),e.Oqu(t.justification.label),e.xp6(1),e.Q6J("id",t.id)}}function oe(o,r){if(1&o&&(e.TgZ(0,"div",9),e.YNc(1,ne,48,32,"div",10),e.qZA()),2&o){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",null==t.pendingOvertimesListView?null:t.pendingOvertimesListView.records)("ngForTrackBy",t.trackByFunction)}}const se=[{path:"",component:U,canActivate:[C.P]},{path:"pending",component:(()=>{class o extends P.R{constructor(t,i,n,a,p,g,v,pe,ce){super(),this.overtimeService=t,this.windowUtilService=i,this.appTranslateService=n,this.profileService=a,this.sanitizationService=p,this.fieldProperties=g,this.notificationService=v,this.notificationsPageStore=pe,this.notificationsCountDispatchers=ce,this.pendingOvertimesListView=new J.i([]),this.actions=[],this.items=[],this.avatar=[],this.pageActions=[],this.filters=[],this._selectedLines=[]}get selectedLines(){return this._selectedLines}set selectedLines(t){const i=t?t.length:0;this._selectedLines=t,this.getPageActions(i),this.isDisableActions=0===i}get justificationLabelKey(){return y.ZP.isErpDatasul()?"l-reason":"l-justification"}ngOnInit(){super.ngOnInit(),this.pendingOvertimesListView.actualPage=1,this.pendingOvertimesListView.pageSize=20,this.showMoreDisable=!1,this.loading=!1,this.isDisableActions=!0,this.partialHoursDialog=!1,this.initializeComponents()}getData(t,i=!1){var n=this;return(0,l.Z)(function*(){yield n.getPendingOvertimesList(i,n.pendingOvertimesListView.actualPage,n.pendingOvertimesListView.pageSize,t,n.employeeName)})()}approveDesk(t){this.approve(t.overtime)}
1reproveDesk(t){this.reprove(t.overtime)}approve(t){var i=this;return(0,l.Z)(function*(){i.modalText=yield i.translateString("l-approve-notification"),i.currentModalAction={type:d.Approve,overtime:t},i.poModal.open()})()}reprove(t){var i=this;return(0,l.Z)(function*(){i.modalText=yield i.translateString("l-reprove-notification"),i.currentModalAction={type:d.Reprove,overtime:t},i.poModal.open()})()}approveMany(){var t=this;return(0,l.Z)(function*(){t.modalText=yield t.translateString("l-approve-notifications"),t.currentModalAction={type:d.ApproveMany},t.poModal.open()})()}reproveMany(){var t=this;return(0,l.Z)(function*(){t.modalText=yield t.translateString("l-reprove-notifications"),t.currentModalAction={type:d.ReproveMany},t.poModal.open()})()}openPartialHours(t){this.partialHoursDialog=!0,this.partialHoursComponent.initializeComponent(t)}closePartialHours(){this.partialHoursDialog=!1}countSelected(){var t=this;return(0,l.Z)(function*(){t.selectedLines=t.poTable.getSelectedRows()})()}disableButtons(){return this.isDisableActions}showMore(){this.getPendingOvertimesList(!1,this.pendingOvertimesListView.getNextPage(),this.pendingOvertimesListView.pageSize,!1,this.employeeName)}searchByEmployeeName(t){var i=this;return(0,l.Z)(function*(){i.employeeName=t,i.selectedLines=[],yield i.getData(!0)})()}back(){this.windowUtilService.back()}translateString(t){return this.appTranslateService.getI18n(t)}onChangeDisclaimers(t){const i={};t.forEach(n=>{i[n.property]=n.value}),this.searchByEmployeeName(i.name)}onQuickSearch(t){this.searchByEmployeeName(t)}onAdvancedSearch(t){this.searchByEmployeeName(t.name)}selectMobile(t){const i=this.selectedLines.findIndex(n=>n.overtime.id===t.id);-1!==i?(this.selectedLines.splice(i,1),this.selectedLines=[...this.selectedLines],this.isDisableActions=0===this.selectedLines.length):(this.selectedLines=[...this.selectedLines,this.items.filter(n=>n.id===t.id)[0]],this.isDisableActions=!1)}translateOccasionalDays(t){var i=this;return(0,l.Z)(function*(){let n;switch(t){case"vacation":n=yield i.translateString("l-vacation");break;case"holiday":n=yield i.translateString("l-holiday-detail");break;case"workLeave":n=yield i.translateString("l-work-leave");break;default:n=t}return n.toString()})()}initializeComponents(){var t=this;return(0,l.Z)(function*(){yield t.getFieldProps(),t.getColumns(),t.getActions(),t.getData(!0,!0),t.getPageActions(),t.getModalActions(),t.getLabelsSearch()})()}getFieldProps(){var t=this;return(0,l.Z)(function*(){(yield t.fieldProperties.getFieldProperties("overtime")).forEac
1h(n=>{t.partialHours=n})})()}getColumns(){var t=this;return(0,l.Z)(function*(){t.columns=[{property:"name",label:(yield t.translateString("l-name")).toString(),width:"15%"},{property:"type",label:(yield t.translateString("l-type")).toString(),width:"15%"},{property:"date",label:(yield t.translateString("l-date")).toString(),type:"date",width:"10%"},{property:"occasionalDays",label:(yield t.translateString("l-occasional-days")).toString(),width:"10%",visible:y.ZP.isErpDatasul()},{property:"initHour",label:(yield t.translateString("l-initial")).toString(),width:"10%"},{property:"endHour",label:(yield t.translateString("l-end-2")).toString(),width:"10%"},{property:"total",label:(yield t.translateString("l-total")).toString(),width:"10%"},{property:"justification",label:yield t.translateString(t.justificationLabelKey),width:"20%"}]})()}getActions(){var t=this;return(0,l.Z)(function*(){t.actions=[{action:t.approveDesk.bind(t),label:(yield t.translateString("l-approve")).toString()},{action:t.reproveDesk.bind(t),label:(yield t.translateString("l-decline")).toString()}],t.partialHours.visible&&t.actions.push({action:t.payPartialHours.bind(t),label:(yield t.translateString("l-pay-overtimes")).toString()})})()}getPendingOvertimesList(t,i,n,a,p){var g=this;return(0,l.Z)(function*(){try{let v;if(g.loading=!0,t?(g.notificationsPageStore.getOvertime({employeedId:A.N.loggedUser,page:i,pageSize:n,employee:p}),v=yield g.notificationsPageStore.nextOvertimeNotNull()):v=yield g.overtimeService.getPendingOvertimesList(A.N.loggedUser,i,n,p),v)return g.updateOvertimeItemsForTable(v,a)}catch{g.loading=!1}g.pendingOvertimesListView.hasMoreRecords=!1})()}updateOvertimeItemsForTable(t,i){var n=this;return(0,l.Z)(function*(){n.clearData(i),n.pendingOvertimesListView.records=n.pendingOvertimesListView.records.concat(t.items),n.pendingOvertimesListView.hasMoreRecords=t.hasNext;for(let a=0;a<n.pendingOvertimesListView.records.length;a++){const p=n.pendingOvertimesListView.records[a].occasionalDays||"";n.items[a]={id:n.pendingOvertimesListView.records[a].id,avatar:n.getAvatar(n.pendingOvertimesListView.records[a].employee.id),name:n.pendingOvertimesListView.records[a].employee.name,date:u.Em.formatUTCDate(new Date(n.pendingOvertimesListView.records[a].date)),occasionalDays:yield n.translateOccasionalDays(p),initHour:u.Em.getHoursByMilliseconds(n.pendingOvertimesListView.records[a].init),endHour:u.Em.getHoursByMilliseconds(n.pendingOvertimesListView.records[a].end),total:u.Em.getHoursByMilliseconds(n.pendingOvertimesListView.records[a].total),type:n.pendingOvertimesListView.records[a].type.label,status:n.pendingOvertimesListView.records[a].status,overtime:n.pendingOvertimesListView.records[a],justification:n.pendingOvertimesListView.records[a].justification.label}}n.items.length<n.pendingOvertimesListView.actualPage*n.pendingOvertimesListView.pageSize&&(n.showMoreDisable=!0),n.loading=!1})()}clearData(t){(!this.pendingOvertimesListView.records||t)&&(this.pendingOvertimesListView.records=[],t&&(this.items=[]))}sendPut(t,i){var n=this;return(0,l.Z)(function*(){try{yield n.overtimeService.putOvertime(t.items[0].employee.id,t);const a=yield n.appTranslateService.getI18n(i);n.notificationService.showNotification(a,c.ik9.Success)}catch(a){n.notificationService.showNotification(a.message,c.ik9.Error)}})()}payPartialHours(t){this.openPartialHours(t.overtime)}getAvatar(t){return this.avatar[t]||(this.avatar[t]=this.sanitizationService.bypassSecurityTrustStyle("url(./assets/img/empty_user.png)"),this.profileService.getImageBase64(t).then(i=>{i&&i.content&&(this.avatar[t]=this.sanitizationService.bypassSecurityTrustStyle(`url(${"data:image/"+(i.type||"png")+";base64,"+i.content})`))})),this.avatar[t]}getPageActions(t=0){var i=this;return(0,l.Z)(function*(){i.pageActions=[{label:`${yield i.translateString("l-approve-selected")} (${t})`,action:i.approveMany.bind(i),disabled:i.disableButtons.bind(i)},{label:`${yield i.translateString("l-reprove-selected")} (${t})`,action:i.reproveMany.bind(i),disabled:i.disableButtons.bind(i)}]})()}getModalActions(){var t=this;return(0,l.Z)(function*(){t.closeAction={action:()=>{t.closeModal()},label:yield t.translateString("l-cancel-title"),danger:!0},t.confirmAction={action:()=>{t.confirmModal()},label:yield t.translateString("l-yes")}})()}closeModal(){this.poModal.close(),this.currentModalAction=null}confirmModal(){var t=this;return(0,l.Z)(function*(){t.poModal.close(),t.currentModalAction.type===d.Approve||t.currentModalAction.type===d.Reprove?yield t.confirmModalOne():yield t.confirmModalMany(),yield t.getData(!0),t.notificationsCountDispatchers.getNotificationsCount()})()}confirmModalOne(){let t;const{overtime:i}=this.currentModalAction,n={hasNext:!1,items:[i]};let a;return this.currentModalAction.type===d.Approve?(a=m.StatusEnum.Approved,t="m-approved-request"):(a=m.StatusEnum.Reproved,t="m-reprove-request"),i.status=a,this.sendPut(n,t)}confirmModalMany(){let t;const i=this.selectedLines,n=[];return this.currentModalAction.type===d.ApproveMany?(t="m-approved-request",i.forEac
1h(p=>{p.overtime.status=m.StatusEnum.Approved,n.push(p.overtime)})):(t="m-reprove-request",i.forEach(p=>{p.overtime.status=m.StatusEnum.Reproved,n.push(p.overtime)})),this.sendPut({hasNext:!1,items:n},t)}getLabelsSearch(){var t=this;return(0,l.Z)(function*(){t.literals={disclaimerGroupTitle:(yield t.translateString("l-filter-applied")).toString(),filterTitle:(yield t.translateString("l-filter-title")).toString(),filterCancelLabel:(yield t.translateString("l-cancel-title")).toString(),filterConfirmLabel:(yield t.translateString("l-apply")).toString(),quickSearchLabel:(yield t.translateString("l-researched-value")).toString(),searchPlaceholder:(yield t.translateString("l-search-collaborator-placeholder")).toString()},t.filters=[{property:"name",label:(yield t.translateString("l-name-collaborator")).toString(),gridColumns:12}]})()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(T.K),e.Y36(b.g),e.Y36(B.g),e.Y36(V.H),e.Y36(Q.H7),e.Y36(I.c),e.Y36(G.g),e.Y36(F.P),e.Y36(k.CV))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-pending-overtimes"]],viewQuery:function(t,i){if(1&t&&(e.Gf(c._w3,5),e.Gf(L,5),e.Gf(c.hmF,7)),2&t){let n;e.iGM(n=e.CRH())&&(i.poTable=n.first),e.iGM(n=e.CRH())&&(i.partialHoursComponent=n.first),e.iGM(n=e.CRH())&&(i.poModal=n.first)}},features:[e.qOj],decls:9,vars:13,consts:[[3,"p-actions","p-filters","p-literals","p-change-disclaimers","p-quick-search","p-advanced-search"],["class","desktop",4,"ngIf"],["class","mobile po-mt-1",4,"ngIf"],["id","partial-hours-dialog","menuIsVisible","true",3,"isVisible","closeDialogButtonEnable","closeDialogEvent"],["dialog-content",""],[3,"closeDialogEvent","saveEvent"],["p-hide-close","true","p-size","md",3,"p-title","p-primary-action","p-secondary-action"],[1,"desktop"],["p-container","","p-hide-text-overflow","","p-selectable","","p-selectable","true",3,"p-hide-select-all","p-sort","p-striped","p-columns","p-items","p-actions","p-loading","p-show-more-disabled","p-hide-text-overflow","p-all-selected","p-all-unselected","p-selected","p-unselected","p-show-more"],[1,"mobile","po-mt-1"],["class","margin-card",4,"ngFor","ngForOf","ngForTrackBy"],[1,"margin-card"],["card-header","",1,"mr-card-header","po-sm-12","po-md-12","po-lg-12","po-xl-12"],[1,"pull-left","checkbox-without-photo"],["name","select-line",1,"checkbox-list",3,"ngModel","id","ngModelChange","p-change"],[1,"aboutEmployee"],[1,"name"],[1,"office"],["card-body",""],[1,"card-line"],[1,"line"],["for","date",1,"po-sm-6","po-md-6"],[1,"pull-right"],["class","card-line",4,"ngIf"],[1,"card-line","clearfix"],[1,"po-sm-6","po-md-6"],[1,"po-sm-6","po-md-6","text-right","po-pr-0"],[1,"po-sm-12","po-md-12","buttons-mobile",3,"id","yes","no"],[1,"pull-right",3,"click"]],template:function(t,i){1&t&&(e.TgZ(0,"po-page-dynamic-search",0),e.NdJ("p-change-disclaimers",function(a){return i.onChangeDisclaimers(a)})("p-quick-search",function(a){return i.onQuickSearch(a)})("p-advanced-search",function(a){return i.onAdvancedSearch(a)}),e.YNc(1,X,2,9,"div",1),e.YNc(2,oe,2,2,"div",2),e.qZA(),e.TgZ(3,"app-dialog",3),e.NdJ("closeDialogEvent",function(){return i.closePartialHours()}),e.TgZ(4,"div",4)(5,"app-partial-hours",5),e.NdJ("closeDialogEvent",function(){return i.closePartialHours()})("saveEvent",function(a){return i.approve(a)}),e.qZA()()(),e.TgZ(6,"po-modal",6),e.ALo(7,"translate"),e._uU(8),e.qZA()),2&t&&(e.Q6J("p-actions",i.pageActions)("p-filters",i.filters)("p-literals",i.literals),e.xp6(1),e.Q6J("ngIf",!i.viewIsMobile),e.xp6(1),e.Q6J("ngIf",i.viewIsMobile),e.xp6(1),e.Q6J("isVisible",i.partialHoursDialog)("closeDialogButtonEnable",!i.viewIsMobile),e.xp6(3),e.s9C("p-title",e.lcZ(7,11,"l-confirmation")),e.Q6J("p-primary-action",i.confirmAction)("p-secondary-action",i.closeAction),e.xp6(2),e.hij(" ",i.modalText,"\n"))},dependencies:[_.sg,_.O5,h.JJ,h.On,c.ejx,c.hmF,c._w3,z.c,Y.a,$.o,L,O.O6,f.X$,S.$,K.r,w.P],styles:[".qtd-selected[_ngcontent-%COMP%]{font-size:.8em;font-style:normal;font-weight:700;position:absolute;margin-left:20px}.line-buttons[_ngcontent-%COMP%]{margin:20px 0 15px}.line-search[_ngcontent-%COMP%]{margin:12px 0 7px}.margin-card[_ngcontent-%COMP%]{margin-bottom:10px}.card-line[_ngcontent-%COMP%]{font-size:14px}.line[_ngcontent-%COMP%]{margin:35px 0 10px}.buttons-mobile[_ngcontent-%COMP%]{padding-bottom:7px}a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]{color:#0c9abe!important}.checkbox-without-photo[_ngcontent-%COMP%]{margin-top:-5px}[_nghost-%COMP%] .po-page-list-operations .po-button{margin-bottom:.25rem}
1@media screen and (min-width: 961px){[_nghost-%COMP%] div.po-page{margin-left:0!important;height:auto!important}[_nghost-%COMP%] div.po-page, [_nghost-%COMP%] div.po-page div.po-page-content{width:100%!important}[_nghost-%COMP%] div.po-page div.po-page-header, [_nghost-%COMP%] div.po-page div.po-page-content{padding-left:8px!important;padding-right:8px!important}}.card-line.clearfix[_ngcontent-%COMP%]{margin-bottom:-25px}.card-line.clearfix[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{text-align:right;padding:0}@media screen and (min-width: 480px){[_nghost-%COMP%] .po-modal-footer{display:flex;justify-content:end;gap:10px}}"]}),o})(),canActivate:[C.P]}];let re=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[x.Bz.forChild(se),x.Bz]}),o})(),le=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[_.ez,re,q.q,f.aw,h.u5,c.JBz,x.Bz,H.To,D.Y,E.G,O.Pu]}),o})()}}]);
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.