1import{_ as W}from"./DiT92L4G.js";import{a as X,O as i,k as n,m as A,a4 as Z,h as e,a2 as o,$ as _,F as J,a6 as Q,a8 as Y,al as ee,ak as w,ae as N,x,j as v,ab as se,n as j,D as ae,S as c,aa as T,a7 as oe,ai as te,a3 as le,o as S}from"./B8z1nnR3.js";import{u as ie}from"./BbadERUU.js";import{_ as ne}from"./DlPnc5q_.js";const re={},ce={class:"page-title"};function de(f,d){return i(),n("section",ce,[...d[0]||(d[0]=[A('<div class="container"><div class="row"><div class="col-lg-12"><div class="page-breadcrumbs"><ul><li><a href="/" class="page-breadcrumbs-link" title="Voltar à página inicial" aria-label="Home - Ir para página inicial"> Home </a></li><li><img src="'+W+'" alt="Seta para a direita" loading="lazy" class="contain"></li><li><p class="page-breadcrumbs-breadcrumb">Recrutamento</p></li></ul></div></div></div></div>',1)])])}const ue=X(re,[["render",de]]),me={class:"recruitment-detail-section-1"},fe={class:"container"},pe={class:"row"},ve={class:"col-lg-12"},_e={class:"section-subtitle-link"},ge=["href"],he={class:"recruitment-detail-section-2"},be={class:"container"},ye={class:"row"},ke={class:"col-lg-12 col-12"},we={class:"row"},xe={class:"col-lg-10 offset-lg-1 col-12 offset-0"},$e={class:"recruitment-detail-middle-title"},Me={class:"job-functions job-offer-list"},Ce=["innerHTML"],Fe={class:"job-functions job-offer-list"},Ne=["innerHTML"],Pe={class:"job-functions job-offer-list"},Re=["innerHTML"],Ve={__name:"RecruitmentDetailSection1",props:{offer:{type:Array,required:!0}},setup(f){const d=Z();return(u,r)=>(i(),n(J,null,[e("section",me,[e("div",fe,[r[1]||(r[1]=A('<div class="row"><div class="col-lg-12"><div class="section-text"><div class="section-title"><h1 class="main-title">Candidatura</h1></div></div></div></div>',1)),e("div",pe,[e("div",ve,[e("div",_e,[e("a",{href:o(d)("recruitment"),class:"go-to-link",title:"Voltar à página de recrutamento","aria-label":"Voltar - Ir para página de recrutamento"},[...r[0]||(r[0]=[e("img",{src:ne,alt:"Seta para a esquerda",class:"right-arrow"},null,-1),e("p",{class:"go-to-link-text"}," Voltar ",-1)])],8,ge)])])])])]),e("section",he,[e("div",be,[e("div",ye,[e("div",ke,[e("div",we,[e("div",xe,[e("p",$e,_(f.offer.title),1),e("div",Me,[r[2]||(r[2]=e("p",{class:"job-offer-title"},"Funções",-1)),e("div",{class:"function-list-text",innerHTML:f.offer.description_functions},null,8,Ce)]),e("div",Fe,[r[3]||(r[3]=e("p",{class:"job-offer-title"},"Habilitações",-1)),e("div",{class:"function-list",innerHTML:f.offer.description_skills},null,8,Ne)]),e("div",Pe,[r[4]||(r[4]=e("p",{class:"job-offer-title"},"Oferta",-1)),e("div",{class:"function-list",innerHTML:f.offer.description_offers},null,8,Re)])])])])])])])],64))}},Ee="data:image/svg+xml,%3csvg%20width='21'%20height='20'%20viewBox='0%200%2021%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2012.5V13.5C18%2014.9001%2018%2015.6002%2017.7275%2016.135C17.4878%2016.6054%2017.1054%2016.9878%2016.635%2017.2275C16.1002%2017.5%2015.4001%2017.5%2014%2017.5H7C5.59987%2017.5%204.8998%2017.5%204.36502%2017.2275C3.89462%2016.9878%203.51217%2016.6054%203.27248%2016.135C3%2015.6002%203%2014.9001%203%2013.5V12.5M14.6667%206.66667L10.5%202.5M10.5%202.5L6.33333%206.66667M10.5%202.5V12.5'%20stroke='%23FBFBFB'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",je={class:"recruitment-detail-section-4"},Se={class:"container"},Ae={class:"row"},De={class:"col-lg-10 offset-lg-1 col-12 offset-0"},He={class:"row"},Le={class:"col-lg-12 col-12"},Te={key:0,class:"input-error"},Ie={class:"row"},ze={class:"col-lg-6 col-12"},Be={key:0,class:"input-error"},Oe={class:"col-lg-6 col-12"},Ue={key:0,class:"input-error"},qe={class:"row"},Ke={class:"col-lg-12 col-12"},Ge={key:0,class:"input-error"},We={class:"row"},Xe={class:"col-lg-12 col-12"},Ze={class:"global-consent-checkbox"},Je={class:"row"},Qe={class:"col-lg-3 col-12"},Ye={key:0,class:"global-consent-checkbox",style:{"margin-top":"5px"}},es={key:0,class:"input-error"},ss={key:0,class:"row"},as={class:"col-12 col-xl-3"},os={style:{color:"darkred"}},ts={key:1,class:"row"},ls={class:"row"},is={class:"col-lg-12"},ns={class:"global-submit"},rs=["disabled"],cs={key:0},ds={key:1},us="O email é inválido",P="O campo é obrigatório",ms="O campo não é um telefone válido",fs="O nome não pode conter números nem caracteres especiais",ps={__name:"RecruitmentDetailSection4",props:{offer_id:{type:Number}},setup(f){const d=f,u=c(!1),r=Q(),R=Y(),$=T(),m=c(null),g=c(null),h=c(null),p=c(null),M=c(!1),V=c(!1),E=c(!1),C=c(""),l=c({formName:"",formEmail:"",formPhone:"",formMessage:"",formFilename:""}),I=()=>{l.value={formName:"",formEmail:"",formPhone:"",formMessage:"",formFilename:""}},F=c(null),y=c(null),z=a=>{const s=a.target.files[0];s&&s.type==="application/pdf"?(y.value=s,F.value=s.name,l.value.formFilename=""):(l.value.formFilename="O arquivo deve ser um PDF.",y.value=null,F.value=null)},B=()=>{u.value||(I(),!U())||(u.value=!0,V.value=!1,E.value=!1,C.value="",window.grecaptcha?grecaptcha.ready(()=>{grecaptcha.execute($.public.recaptchaSiteKey,{action:"submit"}).then(s=>{O(s)})}):(console.error("reCAPTCHA não foi carregado."),u.value=!1))},O=a=>
1{let s=$.public.apiBase+"/forms/recruitment",t=new FormData;t.append("formReferrer",R.resolve(r).href),t.append("recruitmentId",d.offer_id),t.append("formName",m.value),t.append("formEmail",g.value),t.append("formPhone",h.value),t.append("formMessage",p.value),t.append("formFilename",y.value),t.append("formMarketing",M.value),t.append("recaptcha_token",a),fetch(s,{method:"post",body:t}).then(k=>{k.status===200?(V.value=!0,k.json().then(b=>{}),m.value="",g.value="",h.value="",p.value="",y.value=""):k.json().then(b=>{b?(E.value=!0,typeof b=="object"?Object.keys(b).forEach(H=>{b[H].forEach(L=>{console.log(`${H}: ${L}`),C.value+=L+` 2`})}):C.value=b):console.log("Client error: Unknown error")})}).catch(k=>{console.error(k)}).finally(()=>{u.value=!1})},U=()=>{let a=!0,s=G(m.value);return s!=="valid"&&(l.value.formName=s,a=!1),s=q(g.value),s!=="valid"&&(l.value.formEmail=s,a=!1),s=K(h.value),s!=="valid"&&(l.value.formPhone=s,a=!1),s=D(p.value),s!=="valid"&&(l.value.formMessage=s,a=!1),s=D(y.value),s!=="valid"&&(l.value.formFilename=s,a=!1),a},q=a=>a==null||a==""?P:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a)?"valid":us,D=a=>a==null||a==""?P:"valid",K=a=>a==null||a==""?P:/^9\d{8}$/.test(a)?"valid":ms,G=a=>a==null||a.trim()===""?P:/^[A-Za-zÃ-ÿ\s'-]+$/.test(a)?"valid":fs;return(a,s)=>(i(),n("section",je,[e("div",Se,[s[12]||(s[12]=A('<div class="row"><div class="col-lg-10 offset-lg-1 col-12 offset-0"><div class="section-text"><div class="section-title"><p class="form-title">Formulário de Candidatura</p><p class="form-subtitle"> Preenche o formulário abaixo e vem fazer parte da nossa equipa. </p></div></div></div></div>',1)),e("div",Ae,[e("div",De,[e("form",{id:"recruitment-prop-form",onSubmit:ee(B,["prevent"]),class:"enterprise-form global-page-form"},[e("div",He,[e("div",Le,[w(e("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>x(m)?m.value=t:null),type:"text",name:"name",id:"name",placeholder:"Nome completo","aria-label":"Campo de nome completo",class:"global-input-form"},null,512),[[N,o(m)]]),o(l).formName?(i(),n("span",Te,_(o(l).formName),1)):v("",!0)])]),e("div",Ie,[e("div",ze,[w(e("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>x(g)?g.value=t:null),type:"text",name:"email",id:"email",placeholder:"Email","aria-label":"Campo de email",class:"global-input-form"},null,512),[[N,o(g)]]),o(l).formEmail?(i(),n("span",Be,_(o(l).formEmail),1)):v("",!0)]),e("div",Oe,[w(e("input",{"onUpdate:modelValue":s[2]||(s[2]=t=>x(h)?h.value=t:null),type:"text",name:"phone",id:"phone",placeholder:"Telefone","aria-label":"Campo de telefone",class:"global-input-form"},null,512),[[N,o(h)]]),o(l).formPhone?(i(),n("span",Ue,_(o(l).formPhone),1)):v("",!0)])]),e("div",qe,[e("div",Ke,[w(e("textarea",{"onUpdate:modelValue":s[3]||(s[3]=t=>x(p)?p.value=t:null),name:"message",id:"message",placeholder:"Mensagem","aria-label":"Campo de mensagem",colspan:"4",class:"global-textarea-form"},null,512),[[N,o(p)]]),o(l).formMessage?(i(),n("span",Ge,_(o(l).formMessage),1)):v("",!0)])]),e("div",We,[e("div",Xe,[e("label",Ze,[w(e("input",{type:"checkbox",name:"consent",id:"consent","onUpdate:modelValue":s[4]||(s[4]=t=>x(M)?M.value=t:null),"aria-label":"Aceitar receber comunicações de marketing",class:"workshop-input-checkbox-white"},null,512),[[se,o(M)]]),s[5]||(s[5]=e("span",{class:"custom-checkbox-white"},null,-1)),s[6]||(s[6]=j(" Autorizo a comunicação e utilização dos meus dados pessoais para ações de Marketing da Rodda. ",-1))])])]),e("div",Je,[e("div",Qe,[s[7]||(s[7]=e("label",{for:"file_cv",class:"custom-file-label"},[j(" Carregar currÃculo "),e("img",{src:Ee,alt:"Ãcone de upload",loading:"lazy",class:"contain newsletter-img"})],-1)),e("input",{type:"file",onChange:z,name:"file_cv",id:"file_cv","aria-label":"Carregar ficheiro de currÃculo em PDF",class:"global-input-checkbox",hidden:""},null,32)]),e("div",null,[o(F)?(i(),n("span",Ye,"("+_(o(F))+")",1)):v("",!0)]),o(l).formFilename?(i(),n("span",es,_(o(l).formFilename),1)):v("",!0)]),o(E)?(i(),n("div",ss,[e("div",as,[e("label",os,_(o(C)),1)])])):v("",!0),o(V)?(i(),n("div",ts,[...s[8]||(s[8]=[e("div",{class:"col-12"},[e("div",{class:"message-label"},[e("label",{style:{color:"forestgreen"},class:"label-text"}
2,"Pedido enviado com sucesso. Iremos entrar em contacto brevemente.")])],-1)])])):v("",!0),s[11]||(s[11]=e("br",null,null,-1)),e("div",ls,[e("div",is,[e("div",ns,[e("button",{type:"submit",class:ae(["global-submit-button",{disabled:o(u)}]),disabled:o(u),title:"Submeter candidatura para esta oferta","aria-label":"Submeter Candidatura - Enviar candidatura para esta oferta"},[o(u)?(i(),n("span",ds,[...s[9]||(s[9]=[e("i",{class:"fa fa-spinner fa-spin"},null,-1),j(" A enviar...",-1)])])):(i(),n("span",cs,"Submeter Candidatura"))],10,rs)]),s[10]||(s[10]=e("div",{class:"g-recaptcha","data-sitekey":"6LcDv4srAAAAAM9kTuc6-wvxsXio_LpNKW_zPGda","data-size":"invisible","data-callback":"onRecaptchaSuccess","data-badge":"bottomright"},null,-1))])])],32)])])])]))}},vs={class:"page-recruitment-detail",id:"recruitment-detail"},_s={key:0},gs={key:1},ws={__name:"[slug]",async setup(f){let d,u;const r=T();c(r.public.siteUrl);const R=oe(),{pending:$,data:m}=([d,u]=te(()=>ie("/offers/detail/"+R.params.slug)),d=await d,u(),d);return le({link:[{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Open+Sans:wght@300;400;600;700&family=Montserrat:wght@300;400;500;700&family=Lato:wght@300;400;700&family=Poppins:wght@300;400;500;700&family=Playfair+Display:wght@400;500;700&family=Merriweather:wght@300;400;700&family=Bebas+Neue&display=swap"}]}),(g,h)=>{const p=ue;return i(),n("section",vs,[o($)?(i(),n("div",_s)):(i(),n("div",gs,[S(p),S(Ve,{offer:o(m)},null,8,["offer"]),S(ps,{offer_id:o(m)?.id},null,8,["offer_id"])]))])}}};export{ws as default};
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.