1"use strict";(self.webpackChunkportal_meu_rh=self.webpackChunkportal_meu_rh||[]).push([[1759],{1759(ye,W,c){c.d(W,{SubstitutionModule:()=>ve});var f=c(87829),g=c(37222),P=c(61887),V=c(37569),Z=c(40065),S=c(86731),m=c(62092),D=c(753),tt=c(99452),et=c(3564),it=c(11601),w=c(12414),u=c(73308),t=c(54303),B=c(47669),x=c(296),X=c(2268),M=c(19277),R=c(19278),_=c(31806),I=c(68848),s=c(80656),F=c(61288),nt=c(32703),E=c(91132),ot=c(51813),k=c(73123);function at(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",2)(1,"app-page-header",3),t.bIt("backFunction",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.back())}),t.k0s(),t.j41(2,"div",4)(3,"h2",5),t.EFF(4),t.nI1(5,"translate"),t.nI1(6,"translate"),t.nI1(7,"translate"),t.k0s(),t.j41(8,"po-textarea",6),t.mxI("ngModelChange",function(i){s.eBV(n);const o=t.XpG();return t.DH7(o.substitutionJustify,i)||(o.substitutionJustify=i),s.Njj(i)}),t.k0s(),t.j41(9,"div",7)(10,"po-button",8),t.nI1(11,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.back())}),t.k0s(),t.j41(12,"po-button",9),t.nI1(13,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.updateSubstitution(i.substitutionJustify))}),t.k0s()()()()}if(2&a){const n=t.XpG();t.R7$(),t.Y8G("pageTitle",n.pageTitle)("backIsVisible",n.viewIsMobile),t.R7$(3),t.E5c(" ",t.bMT(5,10,"l-requisition-details-before"),"",t.bMT(6,12,n.isApproving?"l-requisition-approve":"l-requisition-reproved"),"",t.bMT(7,14,"l-requisition-ending")," "),t.R7$(4),t.R50("ngModel",n.substitutionJustify),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(11,16,"l-cancel"))),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(13,18,"l-save")))}}function st(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",2)(1,"app-page-header",10),t.bIt("backFunction",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.back())}),t.k0s(),t.j41(2,"div",4)(3,"span")(4,"po-select",11),t.nI1(5,"translate"),t.nI1(6,"translate"),t.mxI("ngModelChange",function(i){s.eBV(n);const o=t.XpG();return t.DH7(o.type,i)||(o.type=i),s.Njj(i)}),t.k0s()(),t.j41(7,"div",4)(8,"po-textarea",12),t.nI1(9,"translate"),t.mxI("ngModelChange",function(i){s.eBV(n);const o=t.XpG();return t.DH7(o.substitutionJustify,i)||(o.substitutionJustify=i),s.Njj(i)}),t.k0s(),t.j41(10,"div",7)(11,"po-button",13),t.nI1(12,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.back())}),t.k0s(),t.j41(13,"po-button",14),t.nI1(14,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.updateSubstitution(i.substitutionJustify,i.type))}),t.k0s()()()()()}if(2&a){const n=t.XpG();t.R7$(),t.Y8G("backIsVisible",n.viewIsMobile),t.R7$(3),t.Y8G("p-label",t.mNQ(t.bMT(5,16,"l-define-next-step")))("p-placeholder",t.mNQ(t.bMT(6,18,"l-select-option"))),t.R50("ngModel",n.type),t.Y8G("p-options",n.steps),t.R7$(4),t.Y8G("p-label",t.mNQ(t.bMT(9,20,"l-request-justification"))),t.R50("ngModel",n.substitutionJustify),t.R7$(3),t.Y8G("p-label",t.mNQ(t.bMT(12,22,"l-cancel")))("ngClass",n.isMobile()?"mobile":""),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(14,24,"l-confirm")))("ngClass",n.isMobile()?"mobile":"")}}let Y=(()=>{var a;class r extends M.U{constructor(e,i,o,l,p){super(),this.requisitionsService=e,this.translateService=i,this.globals=o,this.toastr=l,this.windowUtilService=p,this.employee=void 0,this.substitutionJustify="",this.pageTitle="",this.steps=[],this.getBackEvent=new t.bkB,this.getRequisitions=new t.bkB,this.cleanFinishedRequisitions=new t.bkB}ngOnInit(){this.pageTitle=this.isApproving?"l-approve-substitution":"l-reprove-substitution"}back(){this.getBackEvent.emit()}updateSubstitution(e){var i=this;return(0,u.A)(function*(o,l=null){const p=yield i.getEmployeeSummary();i.substitutionResponse={approved:i.isApproving,date:X.rL.formatUTCDate(new Date),justify:o,requisitions:[]},i.substitutionRequisition={id:i.requisition.id,status:i.requisition.status},i.substitutionResponse.requisitions.push(i.substitutionRequisition),i.requisitionsService.updateRequisitions(p,i.substitutionResponse,l).then(b=>{i.cleanFinishedRequisitions.emit(),i.showMessageSuccess("l-msg-save-success"),i.getRequisitions.emit(),i.back()})}).apply(this,arguments)}isRM(){return _.Ay.isErpRM()}isMobile(){return this.windowUtilService.isMobileDevice()}showMessageSuccess(e){this.translateService.getI18n(e).then(i=>{this.toastr.success(i)})}getEmployeeSummary(){var e=this;return(0,u.A)(function*(){let i=B.c.loggedUser;return e.globals.getEmployeeSummary().then(o=>{e.employee=o,e.employee&&(i=e.employee.id)}),yield _.Ay.checkIfEncode(i)})()}}return(a=r).\u0275fac=function(e){return new(e||a)(t.rXU(I.R),t.rXU(F.F),t.rXU(R.R),t.rXU(nt.tw),t.rXU(E.i))}
1,a.\u0275cmp=t.VBU({type:a,selectors:[["app-substitution-confirm"]],inputs:{isApproving:"isApproving",steps:"steps",requisition:"requisition",finishedRequisitions:"finishedRequisitions"},outputs:{getBackEvent:"getBackEvent",getRequisitions:"getRequisitions",cleanFinishedRequisitions:"cleanFinishedRequisitions"},standalone:!1,features:[t.Vt3],decls:3,vars:3,consts:[["id","filter","isVisible","true",1,"dialog",3,"closeDialogEvent","closeDialogButtonEnable"],["dialog-content","",4,"ngIf"],["dialog-content",""],[3,"backFunction","pageTitle","backIsVisible"],[1,"container-content"],[1,"justify-title"],["p-rows","5",1,"justify-area","width100percent",3,"ngModelChange","ngModel"],[1,"holder"],[1,"button",3,"click","p-label"],["p-kind","primary",1,"button",3,"click","p-label"],["pageTitle","l-next-step",3,"backFunction","backIsVisible"],["name","typeSelect",1,"po-sm-12","po-md-12","po-lg-12","po-xl-12","po-mt-5","justify-area","width100percent",3,"ngModelChange","ngModel","p-label","p-placeholder","p-options"],["p-rows","5",1,"po-sm-12","po-md-12","po-lg-12","po-xl-12","po-mt-5","justify-area","width100percent",3,"ngModelChange","ngModel","p-label"],[1,"button","button-cancel",3,"click","ngClass","p-label"],["p-kind","primary",1,"button",3,"click","ngClass","p-label"]],template:function(e,i){1&e&&(t.j41(0,"app-dialog",0),t.bIt("closeDialogEvent",function(){return i.back()}),t.DNE(1,at,14,20,"div",1)(2,st,15,26,"div",1),t.k0s()),2&e&&(t.Y8G("closeDialogButtonEnable",!0),t.R7$(),t.Y8G("ngIf",!i.isRM()),t.R7$(),t.Y8G("ngIf",i.isRM()))},dependencies:[f.YU,f.bT,g.BC,g.vS,m.rmE,m.TK5,m.LH$,ot.m,k.y,S.D9],styles:["@media screen and (min-width: 768px){.button[_ngcontent-%COMP%]{width:5rem}}@media screen and (min-width: 991px){.button[_ngcontent-%COMP%]{margin-left:15px}}@media screen and (min-width: 991px){.holder[_ngcontent-%COMP%]{text-align:right}}.justify-area[_ngcontent-%COMP%]{margin:10px 0;padding:0!important}.justify-label[_ngcontent-%COMP%]{margin:10px 0;font-size:14px}.holder[_ngcontent-%COMP%]{margin-top:15px}@media screen and (max-width: 475px){[_nghost-%COMP%] .dialog .overlay{padding:15px}}@media screen and (min-width: 961px){[_nghost-%COMP%] .dialog .overlay{padding:0 35px 15px}}[_nghost-%COMP%] .dialog .justify-title{margin:25px 0 15px;padding-left:0;font-family:NunitoSans;font-weight:300;white-space:initial}@media screen and (max-width: 480px){[_nghost-%COMP%] .dialog .po-button{display:block;width:100%}}@media screen and (min-width: 961px){[_nghost-%COMP%] .dialog .max-width-page-title{padding-left:0}[_nghost-%COMP%] .dialog .container-content{margin-bottom:15px}}@media screen and (min-width: 768px){[_nghost-%COMP%] .dialog button{width:10rem}}[_nghost-%COMP%] .button-cancel .po-button{color:#be3e37;border-color:#be3e37}[_nghost-%COMP%] po-select .po-select-content{margin-top:7px!important}@media only screen and (max-width: 477px){.container-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.holder[_ngcontent-%COMP%]{margin-top:15px;display:flex;justify-content:space-between}.mobile[_ngcontent-%COMP%]{display:block!important;padding:0!important;width:48%}[_nghost-%COMP%] .po-button{height:44px}}[_nghost-%COMP%] #dialogCloseBtn{color:#1ea2c3}@media (min-width: 525px){[_nghost-%COMP%] #dialogCloseBtn{top:43px!important}}@media (min-width: 475px) and (max-width: 525px){[_nghost-%COMP%] #dialogCloseBtn{top:32px}}@media (max-width: 474px){[_nghost-%COMP%] #dialogCloseBtn{top:43px}}"]}),r})();var z=c(31930),lt=c(80371),rt=c(18923),pt=c(38555);function ct(a,r){if(1&a){const n=t.RV6();t.j41(0,"app-card-detail",5),t.bIt("back",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.back())}),t.k0s()}if(2&a){const n=t.XpG();t.Y8G("cardTitle","l-substitution-details-title")("name",null==n.currentSubstitution?null:n.currentSubstitution.employeeName)("registry",null==n.currentSubstitution?null:n.currentSubstitution.employeeId)("fields",n.substitutionFields)("status",null==n.currentSubstitution?null:n.currentSubstitution.status)("statusLabel",null==n.currentSubstitution?null:n.currentSubstitution.statusLabel)("groupedFieldType",!0)("hasAttachment",n.hasAttachment)("fileName",n.fileName)("loggedUser",n.loggedUser)("fileSize",n.fileSize)}}let dt=(()=>{var a;class r extends M.U{constructor(e,i,o,l,p){super(),this.fieldPropertiesService=e,this.windowUtilService=i,this.globals=o,this.requisitionsService=l,this.momentService=p,this.currentSubstitution={employeeId:"{current}",id:"",requestId:"",requestType:x.K.RequestTypeEnum.Substitution,employeeName:"",startDate:new Date,status:x.K.StatusEnum.Empty,requesterName:""}
1,this.currentSubstitutionDetails={id:"",date:null,deadline:null,hiringRole:"",justify:""},this.detailVisible=!1,this.substitutionFields=[],this.getBackEvent=new t.bkB,this.openRequestSubstitutionInVisualize=new t.bkB}ngOnInit(){this.initializeComponent()}isActionsAvailable(){return!!this.currentSubstitution&&(this.currentSubstitution.status!==x.K.StatusEnum.Approving||""!==this.currentSubstitution.responsableName)&&this.currentSubstitution.status.toLowerCase()===x.K.StatusEnum.Approving.toLowerCase()&&this.currentSubstitution.responsableId===_.Ay.checkIfDecode(this.loggedUser.id)}back(){this.getBackEvent.emit()}emitOpenRequestSubstitution(e,i){this.openRequestSubstitutionInVisualize.emit({requisition:e,approve:i})}loadFieldProperties(){var e=this;return(0,u.A)(function*(){e.fieldProperties=yield e.fieldPropertiesService.getFieldProperties("substitution"),e.fieldProperties&&e.fieldProperties.forEach(i=>{switch(i.field){case"requesterName":e.requesterName=i;break;case"salaryTable":e.salaryTable=i;break;case"levelSalaryTable":e.levelSalaryTable=i;break;case"rangeSalaryTable":e.rangeSalaryTable=i;break;case"editSalary":e.editSalary=i;break;case"costCenter":e.costCenter=i;break;case"classValue":e.classValue=i;break;case"accountingItem":e.accountingItem=i}})})()}initializeComponent(){var e=this;return(0,u.A)(function*(){yield e.loadFieldProperties(),e.currentSubstitution=yield e.requisitionsService.getSelectedRequisition(),e.loggedUser=yield e.globals.getEmployeeSummary(),e.isMobile=e.windowUtilService.isMobileDevice(),e.currentSubstitution?(yield e.getSubstitutionDetails(),e.detailVisible=!0):e.windowUtilService.back()})()}getSubstitutionDetails(){var e=this;return(0,u.A)(function*(){var i,o,l,p,b,h,v,y,C,T,j,q,N,G,L,$,A;const d=yield e.requisitionsService.getSubstitutionDetails(e.loggedUser.id,null===(i=e.currentSubstitution)||void 0===i?void 0:i.id),fe=new f.oe("pt-BR","BRL");e.requisitionsService.setSubstitutionRequest(d),e.substitutionFields.push({groupTitle:"",showLine:!1,items:[{label:"l-substitution-date",value:e.momentService.getInstance(d.date).utc().format("L"),class:"po-sm-12 po-md-3",visible:null!=d.date},{label:"l-deadline",value:e.momentService.getInstance(d.deadline).utc().format("L"),class:"po-sm-12 po-md-3",visible:null!=d.deadline},{label:"l-requisition-responsible",value:e.currentSubstitution.responsableName,class:"po-sm-12 po-md-3",visible:e.currentSubstitution.responsableName},{label:"l-role",value:d.hiringRole,class:"po-sm-12 po-md-3",visible:d.hiringRole},{label:"l-collaborator",value:null===(o=e.currentSubstitution)||void 0===o?void 0:o.requesterName,class:"po-sm-12 po-md-3",visible:e.currentSubstitution.requesterName&&(null===(l=e.requesterName)||void 0===l?void 0:l.visible)},{label:"l-salary-table",value:null!=(null===(p=d.salaryInfo)||void 0===p?void 0:p.idSalaryTable)?null===(b=d.salaryInfo)||void 0===b?void 0:b.idSalaryTable.split("|")[1]:"",class:"po-sm-12 po-md-3",visible:null!=(null===(h=d.salaryInfo)||void 0===h?void 0:h.idSalaryTable)&&e.salaryTable.visible},{label:"l-salary-level",value:null===(v=d.salaryInfo)||void 0===v?void 0:v.salaryLevel,class:"po-sm-12 po-md-3",visible:null!=(null===(y=d.salaryInfo)||void 0===y?void 0:y.salaryLevel)&&e.levelSalaryTable.visible},{label:"l-salary-range",value:null===(C=d.salaryInfo)||void 0===C?void 0:C.salaryRange,class:"po-sm-12 po-md-3",visible:null!=(null===(T=d.salaryInfo)||void 0===T?void 0:T.salaryRange)&&e.rangeSalaryTable.visible},{label:"l-proposed-salary",value:fe.transform(null===(j=d.salaryInfo)||void 0===j?void 0:j.proposedSalary,"BRL","symbol","1.2-2"),class:"po-sm-12 po-md-3",visible:null!=d.salaryInfo&&e.editSalary.visible},{label:"l-cost-center",value:null==d||null===(q=d.costCenter)||void 0===q?void 0:q.name,class:"po-sm-6 po-md-3",visible:(null==d?void 0:d.costCenter)&&(null===(N=e.costCenter)||void 0===N?void 0:N.visible)},{label:"l-class-value",value:null==d||null===(G=d.classValue)||void 0===G?void 0:G.descricao,class:"po-sm-6 po-md-3",visible:(null==d?void 0:d.classValue)&&(null===(L=e.classValue)||void 0===L?void 0:L.visible)},{label:"l-accounting-item",value:null==d||null===($=d.accountingItem)||void 0===$?void 0:$.descricao,class:"po-sm-6 po-md-3",visible:(null==d?void 0:d.accountingItem)&&(null===(A=e.accountingItem)||void 0===A?void 0:A.visible)}]},{groupTitle:"",showLine:!!d.complementaryField,items:[{label:"l-requisition-justify-label",value:d.justify,class:"po-sm-12 po-md-12",visible:null!=d.justify}]}),e.substitutionFields.push(e.mountComplementaryObject(d.complementaryField))})()}mountComplementaryObject(e){var i=this;if(e){let o={groupTitle:"l-infos",showLine:!1,items:[]};
1return e.sort(this.sortComplementaryField).forEach(function(){var l=(0,u.A)(function*(p){let b=p.typeString.toLowerCase()===rt.F.TypeStringEnum.Url?p.typeString.toLowerCase():p.exclusiveType;const h={label:p.label,value:yield i.returnFieldValue(b,p.value),class:"po-sm-12 po-md-3",visible:!0};o.items.push(h)});return function(p){return l.apply(this,arguments)}}()),o}return[]}sortComplementaryField(e,i){return e.order-i.order}returnFieldValue(e,i){var o=this;return(0,u.A)(function*(){let l;switch(e){case"Data":l=i?o.momentService.getInstance(i).utc().format("L"):"";break;case"Texto":default:l=i;break;case"Logico":l="T"==i?"l-yes":"l-no";break;case"url":l=null!=i&&i.name?i.name:""}return l})()}}return(a=r).\u0275fac=function(e){return new(e||a)(t.rXU(z.F),t.rXU(E.i),t.rXU(R.R),t.rXU(I.R),t.rXU(lt.R))},a.\u0275cmp=t.VBU({type:a,selectors:[["app-substitution-visualize"]],inputs:{requisition:"requisition",substitutionDetails:"substitutionDetails"},outputs:{getBackEvent:"getBackEvent",openRequestSubstitutionInVisualize:"openRequestSubstitutionInVisualize"},standalone:!1,features:[t.Vt3],decls:5,vars:2,consts:[[1,"card-detail"],[1,"po-row"],[1,"po-sm-12","po-md-12","po-lg-12","po-xl-12"],["backIsVisible","true",3,"pageTitle"],[3,"cardTitle","name","registry","fields","status","statusLabel","groupedFieldType","hasAttachment","fileName","loggedUser","fileSize","back",4,"ngIf"],[3,"back","cardTitle","name","registry","fields","status","statusLabel","groupedFieldType","hasAttachment","fileName","loggedUser","fileSize"]],template:function(e,i){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2),t.nrm(3,"app-page-header",3),t.k0s()(),t.DNE(4,ct,1,11,"app-card-detail",4),t.k0s()),2&e&&(t.R7$(3),t.Y8G("pageTitle","l-requisition-details-confirm"),t.R7$(),t.Y8G("ngIf",i.detailVisible))},dependencies:[f.bT,k.y,pt.X],styles:["@media screen and (max-width: 480px){[_nghost-%COMP%] .dialog .overlay{padding:15px}}@media screen and (min-width: 961px){[_nghost-%COMP%] .dialog .overlay{padding:0 35px 15px}}@media screen and (min-width: 768px){[_nghost-%COMP%] .dialog button{width:10rem}}@media screen and (min-width: 961px){[_nghost-%COMP%] .dialog .max-width-page-title{padding-left:0}}@media screen and (max-width: 480px){[_nghost-%COMP%] .dialog .thf-button{display:block;width:100%}}.justify-mainName[_ngcontent-%COMP%]{margin:0;font-family:NunitoSans-bold;font-size:16px;font-weight:700}.justify-title[_ngcontent-%COMP%]{margin:25px 0 15px;font-family:NunitoSans;font-weight:300}.justify-subtitle[_ngcontent-%COMP%]{margin:0;font-family:NunitoSans-bold;font-size:14px;font-weight:700}.holder[_ngcontent-%COMP%]{position:relative;margin:0 0 30px}@media screen and (min-width: 480px){.holder[_ngcontent-%COMP%]{margin-bottom:15px!important}}.subtitulo-modal[_ngcontent-%COMP%]{padding-left:0;padding-right:0}@media screen and (max-width: 480px){.subtitulo-modal[_ngcontent-%COMP%]{padding-top:0!important}.justify-subtitle[_ngcontent-%COMP%]{padding-top:10px!important}.justify-text[_ngcontent-%COMP%], .pt-0[_ngcontent-%COMP%]{padding-top:0!important}}.info[_ngcontent-%COMP%]{display:inline-block;position:absolute;left:60px;top:8px}.marginTop15px[_ngcontent-%COMP%]{margin-top:15px}.avatar[_ngcontent-%COMP%]{display:inline-block}.badge[_ngcontent-%COMP%]{display:inline-block;height:20px;min-width:20px;overflow-y:hidden;padding:2px 8px;border-radius:3px;color:#fff;font-size:10px;line-height:16px;text-align:left;text-transform:uppercase;vertical-align:middle}.badge.pending[_ngcontent-%COMP%]{background-color:#efba2a}.badge.approved[_ngcontent-%COMP%], .badge.closed[_ngcontent-%COMP%]{background:#107048}.badge.rejected[_ngcontent-%COMP%], .badge.reject[_ngcontent-%COMP%], .badge.reproved[_ngcontent-%COMP%]{background:#be3e37}.badge.empty[_ngcontent-%COMP%], .badge.approving[_ngcontent-%COMP%]{background:#efba2a}@media (min-width: 961px) and (max-height: 620px){.demission-justify[_ngcontent-%COMP%]{max-height:50px;overflow-y:visible}}@media (min-width: 961px) and (min-height: 621px) and (max-height: 700px){.demission-justify[_ngcontent-%COMP%]{max-height:70px;overflow-y:auto}}
1@media (min-width: 961px) and (min-height: 700px){.demission-justify[_ngcontent-%COMP%]{max-height:90px;overflow-y:auto}}po-button[_ngcontent-%COMP%]{margin-left:15px}@media screen and (max-width: 480px){po-button[_ngcontent-%COMP%]{margin:0;width:100%}}.po-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-bottom:10px}@media screen and (min-width: 991px){.alignRight[_ngcontent-%COMP%]{text-align:right}}[_nghost-%COMP%] .button-reprove .po-button{color:#be3e37;border-color:#be3e37;height:44px}[_nghost-%COMP%] .button-aprove .po-button{height:44px}@media (max-width: 480px){[_nghost-%COMP%] .actions-visualize po-button{display:block;width:50%}}[_nghost-%COMP%] #dialogCloseBtn{color:#1ea2c3}@media (min-width: 441px) and (max-width: 480px){[_nghost-%COMP%] #dialogCloseBtn{position:absolute;top:44px;right:25px;cursor:pointer}}@media (min-width: 481px) and (max-width: 960px){[_nghost-%COMP%] .actions-visualize-others-resolutions po-button{width:50%;margin:0}}.panel-body[_ngcontent-%COMP%]{padding:0 8px}@media (max-width: 480px){[_nghost-%COMP%] .general{margin-left:-8px!important}}"]}),r})();var U=c(30322),Q=c(49539),ut=c(42433),mt=c(67520),gt=c(54041),bt=c(52840),O=c(75039),ht=c(76098),J=c(30693),H=c(23163),_t=c(63993),vt=c(63686),ft=c(35823);function yt(a,r){if(1&a&&(t.j41(0,"div",14),t.nrm(1,"div",15),t.j41(2,"div",16)(3,"span"),t.EFF(4),t.k0s()()()),2&a){const n=r.$implicit,e=t.XpG(2);t.R7$(),t.xc7("background-image",e.getImageAvatar(n)),t.R7$(3),t.JRh(e.getNameById(n))}}function Ct(a,r){if(1&a&&(t.j41(0,"div")(1,"span",17),t.nI1(2,"lowercase"),t.EFF(3),t.k0s()()),2&a){const n=t.XpG().row;t.R7$(),t.Y8G("ngClass",t.bMT(2,2,n.status)),t.R7$(2),t.SpI(" ",n.statusLabel," ")}}function xt(a,r){1&a&&t.DNE(0,Ct,4,4,"div",7),2&a&&t.Y8G("ngIf","status"===r.column.property)}function St(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",8)(1,"po-table",9,0),t.DNE(3,yt,5,3,"ng-template",10)(4,xt,1,1,"ng-template",11),t.k0s(),t.j41(5,"div",12)(6,"po-button",13),t.nI1(7,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.showMore())}),t.k0s()()()}if(2&a){const n=t.XpG();t.R7$(),t.Y8G("p-columns",n.columns)("p-items",n.items)("p-loading",n.loading)("p-actions",n.tableActions),t.R7$(2),t.Y8G("p-property",n.collumnName),t.R7$(3),t.Y8G("p-label",t.mNQ(t.bMT(7,8,"l-load-more-results")))("p-disabled",n.showMoreDisable)}}function Mt(a,r){if(1&a&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&a){const n=t.XpG().$implicit;t.R7$(),t.SpI(" ",n.roleDescription," ")}}function It(a,r){if(1&a&&(t.j41(0,"div",27)(1,"label",28),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"strong",29),t.EFF(5),t.k0s()()),2&a){const n=t.XpG().$implicit;t.R7$(2),t.JRh(t.bMT(3,2,"l-requisition-exception")),t.R7$(3),t.JRh(n.IsException)}}function Tt(a,r){if(1&a){const n=t.RV6();t.j41(0,"po-button",36),t.nI1(1,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG().$implicit,o=t.XpG(3);return s.Njj(o.openRequestSubstitution(!1,i))}),t.k0s()}2&a&&t.Y8G("p-label",t.mNQ(t.bMT(1,2,"l-reprove")))}function Pt(a,r){if(1&a){const n=t.RV6();t.j41(0,"po-button",37),t.nI1(1,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG().$implicit,o=t.XpG(3);return s.Njj(o.openRequestSubstitution(!0,i))}),t.k0s()}2&a&&t.Y8G("p-label",t.mNQ(t.bMT(1,2,"l-approve")))}function wt(a,r){if(1&a){const n=t.RV6();t.j41(0,"po-button",32),t.nI1(1,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG().$implicit,o=t.XpG(3);return s.Njj(o.openEdit(i))}),t.k0s()}2&a&&t.Y8G("p-label",t.mNQ(t.bMT(1,2,"l-edit")))}function Rt(a,r){if(1&a){const n=t.RV6();t.j41(0,"po-button",32),t.nI1(1,"translate"),t.bIt("click",function(){s.eBV(n);const i=t.XpG().$implicit,o=t.XpG(3);return s.Njj(o.selectRequisitionToStepAction(i))}),t.k0s()}2&a&&t.Y8G("p-label",t.mNQ(t.bMT(1,2,"l-next-step")))}function kt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",21)(1,"app-expansion-card")(2,"div",22),t.nrm(3,"div",23),t.j41(4,"div",24),t.nrm(5,"div",15),t.j41(6,"div",25)(7,"strong"),t.EFF(8),t.nI1(9,"titleCase"),t.k0s(),t.DNE(10,Mt,2,1,"div",7),t.k0s()()(),t.j41(11,"div",26)(12,"div",27)(13,"label",28),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"strong",29),t.EFF(17),t.k0s()(),t.j41(18,"div",27)(19,"label",28),t.EFF(20),t.nI1(21,"translate"),t.k0s(),t.j41(22,"strong",29),t.EFF(23),t.k0s()(),t.j41(24,"div",27)(25,"label",28),t.EFF(26),t.nI1(27,"translate"),t.k0s(),t.j41(28,"strong",29),t.EFF(29),t.nI1(30,"utcDate"),t.k0s()(),t.j41(31,"div",27)(32,"label",28),t.EFF(33),t.nI1(34,"translate"),t.k0s(),t.j41(35,"strong",29),t.EFF(36),t.k0s()(),t.DNE(37,It,6,4,"div",30),t.j41(38,"div",27)(39,"label",28),t.EFF(40),t.nI1(41,"translate"),t.k0s(),t.j41(42,"div",29)(43,"span",17),t.nI1(44,"lowercase"),t.EFF(45),t.k0s()()(),t.j41(46,"div",31),t.qex(47),t.j41(48,"div",14)(49,"po-button",32),t.nI1(50,"translate"),t.bIt("click",function(){const i=s.eBV(n).$implicit,o=t.XpG(3);return s.Njj(o.openVisualize(i))}),t.k0s()(),t.j41(51,"div",14),t.DNE(52,Tt,2,4,"po-button",33)(53,Pt,2,4,"po-button",34),t.k0s(),t.j41(54,"div",14),t.DNE(55,wt,2,4,"po-button",35),t.k0s(),t.j41(56,"div",14),t.DNE(57,Rt,2,4,"po-button",35),t.k0s(),t.bVm(),t.k0s()()()()}if(2&a){const n=r.$implicit,e=t.XpG(3);t.R7$(5),t.xc7("background-image",e.getImageAvatar(n.employeeId)),t.R7$(3),t.JRh(t.bMT(9,22,n.employeeName)),t.R7$(2),t.Y8G("ngIf",e.isMobile),t.R7$(4),t.JRh(t.bMT(15,24,"l-requisition-id")),t.R7$(3),t.JRh(n.requestId),t.R7$(3),t.JRh(t.bMT(21,26,"l-requisition-matricula")),t.R7$(3),t.JRh(n.employeeId),t.R7$(3),t.JRh(t.bMT(27,28,"l-date")),t.R7$(3),t.JRh(t.i5U(30,30,n.date,"shortDate")),t.R7$(4),t.JRh(t.bMT(34,33,"l-requisition-responsible")),t.R7$(3),t.JRh(n.responsableName),t.R7$(),t.Y8G("ngIf",!e.isErpRM()&&null!==(null==n?null:n.IsException)),t.R7$(3),t.JRh(t.bMT(41,35,"l-status")),t.R7$(3),t.Y8G("ngClass",t.bMT(44,37,n.status)),t.R7$(2),t.SpI(" ",n.statusLabel," "),t.R7$(4),t.Y8G("p-label",t.mNQ(t.bMT(50,39,"l-visualize"))),t.R7$(3),t.Y8G("ngIf",e.canApproveReprove(n)&&!e.isVisible()),t.R7$(),t.Y8G("ngIf",e.canApproveReprove(n)&&!e.isVisible()),t.R7$(2),t.Y8G("ngIf",e.canApproveReprove(n)&&e.isVisible()&&(null==e.permissions?null:e.permissions.substitutionEdit)),t.R7$(2),t.Y8G("ngIf",e.canApproveReprove(n)&&e.isVisible())}}function Ot(a,r){if(1&a){const n=t.RV6();t.j41(0,"div"),t.DNE(1,kt,58,41,"div",20),t.j41(2,"div",12)(3,"po-button",13),t.nI1(4,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.showMore())}),t.k0s()()()}if(2&a){const n=t.XpG(2);t.R7$(),t.Y8G("ngForOf",n.items)("ngForTrackBy",n.trackByFunction),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(4,5,"l-load-more-results")))("p-disabled",n.showMoreDisable)}}function Vt(a,r){if(1&a&&(t.j41(0,"div",18),t.nrm(1,"div",19),t.DNE(2,Ot,5,7,"div",7),t.k0s()),2&a){const n=t.XpG();t.R7$(2),t.Y8G("ngIf",!n.substitutionIsEmpty())}}function Ft(a,r){1&a&&(t.j41(0,"div",38),t.nrm(1,"img",39),t.j41(2,"div",40)(3,"p",41),t.EFF(4),t.nI1(5,"translate"),t.k0s()()()),2&a&&(t.R
17$(4),t.JRh(t.bMT(5,1,"l-requisitions-not-found")))}function Et(a,r){1&a&&(t.j41(0,"div",38),t.nrm(1,"img",42),t.j41(2,"div",40)(3,"p",41),t.EFF(4),t.nI1(5,"translate"),t.k0s()()()),2&a&&(t.R7$(4),t.JRh(t.bMT(5,1,"l-no-result-to-show")))}function jt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div")(1,"app-substitution-confirm",43),t.bIt("getBackEvent",function(i){s.eBV(n);const o=t.XpG();return s.Njj(o.getBackEvent(i))})("getRequisitions",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.getRequisitions())})("cleanFinishedRequisitions",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.cleanFinishedRequisitions())}),t.k0s()()}if(2&a){const n=t.XpG();t.R7$(),t.Y8G("requisition",n.selectedRequisition)("isApproving",n.isApproving)("finishedRequisitions",n.finishedRequisitions)("steps",n.steps)}}let Gt=(()=>{var a;class r extends M.U{onResize(e){this.checkIfMobile()}constructor(e,i,o,l,p,b,h,v,y,C,T){super(),this.lastAccessItem=e,this.requisitionsService=i,this.windowUtilService=o,this.profileService=l,this.sanitization=p,this.permissionService=b,this.globals=h,this.appTranslateService=v,this.notificationService=y,this.navigationUtilService=C,this.router=T,this.finishedRequisitions=[],this.hasSubstitutionHistory=!0,this.avatarImage=[],this.buttonActionName="",this.pageTitle="",this.quickSearchLabel="",this.hasDisclaimers=!1,this.requestSubstitutionIsVisible=!1,this.visualizeSubstitutionIsVisible=!1,this.isEmpty=!0,this.employee=void 0,this.substitutionConfirm=!1,this.steps=[],this.requisitionsListView=new bt.O([]),this.columns=[],this.columnStatus="status",this.tableActions=[],this.collumnName="idName",this.items=[],this.filterActive=!1,this.budgetIntegrationEnabled=!1,this.searchActions=[{label:"action"}],this.customLiterals={disclaimerGroupTitle:"",filterTitle:"",filterCancelLabel:"",filterConfirmLabel:"",quickSearchLabel:"",searchPlaceholder:""},this.paramsFilters={employeeName:null,requestId:null,startDate:null,status:null,types:"substitution"}}ngOnInit(){this.requisitionsListView.actualPage=1,this.requisitionsListView.pageSize=10,this.showMoreDisable=!1,this.loading=!1,super.ngOnInit(),this.initializeComponents()}initVariables(){var e=this;return(0,u.A)(function*(){e.loggedUser=yield e.globals.getEmployeeSummary(),e.permissions=yield e.getPermissions()})()}initializePoComponent(){var e=this;return(0,u.A)(function*(){e.pageTitle=yield e.translateLabel("im-desmissal");const o=window.innerWidth<=520?12:6;e.filters=[{property:"employeeName",label:yield e.translateLabel("l-name"),gridColumns:o},{property:"status",label:"status",options:[{value:"approving",label:yield e.translateLabel("l-requisition-approving")},{value:"approved",label:yield e.translateLabel("l-requisition-approved")},{value:"rejected",label:yield e.translateLabel("l-requisition-rejected")},{value:"closed",label:yield e.translateLabel("l-requisition-done")},...e.isErpRM()?[{value:"consultingBudget",label:yield e.translateString("l-requisition-consulting-budget")},{value:"budgetNotApproved",label:yield e.translateString("l-requisition-budget-not-approved")}]:[]],gridColumns:o,validate:e.openEdit.bind(e)},{property:"startDate",label:yield e.translateLabel("l-date"),gridColumns:o,type:"date"},{property:"requestId",label:yield e.translateLabel("l-requisition-id"),gridColumns:o}]})()}initializeSearch(){var e=this;return(0,u.A)(function*(){e.customLiterals={disclaimerGroupTitle:yield e.translateLabel("l-disclaimer-group-title"),filterTitle:yield e.translateLabel("l-filter-title"),filterCancelLabel:yield e.translateLabel("l-cancel-title"),filterConfirmLabel:yield e.translateLabel("l-confirm"),quickSearchLabel:yield e.translateLabel("l-quick-search"),searchPlaceholder:yield e.translateLabel("l-search-placeholder")},e.quickSearchLabel=yield e.translateLabel("l-substitution-search-name")})()}onChangeDisclaimers(e){const i={};e.forEach(o=>{i[o.property]=o.value}),this.searchItems(i)}onQuickSearch(e){e?this.searchItems({employeeName:e}):this.resetFilters()}onAdvancedSearch(e){e?this.searchItems(e):this.resetFilters()}getPermissions(){return this.permissionService.getPermissions(this.loggedUser.id)}checkIfMobile(){this.isMobile=this.windowUtilService.isMobileDevice()}setCountLastAccess(){this.lastAccessItem.setLastAccess(Q.MZ,this.loggedUser.id)}getBackEvent(){this.visualizeSubstitutionIsVisible=this.requestSubstitutionIsVisible=!1}
1getSubstitutionDetails(e){var i=this;return(0,u.A)(function*(){const o=yield i.requisitionsService.getSubstitutionDetails(i.loggedUser.id,e);i.substitutionDetails=o})()}cleanFinishedRequisitions(){var e=this;return(0,u.A)(function*(){e.finishedRequisitions=[]})()}getImageAvatar(e){return this.avatarImage[e]||(this.avatarImage[e]=this.sanitization.bypassSecurityTrustStyle("url(./assets/img/empty_user.png)"),this.profileService.getImageBase64(e).then(i=>{i&&i.content&&(this.avatarImage[e]=this.sanitization.bypassSecurityTrustStyle("url(".concat("data:image/"+(i.type||"png")+";base64,"+i.content,")")))})),this.avatarImage[e]}translateLabel(e){return this.appTranslateService.getI18n(e)}back(){this.router.navigate(["/requisitions"])}openRequestSubstitution(e,i){this.selectedRequisition=i,this.isApproving=e,this.requestSubstitutionIsVisible=!0}openVisualize(e){let i;this.requisitionsListView.records.map(o=>{o.id===e.id&&(i=o)}),this.requisitionsService.setSelectedRequisition(i),this.navigationUtilService.doNavigation("substitution/detail")}canApproveReprove(e){return e.status.toLowerCase()===x.K.StatusEnum.Approving.toLowerCase()&&""!==e.responsableName&&_.Ay.checkIfDecode(this.loggedUser.id)===e.responsableId||this.isErpRM()&&e.status.toLowerCase()===x.K.StatusEnum.BudgetNotApproved.toLowerCase()}getRequisitions(){var e=this;return(0,u.A)(function*(){e.requisitionsListView.actualPage=1,e.requisitionsListView.pageSize=10,e.showMoreDisable=!1,e.loading=!1,yield e.getData(!0)})()}isVisible(){return _.Ay.isErpRM()||_.Ay.isErpNode()}showMore(){this.getDataRequisitionList(this.requisitionsListView.getNextPage(),this.requisitionsListView.pageSize,!1)}substitutionIsEmpty(){return!(this.loading||this.items&&0!==this.items.length)}getNameById(e){const i=this.items.filter(o=>o.idName===e);return i&&i.length>0?i[0].employeeName:""}translateString(e){return this.appTranslateService.getI18n(e)}getData(e){var i=this;return(0,u.A)(function*(){yield i.getDataRequisitionList(i.requisitionsListView.actualPage,i.requisitionsListView.pageSize,e,i.employeeName,i.startDate,i.requestId,i.status)})()}openEdit(e){this.canApproveReprove(e)?(this.requisitionsService.setSelectedRequisition(e),this.router.navigate(["".concat("substitution/edit")])):_.Ay.checkIfDecode(this.loggedUser.id)!==e.responsableId&&e.status.toLowerCase()===x.K.StatusEnum.Approving.toLowerCase()?this.showMessage("l-requisition-in-progress",m._yA.Warning):this.isErpRM()&&e.status.toLowerCase()===x.K.StatusEnum.ConsultingBudget.toLowerCase()?this.showMessage("l-alert-budget-integration",m._yA.Warning):this.showMessage("l-requisition-finished",m._yA.Warning)}initializeComponents(){var e=this;return(0,u.A)(function*(){yield e.initVariables(),e.initializePoComponent(),e.initializeSearch(),e.checkIfMobile(),e.setCountLastAccess(),e.getColumns(),e.getTableActions(),e.getData(!1)})()}getEmployeeSummary(){var e=this;return(0,u.A)(function*(){let i=B.c.loggedUser;return e.globals.getEmployeeSummary().then(o=>{e.employee=o,e.employee&&(i=e.employee.id)}),yield _.Ay.checkIfEncode(i)})()}clearData(e){(!this.requisitionsListView.records||e)&&(this.requisitionsListView.records=[],e&&(this.items=[]))}getDataRequisitionList(e,i,o,l,p,b,h){var v=this;return(0,u.A)(function*(){try{v.loading=!0;const y=yield v.requisitionsService.getAllRequisitions(v.loggedUser.id,e,i,l,b,null==p?void 0:p.toISOString(),h,"substitution");y?v.updateItemsForTable(y,o):v.requisitionsListView.hasMoreRecords=!1}catch(y){v.loading=!1}finally{v.loading=!1}})()}updateItemsForTable(e,i){var o=this;return(0,u.A)(function*(){o.clearData(i),o.requisitionsListView.records=o.requisitionsListView.records.concat(e.items),o.requisitionsListView.hasMoreRecords=e.hasNext;for(let p=0;p<o.requisitionsListView.records.length;p++){var l;const b=(0,U.A)((0,U.A)({id:o.requisitionsListView.records[p].id,idName:o.requisitionsListView.records[p].employeeId,requestId:o.requisitionsListView.records[p].requestId,employeeName:o.requisitionsListView.records[p].employeeName,employeeId:o.requisitionsListView.records[p].employeeId,responsableName:o.requisitionsListView.records[p].responsableName},o.isErpRM()&&null!=o.requisitionsListView.records[p].isException&&{isException:"1"===(null===(l=o.requisitionsListView.records[p])||void 0===l?void 0:l.isException)?"Em exce\xe7\xe3o":"-"}),{},{responsableId:o.requisitionsListView.records[p].responsableId,status:o.requisitionsListView.records[p].status,statusLabel:o.requisitionsListView.records[p].statusLabel,date:X.rL.formatUTCDate(new Date(o.requisitionsListView.records[p].startDate)),requesterName:o.requisitionsListView.records[p].requesterName});o.items[p]=b}o.isErpRM()&&(o.budgetIntegrationEnabled=o.items.some(p=>null==p?void 0:p.isException)),o.showMoreDisable=!o.requisitionsListView.hasMoreRecords,o.loading=!1})()}getColumns(){var e=this;return(0,u.A)(function*(){e.columns=[{property:"idName",label:yield e.translateString("l-name"),type:"columnTemplate"},{property:"requestId",label:yield e.translateString("l-requisition-id")},{property:"employeeId",label:yield e.translateString("l-requisition-matricula")},{property:"date",label:yield e.translateString("l-date"),type:"date"},{property:"responsableName",label:yield e.translateString("l-requisition-responsible")},...e.isErpRM()&&e.budgetIntegrationEnabled?[{property:"isException",label:yield e.translateString("l-requisition-exception")}]:[],{property:e.columnStatus,label:yield e.translateString("l-status"),type:"cellTemplate"}]})()}getTableActions(){var e=this;return(0,u.A)(function*(){e.tableActions.push({action:e.openVisualize.bind(e),label:(yield e.translateString("l-view")).toString(),visible:!0}),_.Ay.isErpProtheus()||(e.tableActions.push({action:e.openEdit.bind(e),label:(yield e.translateString("l-edit")).toString(),visible:e.permissions.substitutionEdit}),e.tableActions.push({label:(yield e.translateString("l-next-step")).toString(),visible:!0,action:e.selectRequisitionToStepAction.bind(e)})),!_.Ay.isErpRM()&&!_.Ay.isErpNode()&&(e.tableActions.push({label:(yield e.translateString("l-approve")).toString(),visible:!0,action:e.openRequestSubstitution.bind(e,!0)}),e.tableActions.push({label:(yield e.translateString("l-reprove")).toString(),visible:!0,action:e.openRequestSubstitution.bind(e,!1)}))})()}searchItems(e){var i,o,l;this.employeeName=null!==(i=e.employeeName)&&void 0!==i?i:void 0,this.startDate=e.startDate?new Date(e.startDate):void 0,this.requestId=null!==(o=e.requestId)&&void 0!==o?o:void 0,this.status=null!==(l=e.status)&&void 0!==l?l:void 0,this.requisitionsListView.actualPage>1&&(this.requisitionsListView.actualPage=1),this.getData(!0),this.filterActive=!1,0!==Object.keys(e).length&&(this.filterActive=!0)}resetFilters(){this.requisitionsListView.actualPage>1&&(this.requisitionsListView.actualPage=1),this.getData(!0)}showMessage(e,i){this.appTranslateService.getI18n(e).then(o=>{this.notificationService.showNotification(o,i)})}selectRequisitionToStepAction(e){this.canApproveReprove(e)?(this.requisitionsService.setSelectedRequisition(e),this.nextStepDialogComponent.getSteps(),this.nextStepDialogComponent.openModal()):_.Ay.checkIfDecode(this.loggedUser.id)!==e.responsableId&&e.status.toLowerCase()===x.K.StatusEnum.Approving.toLowerCase()?this.showMessage("l-requisition-in-progress",m._yA.Warning):this.isErpRM()&&e.status.toLowerCase()===x.K.StatusEnum.ConsultingBudget.toLowerCase()?this.showMessage("l-alert-budget-integration",m._yA.Warning):this.showMessage("l-requisition-finished",m._yA.Warning)}isErpRM(){return _.Ay.isErpRM()}}return(a=r).\u0275fac=function(e){return new(e||a)(t.rXU(Q.mI),t.rXU(I.R),t.rXU(E.i),t.rXU(ut.p),t.rXU(ht.up),t.rXU(mt.n),t.rXU(R.R),t.rXU(F.F),t.rXU(J.J),t.rXU(gt.u),t.rXU(H.Ix))}
1,a.\u0275cmp=t.VBU({type:a,selectors:[["app-substitution"]],viewQuery:function(e,i){if(1&e&&t.GBs(O.F,5),2&e){let o;t.mGM(o=t.lsd())&&(i.nextStepDialogComponent=o.first)}},hostBindings:function(e,i){1&e&&t.bIt("resize",function(l){return i.onResize(l)},t.tSv)},inputs:{requisition:"requisition"},standalone:!1,features:[t.Vt3],decls:9,vars:12,consts:[["tablePO",""],["backIsVisible","viewIsMobile","pageTitle","l-substitution",3,"backFunction"],["p-title"," ",3,"p-change-disclaimers","p-quick-search","p-advanced-search","ngClass","p-filters","p-literals"],["class","desktop",4,"ngIf"],["class","mobile",4,"ngIf"],["class","empty-center",4,"ngIf"],["requiredJustify","true",3,"getRequisitions","title"],[4,"ngIf"],[1,"desktop"],["p-container","","p-hide-select-all","true","p-hide-text-overflow","","p-sort","true","p-striped","true","p-selectable","false","p-actions-right","true",1,"po-table-custom-hide-text-overflow",3,"p-columns","p-items","p-loading","p-actions"],["p-table-column-template","",3,"p-property"],["p-table-cell-template",""],[1,"alignCenter","load-container"],[1,"load-more",3,"p-click","p-disabled","p-label"],[1,"po-row"],[1,"avatar-small"],[1,"po-table-column-cell","cell-content","po-ml-1"],[1,"flag",3,"ngClass"],[1,"mobile"],[1,"po-visible-sm-12","po-visible-md-12","mb-2","pl-0","pr-0"],["class","margin-card po-sm-12 po-md-12 pl-0 pr-0",4,"ngFor","ngForOf","ngForTrackBy"],[1,"margin-card","po-sm-12","po-md-12","pl-0","pr-0"],["card-header","",1,"mr-card-header","po-sm-12","po-md-12","po-lg-12","po-xl-12"],[1,"pull-left"],[1,"aboutEmployee"],[1,"name","cut-title"],["card-body",""],[1,"po-row","card-line"],[1,"po-sm-6","po-md-6"],[1,"pull-right","po-sm-6","po-md-6"],["class","po-row card-line",4,"ngIf"],[1,"po-row","mb-2","mt-3","actions-visualize"],[1,"po-sm-12","po-md-12",3,"click","p-label"],["class","po-sm-6 po-md-6 pull-left button-reprove",3,"p-label","click",4,"ngIf"],["class","po-sm-6 po-md-6","p-kind","primary",3,"p-label","click",4,"ngIf"],["class","po-sm-12 po-md-12",3,"p-label","click",4,"ngIf"],[1,"po-sm-6","po-md-6","pull-left","button-reprove",3,"click","p-label"],["p-kind","primary",1,"po-sm-6","po-md-6",3,"click","p-label"],[1,"empty-center"],["src","assets/img/process-stoped.svg",1,"img-empty"],[1,"po-xl-12","po-lg-12","po-md-12","po-sm-12"],[1,"label-empty"],["src","assets/img/empty-state.svg",1,"img-empty"],[3,"getBackEvent","getRequisitions","cleanFinishedRequisitions","requisition","isApproving","finishedRequisitions","steps"]],template:function(e,i){1&e&&(t.j41(0,"app-page-header",1),t.bIt("backFunction",function(){return i.back()}),t.k0s(),t.j41(1,"po-page-dynamic-search",2),t.bIt("p-change-disclaimers",function(l){return i.onChangeDisclaimers(l)})("p-quick-search",function(l){return i.onQuickSearch(l)})("p-advanced-search",function(l){return i.onAdvancedSearch(l)}),t.k0s(),t.DNE(2,St,8,10,"div",3)(3,Vt,3,1,"div",4)(4,Ft,6,3,"div",5)(5,Et,6,3,"div",5),t.j41(6,"app-next-step-dialog",6),t.nI1(7,"translate"),t.bIt("getRequisitions",function(){return i.getRequisitions()}),t.k0s(),t.DNE(8,jt,2,4,"div",7)),2&e&&(t.R7$(),t.Y8G("ngClass",i.hasDisclaimers?"disclaimer":"")("p-filters",i.filters)("p-literals",i.customLiterals),t.R7$(),t.Y8G("ngIf",!i.isMobile&&!i.substitutionIsEmpty()),t.R7$(),t.Y8G("ngIf",i.isMobile),t.R7$(),t.Y8G("ngIf",i.substitutionIsEmpty()&&!i.filterActive),t.R7$(),t.Y8G("ngIf",i.substitutionIsEmpty()&&i.filterActive),t.R7$(),t.Y8G("title",t.mNQ(t.bMT(7,10,"l-next-step"))),t.R7$(2),t.Y8G("ngIf",i.requestSubstitutionIsVisible))},dependencies:[f.YU,f.Sq,f.bT,m.rmE,m.NZw,m.D05,m.fNP,_t.F,k.y,O.F,D.z0,Y,f.GH,S.D9,vt.B,ft.P],styles:[".demission-label[_ngcontent-%COMP%]{margin-top:0}.mobile[_ngcontent-%COMP%]{overflow-y:visible;padding:0 8px}.desktop[_ngcontent-%COMP%]{margin:0 15px;padding-bottom:100px}.latest-requests[_ngcontent-%COMP%]{margin-top:0}.demission-history-header[_ngcontent-%COMP%]{font-weight:700;font-size:16px;color:#2b3639}.historic-value[_ngcontent-%COMP%]{float:right;font-weight:400;color:#2b3639}@media screen and (max-width: 375px){.historic-value[_ngcontent-%COMP%]{display:block;width:100%}}.historic-label[_ngcontent-%COMP%]{font-weight:700;color:#4a5c60}@media screen and (max-width: 375px){.historic-label[_ngcontent-%COMP%]{display:block;width:100%}}.next-records[_ngcontent-%COMP%]{background-color:transparent;text-align:center;font-size:16px;font-weight:700;line-height:3;color:#00445b;padding-bottom:20px;cursor:pointer}[_nghost-%COMP%] .mat-expansion-indicator:after{padding:5px;margin-top:-9px}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:0 2px 8px #e3e6f1!important;border-radius:6px;position:relative;background:#fff;display:flow-root;padding:0;margin-bottom:16px}.historic-content[_ngcontent-%COMP%]{padding:0 15px}@media (max-width: 375px){.historic-content[_ngcontent-%COMP%]{min-height:48px}}@media (max-width: 480px){.historic-content[_ngcontent-%COMP%] po-button[_ngcontent-%COMP%]{display:block;width:100%}}@media (min-width: 480px) and (max-width: 1024px){.historic-content[_ngcontent-%COMP%] po-button[_ngcontent-%COMP%]{margin-right:5px}}@media (max-width: 480px){[_nghost-%COMP%] po-button .po-button{display:block;width:100%;margin-bottom:10px}}[_nghost-%COMP%] .po-page-list-filter-wrapper{float:left}.requested-value[_ngcontent-%COMP%]{color:#fff;font-weight:700}.requested-label[_ngcontent-%COMP%]{color:#fff;opacity:.7}.requested-title[_ngcontent-%COMP%]{display:inline-block;margin:0 0 8px;padding-left:8px;color:#fff}.to-request-value[_ngcontent-%COMP%]{color:#fff;font-weight:700}.to-request-label[_ngcontent-%COMP%]{color:#fff}.dropdown[_ngcontent-%COMP%]{float:initial;text-align:center}.dropdown-menu-itens[_ngcontent-%COMP%]{cursor:pointer!important;text-align:left;font-weight:400;background-color:#fff;line-height:44px;width:100%;padding:0 16px;margin-top:-4px;border-radius:3px}.dropdown-menu-itens[_ngcontent-%COMP%]:hover{background-color:#f0f8ff}.dropdown-menu-itens-next[_ngcontent-%COMP%]{white-space:nowrap}.dropdown-menu[_ngcontent-%COMP%]{top:100%;right:5px;min-width:90px;left:auto!important}.see-more[_ngcontent-%COMP%]{color:#4a5c60;font-size:20px}[_nghost-%COMP%] po-advanced-filter .po-field-title{text-transform:capitalize}.demission[_ngcontent-%COMP%]{position:relative;padding:10px}@media screen and (min-width: 992px) and (max-width: 1199px){.demission-holder[_ngcontent-%COMP%]{position:absolute;bottom:22px;right:15px}}@media screen and (min-width: 1200px){.demission-holder[_ngcontent-%COMP%]{position:absolute;bottom:22px;right:15px}}@media (max-width: 960px) and (min-width: 481px){.demission-holder[_ngcontent-%COMP%]{position:absolute;bottom:22px;right:15px}}.demission-link[_ngcontent-%COMP%]{width:100%}@media screen and (min-width: 992px){.actions-holder[_ngcontent-%COMP%]{margin:30px 0 20px}.actions-holder[_ngcontent-%COMP%] .search-holder[_ngcontent-%COMP%]{display:inline-block;max-width:450px;width:250px;float:right}}@media (max-width: 480px){.actions-holder[_ngcontent-%COMP%]{margin:0 0 15px}.actions-holder[_ngcontent-%COMP%] .po-button[_ngcontent-%COMP%]{height:44px;width:100%;margin-bottom:15px}.actions-holder[_ngcontent-%COMP%] .po-button[_ngcontent-%COMP%] po-button[_ngcontent-%COMP%]{height:44px;width:100%;padding:0}}@media (max-width: 480px){[_nghost-%COMP%] .po-page-list-actions .po-button, [_nghost-%COMP%] .load-more .po-button{height:44px;width:100%;padding:0}}@media (max-width: 480px){[_nghost-%COMP%] .po-page-list-actions{margin-bottom:55px}}[_nghost-%COMP%] .general .max-width-page-title{padding-left:0}[_nghost-%COMP%] .demission .card-well{background:linear-gradient(to top right,#0c7cbe,#0cb8be)}.displayBlock[_ngcontent-%COMP%]{width:100%;display:block}.bullet[_ngcontent-%COMP%]{display:inline-block;height:15px;width:15px;margin-right:10px;padding:8px;border-radius:20px;background:#efba2a}.flag[_ngcontent-%COMP%]{display:inline-block;height:20px;min-width:20px;overflow-y:hidden;padding:2px 8px;background:#efba2a;border-radius:3px;color:#fff;font-size:10px;line-height:16px;text-align:left;text-transform:uppercase;vertical-align:middle}.employee-label-column[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:#00445b;border-bottom:2px solid #ceebf2!important;background-color:#fff;padding:0;margin:0}.custom-tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle!important;font-size:14px;line-height:1;word-wrap:break-word;overflow:auto;
1max-width:200px}.column-icons[_ngcontent-%COMP%]{text-align:center}.custom-tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{vertical-align:middle!important;font-size:14px;height:20px!important;white-space:nowrap;padding:10px}tr.hover-design[_ngcontent-%COMP%]:hover{background-color:#fafbfb}tr.hover-design[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:1px solid #ebeded}.sort-icons[_ngcontent-%COMP%]{display:inline-block}.desktop[_ngcontent-%COMP%]{padding-bottom:100px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.avatar-small[_ngcontent-%COMP%]{display:inline-block}.column-see[_ngcontent-%COMP%]{vertical-align:middle!important}.column-icons[_ngcontent-%COMP%]{overflow:initial!important}.pending[_ngcontent-%COMP%]{background-color:#efba2a}.approved[_ngcontent-%COMP%], .aprovado[_ngcontent-%COMP%], .fechado[_ngcontent-%COMP%], .closed[_ngcontent-%COMP%]{background:#107048}.rejected[_ngcontent-%COMP%], .rejeitado[_ngcontent-%COMP%], .reprovado[_ngcontent-%COMP%], .reproved[_ngcontent-%COMP%]{background:#be3e37}.consultingbudget[_ngcontent-%COMP%]{background:#e3e9f7;color:#173782;width:163px}.budgetnotapproved[_ngcontent-%COMP%]{background:#f6e6e5;color:#72211d}.empty[_ngcontent-%COMP%], .vazio[_ngcontent-%COMP%]{background:#cacaca}.approving[_ngcontent-%COMP%]{background:#efba2a}[_nghost-%COMP%] .po-page-content{position:absolute;left:-100vw;top:-100vh}[_nghost-%COMP%] .po-page{height:-webkit-fit-content;height:fit-content;display:block;width:100%;margin-left:0}@media screen and (max-width: 576px){[_nghost-%COMP%] .po-modal-footer{padding:15px}}@media screen and (min-width: 576px){[_nghost-%COMP%] .po-modal-footer{margin-bottom:15px;padding:15px 15px 0}}[_nghost-%COMP%] .po-modal-footer .po-button{margin:0 0 5px}@media screen and (max-width: 480px){[_nghost-%COMP%] .po-modal-footer .po-button{margin-bottom:10px}}@media screen and (min-width: 576px){[_nghost-%COMP%] .po-modal-footer po-button{margin-left:0}}[_nghost-%COMP%] .po-page-list-actions .po-button{padding:0 50px}@media (max-width: 480px){[_nghost-%COMP%] .po-page-filter-content{width:calc(100% - 80px)}}@media (min-width: 768px){[_nghost-%COMP%] .po-page-filter-content{width:300px}}[_nghost-%COMP%] .po-table-subtitle-footer-container{display:none}.alignCenter[_ngcontent-%COMP%]{text-align:center}.mat-accordion[_ngcontent-%COMP%] > .mat-expansion-panel-spacing[_ngcontent-%COMP%]{margin-bottom:8px}[_nghost-%COMP%] .mat-content{align-items:center;overflow:auto}.mat-expansion-panel-header[_ngcontent-%COMP%]{padding:0 24px 0 20px}.sort[_ngcontent-%COMP%]{display:block;width:100%;cursor:pointer;font-size:9px;margin-left:15px}.load-container[_ngcontent-%COMP%]{margin-bottom:30px}.history-panel[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .custom-tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#fff}[_nghost-%COMP%] .button-reprove .po-button{color:#be3e37;border-color:#be3e37}.pull-right[_ngcontent-%COMP%]{padding:0 8px;float:right!important;text-align:right}.card-line[_ngcontent-%COMP%]{font-size:14px;border-top:1px solid #eceeee}[_nghost-%COMP%] .button-actions{width:100%;padding-top:10px}.margin-card[_ngcontent-%COMP%]{margin-bottom:16px}@media screen and (max-width: 490px){[_nghost-%COMP%] .po-page-list-filter-wrapper .po-page-filter-content{width:calc(100% - 72px)}[_nghost-%COMP%] .po-page-list-actions .po-button{height:44px}[_nghost-%COMP%] .po-page-list-filter-wrapper .po-input, [_nghost-%COMP%] .po-page-list-filter-wrapper .po-page-list-filter-search-link{height:44px}[_nghost-%COMP%] .po-page-list-filter-wrapper .po-page-list-filter-search-link{font-size:12px}[_nghost-%COMP%] .load-more .po-button{height:44px;width:100%;padding:0}[_nghost-%COMP%] .po-icon{padding-right:8px}[_nghost-%COMP%] .po-disclaimer-group{margin-top:70px}}@media screen and (min-width: 720px){[_nghost-%COMP%] .po-page-header{padding-top:35px}}@media screen and (min-width: 480px){[_nghost-%COMP%] div.po-modal-footer{padding-top:15px}}.empty-center[_ngcontent-%COMP%]{text-align:center;margin-top:6%;margin-bottom:25%}.label-empty[_ngcontent-%COMP%]{font-size:23px}@media only screen and (min-width: 320px) and (max-width: 768px){.empty-center[_ngcontent-%COMP%]{text-align:center;margin-top:30%;padding-bottom:25%;margin-bottom:57%!important}.label-empty[_ngcontent-%COMP%]{font-size:24px;margin-top:-6px}}.img-empty[_ngcontent-%COMP%]{width:100%;max-width:230px;padding-bottom:10px;margin-bottom:20px}@media only screen and (min-width: 481px) and (max-width: 960px){.img-empty[_ngcontent-%COMP%]{width:100%;max-width:365px;padding-bottom:10px;margin-bottom:20px}}[_nghost-%COMP%] .aboutEmployee{display:flex;align-items:center}[_nghost-%COMP%] .aboutEmployee .name{font-size:15px}[_nghost-%COMP%] .aboutEmployee .office{font-size:12px}.avatar-small[_ngcontent-%COMP%]{float:left;margin:5px 8px 0 0}@media screen and (min-width: 768px){.avatar-small[_ngcontent-%COMP%]{width:27px!important;height:27px!important;margin:5px 5px 0 0!important}}.load-container[_ngcontent-%COMP%]{margin-bottom:30px;padding:20px 0}.cell-content[_ngcontent-%COMP%]{display:flex;max-width:64%!important;align-items:center}@media screen and (min-width: 1500px){.cell-content[_ngcontent-%COMP%]{max-width:80%!important}}.card-line[_ngcontent-%COMP%]{font-size:14px;border-top:1px solid #eceeee;padding-top:16px}.cut-title[_ngcontent-%COMP%]{margin:0;padding-left:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 320px) and (max-width: 481px){.cut-title[_ngcontent-%COMP%]{width:calc(100vw - 220px)}}@media screen and (max-width: 320px){.cut-title[_ngcontent-%COMP%]{width:calc(100vw - 240px)}}[_nghost-%COMP%] .po-page, [_nghost-%COMP%] .po-page-content{height:auto!important}[_nghost-%COMP%] #expansion-card-header{position:relative;padding:3px 0 2px}[_nghost-%COMP%] #expansion-card-header .icon-collapsed{top:50%;margin-top:25px!important;transform:translateY(-50%);right:0}[_nghost-%COMP%] #expansion-card-header .mr-card-header{float:unset}[_nghost-%COMP%] #expansion-card-header .mr-card-header .about-employee{display:flex;align-items:center;padding-right:15px}[_nghost-%COMP%] #expansion-card-header .mr-card-header .about-employee .cut-title{margin:0;padding-left:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:16px}[_nghost-%COMP%] #expansion-card-header .mr-card-header .about-employee .name{font-size:15px}[_nghost-%COMP%] #expansion-card-header .mr-card-header .checkbox-list .po-checkbox{margin-top:4px;padding:4px 0}[_nghost-%COMP%] #expansion-card-header .mr-card-header .po-checkbox .po-checkbox-label{font-weight:bolder!important}[_nghost-%COMP%] #expansion-card-body .item-body .value{text-align:right;font-weight:700}[_nghost-%COMP%] .po-page-content{padding:0!important}@media screen and (min-width: 480px){[_nghost-%COMP%] .po-modal-footer{display:flex!important;justify-content:end!important;gap:10px!important}}"]}),r})();var K=c(9029),Lt=c(58217),$t=c(31028),At=c(96287),Dt=c(70514);const Bt=a=>({"pl-0 pr-1":a}),Xt=()=>({standalone:!0});function Yt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",10)(1,"div",12),t.nrm(2,"po-input",13),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",14)(5,"div",15),t.bIt("click",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.openSalarialTable())}),t.EFF(6),t.nI1(7,"translate"),t.k0s()()()}if(2&a){const n=t.XpG(2);t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(3,4,"l-salary-table")))("ngClass",t.eq3(8,Bt,n.viewIsMobile)),t.R7$(4),t.JRh(t.bMT(7,6,"l-salary-table"))}}function zt(a,r){1&a&&(t.j41(0,"div",16),t.nrm(1,"po-input",17),t.nI1(2,"translate"),t.nI1(3,"translate"),t.k0s()),2&a&&(t.R
17$(),t.Y8G("p-placeholder",t.mNQ(t.bMT(2,4,"l-salary-level")))("p-label",t.mNQ(t.bMT(3,6,"l-salary-level"))))}function Ut(a,r){1&a&&(t.j41(0,"div",16),t.nrm(1,"po-input",18),t.nI1(2,"translate"),t.nI1(3,"translate"),t.k0s()),2&a&&(t.R7$(),t.Y8G("p-placeholder",t.mNQ(t.bMT(2,4,"l-salary-range")))("p-label",t.mNQ(t.bMT(3,6,"l-salary-range"))))}function Qt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",16)(1,"po-number",20),t.nI1(2,"translate"),t.nI1(3,"translate"),t.bIt("focusin",function(){s.eBV(n);const i=t.XpG(3);return s.Njj(i.setCurrentValues())})("focusout",function(){s.eBV(n);const i=t.XpG(3);return s.Njj(i.calculateSalaryValue())}),t.k0s()()}2&a&&(t.R7$(),t.Y8G("p-placeholder",t.mNQ(t.bMT(2,4,"l-salary-percent-placeholder")))("p-label",t.mNQ(t.bMT(3,6,"l-percentage-increase"))))}function Jt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",10),t.DNE(1,Qt,4,8,"div",11),t.j41(2,"div",16)(3,"po-number",19),t.nI1(4,"translate"),t.nI1(5,"translate"),t.bIt("focusin",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.setCurrentValues())})("focusout",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.calculatePercentage())}),t.k0s()()()}if(2&a){const n=t.XpG(2);t.R7$(),t.Y8G("ngIf",n.percentSalaryField),t.R7$(2),t.Y8G("p-placeholder",t.mNQ(t.bMT(4,5,"l-salary-proposal-placeholder")))("p-label",t.mNQ(t.bMT(5,7,"l-proposed-salary")))}}function Ht(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",16)(1,"po-input",21),t.nI1(2,"translate"),t.mxI("ngModelChange",function(i){s.eBV(n);const o=t.XpG(2);return t.DH7(o.costCenter.name,i)||(o.costCenter.name=i),s.Njj(i)}),t.k0s()()}if(2&a){const n=t.XpG(2);t.R7$(),t.Y8G("p-label",t.mNQ(t.bMT(2,3,"l-cost-center"))),t.R50("ngModel",n.costCenter.name)}}function Kt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",16)(1,"po-input",22),t.nI1(2,"translate"),t.mxI("ngModelChange",function(i){s.eBV(n);const o=t.XpG(2);return t.DH7(o.classValue.descricao,i)||(o.classValue.descricao=i),s.Njj(i)}),t.k0s()()}if(2&a){const n=t.XpG(2);t.R7$(),t.Y8G("p-label",t.mNQ(t.bMT(2,3,"l-class-value"))),t.R50("ngModel",n.classValue.descricao)}}function Wt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",16)(1,"po-input",23),t.nI1(2,"translate"),t.mxI("ngModelChange",function(i){s.eBV(n);const o=t.XpG(2);return t.DH7(o.accountingItem.descricao,i)||(o.accountingItem.descricao=i),s.Njj(i)}),t.k0s()()}if(2&a){const n=t.XpG(2);t.R7$(),t.Y8G("p-label",t.mNQ(t.bMT(2,3,"l-accounting-item"))),t.R50("ngModel",n.accountingItem.descricao)}}function Zt(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",10)(1,"div",24)(2,"po-lookup",25),t.nI1(3,"translate"),t.nI1(4,"translate"),t.mxI("ngModelChange",function(i){s.eBV(n);const o=t.XpG(2);return t.DH7(o.reasonSalaryChange,i)||(o.reasonSalaryChange=i),s.Njj(i)}),t.bIt("p-selected",function(i){s.eBV(n);const o=t.XpG(2);return s.Njj(o.setSelectedReasonSalaryChange(i))})("p-change",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.setSalaryTable())}),t.k0s()()()}if(2&a){const n=t.XpG(2);t.R7$(2),t.Y8G("p-placeholder",t.mNQ(t.bMT(3,8,"l-select-salary-change-reason")))("p-label",t.mNQ(t.bMT(4,10,"l-salary-change-reason"))),t.R50("ngModel",n.reasonSalaryChange),t.Y8G("ngModelOptions",t.lJ4(12,Xt))("p-filter-service",n.salaryChangeTypesLookupService)("p-columns",n.lookupColumnSalaryChangeTypes)}}function te(a,r){if(1&a&&(t.j41(0,"div",8),t.DNE(1,Yt,8,10,"div",9),t.j41(2,"div",10),t.DNE(3,zt,4,8,"div",11)(4,Ut,4,8,"div",11),t.k0s(),t.DNE(5,Jt,6,9,"div",9),t.j41(6,"div",10),t.DNE(7,Ht,3,5,"div",11)(8,Kt,3,5,"div",11)(9,Wt,3,5,"div",11),t.k0s(),t.DNE(10,Zt,5,13,"div",9),t.k0s()),2&a){const n=t.XpG();t.Y8G("formGroup",n.reactiveForm),t.R7$(),t.Y8G("ngIf","hiddenFieldProperties"!==n.reactiveForm.controls.salaryTable.value),t.R7$(2),t.Y8G("ngIf","hiddenFieldProperties"!==n.reactiveForm.controls.levelSalaryTable.value),t.R7$(),t.Y8G("ngIf","hiddenFieldProperties"!==n.reactiveForm.controls.rangeSalaryTable.value),t.R7$(),t.Y8G("ngIf","hiddenFieldProperties"!==n.reactiveForm.controls.editSalary.value),t.R7$(2),t.Y8G("ngIf",n.isVisibleCostCenter&&null!==n.costCenter),t.R7$(),t.Y8G("ngIf",n.isVisibleClassValue),t.R7$(),t.Y8G("ngIf",n.isVisibleAccountingItem),t.R7$(),t.Y8G("ngIf",n.isVisibleChangeSalary&&"hiddenFieldProperties"!==n.reactiveForm.controls.reasonSalaryChange.value)}}function ee(a,r){1&a&&(t.j41(0,"p",26),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&a&&(t.R
17$(),t.JRh(t.bMT(2,1,"l-salary-table-subtitle")))}function ie(a,r){if(1&a&&t.nrm(0,"po-table",27),2&a){const n=t.XpG();t.Y8G("p-columns",n.columnsView)("p-items",n.itemsView)("p-sort",!0)("p-striped",!0)("p-hide-columns-manager",!0)("p-loading",n.loading)}}function ne(a,r){if(1&a){const n=t.RV6();t.j41(0,"span"),t.nrm(1,"hr",38),t.j41(2,"div",39)(3,"span",40)(4,"input",41),t.bIt("click",function(){const i=s.eBV(n).$implicit,o=t.XpG().$implicit,l=t.XpG().$implicit,p=t.XpG(2);return s.Njj(p.setSelectedValue(o.descriptionLevel,i.labelLevel,i.valueLevel,l.description,l.id,o.codLevel,i.idLevel))}),t.k0s(),t.j41(5,"label",42),t.EFF(6),t.k0s()(),t.j41(7,"span",43),t.EFF(8),t.nI1(9,"currency"),t.k0s()()()}if(2&a){const n=r.$implicit;t.R7$(4),t.Y8G("id",n.idLevel)("value",n.labelLevel),t.R7$(),t.Y8G("for",n.idLevel),t.R7$(),t.JRh(n.labelLevel),t.R7$(2),t.JRh(t.brH(9,5,n.valueLevel,"BRL",!0))}}function oe(a,r){if(1&a&&(t.j41(0,"mat-expansion-panel",35)(1,"mat-expansion-panel-header",36),t.EFF(2),t.k0s(),t.DNE(3,ne,10,9,"span",37),t.k0s()),2&a){const n=r.$implicit;t.R7$(2),t.Lme(" ",n.codLevel," - ",n.descriptionLevel," "),t.R7$(),t.Y8G("ngForOf",n.items)}}function ae(a,r){if(1&a&&(t.j41(0,"mat-accordion",33),t.DNE(1,oe,4,3,"mat-expansion-panel",34),t.k0s()),2&a){const n=r.$implicit;t.R7$(),t.Y8G("ngForOf",n.items)}}function se(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",28),t.DNE(1,ae,2,1,"mat-accordion",29),t.j41(2,"div",30)(3,"div",10)(4,"po-button",31),t.nI1(5,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.cancelModal())}),t.k0s(),t.j41(6,"po-button",32),t.nI1(7,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG();return s.Njj(i.confirmModal())}),t.k0s()()()()}if(2&a){const n=t.XpG();t.R7$(),t.Y8G("ngForOf",n.salaryTable.items),t.R7$(3),t.Y8G("p-label",t.mNQ(t.bMT(5,5,"l-cancel"))),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(7,7,"l-confirm")))}}let le=(()=>{var a;class r extends M.U{constructor(e,i,o,l,p,b,h){super(),this.costCenterLookupService=e,this.classValueLookupService=i,this.accountingItemLookupService=o,this.fb=l,this.requisitionsService=p,this.appTranslateService=b,this.notificationService=h,this.isVisibleClassValue=!1,this.isVisibleAccountingItem=!1,this.isVisibleCostCenter=!1,this.isVisibleChangeSalary=!0,this.percentSalaryField=!0,this.isSubstitutionRequest=!1,this.salaryInfo={},this.visibleTableDescription=!0}ngOnInit(){var e=this;return(0,u.A)(function*(){e.defineIsMobile(window.innerWidth,window.innerHeight),e.setFieldProperties(),e.setCurrentValues(),yield e.initializeComponent()})()}initFormField(){var e,i,o,l;this.salaryInfoEdit=this.salaryInfo,"hiddenFieldProperties"!==this.reactiveForm.controls.salaryTable.value&&this.reactiveForm.controls.salaryTable.setValue(null===(e=this.salaryInfo.idSalaryTable)||void 0===e?void 0:e.split("|")[1]),"hiddenFieldProperties"!==this.reactiveForm.controls.levelSalaryTable.value&&this.reactiveForm.controls.levelSalaryTable.setValue(this.salaryInfo.salaryLevel),"hiddenFieldProperties"!==this.reactiveForm.controls.rangeSalaryTable.value&&this.reactiveForm.controls.rangeSalaryTable.setValue(this.salaryInfo.salaryRange),"hiddenFieldProperties"!==this.reactiveForm.controls.editPercent.value&&this.reactiveForm.controls.editPercent.setValue(this.salaryInfo.percent),"hiddenFieldProperties"!==this.reactiveForm.controls.editSalary.value&&this.reactiveForm.controls.editSalary.setValue(this.salaryInfo.proposedSalary),"hiddenFieldProperties"!==this.reactiveForm.controls.editSalary.value&&(this.reactiveForm.controls.reasonSalaryChange.setValue(this.changeSalaryField),this.reasonSalaryChange=this.changeSalaryField),this.isVisibleCostCenter&&this.reactiveForm.controls.costCenter.setValue(null===(i=this.costCenter)||void 0===i?void 0:i.name),this.isVisibleClassValue&&this.reactiveForm.controls.classValue.setValue(null===(o=this.classValue)||void 0===o?void 0:o.id),this.isVisibleAccountingItem&&this.reactiveForm.controls.accountingItem.setValue(null===(l=this.accountingItem)||void 0===l?void 0:l.id)}createReactiveForm(){this.reactiveForm=this.fb.group({salaryTable:[""],levelSalaryTable:[""],rangeSalaryTable:[""],editPercent:[""],editSalary:[""],reasonSalaryChange:[""],costCenter:[""],classValue:[""],accountingItem:[""]}
1),this.fieldProperties.forEach(e=>{this.reactiveForm.controls[e.field]&&(e.required&&this.reactiveForm.controls[e.field].addValidators([g.k0.required]),e.editable||this.reactiveForm.controls[e.field].disable(),e.visible||this.reactiveForm.controls[e.field].setValue("hiddenFieldProperties"),"costCenter"===e.field&&(this.isVisibleCostCenter=e.visible),"classValue"===e.field&&(this.isVisibleClassValue=e.visible),"accountingItem"===e.field&&(this.isVisibleAccountingItem=e.visible))}),this.initFormField()}openSalarialTable(){var e=this;return(0,u.A)(function*(){let i;e.columns=[],e.items=[],e.loading=!0,i={idCompanyDepartment:e.company,idDepartment:e.department,idFunction:e.codFunction},e.salaryTable=yield e.requisitionsService.getSalaryTables(i),e.modalTitle=e.salaryTable.items[0].description,e.poModal.open(),yield e.generateTable(e.salaryTable.items),e.columnsView=e.columns,e.itemsView=e.items,e.loading=!1,e.resetSelectedValue()})()}generateTable(e){var i=this;return(0,u.A)(function*(){const o=[],l=new f.oe("pt-BR","BRL");let p=[];e&&e.forEach(b=>{b.items.forEach(h=>{h.items.forEach(C=>{o.push({property:C.idLevel,label:C.labelLevel,type:"link",action:i.clickAction.bind(i,C.idLevel,C.labelLevel)}),p.push({[C.idLevel]:l.transform(C.valueLevel,"BRL","symbol","1.2-2")})});const v={cod:h.codLevel,nvl:h.descriptionLevel};let y;p.forEach(C=>{y=Object.assign(v,C)}),i.items.push(y)}),i.columns.push({property:"cod",label:"C\xf3digo",type:"string"}),i.columns.push({property:"nvl",label:"N\xedvel",type:"string"}),o.forEach(h=>{-1===i.columns.findIndex(y=>y.property===h.property)&&i.columns.push(h)})})})()}clickAction(e,i,o,l){const p=o.replace(/[^0-9,-]+/g,""),b=Number(p.replace(/,/g,"."));this.salaryTable.items.length>=0&&(this.reactiveForm.controls.salaryTable.setValue(this.salaryTable.items[0].description),this.reactiveForm.controls.levelSalaryTable.setValue(l.nvl),this.reactiveForm.controls.rangeSalaryTable.setValue(i),this.reactiveForm.controls.editSalary.setValue(b),this.selectedSalaryTableId=this.salaryTable.items[0].id,this.selectedSalaryTableLevelId=l.cod,this.selectedSalaryTableRangeId=e,_.Ay.isErpRM()&&o&&this.isVisibleChangeSalary&&(this.reactiveForm.controls.reasonSalaryChange.enable(),this.reactiveForm.controls.reasonSalaryChange.addValidators([g.k0.required]),this.reactiveForm.controls.reasonSalaryChange.setValue(""))),this.poModal.close(),this.calculatePercentage(),this.setSalaryTable()}setSalaryTable(){let e;e={idSalaryTable:this.salaryInfoEdit.idSalaryTable,salaryRange:this.selectedSalaryTableRangeId,salaryLevel:this.selectedSalaryTableLevelId,proposedSalary:this.reactiveForm.controls.editSalary.value,percent:this.salaryInfoEdit.percent},this.requisitionsService.setSalaryTableRequest(e)}cancelModal(){this.resetSelectedValue(),this.poModal.close()}setSelectedValue(e,i,o,l,p,b,h){const v=new f.oe("pt-BR","BRL");this.descriptionLevel=e,this.labelLevel=i,this.tableName=l,this.valueLevel=v.transform(o,"BRL","symbol","1.2-2"),this.selectedSalaryTableId=p,this.selectedSalaryTableLevelId=b,this.selectedSalaryTableRangeId=h,this.salaryInfoEdit.idSalaryTable=this.selectedSalaryTableId,this.salaryInfoEdit.proposedSalary=o,this.salaryInfoEdit.salaryLevel=b,this.salaryInfoEdit.salaryRange=h}resetSelectedValue(){this.descriptionLevel=null,this.labelLevel=null,this.valueLevel=null}confirmModal(){const e=this.valueLevel.replace(/[^0-9,-]+/g,""),i=Number(e.replace(/,/g,"."));this.reactiveForm.controls.salaryTable.setValue(this.tableName),this.reactiveForm.controls.levelSalaryTable.setValue(this.labelLevel),this.reactiveForm.controls.rangeSalaryTable.setValue(this.descriptionLevel),this.reactiveForm.controls.editSalary.setValue(i),_.Ay.isErpRM()&&e&&this.isVisibleChangeSalary&&(this.reactiveForm.controls.reasonSalaryChange.enable(),this.reactiveForm.controls.reasonSalaryChange.addValidators([g.k0.required]),this.reactiveForm.controls.reasonSalaryChange.setValue("")),this.poModal.close(),this.calculatePercentage()}calculatePercentage(){var e=this;return(0,u.A)(function*(){const i=e.reactiveForm.controls.editSalary.value;if(i!==e.currentSalary){let o;o={salary:i,percent:null,salaryCurrent:e.currentSalary,isSubstitutionRequest:!(!_.Ay.isErpRM()||!e.isSubstitutionRequest)||void 0};const l=yield e.requisitionsService.validateSalary(o);e.applySalaryChangeRules(i,l),e.salaryInfoEdit.percent=l.percent,e.salaryInfoEdit.proposedSalary=l.salary,e.reactiveForm.controls.editPercent.setValue(l.percent),e.reactiveForm.controls.editSalary.setValue(l.salary),e.checkIfSalaryisLower(i),e.setSalaryTable()}})()}applySalaryChangeRules(e,i){_.Ay.isErpRM()&&(null!=e&&i.salary>=0?(0==e&&0==i.salary&&this.reactiveForm.controls.editPercent.setValue(-100),this.reactiveForm.controls.reasonSalaryChange.enable(),this.reactiveForm.controls.reasonSalaryChange.addValidators([g.k0.required]),this.reactiveForm.controls.reasonSalaryChange.setValue("")):this.isVisibleChangeSalary&&(this.reactiveForm.controls.reasonSalaryChange.setValue(""),this.selectedChangeSalaryReason=null,this.reactiveForm.controls.reasonSalaryChange.removeValidators([g.k0.required]),this.reactiveForm.controls.reasonSalaryChange.disable(),this.resetValueTableSalary(this.reactiveForm.controls.salaryTable.value)))}calculateSalaryValue(){var e=this;return(0,u.A)(function*(){const i=e.reactiveForm.controls.editPercent.value;if(i!==e.currentDiscount){let o;o={salary:null,percent:i,salaryCurrent:e.salaryInfo.proposedSalary,isSubstitutionRequest:!(!_.Ay.isErpRM()||!e.isSubstitutionRequest)||void 0};const l=yield e.requisitionsService.validateSalary(o);e.salaryInfoEdit.proposedSalary=l.salary,e.salaryInfoEdit.percent=l.percent,e.reactiveForm.controls.editSalary.setValue(l.salary),e.reactiveForm.controls.editPercent.setValue(l.percent),e.a
1pplyPercentageSalaryRules(i,l,o),e.checkIfSalaryisLower(l.salary),e.setSalaryTable()}})()}applyPercentageSalaryRules(e,i,o){_.Ay.isErpRM()&&(null!=e&&i.salary>=0?(0==e&&0==i.salary&&this.reactiveForm.controls.editSalary.setValue(o.salaryCurrent),this.reactiveForm.controls.reasonSalaryChange.enable(),this.reactiveForm.controls.reasonSalaryChange.addValidators([g.k0.required]),this.reactiveForm.controls.reasonSalaryChange.setValue("")):this.isVisibleChangeSalary&&(this.reactiveForm.controls.reasonSalaryChange.setValue(""),this.selectedChangeSalaryReason=null,this.reactiveForm.controls.reasonSalaryChange.removeValidators([g.k0.required]),this.reactiveForm.controls.reasonSalaryChange.disable(),this.resetValueTableSalary(this.reactiveForm.controls.salaryTable.value)))}resetValueTableSalary(e){"hiddenFieldProperties"!==e&&(this.reactiveForm.controls.salaryTable.setValue(""),this.reactiveForm.controls.levelSalaryTable.setValue(""),this.reactiveForm.controls.rangeSalaryTable.setValue(""),this.reactiveForm.controls.editSalary.setValue(""),this.reactiveForm.controls.editPercent.setValue(""),this.reactiveForm.controls.reasonSalaryChange.setValue(""),this.selectedChangeSalaryReason=null,this.selectedChangeFunctionReason=null,this.selectedSalaryTableLevelId=null,this.selectedSalaryTableRangeId=null,this.selectedSalaryTableId=null,this.reactiveForm.controls.reasonSalaryChange.disable())}setCurrentValues(){const i=this.salaryInfo.percent;this.currentSalary=this.salaryInfo.proposedSalary,this.currentDiscount=i,this.isVisibleCostCenter&&(this.costCenterLookupService.companyId=this.company),this.isVisibleClassValue&&(this.classValueLookupService.companyId=this.company),this.isVisibleAccountingItem&&(this.accountingItemLookupService.companyId=this.company)}checkIfSalaryisLower(e){var i=this;return(0,u.A)(function*(){if(e<i.currentSalary){const o=yield i.appTranslateService.getI18n("l-salary-level-warning");i.visibleWarning&&i.notificationService.showNotification(o,m._yA.Warning)}else if(e==i.currentSalary){const o=yield i.appTranslateService.getI18n("l-salary-level-information");i.notificationService.showNotification(o,m._yA.Information)}})()}setFieldProperties(){var e=this;return(0,u.A)(function*(){e.fieldProperties&&(e.fieldProperties.forEach(i=>{switch(i.field){case"salaryTable":e.salaryTableProperties=i;break;case"levelSalaryTable":e.levelSalaryTable=i;break;case"rangeSalaryTable":e.rangeSalaryTable=i;break;case"editSalary":e.editSalary=i}}),e.createReactiveForm())})()}initializeComponent(){var e=this;return(0,u.A)(function*(){e.initLookup()})()}initLookup(){this.costCenterLookupColumns=[{property:"id",label:"l-code",fieldLabel:!0,width:"30%"},{property:"name",label:"l-cost-center"}],this.classValueLookupColumns=[{property:"id",label:"l-code",fieldLabel:!0,width:"30%"},{property:"classeValor",label:"l-class-value"},{property:"descricao",label:"l-description"}],this.accountingItemLookupColumns=[{property:"id",label:"l-code",fieldLabel:!0,width:"30%"},{property:"itemContabil",label:"l-accounting-item"},{property:"descricao",label:"l-description"}],this.costCenterLookupColumns.forEach(e=>{this.appTranslateService.getI18n(e.label).then(i=>{e.label=i})}),this.classValueLookupColumns.forEach(e=>{this.appTranslateService.getI18n(e.label).then(i=>{e.label=i})}),this.accountingItemLookupColumns.forEach(e=>{this.appTranslateService.getI18n(e.label).then(i=>{e.label=i})})}setCostCenter(e){e&&(this.costCenter=e)}setClassValue(e){e&&(this.classValue=e)}setAccountingItem(e){e&&(this.accountingItem=e)}}return(a=r).\u0275fac=function(e){return new(e||a)(t.rXU($t.Q),t.rXU(At.V),t.rXU(Dt.c),t.rXU(g.ok),t.rXU(I.R),t.rXU(F.F),t.rXU(J.J))},a.\u0275cmp=t.VBU({type:a,selectors:[["app-salary-table"]],viewQuery:function(e,i){if(1&e&&t.GBs(m.I3z,7),2&e){let o;t.mGM(o=t.lsd())&&(i.poModal=o.first)}},inputs:{isVisibleChangeSalary:"isVisibleChangeSalary",percentSalaryField:"percentSalaryField",isSubstitutionRequest:"isSubstitutionRequest",salaryInfo:"salaryInfo",company:"company",department:"department",codFunction:"codFunction",changeSalaryField:"changeSalaryField",fieldProperties:"fieldProperties",costCenter:"costCenter",classValue:"classValue",accountingItem:"accountingItem"},standalone:!1,features:[t.Vt3],decls:11,vars:12,consts:[["modal",""],[1,"po-row","pt-3"],[1,"po-xl-12","po-lg-12","po-md-12","po-sm-12","subtitle-form","fix-padding"],[3,"formGroup",4,"ngIf"],["id","salaryTable",3,"p-title"],["class","table-description",4,"ngIf"],["p-striped","true",3,"p-columns","p-items","p-sort","p-striped","p-hide-columns-manager","p-loading",4,"ngIf"],["class","accordion-itens",4,"ngIf"],[3,"formGroup"],["class","po-row",4,"ngIf"],[1,"po-row"],["class","po-xl-6 po-lg-6 po-md-6 po-sm-6",4,"ngIf"],[1,"po-xl-8","po-lg-8","po-md-8","po-sm-7","fix-padding"],["p-disabled","true","formControlName","salaryTable",3,"ngClass","p-label"],[1,"po-xl-4","po-lg-4","po-md-4","po-sm-5","table-btn"],[1,"salarial-table-btn",3,"click"],[1,"po-xl-6","po-lg-6","po-md-6","po-sm-6"],["p-disabled","true","formControlName","levelSalaryTable",3,"p-placeholder","p-label"],["p-disabled","true","formControlName","rangeSalaryTable",3,"p-placeholder","p-label"],["formControlName","editSalary",3,"focusin","focusout","p-placeholder","p-label"],["formControlName","editPercent",3,"focusin","focusout","p-placeholder","p-label"],["p-disabled","true","formControlName","costCenter",3,"ngModelChange","ngModel","p-label"],["p-disabled","true","formControlName","classValue",3,"ngModelChange","ngModel","p-label"],["p-disabled","true","formControlName","accountingItem",3,"ngModelChange","ngModel","p-label"],[1,"po-xl-12","po-lg-12","po-md-12","po-sm-12"],["p-field-label","name","p-field-value","id","name","reasonSalaryChange",3,"ngModelChange","p-selected","p-change","ngModel","ngModelOptions","p-placeholder","p-label","p-filter-service","p-columns"],[1,"table-description"],["p-striped","true",3,"p-columns","p-items","p-sort","p-striped","p-hide-columns-manager","p-loading"],[1,"accordion-itens"],["class","po-sm-12 po-md-12 po-lg-12 po-xl-12 no-padding",4,"ngFor","ngForOf"],[1,"mobile-footer-btns"],[1,"po-xl-6","po-lg-6","po-md-6","po-sm-6",3,"p-click","p-label"],["p-type","primary",1,"po-xl-6","po-lg-6","po-md-6","po-sm-6",3,"p-click","p-label"],[1,"po-sm-12","po-md-12","po-lg-12","po-xl-12","no-padding"],["hideToggle","false",4,"ngFor","ngForOf"],["hideToggle","false"],[1,"vacation-history-header"],[4,"ngFor","ngForOf"],[1,"line"],[1,"historic-content"],[1,"historic-label"],["type","radio","name","choosenField",3,"click","id","value"],[3,"for"],[1,"historic-value"]],template:function(e,i){1&e&&(t.j41(0,"div",1)(1,"div",2),t.EFF(2),t.nI1(3,"translate"),t.k0s()(),t.DNE(4,te,11,9,"div",3),t.j41(5,"po-modal",4,0),t.nI1(7,"translate"),t.DNE(8,ee,3,3,"p",5)(9,ie,1,6,"po-table",6)(10,se,8,9,"div",7),t.k0s()),2&e&&(t.R7$(2),t.SpI(" ",t.bMT(3,8,"l-salary-proposal")," "),t.R7$(2),t.Y8G("ngIf",i.reactiveForm),t.R7$(),t.Y8G("p-title",t.ai1("",t.bMT(7,10,"l-salary-table"),": ",i.modalTitle)),t.R7$(3),t.Y8G("ngIf",i.visibleTableDescription),t.R7$(),t.Y8G("ngIf",!i.viewIsMobile),t.R7$(),t.Y8G("ngIf",i.salaryTable&&i.viewIsMobile))},dependencies:[f.YU,f.Sq,f.bT,g.BC,g.cb,g.vS,P.BS,P.GK,P.Z2,m.rmE,m.hdu,m.P5q,m.Cus,m.I3z,m.NZw,g.j4,g.JD,f.oe,S.D9],styles:[".subtitle-form[_ngcontent-%COMP%]{margin-bottom:.4em;font-family:NunitoSans;font-size:1.31em;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.24;letter-spacing:normal;color:#4a5c60}po-input[_ngcontent-%COMP%] input, po-number[_ngcontent-%COMP%] input{height:40px!important}po-input[_ngcontent-%COMP%] .po-field-container, po-number[_ngcontent-%COMP%] .po-field-container{margin-bottom:8px}po-input[_ngcontent-%COMP%] .po-field-container-content, po-number[_ngcontent-%COMP%] .po-field-container-content{padding-top:2px;padding-bottom:2px}po-lookup[_ngcontent-%COMP%] input{height:40px!important}po-lookup[_ngcontent-%COMP%] .po-field-container{margin-bottom:8px}po-lookup[_ngcontent-%COMP%] .po-field-container-content{padding-top:2px;padding-bottom:2px}@media screen and (max-width: 768px){.po-sm-12[_ngcontent-%COMP%], .po-sm-6[_ngcontent-%COMP%]{padding:0 8px}.subtitle-form[_ngcontent-%COMP%]{padding:0 8px;font-size:21px}.table-btn[_ngcontent-%COMP%]{padding-right:8px!important}po-input[_ngcontent-%COMP%] po-field-container .po-field-title, po-number[_ngcontent-%COMP%] po-field-container .po-field-title, po-textarea[_ngcontent-%COMP%] po-field-container .po-field-title, po-lookup[_ngcontent-%COMP%] po-field-container .po-field-title, po-datepicker[_ngcontent-%COMP%] po-field-container .po-field-title, po-switch[_ngcontent-%COMP%] po-field-container .po-field-title{font-size:14px}.fix-padding[_ngcontent-%COMP%]{padding-left:8px;padding-right:8px}}.table-btn[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;padding-right:8px}.salarial-table-btn[_ngcontent-%COMP%]{width:100%;color:#00445b;font-family:NunitoSans-bold;height:40px;border-radius:3px;border:1px solid #00445B;font-size:14px;text-align:center;padding-top:9px;
1cursor:pointer;margin-bottom:10px}@media screen and (max-width: 425px){.salarial-table-btn[_ngcontent-%COMP%]{font-size:14px;margin:auto 0}}@media screen and (max-width: 320px){.subtitle-form[_ngcontent-%COMP%]{font-size:.9em}}po-modal#salaryTable[_ngcontent-%COMP%] .po-modal-footer{display:none}po-modal#salaryTable[_ngcontent-%COMP%] .po-modal-header{padding:23px 8px 5px 10px}po-modal#salaryTable[_ngcontent-%COMP%] .po-modal-header .po-modal-title{white-space:inherit!important}po-modal#salaryTable[_ngcontent-%COMP%] .po-modal-header-close-button{top:17px}po-modal#salaryTable[_ngcontent-%COMP%] .po-modal-body{margin-bottom:24px}po-modal#salaryTable[_ngcontent-%COMP%] .historic-label{color:#4a5c60}po-modal#salaryTable[_ngcontent-%COMP%] .historic-label label{margin:0;padding-left:1em}po-modal#salaryTable[_ngcontent-%COMP%] .historic-content{padding:0 24px;display:flex;justify-content:space-between;text-align:right;cursor:pointer;-webkit-user-select:none;user-select:none}po-modal#salaryTable[_ngcontent-%COMP%] .mobile-footer-btns{display:flex;width:100%;justify-content:flex-end;margin-top:15px}po-modal#salaryTable[_ngcontent-%COMP%] .mobile-footer-btns .confirm{margin-left:10px}"]}),r})();var re=c(60083);function pe(a,r){if(1&a&&t.nrm(0,"app-salary-table",15),2&a){const n=t.XpG(2);
1t.Y8G("salaryInfo",n.requisitionEdit.salaryInfo)("company",n.requisitionEdit.company)("department",n.requisitionEdit.department)("codFunction",n.requisitionEdit.codFunction)("isVisibleChangeSalary",!1)("percentSalaryField",!1)("isSubstitutionRequest",!0)("fieldProperties",n.fieldProperties)("costCenter",n.requisitionEdit.costCenter)("classValue",n.requisitionEdit.classValue)("accountingItem",n.requisitionEdit.accountingItem)}}function ce(a,r){1&a&&(t.j41(0,"div",16)(1,"div",17),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&a&&(t.R7$(2),t.JRh(t.bMT(3,1,"l-infos")))}function de(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",18)(1,"div",19)(2,"po-button",20),t.nI1(3,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.selectRequisitionToStepAction())}),t.k0s(),t.j41(4,"po-button",21),t.nI1(5,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.back())}),t.k0s()()()}if(2&a){const n=t.XpG(2);t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(3,5,"l-next-step")))("p-disabled",!n.reactiveForm.valid),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(5,7,"l-back")))}}function ue(a,r){if(1&a){const n=t.RV6();t.j41(0,"div",22)(1,"po-button",23),t.nI1(2,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.back())}),t.k0s(),t.j41(3,"po-button",24),t.nI1(4,"translate"),t.bIt("p-click",function(){s.eBV(n);const i=t.XpG(2);return s.Njj(i.selectRequisitionToStepAction())}),t.k0s()()}if(2&a){const n=t.XpG(2);t.R7$(),t.Y8G("p-label",t.mNQ(t.bMT(2,5,"l-back"))),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(4,7,"l-next-step")))("p-disabled",!n.reactiveForm.valid)}}function me(a,r){if(1&a&&(t.j41(0,"div",7)(1,"div",8),t.nrm(2,"po-datepicker",9),t.nI1(3,"translate"),t.k0s(),t.DNE(4,pe,1,11,"app-salary-table",10)(5,ce,4,3,"div",11),t.j41(6,"div",1),t.nrm(7,"app-dynamic-form"),t.k0s(),t.nrm(8,"app-alert-budget-integration",12),t.DNE(9,de,6,9,"div",13)(10,ue,5,9,"div",14),t.k0s()),2&a){const n=t.XpG();t.Y8G("ngClass",n.viewIsMobile?"mobile-card":"pl-1")("formGroup",n.reactiveForm),t.R7$(2),t.Y8G("p-label",t.mNQ(t.bMT(3,9,"l-expected-date"))),t.R7$(2),t.Y8G("ngIf",null==n.requisitionEdit?null:n.requisitionEdit.salaryInfo),t.R7$(),t.Y8G("ngIf",(null==n.dynamicFormComponent||null==n.dynamicFormComponent.complementaryField?null:n.dynamicFormComponent.complementaryField.length)>0),t.R7$(3),t.Y8G("isVisibleAlert",n.isVisibleCostCenter),t.R7$(),t.Y8G("ngIf",!n.viewIsMobile),t.R7$(),t.Y8G("ngIf",n.viewIsMobile)}}const be=[{path:"substitution/confirm",component:Y,canActivate:[w.r]},{path:"",component:Gt,canActivate:[w.r]},{path:"detail",component:dt,canActivate:[w.r]},{path:"edit",component:(()=>{var a;class r extends M.U{constructor(e,i,o,l,p){super(),this.router=e,this.fb=i,this.requisitionsService=o,this.globals=l,this.fieldPropertiesService=p,this.requisitionEdit=null,this.isVisibleCostCenter=!1}ngOnInit(){this.initializeComponent()}ngOnDestroy(){this.destroy()}back(){this.destroy(),this.router.navigate(["/substitution"])}selectRequisitionToStepAction(){this.createSendObject(),this.requisitionsService.setSubstitutionRequest(this.requisitionEdit),this.nextStepDialogComponent.getSteps(),this.nextStepDialogComponent.openModal()}loadFieldProperties(){var e=this;return(0,u.A)(function*(){e.fieldProperties=yield e.fieldPropertiesService.getFieldProperties("substitution")})()}destroy(){this.requisitionsService.setSelectedRequisition(null),this.requisitionsService.setSubstitutionRequest(null)}initializeComponent(){var e=this;return(0,u.A)(function*(){e.defineIsMobile(window.innerWidth,window.innerHeight),e.loadFieldProperties(),e.createReactiveForm(),e.currentSubstitution=e.requisitionsService.getSelectedRequisition(),e.loggedUser=yield e.globals.getEmployeeSummary(),e.substitutionDetails=e.requisitionsService.getSelectedSubstitutionRequest(),e.checkSubstitutionDetails(),e.dynamicFormComponent.edit=!0})()}checkSubstitutionDetails(){var e=this;return(0,u.A)(function*(){e.currentSubstitution?yield e.getSubstitutionDetails():e.substitutionDetails?(e.requisitionEdit=e.substitutionDetails,e.setFieldsSubstitution()):e.back()})()}
1getSubstitutionDetails(){var e=this;return(0,u.A)(function*(){var i;const o=yield e.requisitionsService.getSubstitutionDetails(e.loggedUser.id,null===(i=e.currentSubstitution)||void 0===i?void 0:i.id);e.requisitionEdit=o,e.requisitionEdit.costCenter&&null!=e.requisitionEdit.costCenter&&(e.isVisibleCostCenter=!0),e.setFieldsSubstitution()})()}setFieldsSubstitution(){var e=this;return(0,u.A)(function*(){e.dynamicFormComponent&&(e.dynamicFormComponent.complementaryField=e.requisitionEdit.complementaryField,e.dynamicFormComponent.setDefaultValue(),e.dynamicFormComponent.setDefaultValueText(),e.reactiveForm.controls.deadline.setValue(e.requisitionEdit.deadline),e.dynamicFormComponent.setDefaultValueDynamic())})()}createSendObject(){var e,i,o,l,p;null===(e=this.dynamicFormComponent)||void 0===e||e.setFieldValues(),this.salaryInfo=this.requisitionsService.getSelectedSalaryTableRequest(),this.salaryInfo&&(this.salaryInfo.idSalaryTable=null===(i=this.salaryInfo.idSalaryTable)||void 0===i?void 0:i.split("|")[0]),this.requisitionEdit.deadline=this.reactiveForm.controls.deadline.value,this.requisitionEdit.complementaryField=(null===(o=this.dynamicFormComponent)||void 0===o||null===(o=o.complementaryField)||void 0===o?void 0:o.length)>0&&(null===(l=this.dynamicFormComponent)||void 0===l||!l.complementaryField[0].disabled)?null===(p=this.dynamicFormComponent)||void 0===p?void 0:p.complementaryField:null,this.requisitionEdit.salaryInfo=this.salaryInfo}createReactiveForm(){this.reactiveForm=this.fb.group({deadline:[""]}),this.reactiveForm.controls.deadline.addValidators([g.k0.required])}}return(a=r).\u0275fac=function(e){return new(e||a)(t.rXU(H.Ix),t.rXU(g.ok),t.rXU(I.R),t.rXU(R.R),t.rXU(z.F))},a.\u0275cmp=t.VBU({type:a,selectors:[["app-substitution-edit"]],viewQuery:function(e,i){if(1&e&&(t.GBs(K.f,5),t.GBs(O.F,5)),2&e){let o;t.mGM(o=t.lsd())&&(i.dynamicFormComponent=o.first),t.mGM(o=t.lsd())&&(i.nextStepDialogComponent=o.first)}},standalone:!1,features:[t.Vt3],decls:10,vars:7,consts:[[1,"card-detail"],[1,"po-row"],[1,"po-sm-12","po-md-12","po-lg-12","po-xl-12"],["backIsVisible","true",3,"pageTitle"],[1,"po-sm-12","po-pl-sm-0","po-pr-sm-0"],["card-body","",3,"ngClass","formGroup",4,"ngIf"],["requiredJustify","true",3,"getRequisitions","title","isEdit"],["card-body","",3,"ngClass","formGroup"],[1,"po-xl-12","po-lg-12","po-md-12","po-sm-12","pl-0","pb-2","pt-1"],["p-placeholder","dd/mm/aaaa","name","deadline","formControlName","deadline",1,"po-xl-3","po-lg-3","po-md-3","po-sm-12","po-pr-sm-0",3,"p-label"],[3,"salaryInfo","company","department","codFunction","isVisibleChangeSalary","percentSalaryField","isSubstitutionRequest","fieldProperties","costCenter","classValue","accountingItem",4,"ngIf"],["class","po-row pt-1",4,"ngIf"],[3,"isVisibleAlert"],["class","po-row po-mt-2 margin-next-step",4,"ngIf"],["class","po-row po-mb-2",4,"ngIf"],[3,"salaryInfo","company","department","codFunction","isVisibleChangeSalary","percentSalaryField","isSubstitutionRequest","fieldProperties","costCenter","classValue","accountingItem"],[1,"po-row","pt-1"],[1,"po-xl-12","po-lg-12","po-md-12","po-sm-12","pb-0","mb-0","subtitle-form"],[1,"po-row","po-mt-2","margin-next-step"],[1,"po-xl-12","po-lg-12","po-md-12","po-sm-12"],["p-kind","primary",1,"next-step-button",3,"p-click","p-label","p-disabled"],["id","back","p-kind","secondary",1,"next-step-button",3,"p-click","p-label"],[1,"po-row","po-mb-2"],["p-kind","secondary",1,"po-sm-12","po-md-12","mt-3",3,"p-click","p-label"],["p-kind","primary",1,"po-sm-12","po-md-12","mt-3",3,"p-click","p-label","p-disabled"]],template:function(e,i){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2),t.nrm(3,"app-page-header",3),t.k0s()(),t.j41(4,"div",0)(5,"div",4)(6,"app-card"),t.DNE(7,me,11,11,"div",5),t.k0s()()()(),t.j41(8,"app-next-step-dialog",6),t.nI1(9,"translate"),t.bIt("getRequisitions",function(){return i.back()}),t.k0s()),2&e&&(t.R7$(3),t.Y8G("pageTitle","l-edit"),t.R7$(4),t.Y8G("ngIf",i.reactiveForm),t.R7$(),t.Y8G("title",t.mNQ(t.bMT(9,5,"l-next-step")))("isEdit",null!==i.currentSubstitution))},dependencies:[f.YU,f.bT,g.BC,g.cb,m.rmE,m.zLt,Lt.i,k.y,O.F,K.f,le,re.l,g.j4,g.JD,S.D9],styles:[".card-detail[_ngcontent-%COMP%]{position:relative}@media screen and (min-width: 992px) and (max-width: 1199px){.card-detail-holder[_ngcontent-%COMP%]{position:absolute;bottom:22px;right:15px}}@media screen and (min-width: 1200px){.card-detail-holder[_ngcontent-%COMP%]{position:absolute;bottom:22px;right:15px}}@media (max-width: 960px) and (min-width: 481px){.card-detail-holder[_ngcontent-%COMP%]{position:absolute;bottom:22px;right:15px}}@media (min-width: 768px){.card-detail[_ngcontent-%COMP%]{padding:0 14px!important}}[_nghost-%COMP%] .mobile-card h2{white-space:inherit!important}@media (max-width: 719px){[_nghost-%COMP%] app-card .card-well{box-shadow:none!important;padding:0!important;background:none!important}}.subtitle-form[_ngcontent-%COMP%]{padding:6px 8px;margin-bottom:.4em!important;font-family:NunitoSans;font-size:1.31em;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.24;letter-spacing:normal;color:#4a5c60}.margin-next-step[_ngcontent-%COMP%]{margin-bottom:2px!important}[_nghost-%COMP%] .next-step-button{float:right;height:42px}[_nghost-%COMP%] .po-textarea{height:100px}[_nghost-%COMP%] .po-input{height:40px!important}[_nghost-%COMP%] .po-field-title{padding-top:8px!important}[_nghost-%COMP%] .po-button{padding:12px 19px 12px 17px!important;height:46px;font-size:16px!important}[_nghost-%COMP%] #back .po-button{padding:12px 45px!important}po-button[_ngcontent-%COMP%]{margin-left:15px}@media screen and (max-width: 480px){po-button[_ngcontent-%COMP%]{margin:0;width:100%}}.po-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-bottom:10px}@media screen and (min-width: 991px){.alignRight[_ngcontent-%COMP%]{text-align:right}}[_nghost-%COMP%] .button-reprove .po-button{color:#be3e37;border-color:#be3e37;height:44px}[_nghost-%COMP%] .button-aprove .po-button{height:44px}@media (max-width: 480px){[_nghost-%COMP%] .actions-visualize po-button{display:block;width:50%}}[_nghost-%COMP%] #dialogCloseBtn{color:#1ea2c3}@media (min-width: 441px) and (max-width: 480px){[_nghost-%COMP%] #dialogCloseBtn{position:absolute;top:44px;right:25px;cursor:pointer}}@media (min-width: 481px) and (max-width: 960px){[_nghost-%COMP%] .actions-visualize-others-resolutions po-button{width:50%;margin:0}}.panel-body[_ngcontent-%COMP%]{padding:0 8px}@media (max-width: 480px){[_nghost-%COMP%] .general{margin-left:-8px!important}}"]}),r})(),canActivate:[w.r]}];let he=(()=>{var a;class r{}return(a=r).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.$C({type:a}),a.\u0275inj=s.G2t({imports:[V.iI.forChild(be),V.iI]}),r})();var _e=c(84193);let ve=(()=>{var a;class r{}return(a=r).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.$C({type:a}),a.\u0275inj=s.G2t({providers:[{provide:Z.a7,useClass:_e.L,multi:!0}],imports:[f.MD,it.h,S.h,V.iI,g.YN,P.MY,m.Kgc,et.k,g.X1,tt.D,D.S,he]}),r})()}}]);
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.