1"use strict";(self.webpackChunkpda=self.webpackChunkpda||[]).push([[200],{7877:(L,C,s)=>{s.d(C,{L:()=>A});var o=s(80529),E=s(16916),f=s(94650);let A=(()=>{class T{constructor(r){this.httpClient=r,this.basePath=E.N.apiReports}generateClassicReport(r){const c=new o.WM({"Accept-Language":r.reportLangugeSelected});return this.httpClient.post(`${this.basePath}/ClassicReports/PDAAssessment`,r,{headers:c,responseType:"text"})}generateAudiofeedback(r){return this.httpClient.post(`${this.basePath}/ClassicReports/AudioFeedback`,r,{responseType:"text"})}generateCompetencyReport(r){const c=new o.WM({"Accept-Language":r.reportLangugeSelected});return this.httpClient.post(`${this.basePath}/ClassicReports/CompetencyReport`,r,{headers:c,responseType:"text"})}generateJobReport(r){const c=new o.WM({"Accept-Language":r.reportLangugeSelected});return this.httpClient.post(`${this.basePath}/ClassicReports/JobReport`,r,{headers:c,responseType:"text"})}generateLeaderShipMatchingReport(r){const c=new o.WM({"Accept-Language":r.reportLangugeSelected});return this.httpClient.post(`${this.basePath}/ClassicReports/LeadershipMatchingReport`,r,{headers:c,responseType:"text"})}generateGroupTrendsReport(r){const c=new o.WM({"Accept-Language":r.reportLangugeSelected});return this.httpClient.post(`${this.basePath}/ClassicReports/GroupTrendsReport`,r,{headers:c,responseType:"text"})}generateInvalidPDAReport(r){const c=new o.WM({"Accept-Language":r.reportLangugeSelected});return this.httpClient.post(`${this.basePath}/ClassicReports/InvalidPDAAssessment`,r,{headers:c,responseType:"text"})}generateJobDescriptorsReport(r){const c=new o.WM({"Accept-Language":r.reportLangugeSelected});return this.httpClient.post(`${this.basePath}/ClassicReports/JobDescriptors`,r,{headers:c,responseType:"text"})}getEnableSections(r,c){let g=new o.LE;return null!=r&&(g=g.set("baseId",r)),null!=c&&(g=g.set("clientReportPDA",c)),this.httpClient.get(`${this.basePath}/ClassicReports/GetEnabledSections`,{params:g})}getCustomSelectionSection(r,c,g){let p=new o.LE;return null!=r&&(p=p.set("baseId",r)),c&&c.length>0&&c.forEach(d=>{p=p.append("subbaseId",d)}),null!=g&&(p=p.set("productId",g)),this.httpClient.get(`${this.basePath}/CustomSelection/RelationProductField`,{params:p})}putCustomSelectionSection(r){return this.httpClient.put(`${this.basePath}/CustomSelection/Relation`,r)}getCustomSelectionSectionCompetency(r,c,g){let p=new o.LE;return null!=r&&(p=p.set("baseId",r)),null!=c&&(p=p.set("subbaseId",c)),null!=g&&(p=p.set("productId",g)),this.httpClient.get(`${this.basePath}/CustomSelection/RelationCompetency`,{params:p})}putCustomSelectionSectionCompetency(r,c,g,p){let d=new o.LE;return null!=r&&(d=d.set("baseId",r)),null!=c&&(d=d.set("subbaseId",c)),null!=g&&(d=d.set("productId",g)),this.httpClient.put(`${this.basePath}/CustomSelection/RelationCompetency`,p,{params:d})}getReportCulture(){return this.httpClient.get(`${this.basePath}/ClassicReports/ReportCulture`,{responseType:"text"})}static#e=this.\u0275fac=function(c){return new(c||T)(f.LFG(o.eN))};static#t=this.\u0275prov=f.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"})}return T})()},70200:(L,C,s)=>{s.r(C),s.d(C,{JobModule:()=>Fe});var o=s(36895),E=s(793),f=s(89383),A=s(80971),T=s(9116),I=s(53626),r=s(45589),c=s(87076),g=s(12919),p=(()=>{return(n=p||(p={})).AUTOMATIC="AUTOMATIC",n.MANUAL="MANUAL",p;var n})(),d=(()=>{return(n=d||(d={})).DATA="DATA",n.TASK="TASK",n.TASK_GROUP="TASK_GROUP",n.DESCRIPTORS="DESCRIPTORS",d;var n})(),m=(()=>{return(n=m||(m={})).JOBCHART="jobChart",n.JOBTASKS="jobTasks",n.DESCRIPTIVEWORDS="descriptiveWords",n.BEHAVIORDESCRIPTORS="behaviorDescriptors",n.BEHAVIORALRADARCHART="behavioralRadarChart",n.MOTIVATORS="motivators",n.LEADERSHIPSTYLE="leadershipStyle",n.IDEALENVIRONMENT="idealenvironment",m;var n})(),x=s(65412),O=s(12313),k=s(22755),e=s(94650),D=s(64617),B=s(27240),U=s(6085),Z=s(7877),j=s(22310),N=s(77524),w=s(74359),R=s(97392),b=s(24006),F=s(22023),Q=s(56621),y=s(4859),G=s(3238),v=s(59549),$=s(284),q=s(84385),H=s(71948);function W(n,h){if(1&n&&(e.TgZ(0,"mat-option",20),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=h.$implicit;e.Q6J("value",t.id),e.xp6(1),e.Oqu("Predeterminada"===t.name?e.lcZ(2,2,"PEOPLE_MANAGMENT.ALL"):t.name)}}function z(n,h){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPETENCIES.VALIDATION.CREATION.NAME")," "))}function X(n,h){if(1&n&&e._UZ(0,"app-repna-pda",21),2&n){const t=e.oxw();e.Q6J("parentForm",t.mainForm)}}function ee(n,h){if(1&n&&(e.TgZ(0,"mat-radio-button",22),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=e.oxw();
1e.Q6J("value",t.TypeLoad.MANUAL),e.xp6(1),e.Oqu(e.lcZ(2,2,"JOBS.MANUAL"))}}function te(n,h){if(1&n&&(e.TgZ(0,"mat-radio-button",22),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.TypeLoad.AUTOMATIC),e.xp6(1),e.Oqu(e.lcZ(2,2,"JOBS.AUTOMATIC"))}}const ae=function(){return["Both","Manual"]},ie=function(){return["Both","Automatic"]};let ne=(()=>{class n{constructor(t,i){this.subbaseChangeService=t,this.fb=i,this.TypeLoad=p,this.requestJobEvent=new e.vpe}ngOnInit(){this.loadType=this.data.element?this.data.element.isAutomatic?p.AUTOMATIC:p.MANUAL:["Both","Automatic"].includes(this.data.canAutomaticOrManual)?p.AUTOMATIC:p.MANUAL,this.createForm(),this.getSubbases()}ngAfterViewInit(){this.data&&this.data.element?this.setValues():this.data&&this.data.request&&(this.name=this.data.request.name,this.description=this.data.request.description,this.subbase=this.data.request.subBaseId)}setValues(){this.name=this.data.element.name,this.description=this.data.element.description,this.subbase=this.data.element.subBaseId,this.loadType===p.MANUAL&&(this.mainForm.setValidators(this.sumValidator(["r","e","p","n"])),this.r=this.data.element.r,this.e=this.data.element.e,this.p=this.data.element.p,this.n=this.data.element.n,this.s=this.data.element.s)}onSubmit(){this.requestJobEvent.emit(this.loadType===p.MANUAL?{baseId:"",subBaseId:this.subbase,name:this.name,description:this.description,manual:{r:this.r,e:this.e,p:this.p,n:this.n,s:this.s}}:{baseId:"",subBaseId:this.subbase,name:this.name,description:this.description,automatic:[]})}cancel(){this.close(!1)}close(t){}getSubbases(){this.subbaseChangeService.getSubBaseChangeEvent().subscribe(t=>{this.subBasesOption=t.map(a=>({id:a.subBaseId,name:a.subBaseName}));const i=this.subBasesOption.find(a=>"Predeterminada"===a.name)?this.subBasesOption.find(a=>"Predeterminada"===a.name).id:"";this.subbase=i})}createForm(){this.mainForm=this.fb.group({subbase:[""],name:["",[b.kI.required]],description:[""]})}onSelectionChange(t){this.loadType=t,this.data.typeAction===g.w.EDIT?this.loadType===p.MANUAL?setTimeout(()=>{this.setValues()},100):this.reinitControlForm():this.loadType===p.MANUAL?this.mainForm.setValidators(this.sumValidator(["r","e","p","n"])):this.reinitControlForm(),this.mainForm.updateValueAndValidity()}reinitControlForm(){this.mainForm.clearValidators(),this.r=null,this.e=null,this.p=null,this.n=null,this.s=null,this.mainForm.removeControl("r"),this.mainForm.removeControl("e"),this.mainForm.removeControl("p"),this.mainForm.removeControl("n"),this.mainForm.removeControl("s")}sumValidator(t){return i=>{const a=i;let l=0,u=!1;return t.forEach(S=>{const J=a.get(S),_=J?Number(J.value):0;l+=_,0===_&&(u=!0),100===_&&(u=!0)}),200!==l?{sumaInvalida:!0}:u?null:{faltaCero:!0}}}get name(){return this.mainForm.get("name").value}set name(t){this.mainForm.get("name").setValue(t)}get description(){return this.mainForm.get("description").value}set description(t){this.mainForm.get("description").setValue(t)}get subbase(){return this.mainForm.get("subbase").value}set subbase(t){this.mainForm.get("subbase").setValue(t)}get r(){return this.mainForm.get("r")?this.mainForm.get("r").value:null}set r(t){this.mainForm.get("r")?.setValue(t)}get e(){return this.mainForm.get("e")?this.mainForm.get("e").value:null}set e(t){this.mainForm.get("e")?.setValue(t)}get p(){return this.mainForm.get("p")?this.mainForm.get("p").value:null}set p(t){this.mainForm.get("p")?.setValue(t)}get n(){return this.mainForm.get("n")?this.mainForm.get("n").value:null}set n(t){this.mainForm.get("n")?.setValue(t)}get s(){return this.mainForm.get("n")?this.mainForm.get("s").value:null}set s(t){this.mainForm.get("s")?.setValue(t)}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(F._),e.Y36(b.qu))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-edit-create-data"]],inputs:{data:"data"},outputs:{requestJobEvent:"requestJobEvent"},decls:38,vars:31,consts:[[3,"formGroup","ngSubmit"],[1,"mt-6"],[1,"flex","gap-3"],[1,"w-6/12"],["appearance","outline",1,"text-xs","!w-full","field"],["formControlName","subbase"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","svgIcon","ic-abajo",1,"!w-5","!h-5","text-pda-secondary-100"],["matInput","","formControlName","name",3,"placeholder"],[4,"ngIf"],[1,"w-full"],["appearance","outline",1,"text-xs","!w-full","mb-4","field-textarea"],["matInput","","formControlName","description","rows","4",1,"!text-xs","!text-pda-peoplemanagement-grey-800","!resize-none",3,"placeholder"],[3,"parentForm",4,"ngIf"],[1,"flex","items-center","justify-start","my-5"],[1,"font-bold","text-sm","text-pda-peoplemanagement-cyan-400","mr-2"],[1,"mx-2",3,"value","change"],["class","mx-2 text-xs text-pda-peoplemanagement-grey-800 font-light",3,"value",4,"ngIf"],[1,"flex","justify-end","mt-5"],["mat-flat-button","",1,"w-full","lg:w-auto","!h-10","leading-10","bg-pda-peoplemanagement-cyan-400","text-white","font-semibold","!rounded-3xl","hover:bg-pda-peoplemanagement-cyan-600",3,"disabled"],[3,"value"],[3,"parentForm"],[1,"mx-2","text-xs","text-pda-peoplemanagement-grey-800","font-light",3,"value"]],template:function(i,a){1&i&&(e.TgZ(0,"form",0),e.NdJ("ngSubmit",function(){return a.onSubmit()}),e.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"mat-select",5),e.YNc(9,W,3,4,"mat-option",6),e.qZA(),e._UZ(10,"mat-icon",7),e.qZA()(),e.TgZ(11,"div",3)(12,"mat-form-field",4)(13,"mat-label"),e._uU(14),e.ALo(15,"translate"),e.qZA(),e._UZ(16,"input",8),e.ALo(17,"translate"),e.YNc(18,z,3,3,"mat-error",9),e.qZA()()(),e.TgZ(19,"div",10)(20,"mat-form-field",11)(21,"mat-label"),e._uU(22),e.ALo(23,"translate"),e.qZA(),e._UZ(24,"textarea",12),e.ALo(25,"translate"),e.qZA()(),e.YNc(26,X,1,1,"app-repna-pda",13),e.TgZ(27,"div",14)(28,"span",15),e._uU(29),e.ALo(30,"translate"),e.qZA(),e.TgZ(31,"mat-radio-group",16),e.NdJ("change",function(u){return a.onSelectionChange(u.value)}),e.YNc(32,ee,3,4,"mat-radio-button",17),e.YNc(33,te,3,4,"mat-radio-button",17),e.qZA()(),e.TgZ(34,"div",18)(35,"button",19),e._uU(36),e.ALo(37,"translate"),e.qZA()()()()),2&i&&(e.Q6J("formGroup",a.mainForm),e.xp6(6),e.Oqu(e.l
1cZ(7,15,"COMPETENCIES.CREATION.CAMPOS.LABEL.SUB_BASE")),e.xp6(3),e.Q6J("ngForOf",a.subBasesOption),e.xp6(5),e.Oqu(e.lcZ(15,17,"COMPETENCIES.CREATION.CAMPOS.LABEL.NAME")),e.xp6(2),e.Q6J("placeholder",e.lcZ(17,19,"COMPETENCIES.CREATION.CAMPOS.LABEL.NAME")),e.xp6(2),e.Q6J("ngIf",a.mainForm.get("name").invalid&&a.mainForm.get("name").touched),e.xp6(4),e.Oqu(e.lcZ(23,21,"COMPETENCIES.CREATION.CAMPOS.LABEL.DESCRIPTION")),e.xp6(2),e.Q6J("placeholder",e.lcZ(25,23,"COMPETENCIES.CREATION.CAMPOS.LABEL.DESCRIPTION")),e.xp6(2),e.Q6J("ngIf",a.loadType===a.TypeLoad.MANUAL),e.xp6(3),e.Oqu(e.lcZ(30,25,"JOBS.DEFINITION_PROFILE_JOBS")),e.xp6(2),e.Q6J("value",a.loadType),e.xp6(1),e.Q6J("ngIf",e.DdM(29,ae).includes(a.data.canAutomaticOrManual)),e.xp6(1),e.Q6J("ngIf",e.DdM(30,ie).includes(a.data.canAutomaticOrManual)),e.xp6(2),e.Q6J("disabled",a.mainForm.invalid),e.xp6(1),e.hij(" ",e.lcZ(37,27,"COMPETENCIES.BUTTON.ACEPT")," "))},dependencies:[o.sg,o.O5,Q.m,y.lW,R.Hw,G.ey,v.TO,v.KE,v.hX,v.R9,$.Nt,q.gD,H.VQ,H.U0,b._Y,b.Fj,b.JJ,b.JL,b.sg,b.u,f.X$],styles:["[_nghost-%COMP%] .mat-icon-button{background-color:#ececff!important}[_nghost-%COMP%] .mat-checkbox .mat-checkbox-inner-container{width:18px;height:18px}[_nghost-%COMP%] .mat-checkbox .mat-checkbox-frame{background:#FFFFFF;border:1px solid #1E1FFD;border-radius:50%}[_nghost-%COMP%] .mat-checkbox.mat-checkbox-checked .mat-checkbox-background{border:none!important;border-radius:50%!important;background-color:#1e1ffd!important}[_nghost-%COMP%] .field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-outline{color:#aaaafe;height:41px!important}[_nghost-%COMP%] .field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{padding:8px 0!important}[_nghost-%COMP%] .field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-form-field-label-wrapper .mat-form-field-label{color:#aaaafe;margin-top:-.2em!important}[_nghost-%COMP%] .field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-form-field-label-wrapper .mat-form-field-label mat-label{top:-3px!important;position:relative}[_nghost-%COMP%] .field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-select-arrow{display:none!important}[_nghost-%COMP%] .field-textarea .mat-form-field-outline{color:#aaaafe}[_nghost-%COMP%] .field-textarea .mat-form-field-label{color:#aaaafe}"]})}return n})();var K=s(56709);function se(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"div",13)(1,"mat-checkbox",14),e.NdJ("change",function(a){const u=e.CHM(t).$implicit,S=e.oxw();return e.KtG(S.selectCheckBox(a,u))}),e.qZA(),e.TgZ(2,"span",15),e._uU(3),e.qZA()()}if(2&n){const t=h.$implicit,i=e.oxw();e.xp6(1),e.Q6J("checked",i.isItemSelected(t))("disabled",i.isMaxSelected()&&!i.isItemSelected(t)),e.xp6(2),e.AsE("",t.order,". ",t.description,"")}}let oe=(()=>{class n{constructor(){this.maxTask=10,this.requestJobEvent=new e.vpe}ngOnInit(){this.dataTask.element?this.jobTaskTypeSelected=this.dataTask.element.jobTasks?this.jobTaskType.filter(t=>this.dataTask.element.jobTasks.some(i=>i.jobTaskTypeId===t.jobTaskTypeId)):[]:this.dataTask.JobTaskSelected&&(this.jobTaskTypeSelected=this.dataTask.JobTaskSelected),this.dataTask.JobTaskSelected=this.jobTaskTypeSelected}selectCheckBox(t,i){this.jobTaskTypeSelected.length>10||(this.jobTaskTypeSelected=t.checked?[...this.jobTaskTypeSelected,i]:[...this.jobTaskTypeSelected.filter(a=>a.jobTaskTypeId!==i.jobTaskTypeId)],this.dataTask.JobTaskSelected=[...this.jobTaskTypeSelected],this.dataTask.JobTaskSelected.sort((a,l)=>a.jobTaskTypeId-l.jobTaskTypeId))}isMaxSelected(){return this.jobTaskTypeSelected.length>=this.maxTask}isItemSelected(t){return this.jobTaskTypeSelected.some(i=>i.jobTaskTypeId===t.jobTaskTypeId)}ableButtonNext(){return this.jobTaskTypeSelected.length<this.maxTask}nextStepCreationEdition(){this.requestJobEvent.emit(this.dataTask)}backToDataCreationEdition(){this.dataTask.typeScreen=d.DATA,this.requestJobEvent.emit(this.dataTask)}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-edit-create-task"]],inputs:{jobTaskType:"jobTaskType",dataTask:"dataTask"},outputs:{requestJobEvent:"requestJobEvent"},decls:23,vars:19,consts:[[1,"py-5"],[1,"flex","items-center","justify-start"],[1,"font-normal","text-sm","text-pda-peoplemanagement-grey-800"],[1,"flex","items-center","justify-between"],[1,"font-semibold","text-sm","text-pda-peoplemanagement-grey-800","mt-5","justify-center"],[1,"flex","flex-wrap","py-3","overflow-y-auto","max-h-96"],["class","my-1 px-2 flex items-center w-full",4,"ngFor","ngForOf"],[1,"flex","justify-between","items-baseline"],[1,"flex","items-center","justify-start","my-5"],[1,"text-sm","text-pda-peoplemanagement-cyan-400","font-semibold","mr-2"],[1,"flex","justify-around","mt-5"],["mat-flat-button","",1,"w-full","lg:w-auto","!mx-2","!h-10","leading-10","bg-pda-peoplemanagement-lcyan-200","text-pda-peoplemanagement-cyan-400","font-semibold","!rounded-3xl","hover:bg-pda-peoplemanagement-cyan-600","hover:text-white",3,"click"],["mat-flat-button","",1,"w-full","lg:w-auto","!mx-2","!h-10","leading-10","bg-pda-peoplemanagement-cyan-400","text-white","font-semibold","!rounded-3xl","hover:bg-pda-peoplemanagement-cyan-600",3,"disabled","click"],[1,"my-1","px-2","flex","items-center","w-full"],[3,"checked","disabled","change"],[1,"ml-2","text-xs","text-pda-peoplemanagement-grey-800","font-light"]],template:function(i,a){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"p",2),e._uU(3),e.ALo(4,"translate"),e.qZA()(),e.TgZ(5,"div",3)(6,"h3",4),e._uU(7),e.ALo(8,"translate"),e.qZA()(),e.TgZ(9,"div",5),e.YNc(10,se,4,4,"div",6),e.qZA(),e.TgZ(11,"div",7)(12,"div",8)(13,"span",9),e._uU(14),e.ALo(15,"translate"),e.qZA()(),e.TgZ(16,"div",10)(17,"button",11),e.NdJ("click",function(){return a.backToDataCreationEdition()}),e._uU(18),e.ALo(19,"translate"),e.qZA(),e.TgZ(20,"button",12),e.NdJ("click",function(){return a.nextStepCreationEdition()}),e._uU(21),e.ALo(22,"translate"),e.qZA()()()()),2&i&&(e.xp6(3),e.hij(" ",e.lcZ(4,9,"JOBS.TASK_INFORMATION")," "),e.xp6(4),e.hij(" ",e.lcZ(8,11,"JOBS.TASK_DESCRIPTION")," "),e.xp6(3),e.Q6J("ngForOf",a.jobTaskType),e.xp6(4),e.lnq("",e.lcZ(15,13,"JOBS.TASK_TOTAL_SELECTED")," ",a.jobTaskTypeSelected.length,"/",a.maxTask,""),e.xp6(4),e.hij(" ",e.lcZ(19,15,"COMPETENCIES.BUTTON.BACK")," "),e.xp6(2),e.Q6J("disabled",a.ableButtonNext()),e.xp6(1),e.hij(" ",e.lcZ(22,17,"COMPETENCIES.BUTTON.ACEPT")," "))},dependencies:[o.sg,y.lW,K.oG,f.X$],styles:["[_nghost-%COMP%] .mat-icon-button{background-color:#ececff!important}[_nghost-%COMP%] .mat-checkbox .mat-checkbox-inner-container{width:18px;height:18px}[_nghost-%COMP%] .mat-checkbox .mat-checkbox-frame{background:#FFFFFF;border:1px solid #AAAAFE;border-radius:50%}[_nghost-%COMP%] .mat-checkbox.mat-checkbox-checked .mat-checkbox-background{border:none!important;border-radius:50%!important;background-color:#1e1ffd!important}"]})}return n})();function re(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"div",11)(1,"div",12)(2,"mat-form-field",13)(3,"mat-label"),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"mat-select",14),e.NdJ("selectionChange",function(a){const u=e.CHM(t).$implicit,S=e.oxw();return e.KtG(S.onSelectTypegroup(a,u))}),e.TgZ(7,"mat-option",15),e._uU(8,"A"),e.qZA(),e.TgZ(9,"mat-option",16),e._uU(10,"B"),e.qZA(),e.TgZ(11,"mat-option",17),e._uU(12,"C"),e.qZA()(),e._UZ(13,"mat-icon",18),e.qZA()(),e.TgZ(14,"span",19),e._uU(15),e.qZA()()}if(2&n){const t=h.$implicit,i=e.oxw();
1e.xp6(4),e.Oqu(e.lcZ(5,3,"JOBS.TASK_GROUP_SELECTION")),e.xp6(2),e.Q6J("value",i.setValueTaskGroup(t)),e.xp6(9),e.Oqu(t.description)}}let le=(()=>{class n{constructor(){this.requestJobEvent=new e.vpe}ngOnInit(){this.dataTaskGroup.element?(this.jobTaskGroupSelected=this.dataTaskGroup.JobTaskSelected.map(t=>({group:this.dataTaskGroup.element.jobTasks&&this.dataTaskGroup.element.jobTasks.some(i=>i.jobTaskTypeId===t.jobTaskTypeId)?this.dataTaskGroup.element.jobTasks.find(i=>i.jobTaskTypeId===t.jobTaskTypeId).group:"",jobTaskTypeId:t.jobTaskTypeId})),this.dataTaskGroup.request.automatic=this.jobTaskGroupSelected):this.dataTaskGroup.JobTaskSelected&&(this.jobTaskGroupSelected=this.dataTaskGroup.JobTaskSelected.map(t=>({group:this.dataTaskGroup.request.automatic.some(i=>i.jobTaskTypeId===t.jobTaskTypeId)?this.dataTaskGroup.request.automatic.find(i=>i.jobTaskTypeId===t.jobTaskTypeId).group:"",jobTaskTypeId:t.jobTaskTypeId})))}onSelectTypegroup(t,i){this.jobTaskGroupSelected.forEach(a=>{a.jobTaskTypeId===i.jobTaskTypeId&&(a.group=t.value)}),this.dataTaskGroup.request.automatic=this.jobTaskGroupSelected}validateArray(t){const i=t.filter(u=>"A"===u.group),a=t.filter(u=>"B"===u.group),l=t.filter(u=>"C"===u.group);return!(3===i.length&&3===a.length&&4===l.length)}finalCreationEdition(){this.requestJobEvent.emit(this.dataTaskGroup)}setValueTaskGroup(t){return this.dataTaskGroup.element?this.dataTaskGroup.element.jobTasks&&this.dataTaskGroup.element.jobTasks.some(i=>i.jobTaskTypeId===t.jobTaskTypeId)?this.dataTaskGroup.element.jobTasks.find(i=>i.jobTaskTypeId===t.jobTaskTypeId).group:"":this.dataTaskGroup.request&&this.dataTaskGroup.request.automatic&&this.dataTaskGroup.request.automatic.some(i=>i.jobTaskTypeId===t.jobTaskTypeId)?this.dataTaskGroup.request.automatic.find(i=>i.jobTaskTypeId===t.jobTaskTypeId).group:""}backToDataTypeCreationEdition(){this.dataTaskGroup.typeScreen=d.TASK,this.requestJobEvent.emit(this.dataTaskGroup)}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-edit-create-task-group"]],inputs:{dataTaskGroup:"dataTaskGroup"},outputs:{requestJobEvent:"requestJobEvent"},decls:27,vars:23,consts:[[1,"py-5"],[1,"text-sm","text-pda-pda-peoplemanagement-grey-100","font-light","mb-3"],[1,"font-semibold","text-sm","text-pda-pda-peoplemanagement-cyan-500","mt-5"],[1,"flex","items-center","justify-between"],[1,"font-semibold","text-sm","text-pda-peoplemanagement-grey-800","mt-5","justify-center"],[1,"flex","flex-wrap","py-3","overflow-y-auto","max-h-96"],["class","my-1 px-2 flex items-center w-full",4,"ngFor","ngForOf"],[1,"flex","justify-between","items-baseline"],[1,"flex","justify-around","mt-5"],["mat-flat-button","",1,"w-full","lg:w-auto","!mx-2","!h-10","leading-10","bg-pda-peoplemanagement-lcyan-200","text-pda-peoplemanagement-cyan-400","font-semibold","!rounded-3xl","hover:bg-pda-peoplemanagement-cyan-600","hover:text-white",3,"click"],["mat-flat-button","",1,"w-full","lg:w-auto","!mx-2","!h-10","leading-10","bg-pda-peoplemanagement-cyan-400","text-white","font-semibold","!rounded-3xl","hover:bg-pda-peoplemanagement-cyan-600",3,"disabled","click"],[1,"my-1","px-2","flex","items-center","w-full"],[1,"w-2/12","px-2"],["appearance","outline",1,"text-xs","!w-full","field-language","!block","bg-slate-50"],[3,"value","selectionChange"],["value","A"],["value","B"],["value","C"],["matSuffix","","svgIcon","ic-abajo",1,"!w-5","!h-5"],[1,"ml-2","text-xs","text-pda-peoplemanagement-grey-800","font-light"]],template:function(i,a){1&i&&(e.TgZ(0,"div",0)(1,"p",1),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"h3",2),e._uU(5),e.ALo(6,"translate"),e._UZ(7,"br"),e._uU(8),e.ALo(9,"translate"),e._UZ(10,"br"),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"div",3)(14,"h3",4),e._uU(15),e.ALo(16,"translate"),e.qZA()(),e.TgZ(17,"div",5),e.YNc(18,re,16,5,"div",6),e.qZA(),e.TgZ(19,"div",7)(20,"div",8)(21,"button",9),e.NdJ("click",function(){return a.backToDataTypeCreationEdition()}),e._uU(22),e.ALo(23,"translate"),e.qZA(),e.TgZ(24,"button",10),e.NdJ("click",function(){return a.finalCreationEdition()}),e._uU(25),e.ALo(26,"translate"),e.qZA()()()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,9,"JOBS.TASK_GROUP_INFORMATION")," "),e.xp6(3),e.hij(" ",e.lcZ(6,11,"JOBS.TASK_GROUP_CONDITION.FIRST")," "),e.xp6(3),e.hij("",e.lcZ(9,13,"JOBS.TASK_GROUP_CONDITION.SECOND")," "),e.xp6(3),e.hij("",e.lcZ(12,15,"JOBS.TASK_GROUP_CONDITION.THIRD")," "),e.xp6(4),e.hij(" ",e.lcZ(16,17,"JOBS.TASK_DESCRIPTION")," "),e.xp6(3),e.Q6J("ngForOf",a.dataTaskGroup.JobTaskSelected),e.xp6(4),e.hij(" ",e.lcZ(23,19,"COMPETENCIES.BUTTON.BACK")," "),e.xp6(2),e.Q6J("disabled",a.validateArray(a.jobTaskGroupSelected)),e.xp6(1),e.hij(" ",e.lcZ(26,21,"COMPETENCIES.BUTTON.ACEPT")," "))},dependencies:[o.sg,y.lW,R.Hw,G.ey,v.KE,v.hX,v.R9,q.gD,f.X$],styles:["[_nghost-%COMP%] .field-language .mat-form-field-wrapper{padding-bottom:0!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex{height:30px!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-outline{height:30px!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{padding:4px 0!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-form-field-label-wrapper .mat-form-field-label{margin-top:-.2em!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-form-field-label-wrapper .mat-form-field-label mat-label{top:-3px!important;position:relative}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-select-arrow{display:none!important}[_nghost-%COMP%] .mat-icon-button{background-color:#ececff!important}[_nghost-%COMP%] .mat-checkbox .mat-checkbox-inner-container{width:18px;height:18px}[_nghost-%COMP%] .mat-checkbox .mat-checkbox-frame{background:#FFFFFF;border:1px solid #AAAAFE;border-radius:50%}[_nghost-%COMP%] .mat-checkbox.mat-checkbox-checked .mat-checkbox-background{border:none!important;border-radius:50%!important;background-color:#1e1ffd!important}"]})}return n})();const ce=[{nameid:m.BEHAVIORALRADARCHART,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.BEHAVIORALRADARCHART",selected:!0},{nameid:m.BEHAVIORDESCRIPTORS,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.BEHAVIORDESCRIPTORS",selected:!0},{nameid:m.DESCRIPTIVEWORDS,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.DESCRIPTIVEWORDS",selected:!0},{nameid:m.IDEALENVIRONMENT,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.IDEALENVIRONMENT",selected:!0},{nameid:m.JOBCHART,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.JOBCHART",selected:!0},{nameid:m.JOBTASKS,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.JOBTASKS",selected:!0},{nameid:m.LEADERSHIPSTYLE,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.LEADERSHIPSTYLE",selected:!0},{nameid:m.MOTIVATORS,name:"JOBS.REPORT_DESCRIPTORS.SECTIONS.MOTIVATORS",selected:!0}];var pe=s(77234),me=s(10266),de=s(6088);function ue(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"div",13)(1,"mat-checkbox",14),e.NdJ("change",function(a){const u=e.CHM(t).$implicit,S=e.oxw();return e.KtG(S.selectSection(a,u))}),e.qZA(),e.TgZ(2,"span",15),e._uU(3),e.ALo(4,"translate"),e.qZA()()}if(2&n){const t=h.$implicit;
1e.xp6(1),e.Q6J("checked",t.selected),e.xp6(2),e.Oqu(e.lcZ(4,2,t.name))}}function ge(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"app-pda-selection",16),e.NdJ("itemEvent",function(a){e.CHM(t);const l=e.oxw();return e.KtG(l.changeLanguge(a))}),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("label","PEOPLE_MANAGMENT.GENERATE_REPORT.LANGUAGE")("items",t.languagesOption)("itemSelected",t.languageSelectedId)("isMultiple","false")}}let he=(()=>{class n{constructor(t,i,a){this.languageService=t,this.individualService=i,this.reportClassic=a,this.sections=ce,this.requestJobEvent=new e.vpe,this.reportLangugeSelected=new e.vpe}ngOnDestroy(){(0,c.r)(this.getAllLanguageSub),(0,c.r)(this.reportClassicSub)}ngOnInit(){this.jobName=this.dataDescriptors.element.name,this.languageSelectedCulture=this.languageService.getLanguageCurrent(),this.getCultureUser(),this.reportTypeRequest={excelInRows:!0,reportType:pe.C.PDF}}selectSection(t,i){this.sections.find(l=>l.nameid===i.nameid).selected=t.checked}generateReport(){this.requestJobEvent.emit(this.sections)}getCultureUser(){this.reportClassicSub=this.reportClassic.getReportCulture().subscribe({next:t=>{t?(this.languageSelectedCulture=t,this.getLanguage()):this.getLanguage()},error:t=>{this.getLanguage()}})}getLanguage(){this.getAllLanguageSub=this.individualService.getAllLanguage("Active").subscribe({next:t=>{this.availablelanguages=t,"en"===this.languageSelectedCulture&&(this.languageSelectedCulture="en-US"),this.languageSelectedId=t.find(i=>i.culture===this.languageSelectedCulture).id,this.reportLangugeSelected.emit(this.languageSelectedCulture),this.languages=t,this.languagesOption=t.map(i=>({id:i.id,name:i.name})),this.languagesOption.sort((i,a)=>i.name<a.name?-1:i.name>a.name?1:0)},error:t=>{}})}changeLanguge(t){this.languageSelectedId=t,this.languageSelectedCulture=this.availablelanguages.some(i=>i.id===t)?this.availablelanguages.find(i=>i.id===t).culture:"",this.reportLangugeSelected.emit(this.languageSelectedCulture)}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(N.T),e.Y36(j.n),e.Y36(Z.L))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-job-description-section"]],inputs:{dataDescriptors:"dataDescriptors"},outputs:{requestJobEvent:"requestJobEvent",reportLangugeSelected:"reportLangugeSelected"},decls:23,vars:18,consts:[[1,"py-5"],[1,"flex","items-center","justify-start"],[1,"font-semibold","text-sm","text-pda-peoplemanagement-cyan-400","mt-5","mr-1"],[1,"font-normal","text-sm","text-pda-peoplemanagement-grey-800","mt-5"],[1,"flex","items-center","justify-between"],[1,"font-semibold","text-sm","text-pda-peoplemanagement-cyan-400","mt-5"],[1,"flex","flex-wrap","py-3"],["class","my-1 px-2 flex items-center w-full",4,"ngFor","ngForOf"],[1,"flex","flex-col","md:flex-row","justify-between","mt-5"],[1,"text-sm","text-pda-peoplemanagement-cyan-400","font-semibold","mr-2","flex","items-center"],["svgIcon","ic-informacion","matTooltipClass","bg-pda-peoplemanagement-cyan-400",1,"!w-4","!h-4","!leading-4","!ml-[2px]","text-pda-peoplemanagement-cyan-100",3,"matTooltip"],[3,"label","items","itemSelected","isMultiple","itemEvent",4,"ngIf"],["mat-flat-button","",1,"w-full","md:w-auto","!h-10","leading-10","bg-pda-peoplemanagement-cyan-400","text-white","font-semibold","!rounded-3xl","hover:bg-pda-peoplemanagement-cyan-600","!mt-5","md:!mt-0",3,"click"],[1,"my-1","px-2","flex","items-center","w-full"],[3,"checked","change"],[1,"ml-2","text-xs","text-pda-peoplemanagement-grey-800","font-light"],[3,"label","items","itemSelected","isMultiple","itemEvent"]],template:function(i,a){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h3",2),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"p",3),e._uU(6),e.qZA()(),e.TgZ(7,"div",4)(8,"h3",5),e._uU(9),e.ALo(10,"translate"),e.qZA()(),e.TgZ(11,"div",6),e.YNc(12,ue,5,4,"div",7),e.qZA(),e.TgZ(13,"div",8)(14,"div",9),e._uU(15),e.ALo(16,"translate"),e._UZ(17,"mat-icon",10),e.ALo(18,"translate"),e.YNc(19,ge,1,4,"app-pda-selection",11),e.qZA(),e.TgZ(20,"button",12),e.NdJ("click",function(){return a.generateReport()}),e._uU(21),e.ALo(22,"translate"),e.qZA()()()),2&i&&(e.xp6(3),e.hij(" ",e.lcZ(4,8,"JOBS.REPORT_DESCRIPTORS.JOB_NAME")," "),e.xp6(3),e.hij(" ",a.jobName," "),e.xp6(3),e.hij(" ",e.lcZ(10,10,"JOBS.REPORT_DESCRIPTORS.INCLUDE_SECTION")," "),e.xp6(3),e.Q6J("ngForOf",a.sections),e.xp6(3),e.hij(" ",e.lcZ(16,12,"PEOPLE_MANAGMENT.GENERATE_REPORT.SELECT_LANGUAGE")," "),e.xp6(2),e.Q6J("matTooltip",e.lcZ(18,14,"PEOPLE_MANAGMENT.GENERATE_REPORT.SELECT_LANGUAGE_TOOLTIP")),e.xp6(2),e.Q6J("ngIf",a.languagesOption),e.xp6(2),e.hij(" ",e.lcZ(22,16,"COMPETENCIES.BUTTON.ACEPT")," "))},dependencies:[o.sg,o.O5,R.Hw,y.lW,K.oG,me.gM,de.A,f.X$],styles:["[_nghost-%COMP%] .mat-checkbox .mat-checkbox-inner-container{width:18px;height:18px}[_nghost-%COMP%] .mat-checkbox .mat-checkbox-frame{background:#ffffff;border:1px solid #AAAAFE;border-radius:999px}[_nghost-%COMP%] .mat-checkbox.mat-checkbox-checked .mat-checkbox-background{border:none!important;border-radius:999px!important;background-color:#1e1ffd!important}[_nghost-%COMP%] .mat-checkbox.mat-checkbox-indeterminate .mat-checkbox-background{border:none!important;border-radius:999px!important;background-color:#1e1ffd!important}[_nghost-%COMP%] .mat-icon-button{background-color:#ececff!important;transition:none!important;color:#1e1ffd}[_nghost-%COMP%] .mat-button-focus-overlay{opacity:0;transition:none!important;cursor:none!important}[_nghost-%COMP%] .mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease .28s;width:20px;border-width:2px;border-style:solid;border-radius:50%;background:#ffffff;border:1px solid #AAAAFE}[_nghost-%COMP%] .mat-radio-button.mat-radio-checked .mat-radio-inner-circle{transform:scale(1)!important;background:#1E1FFD!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper{padding-bottom:0!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex{height:30px!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-outline{height:30px!important;color:#1e1ffd}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{padding:3px 0!important}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-form-field-label-wrapper .mat-form-field-label mat-label{top:-3px!important;position:relative}[_nghost-%COMP%] .field-language .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix .mat-select-arrow{display:none!important}"]})}return n})();function fe(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"app-edit-create-data",8),e.NdJ("requestJobEvent",function(a){e.CHM(t);const l=e.oxw();return e.KtG(l.saveJob(a))}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("data",t.data)}}function Te(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"app-edit-create-task",10),e.NdJ("requestJobEvent",function(a){e.CHM(t);const l=e.oxw(2);return e.KtG(l.saveAutomaticJob(a))}),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("dataTask",t.data)("jobTaskType",t.jobTaskType)}}function Se(n,h){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,Te,1,2,"app-edit-create-task",9),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.jobTaskType)}}function be(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"app-edit-create-task-group",11),e.NdJ("requestJobEvent",function(a){e.CHM(t);const l=e.oxw();return e.KtG(l.saveFinalAutomaticJob(a))}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("dataTaskGroup",t.data)}}function Ee(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"app-job-description-section",12),e.NdJ("requestJobEvent",function(a){e.CHM(t);const l=e.oxw();return e.KtG(l.generateReport(a))})("reportLangugeSelected",function(a){e.CHM(t);const l=e.oxw();return e.KtG(l.languageSelectedReportEvent(a))}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("dataDescriptors",t.data)}}function Ce(n,h){1&n&&(e.TgZ(0,"div"),e._uU(1," Ninguna opci\xf3n seleccionad
1a "),e.qZA())}let P=(()=>{class n{constructor(t,i,a,l,u,S,J,_,M){this.dialogRef=t,this.data=i,this.localStorageService=a,this.jobService=l,this.messageHandlerService=u,this.reportClassicService=S,this.individualService=J,this.languageService=_,this.modalService=M,this.TypeCreationEdition=d}ngOnInit(){this.statusActionParent=this.data.typeScreen,this.languageSelectedCulture=this.languageService.getLanguageCurrent(),"en"===this.languageSelectedCulture&&(this.languageSelectedCulture="en-US"),this.getLanguage(),this.getclientId(),this.setTitleScreen()}ngOnDestroy(){(0,c.r)(this.postJobAdministrationtSub),(0,c.r)(this.getAllLanguageSub)}cancel(){this.close(!1)}close(t){this.dialogRef&&this.dialogRef.close(t)}setTitleScreen(){switch(this.statusActionParent){case d.DATA:case d.TASK:case d.TASK_GROUP:this.titleScreen=this.data.typeAction===g.w.EDIT?"JOBS.TITLE_SCREEN_EDIT":"JOBS.TITLE_SCREEN_CREATE";break;case d.DESCRIPTORS:this.titleScreen="JOBS.TITLE_SCREEN_REPORT"}}generateReport(t){const i={baseId:this.selectedClientId,jobId:this.data.element.jobId,reportFormat:"PDF",jobChart:!!t.find(a=>a.nameid===m.JOBCHART)&&t.find(a=>a.nameid===m.JOBCHART).selected,jobTasks:!!t.find(a=>a.nameid===m.JOBTASKS)&&t.find(a=>a.nameid===m.JOBTASKS).selected,descriptiveWords:!!t.find(a=>a.nameid===m.DESCRIPTIVEWORDS)&&t.find(a=>a.nameid===m.DESCRIPTIVEWORDS).selected,behaviorDescriptors:!!t.find(a=>a.nameid===m.BEHAVIORDESCRIPTORS)&&t.find(a=>a.nameid===m.BEHAVIORDESCRIPTORS).selected,behavioralRadarChart:!!t.find(a=>a.nameid===m.BEHAVIORALRADARCHART)&&t.find(a=>a.nameid===m.BEHAVIORALRADARCHART).selected,motivators:!!t.find(a=>a.nameid===m.MOTIVATORS)&&t.find(a=>a.nameid===m.MOTIVATORS).selected,leadershipStyle:!!t.find(a=>a.nameid===m.LEADERSHIPSTYLE)&&t.find(a=>a.nameid===m.LEADERSHIPSTYLE).selected,idealenvironment:!!t.find(a=>a.nameid===m.IDEALENVIRONMENT)&&t.find(a=>a.nameid===m.IDEALENVIRONMENT).selected,reportLangugeSelected:this.languageSelectedReport};this.reportClassicService.generateJobDescriptorsReport(i).subscribe(a=>{a&&(window.open(a),this.dialogRef.close(null))})}languageSelectedReportEvent(t){this.languageSelectedReport=t}getclientId(){let t=JSON.parse(this.localStorageService.getValue(r.X.SELECTED_CUSTOMER));this.selectedClientId=t.baseId}getLanguage(){this.getAllLanguageSub=this.individualService.getAllLanguage("PDAProfileAngularActive").subscribe({next:t=>{this.languageSelectedId=t.find(i=>i.culture===this.languageSelectedCulture).id,this.statusAction()},error:t=>{}})}statusAction(){this.statusActionParent===d.TASK&&this.jobService.getAllJobTaskType(this.languageSelectedId).subscribe({next:t=>{this.jobTaskType=t,this.jobTaskType=this.jobTaskType.sort((i,a)=>i.order-a.order)},error:t=>{this.messageHandlerService.error({title:"Error al generar el reporte",message:"Error al generar el reporte"})}})}saveJob(t){t.manual?this.data.typeAction===g.w.CREATE?(t.baseId=this.selectedClientId,this.postJobAdministrationtSub=this.jobService.postJobAdministration(t).subscribe({next:i=>{this.messageHandlerService.success({title:"JOBS.SUCCESS.CREATION.TITLE",message:"JOBS.SUCCESS.CREATION.MESSAGGE"}),this.close(!0)},error:i=>{this.messageHandlerService.error({title:"JOBS.ERROR.CREATION.TITLE",message:"JOBS.ERROR.CREATION.MESSAGGE"})}})):null!=this.data&&null!=this.data.element&&this.data.element.existsAssociatedAnalytics?this.modalFunction(t):this.executeEditJob(t):null!=this.data&&null!=this.data.element&&this.data.element.existsAssociatedAnalytics?this.modalFunctionEditCustomPosition(t):(this.data.request=t,this.dialogRef.close(this.data))}saveAutomaticJob(t){this.dialogRef.close(t)}saveFinalAutomaticJob(t){t.typeScreen===d.TASK?this.dialogRef.close(t):this.data.typeAction===g.w.CREATE?(t.request.baseId=this.selectedClientId,this.postJobAdministrationtSub=this.jobService.postJobAdministration(t.request).subscribe({next:i=>{this.messageHandlerService.success({title:"JOBS.SUCCESS.CREATION.TITLE",message:"JOBS.SUCCESS.CREATION.MESSAGGE"}),this.close(!0)},error:i=>{this.messageHandlerService.error({title:"JOBS.ERROR.CREATION.TITLE",message:"JOBS.ERROR.CREATION.MESSAGGE"})}})):(t.request.baseId=this.selectedClientId,this.postJobAdministrationtSub=this.jobService.putJobAdministration(this.data.element.jobId,t.request).subscribe({next:i=>{this.messageHandlerService.success({title:"JOBS.SUCCESS.EDIT.TITLE",message:"JOBS.SUCCESS.EDIT.MESSAGGE"}),this.close(!0)},error:i=>
1{this.messageHandlerService.error({title:"JOBS.ERROR.EDIT.TITLE",message:"JOBS.ERROR.EDIT.MESSAGGE"})}}))}modalFunction(t){this.ejecutPopUp(),this.modalService.confirmedPopUp().subscribe(i=>{i&&this.executeEditJob(t)})}modalFunctionEditCustomPosition(t){this.ejecutPopUp(),this.modalService.confirmedPopUp().subscribe(i=>{i&&(this.data.request=t,this.dialogRef.close(this.data))})}ejecutPopUp(){let i=this.modalService.getParams("",["JOBS.MODAL_DESCRIPTION"],O.$.WARNING,"confirm","514px",!0);i.closeOnNavigation=!0,this.modalService.openPopUp(k.N,i)}executeEditJob(t){t.baseId=this.selectedClientId,this.postJobAdministrationtSub=this.jobService.putJobAdministration(this.data.element.jobId,t).subscribe({next:i=>{this.messageHandlerService.success({title:"JOBS.SUCCESS.EDIT.TITLE",message:"JOBS.SUCCESS.EDIT.MESSAGGE"}),this.close(!0)},error:i=>{this.messageHandlerService.error({title:"JOBS.ERROR.EDIT.TITLE",message:"JOBS.ERROR.EDIT.MESSAGGE"})}})}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(x.so),e.Y36(x.WI),e.Y36(D.n),e.Y36(B.O),e.Y36(U.d),e.Y36(Z.L),e.Y36(j.n),e.Y36(N.T),e.Y36(w.Z))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-job-container-parent"]],decls:13,vars:8,consts:[[1,"flex","justify-end","text-pda-peoplemanagement-cyan-400"],["mat-icon-button","",3,"click"],["svgIcon","ic-cerrar"],[1,"flex","items-center","justify-start","mt-3"],[1,"font-bold","text-pda-peoplemanagement-cyan-400","text-lg"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"data","requestJobEvent"],[3,"dataTask","jobTaskType","requestJobEvent",4,"ngIf"],[3,"dataTask","jobTaskType","requestJobEvent"],[3,"dataTaskGroup","requestJobEvent"],[3,"dataDescriptors","requestJobEvent","reportLangugeSelected"]],template:function(i,a){1&i&&(e.TgZ(0,"div",0)(1,"button",1),e.NdJ("click",function(){return a.cancel()}),e._UZ(2,"mat-icon",2),e.qZA()(),e.TgZ(3,"div",3)(4,"h2",4),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e.TgZ(7,"div",5),e.YNc(8,fe,2,1,"div",6),e.YNc(9,Se,2,1,"div",6),e.YNc(10,be,2,1,"div",6),e.YNc(11,Ee,2,1,"div",6),e.YNc(12,Ce,2,0,"div",7),e.qZA()),2&i&&(e.xp6(5),e.hij(" ",e.lcZ(6,6,a.titleScreen)," "),e.xp6(2),e.Q6J("ngSwitch",a.statusActionParent),e.xp6(1),e.Q6J("ngSwitchCase",a.TypeCreationEdition.DATA),e.xp6(1),e.Q6J("ngSwitchCase",a.TypeCreationEdition.TASK),e.xp6(1),e.Q6J("ngSwitchCase",a.TypeCreationEdition.TASK_GROUP),e.xp6(1),e.Q6J("ngSwitchCase",a.TypeCreationEdition.DESCRIPTORS))},dependencies:[o.O5,o.RF,o.n9,o.ED,R.Hw,ne,oe,le,y.lW,he,f.X$]})}return n})();var Y=s(2147),V=s(81748),Ae=s(75997),xe=s(21645),Oe=s(88948),ve=s(38075),_e=s(31912),Ie=s(24310),Re=s(20740),ye=s(22910),Je=s(22990);const Pe=["svgErrorSearchUsers"];function Le(n,h){if(1&n){const t=e.EpF();e.TgZ(0,"div",8)(1,"div",9)(2,"button",10),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.openActionJobDialogs(a.ActionType.CREATE,null))}),e._UZ(3,"mat-icon",11),e.qZA()()()}}const Ne=[{path:"",component:(()=>{class n{constructor(t,i,a,l,u,S,J,_,M,Ge,qe){this.jobService=t,this.localStorageService=i,this.translateService=a,this.modalService=l,this.messageHandlerService=u,this.customerSelectionService=S,this.storeService=J,this.languageService=_,this.clientConfigurationService=M,this.cookieStorageService=Ge,this.subbaseChangeService=qe,this.pageSizeOption=[10,25,50],this.ActionType=g.w}ngOnDestroy(){(0,c.r)(this.getJobsSub),(0,c.r)(this.getCustomerSelectionEventSub),(0,c.r)(this.languageServiceSub)}ngOnInit(){this.pageSize=25,this.pageNumber=1,this.pageSizeOption=[10,25,50],this.title="JOBS.TITLE",this.description=this.translateService.instant("JOBS.DESCRIPTION"),this.language=this.cookieStorageService.getCookie("language");let t=this.language?this.language.split("-"):["es"];this.idioma=t[0],this.setImageLanding(),this.getclientId(),this.claims=this.getAllClaimsByUser(),this.initColumns(),this.loadJob(),this.button="COMPETENCIES.DEMO",this.getsubbasesFromUser(),this.listenLanguageChangeEvent(),this.listenCustomerSelectionEvent(),this.clientConfigurationService.data$.subscribe(i=>{i&&(this.clientConfiguration=i.map(a=>({value:a.value,name:a.name})),this.configurationCliente=this.clientConfiguration,this.checkConfiguration(),this.setActions())})}getsubbasesFromUser(){this.subbaseChangeService.getSubBaseChangeEvent().subscribe(t=>{this.subBasesOption=t.map(i=>({id:i.subBaseId,name:i.subBaseName}))})}setActions(){this.actions=[{label:"JOBS.JOB_LIST.ACTION.JOB_DESCRIPTION",icon:"ic-description-jobs",action:g.w.JOB_DESCRIPTOR}],this.hasPerissionAdministration()&&(this.actions=[{label:"COMPETENCIES.COMPETENCIES_LIST.ACTION.EDIT",icon:"ic-edit",action:g.w.EDIT},...this.actions],this.actions=[...this.actions,{label:"COMPETENCIES.COMPETENCIES_LIST.ACTION.DELETE",icon:"ic-trash",action:g.w.DELETE}])}hasPerissionAdministration(){return this.claims.includes("JobAdministrationFull")||this.claims.includes("JobAdministration")&&this.jobAdministrationEnabled}checkConfiguration(){const t=this.configurationCliente.find(a=>a.name===V.P.JOBADMINISTRATIONENABLED),i=this.configurationCliente.find(a=>a.name===V.P.JOBADMINISTRATIONTYPE);this.jobAdministrationEnabled=!!t&&t.value,this.jobAdministrationType=i?i.value:""}setImageLanding(){this.img="en"===this.idioma?"assets/img/imagen-puestos-en.png":"assets/img/imagen-puestos.png"}loadJob(){this.pageNumber||(this.pageNumber=1),this.getJobsSub=this.jobService.getJobAdministration({baseId:this.selectedClientId,pageNumber:this.pageNumber,pageSize:this.pageSize}).subscribe({next:i=>{this.hideNotification(),i&&i.data&&i.data.length>0?(this.jobsAvailable=i.data.filter(a=>this.subBasesOption.some(l=>l.id===a.subBaseId||"Predeterminada"===a.subbaseName)),this.dataSource=new I.by(this.jobsAvailable),this.totalSize=i.totalRecords):(this.dataSource=new I.by([]),this.svgErrorSearchUsers.show("INTERNAL_USER_ADMINISTRATION.USER_LIST.NOT_FOUND_ANY_USER_TEXT.TITLE","INTERNAL_USER_ADMINISTRATION.USER_LIST.NOT_FOUND_ANY_USER_TEXT.MESSAGE"))},error:()=>{}})}getclientId(){let t=JSON.parse(this.localStorageService.getValue(r.X.SELECTED_CUSTOMER));this.selectedClientId=t.baseId}
1initColumns(){this.columns=[{columnDef:"subbase",header:"JOBS.JOB_LIST.TABLE.COLUMN.SUBBASE",cell:t=>`${"Predeterminada"===t.subbaseName?this.translateService.instant("PEOPLE_MANAGMENT.ALL"):t.subbaseName}`,classTh:"font-medium text-pda-peoplemanagement-grey-800 dark:!text-pda-peoplemanagement-grey-50 text-sm w-0 !px-2",classTd:"text-xs text-pda-peoplemanagement-grey-800 !px-2"},{columnDef:"name",header:"JOBS.JOB_LIST.TABLE.COLUMN.NAME",cell:t=>`${t.name}`,classTh:"font-medium text-pda-peoplemanagement-grey-800 dark:!text-pda-peoplemanagement-grey-50 text-sm !px-2 w-4/12",classTd:"text-xs text-pda-peoplemanagement-grey-800 !px-2"},{columnDef:"description",header:"JOBS.JOB_LIST.TABLE.COLUMN.DESCRIPTION",cell:t=>`${t.description?t.description:""}`,classTh:"font-medium text-pda-peoplemanagement-grey-800 dark:!text-pda-peoplemanagement-grey-50 text-sm !px-2 w-5/12",classTd:"text-xs text-pda-peoplemanagement-grey-800 !py-[3px] !px-2"},{columnDef:"profileRef",header:"JOBS.JOB_LIST.TABLE.COLUMN.PROFILE_REF",cell:t=>`${t.name?t.behaviouralProfileCoreName:""}`,classTh:"font-medium text-pda-peoplemanagement-grey-800 dark:!text-pda-peoplemanagement-grey-50 text-sm !px-2 min-w-[105px] w-0",classTd:"text-xs text-pda-peoplemanagement-grey-800 !px-2"},{columnDef:"profile",header:"JOBS.JOB_LIST.TABLE.COLUMN.PROFILE",cell:t=>`${null!==t.r?t.r:""} ${null!==t.e?t.e:""} ${null!==t.p?t.p:""} ${null!==t.n?t.n:""} ${null!==t.s?t.s:""}`,classTh:"font-medium text-pda-peoplemanagement-grey-800 dark:!text-pda-peoplemanagement-grey-50 text-sm !px-2 w-0",classTd:"text-xs text-pda-peoplemanagement-grey-800 !px-2"}]}onPaginateChange(t){this.pageSize=t.pageSize,this.pageNumber=t.pageIndex+1,this.loadJob()}onAction(t){this.openActionJobDialogs(t.type,t.element)}openActionJobDialogs(t,i){t===this.ActionType.DELETE?(this.modalService.openPopUp(Ae.$,{width:"auto",closeOnNavigation:!0,data:{title:"JOBS.CONFIRM.TITLE",message:""},panelClass:"confirm"}),this.modalService.confirmedPopUp().subscribe(l=>{l&&this.jobService.deleteJobAdministration(i.jobId).subscribe({next:u=>{this.messageHandlerService.success({title:"JOBS.SUCCESS.DELETE.TITLE",message:"JOBS.SUCCESS.DELETE.MESSAGGE"}),this.loadJob()},error:u=>{this.messageHandlerService.error({title:"JOBS.ERROR.DELETE.TITLE",message:"JOBS.ERROR.DELETE.MESSAGGE"})}})})):t===g.w.JOB_DESCRIPTOR?(this.modalService.openPopUp(P,{width:"750px",panelClass:"action-group",position:{right:"0px"},height:"100vh",maxHeight:"100vh",data:{typeAction:t,typeScreen:d.DESCRIPTORS,element:i,request:null,JobTaskSelected:[]}}),this.modalService.confirmedPopUp().subscribe(l=>{})):this.enterToData({typeAction:t,typeScreen:d.DATA,element:i,request:null,JobTaskSelected:[],canAutomaticOrManual:this.jobAdministrationType})}enterToData(t){this.modalService.openPopUp(P,{width:"750px",panelClass:"action-group",position:{right:"0px"},height:"100vh",maxHeight:"100vh",data:t}),this.modalService.confirmedPopUp().subscribe(i=>{this.enterToDataTask(i)})}enterToDataTask(t){t&&(t.typeScreen===d.DATA||t.typeScreen===d.TASK?(t.typeScreen=d.TASK,this.modalService.openPopUp(P,{width:"750px",panelClass:"action-group",position:{right:"0px"},height:"100vh",maxHeight:"100vh",data:t}),this.modalService.confirmedPopUp().subscribe(i=>{i.typeScreen===d.DATA?this.enterToData(i):this.enterToDataTaskGroup(i)})):this.loadJob())}listenLanguageChangeEvent(){this.languageServiceSub=this.languageService.getCurrentStateLanguage().subscribe(t=>{if(this.stateLanguage=t,t===xe.v.CHANGING){this.language=this.cookieStorageService.getCookie("language");let i=this.language?this.language.split("-"):["es"];this.idioma=i[0],this.loadJob(),this.setImageLanding(),this.description=this.translateService.instant("JOBS.DESCRIPTION")}})}listenCustomerSelectionEvent(){this.getCustomerSelectionEventSub=this.customerSelectionService.getCustomerSelectionEvent().pipe().subscribe(t=>{t&&(this.pageNumber=1,this.getclientId(),this.claims=this.getAllClaimsByUser(),this.loadJob())})}enterToDataTaskGroup(t){t&&t.typeScreen===d.TASK&&(t.typeScreen=d.TASK_GROUP,this.modalService.openPopUp(P,{width:"750px",panelClass:"action-group",position:{right:"0px"},height:"100vh",maxHeight:"100vh",data:t}),this.modalService.confirmedPopUp().subscribe(i=>{i&&(i.typeScreen===d.TASK?this.enterToDataTask(i):this.loadJob())}))}getAllClaimsByUser(){let i,t=this.storeService.getData(Y.S.ROLE_CLAIMS_AND_USER_CLAIMS);i=t.roleClaims.map(u=>u.claimType);let a=t.userClaims.map(u=>u.claimType);return[...new Set([...i,...a])]}getClientConfiguration(){this.configurationCliente=JSON.parse(this.storeService.getData(Y.S.CLIENT_CONFIGURATION))}hideNotification(){this.svgErrorSearchUsers.hide()}static#e=this.\u0275fac=function(i){return new(i||n)(e.Y36(B.O),e.Y36(D.n),e.Y36(f.sK),e.Y36(w.Z),e.Y36(U.d),e.Y36(Oe.s),e.Y36(ve.d),e.Y36(N.T),e.Y36(_e.B),e.Y36(Ie.G),e.Y36(F._))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-job"]],viewQuery:function(i,a){if(1&i&&e.Gf(Pe,7),2&i){let l;e.iGM(l=e.CRH())&&(a.svgErrorSearchUsers=l.first)}},decls:11,vars:16,consts:[[3,"title","description","img","button","showButton"],[1,"my-10","mx-2"],[1,"text-xl","text-pda-peoplemanagement-cyan-400","font-bold","px-2"],[1,"px-2"],[1,"lg:flex","lg:flex-wrap","items-center","pt-3","lg:py-3","gap-3","mb-4","px-5"],["class","w-full pb-3 lg:pb-0",4,"ngIf"],[1,"w-full","lg:flex","lg:flex-wrap","items-center","pt-3","lg:py-3","gap-3","mb-4",3,"columns","dataSource","menuActions","pageSize","pageSizeOptions","totalSize","showSelectColumn","paginateChange","actionEvent"],["svgErrorSearchUsers",""],[1,"w-full","pb-3","lg:pb-0"],[1,"w-full","lg:w-4/12","pb-3","lg:pb-0","ml-auto","flex","gap-3"],["mat-flat-button","",1,"!w-10","!min-w-[40px]","!h-10","leading-10","text-pda-peoplemanagement-cyan-400","font-semibold","!rounded-full","bg-pda-peoplemanagement-lcyan-200","hover:bg-pda-peoplemanagement-cyan-600","hover:text-white","!ml-auto","!flex","!justify-center",3,"click"],["svgIcon","ic-agregar",1,"!w-4","!h-4","leading-4"]],template:function(i,a){1&i&&(e._UZ(0,"app-landing-product",0),e.TgZ(1,"div",1)(2,"h4",2),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",3)(6,"div",4),e.YNc(7,Le,4,0,"div",5),e.TgZ(8,"app-general-table",6),e.NdJ("paginateChange",function(u){return a.onPaginateChange(u)})("actionEvent",function(u){return a.onAction(u)}),e.qZA()()()(),e._UZ(9,"app-svg-error-notification",null,7)),2&i&&(e.Q6J("title",a.title)("description",a.description)("img",a.img)("button",a.button)("showButton",!1),e.xp6(3),e.hij(" ",e.lcZ(4,14,"JOBS.SUBTITLE")," "),e.xp6(4),e.Q6J("ngIf",a.hasPerissionAdministration()),e.xp6(1),e.Q6J("columns",a.columns)("dataSource",a.dataSource)("menuActions",a.actions)("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOption)("totalSize",a.totalSize)("showSelectColumn",!1))},dependencies:[o.O5,y.lW,R.Hw,Re.y,ye.b,Je.j,f.X$],styles:[".row[_ngcontent-%COMP%]{flex-wrap:nowrap;align-items:center;justify-content:space-evenly}.h2[_ngcontent-%COMP%]{margin-bottom:.5rem;font-weight:500;line-height:1.2}.jobs-img[_ngcontent-%COMP%]{max-width:700px}@media (min-width: 768px){.col-md-6[_ngcontent-%COMP%]{flex:0 0 50%;max-width:50%}}"]})}return n})()}];let Me=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.oAB({type:n});static#a=this.\u0275inj=e.cJS({imports:[T.Bz.forChild(Ne),T.Bz]})}return n})();var ke=s(61834),De=s(15240);let Be=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.oAB({type:n});static#a=this.\u0275inj=e.cJS({imports:[o.ez,De.P,E.q,f.aw,b.UX,b.u5]})}return n})();var Ue=s(6615),Ze=s(45466);let je=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.oAB({type:n});static#a=this.\u0275inj=e.cJS({imports:[o.ez,R.Ps,Be,E.q,f.aw,Ze.Y,Ue.o]})}return n})();var we=s(58539);let Fe=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.oAB({type:n});static#a=this.\u0275inj=e.cJS({imports:[o.ez,E.q,f.aw,A.v,Me,ke.C,je,we.F]})}return n})()},6088:(L,C,s)=>{s.d(C,{A:()=>g});var o=s(94650),E=s(36895),f=s(97392),A=s(3238),T=s(59549),I=s(84385),r=s(89383);function c(p,d){if(1&p&&(o.TgZ(0,"mat-option",4),o._uU(1),o.qZA()),2&p){const m=d.$implicit;
1o.Q6J("value",m.id),o.xp6(1),o.Oqu(m.name)}}let g=(()=>{class p{constructor(){this.isMultiple="false",this.itemEvent=new o.vpe}ngOnInit(){}changeItem(m){this.itemEvent.emit(m)}static#e=this.\u0275fac=function(x){return new(x||p)};static#t=this.\u0275cmp=o.Xpm({type:p,selectors:[["app-pda-selection"]],inputs:{itemSelected:"itemSelected",label:"label",items:"items",isMultiple:"isMultiple"},outputs:{itemEvent:"itemEvent"},decls:7,vars:6,consts:[["appearance","outline",1,"text-xs","field-language","!block"],[1,"!text-xs","!font-semibold","!text-pda-peoplemanagement-cyan-100",3,"value","multiple","selectionChange"],["class","text-pda-peoplemanagement-cyan-400",3,"value",4,"ngFor","ngForOf"],["matSuffix","","svgIcon","ic-abajo",1,"!w-5","!h-5","items-center","align-middle","text-pda-peoplemanagement-cyan-100"],[1,"text-pda-peoplemanagement-cyan-400",3,"value"]],template:function(x,O){1&x&&(o.TgZ(0,"mat-form-field",0)(1,"mat-label"),o._uU(2),o.ALo(3,"translate"),o.qZA(),o.TgZ(4,"mat-select",1),o.NdJ("selectionChange",function(e){return O.changeItem(e.value)}),o.YNc(5,c,2,2,"mat-option",2),o.qZA(),o._UZ(6,"mat-icon",3),o.qZA()),2&x&&(o.xp6(2),o.Oqu(o.lcZ(3,4,O.label)),o.xp6(2),o.Q6J("value",O.itemSelected)("multiple",O.isMultiple),o.xp6(1),o.Q6J("ngForOf",O.items))},dependencies:[E.sg,f.Hw,A.ey,T.KE,T.hX,T.R9,I.gD,r.X$]})}return p})()},6615:(L,C,s)=>{s.d(C,{o:()=>I});var o=s(36895),E=s(793),f=s(89383),A=s(24006),T=s(94650);let I=(()=>{class r{static#e=this.\u0275fac=function(p){return new(p||r)};static#t=this.\u0275mod=T.oAB({type:r});static#a=this.\u0275inj=T.cJS({imports:[o.ez,E.q,f.aw,A.UX]})}return 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.