1"use strict";(self.webpackChunktaalentfy=self.webpackChunktaalentfy||[]).push([[7308],{67308(U,M,l){l.d(M,{g:()=>K});var j=l(73308),h=l(87829),y=l(2978),a=l(80656),u=l(7212),d=l(37222),f=l(54498),E=l(70739),m=l(66845),v=l(16226),x=l(8020),S=l(99390),I=l(26489),O=l(59237),P=l(56793),b=l(36248),p=l(22882),T=l(31027),g=l(70143),C=l(37413),k=l(38503),e=l(54303),D=l(55432),R=l(94903);function F(s,_){if(1&s&&(e.j41(0,"div",8),e.nrm(1,"app-spinner",12),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.Y8G("loading",t.loading())}}function J(s,_){1&s&&(e.j41(0,"span",16),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" *",e.bMT(2,1,"admin.admin_job_helper.errors.required_field")," "))}function B(s,_){1&s&&(e.j41(0,"span",20),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" *",e.bMT(2,1,"admin.admin_job_helper.errors.required_field")," "))}function L(s,_){if(1&s&&e.nrm(0,"img",24),2&s){const t=e.XpG(2);e.Y8G("src",t.new_job.picture_url,e.B4B)}}function q(s,_){1&s&&(e.j41(0,"span",20),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" *",e.bMT(2,1,"admin.admin_job_helper.errors.required_field")," "))}function w(s,_){if(1&s&&(e.j41(0,"i"),e.EFF(1),e.k0s()),2&s){const t=e.XpG(2).$implicit;e.R7$(),e.SpI("(",t.value.answer_placeholder,")")}}function A(s,_){if(1&s){const t=e.RV6();e.j41(0,"input",30),e.bIt("change",function(){a.eBV(t);const o=e.XpG().$implicit,i=e.XpG(2);return a.Njj(i.manageQuestion(o))}),e.k0s(),e.j41(1,"label",31),e.EFF(2),e.nVh(3,w,2,1,"i"),e.k0s()}if(2&s){const t=e.XpG().$implicit,n=e.XpG(2);e.Y8G("id",t.key)("checked",n.localQuestionsIndex.includes(t.key)),e.R7$(),e.Y8G("for",t.key),e.R7$(),e.SpI(" ",t.value.question," "),e.R7$(),e.vxM(t.value.answer_placeholder?3:-1)}}function Q(s,_){if(1&s&&(e.j41(0,"div",28),e.nVh(1,A,4,5),e.k0s()),2&s){const t=_.$implicit,n=e.XpG(2);e.R7$(),e.vxM(t.value.jobTypes&&!t.value.jobTypes.includes(n.new_job.type)||t.value.dependency?-1:1)}}function W(s,_){1&s&&(e.j41(0,"span",29),e.EFF(1),e.k0s()),2&s&&(e.R7$(),e.SpI(" ","admin.admin_job_helper.errors.select_at_least_one_option"," "))}function $(s,_){if(1&s){const t=e.RV6();e.j41(0,"div",9)(1,"div",9)(2,"label",13),e.EFF(3),e.nI1(4,"translate"),e.j41(5,"span",14),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.j41(8,"input",15),e.nI1(9,"translate"),e.mxI("ngModelChange",function(o){a.eBV(t);const i=e.XpG();return e.DH7(i.new_job.title,o)||(i.new_job.title=o),a.Njj(o)}),e.k0s(),e.nVh(10,J,3,3,"span",16),e.k0s(),e.j41(11,"div",17)(12,"label",18),e.EFF(13),e.nI1(14,"translate"),e.j41(15,"span",14),e.EFF(16),e.nI1(17,"translate"),e.k0s()(),e.j41(18,"quill-editor",19),e.nI1(19,"translate"),e.bIt("onContentChanged",function(o){a.eBV(t);const i=e.XpG();return a.Njj(i.new_job.description=(null==o.html?null:o.html.split("\xa0").join(" ").split("\xa0").join(" "))??i.new_job.description)}),e.k0s(),e.nVh(20,B,3,3,"span",20),e.k0s(),e.j41(21,"div",9)(22,"label",21),e.EFF(23),e.nI1(24,"translate"),e.j41(25,"span",14),e.EFF(26),e.nI1(27,"translate"),e.k0s()(),e.j41(28,"a",22),e.bIt("click",function(){a.eBV(t);const o=e.XpG();return a.Njj(o.updateImage())}),e.nrm(29,"app-icon",23),e.j41(30,"span"),e.EFF(31),e.nI1(32,"translate"),e.k0s()(),e.nVh(33,L,1,1,"img",24),e.nVh(34,q,3,3,"span",20),e.k0s(),e.j41(35,"div",25)(36,"div",26)(37,"label",27),e.EFF(38),e.nI1(39,"translate"),e.j41(40,"span",14),e.EFF(41),e.nI1(42,"translate"),e.k0s()(),e.Z7z(43,Q,2,1,"div",28,e.fX1),e.nI1(45,"keyvalue"),e.nI1(46,"orderBy"),e.nVh(47,W,2,1,"span",29),e.k0s()()()}if(2&s){const t=e.XpG();e.R7$(3),e.SpI("",e.bMT(4,23,"admin.header.create_job.title_offer")," "),e.R7$(3),e.SpI(" ",e.bMT(7,25,"admin.header.create_job.title_info")," "),e.R7$(2),e.R50("ngModel",t.new_job.title),e.Y8G("placeholder",e.bMT(9,27,"admin.header.create_job.title_offer")),e.BMQ("aria-describedby",t.errors&&t.formErrors.includes("title")?"job-title-error":null)("aria-invalid",t.errors&&t.formErrors.includes("title")),e.R7$(2),e.vxM(t.errors&&t.formErrors.includes("title")?10:-1),e.R7$(3),e.SpI("",e.bMT(14,29,"employment.common.job_detail.description")," "),e.R7$(3),e.SpI(" ",e.bMT(17,31,"admin.header.create_job.description_info")," "),e.R7$(2),e.Y8G("ngModel",t.new_job.description)("modules",t.editorConfig)("sanitize",!0)("placeholder","*"+e.bMT(19,33,"other.text_hcj"))("required",!0),e.R7$(2),e.vxM(t.errors&&t.formErrors.includes("description")?20:-1),e.R7$(3),e.SpI(" ",e.bMT(24,35,"admin.admin_job.history.picture_url")," "),e.R7$(3),e.SpI(" ",e.bMT(27,37,"admin.header.create_job.image_info")," "),e.R7$(5),e.SpI(" ",e.bMT(32,39,"admin.header.create_job.attach_image")," "),e.R7$(2),e.vxM(t.new_job.picture_url?33:-1),e.R7$(),e.vxM(t.errors&&t.formErrors.includes("image")?34:-1),e.R7$(4),e.SpI(" ",e.bMT(39,41,"admin.admin_job_helper.text34")," "),e.R7$(3),e.SpI(" ",e.bMT(42,43,"admin.header.create_job.question_info")," "),e.R7$(2),e.Dyx(e.i5U(46,47,e.bMT(45,45,t.questionsEstructureFiltered),"key")),e.R7$(4),e.vxM(!t.errors||null==t.formErrors||!t.formErrors.includes("extras.questions")||null!=t.new_job.extras&&t.new_job.extras.questions?-1:47)}}let K=(()=>{class s{translate=(0,a.WQX)(p.c$);uploadCropImageService=(0,a.WQX)(b.U);backendHelper=(0,a.WQX)(x.L);route=(0,a.WQX)(f.nX);notif=(0,a.WQX)(T.I2);gbService=(0,a.WQX)(I.g);modulesService=(0,a.WQX)(P.F);generalModalService=(0,a.WQX)(S.d);router=(0,a.WQX)(f.Ix);menuControl=(0,a.WQX)(O.K);destroyRef=(0,a.WQX)(a.abz);cdr=(0,a.WQX)(y.gRc);subscriptions=[];loading=(0,a.vPA)(!1);new_job;selectedSkills=[];countSelectedSkillsByType;totalSkillsSelected=0;companyId;applyStatusList;applyStatusSelectedList=(0,a.vPA)(void 0);currentJobConfig;defaultJobType=(0,a.vPA)(void 0);generalConfig;skillsConfig={optional:{max:5,min:0,status:"optional"},mandatory:{max:5,min:0,status:"required"},standalone:{max:5,min:0,status:"optional"},total_min_skills:3};questionsEstructure;questionsEstructureFiltered;enableAlterQuestion=!1;externalQuestion="";localQuestionsIndex=[];errors=!1;formErrors=[];objectKeys=Object.keys;editorConfig={toolbar:[["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{header:[1,2,3,4,5,6,!1]}],[{align:[]}],["link"],["clean"]]};
1constructor(){this.companyId=this.route.snapshot.params.company_id,this.questionsEstructure=this.translate.instant("admin.admin_job_helper.questions")}ngOnInit(){var t=this;this.subscriptions.push(this.gbService.getConfig().pipe((0,k.p)(({jobConfiguration:n,general:o})=>null!=n&&null!=o&&o.applyStateConfig&&(!this.generalConfig||!this.currentJobConfig))).pipe((0,u.pQ)(this.destroyRef)).subscribe(function(){var n=(0,j.A)(function*({jobConfiguration:o,general:i}){t.generalConfig=i,console.log(t.generalConfig),t.defaultJobType.set((yield t.modulesService.hasModule("default_job_type"))?.configuration),t.currentJobConfig=o[t.defaultJobType()],t.filterQuestionsByJobType(),t.new_job=new m.z([],t.defaultJobType()),console.log(t.currentJobConfig),t.cdr.markForCheck()});return function(o){return n.apply(this,arguments)}}()))}filterQuestionsByJobType(){this.questionsEstructureFiltered=Object.assign({},this.questionsEstructure),this.currentJobConfig?.step5?.questions?.length>1&&this.objectKeys(this.questionsEstructureFiltered).forEach(t=>{!this.currentJobConfig.step5.questions.includes(t)&&!t.includes("external_question")&&delete this.questionsEstructureFiltered[t]})}addExternalQuestion(){if(""==this.externalQuestion)return;let t=Object.keys(this.questionsEstructureFiltered).filter(i=>i.includes("external_question")).length++,n="q_external_question_"+t;for(;this.questionsEstructureFiltered[n];)t++,n="q_external_question_"+t;const o={[n]:{question:this.externalQuestion}};this.questionsEstructureFiltered={...this.questionsEstructureFiltered,...o},this.externalQuestion="",this.manageQuestion({key:n,value:o[n]})}manageQuestion(t,n){this.new_job.extras.questions||(this.new_job.extras.questions=[]),this.new_job.extras.questions.filter(i=>i.id==t.key).length>0?(this.new_job.extras.questions=this.new_job.extras.questions.filter(i=>i.id!=t.key),this.localQuestionsIndex=this.localQuestionsIndex.filter(i=>i!=t.key),t.value.childs&&t.value.childs.forEach(i=>{const r=Object.keys(this.questionsEstructureFiltered).find(c=>c==i);r&&(this.new_job.extras.questions=this.new_job.extras.questions.filter(c=>c.id!=r),this.localQuestionsIndex=this.localQuestionsIndex.filter(c=>c!=r))})):(this.new_job.extras.questions.push({id:n||t.key,question:t.question||t.value.question,type:t.type}),this.localQuestionsIndex.push(n||t.key),t.value.childs&&t.value.childs.forEach(i=>{const r=Object.keys(this.questionsEstructureFiltered).find(c=>c==i);r&&(this.new_job.extras.questions.push({id:r,question:this.questionsEstructureFiltered[r].question,type:this.questionsEstructureFiltered[r].type}),this.localQuestionsIndex.push(r))}))}updateImage(){this.uploadCropImageService.setConfig(new b.d(this.translate.instant("other.title_offer_image"),"job",this.new_job.picture_url,1214,488));const t=this.uploadCropImageService.getImageOut().subscribe(n=>{null==n||""===n||(this.new_job.picture_url=n,this.uploadCropImageService.setImageOut(null),t.unsubscribe())})}handleSkillSelection(t,n){this.selectedSkills=[],this.selectedSkills=t,this.totalSkillsSelected=this.countSelectedSkillsByType&&!n?this.countSelectedSkillsByType.mandatory+this.countSelectedSkillsByType.optional+this.countSelectedSkillsByType.standalone:t.length,console.log(" this.totalSkillsSelected:",this.totalSkillsSelected)}setCountSkillsByType(t){this.countSelectedSkillsByType=t}loadJoBStates(){this.subscriptions.push(this.backendHelper.get(`/company-admin/apply-status?job_type=${this.new_job.type}`).pipe((0,u.pQ)(this.destroyRef)).subscribe(t=>{this.applyStatusList=t.optional.map(n=>({state:n,required:!1})),this.applyStatusSelectedList.set(t.required.map(n=>({state:n,required:!0}))),Object.keys(this.new_job.available_apply_statuses).length>0&&(this.applyStatusSelectedList.set([]),Object.keys(this.new_job.available_apply_statuses).forEach(n=>{const o=this.applyStatusList.find(i=>i.state===n);o?(this.applyStatusSelectedList.update(i=>[...i,o]),this.applyStatusList=this.applyStatusList.filter(i=>i.state!==n)):this.applyStatusSelectedList.update(i=>[...i,{state:n,required:!0}])}))}))}resolveApplyStatusDefault(t,n){const o=(this.applyStatusSelectedList()??[]).map(i=>i.state);return o.length?t&&o.includes(t)?t:n&&o.includes(n)?n:o[0]:t||n}preparePostData(){return this.new_job.available_apply_statuses=this.applyStatusSelectedList(),{available_apply_statuses:this.new_job.available_apply_statuses,description:this.new_job.description,extras:this.new_job.extras,fairs:this.new_job.fairs,picture_url:this.new_job.picture_url,skills:this.selectedSkills,title:this.new_job.title,type:this.new_job.type,default_apply_status:this.resolveApplyStatusDefault(this.currentJobConfig.defaultValues?.default_apply||this.generalConfig.applyStateConfig?.defaultApply,this.new_job.default_apply_status),default_accepted_invitation_status:this.resolveApplyStatusDefault(this.currentJobConfig.defaultValues?.default_invite||this.generalConfig.applyStateConfig?.defaultInvite,this.new_job.default_accepted_invitation_status),salary:{show_salary:!1,t
1ype:"unspecified"}}}prepareForm(){this.new_job=new m.z([],null),this.loading.set(!1),this.selectedSkills=[]}createJob(){this.loading.set(!0),this.new_job.description=this.new_job.description?.split(" ").join(" ").split("\xa0").join(" ")??"";const t=this.preparePostData(),n=this.backendHelper.post("/company-admin/"+this.companyId+"/job",t,!0);this.subscriptions.push(n.pipe((0,u.pQ)(this.destroyRef)).subscribe(()=>{this.loading.set(!1),this.notif.success(this.translate.instant("notif.success"),this.translate.instant("notif.job_offer_successfully_created")),this.router.url.includes("/job-list")&&this.menuControl.setAction({action:"reload-company-job-list"}),this.prepareForm(),this.close()},o=>{const i=E.cD[o?.error?.error];i?(this.notif.warn(this.translate.instant("notif.error"),this.translate.instant(i)),this.loading.set(!1)):400===o.status?(this.notif.warn(this.translate.instant("notif.error_saving_your_changes")),this.loading.set(!1)):(this.notif.error(this.translate.instant("notif.error"),this.translate.instant("notif.error_saving_your_changes2")),this.loading.set(!1))}))}resetCompetenceSkillSelection(){this.selectedSkills=[],this.totalSkillsSelected=0,this.totalSkillsSelected=null}close(){this.generalModalService.close("createJobModal")}ngOnDestroy(){this.subscriptions.forEach(t=>{!t.closed&&t.unsubscribe&&t.unsubscribe()})}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=e.VBU({type:s,selectors:[["create-job-modal"]],decls:17,vars:5,consts:[["closeBtn",""],["id","createJobModal","tabindex","-1",1,"dmodal","fade"],["role","document",1,"modal-dialog","modal
1-lg"],[1,"modal-content"],[1,"modal-header"],["type","button",1,"close",3,"click"],["name","times",1,"ico"],[1,"modal-body"],[1,"loading"],[1,"form-group"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"click","disabled"],[3,"loading"],["for","title",1,"fieldLabel"],[1,"subtitle"],["type","text","id","title","name","title","required","",1,"form-control",3,"ngModelChange","ngModel","placeholder"],["id","job-title-error",1,"error"],[1,"form-group","descriptionBox"],["for","description",1,"fieldLabel"],["name","description","id","description",1,"editor","notranslate",3,"onContentChanged","ngModel","modules","sanitize","placeholder","required"],[1,"error"],["for","image",1,"fieldLabel"],["id","image",1,"form-control","adjuntar-imagev2",3,"click"],["name","image-v",1,"ico"],["alt","contentImg",3,"src"],[1,"idiomaextra","form-row"],[1,"form-group","col-12"],["for","questions",1,"fieldLabel"],["id","questions",1,"form-check"],[1,"col-12","d-flex","error"],["type","checkbox",1,"form-check-input",3,"change","id","checked"],[1,"form-check-label",3,"for"]],template:function(n,o){if(1&n){const i=e.RV6();e.j41(0,"dialog",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"button",5,0),e.bIt("click",function(){return a.eBV(i),a.Njj(o.close())}),e.nrm(6,"app-icon",6),e.k0s()(),e.j41(7,"div",7)(8,"h2"),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.nVh(11,F,2,1,"div",8)(12,$,48,50,"div",9),e.k0s(),e.j41(13,"div",10)(14,"button",11),e.bIt("click",function(){return a.eBV(i),a.Njj(o.createJob())}),e.j41(15,"span"),e.EFF(16,"Publicar proceso"),e.k0s()()()()()()}2&n&&(e.R7$(9),e.JRh(e.bMT(10,3,"admin.header.create_job.create_offer")),e.R7$(2),e.vxM(o.loading()?11:o.new_job?12:-1),e.R7$(3),e.Y8G("disabled",o.loading()))},dependencies:[h.MD,v.s,D.R,R.t,d.YN,d.me,d.BC,d.YS,d.vS,g.R,C.Qs,C.i9,p.h,h.lG,g.F,p.D9],styles:["#createJobModal[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:25%;margin-top:15px}#createJobModal[_ngcontent-%COMP%] .fieldLabel[_ngcontent-%COMP%]{font-size:18px;font-weight:700;margin:0 0 12px;display:flex;flex-direction:column;align-items:flex-start}#createJobModal[_ngcontent-%COMP%] .fieldLabel[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-style:italic}#createJobModal[_ngcontent-%COMP%] .questionsCheckboxGroup[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:8px}#createJobModal[_ngcontent-%COMP%] .questionsCheckboxGroup[_ngcontent-%COMP%] .answerCheckboxInput[_ngcontent-%COMP%]{margin:0;position:relative}#createJobModal[_ngcontent-%COMP%] .descriptionBox[_ngcontent-%COMP%] .editor[_ngcontent-%COMP%]{width:100%}#createJobModal[_ngcontent-%COMP%] .adjuntar-imagev2[_ngcontent-%COMP%]{display:flex;margin:0}#createJobModal[_ngcontent-%COMP%] .adjuntar-imagev2[_ngcontent-%COMP%] .ico[_ngcontent-%COMP%]{margin:0;opacity:.5;color:var(--color_text);width:20px;height:20px}#createJobModal[_ngcontent-%COMP%] .adjuntar-imagev2[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{vertical-align:top;margin-left:10px}#createJobModal[_ngcontent-%COMP%] .adjuntar-imagev2[_ngcontent-%COMP%] span[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:11px;margin:0;vertical-align:super} .ql-container .ql-editor{height:250px!important} .quill-editor{height:250px!important}"],changeDetection:0})}return s})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.