2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
import{g as D,p as E,B as G,C as I,r as k,c as z,d as c,l as h,w as C,e as s,v as M,x as R,y as T,h as r,E as F,G as L,z as y,j as $,i as n,t as d,F as q,b as p,m as S,s as O}from"./index-BmU8V2V2.js";import{S as P}from"./SectionTitle-CrHOP_mf.js";import{S as Q}from"./SecondaryButton-CAqGmnmb.js";import{u as U}from"./vee-validate-uNXg2txt.js";const H="/assets/img44-CIXgDxQQ.webp",X=async x=>{try{const{data:a}=await D.get(`/loadcolaboradoresbycedula/${x}`);return a}catch(a){throw console.log(a),new Error("Error getting colaborador")}},J={key:0,class:"max-w-5xl mx-auto p-8 mb-8"},K={class:"relative w-full max-w-5xl shadow-lg rounded-[35px] overflow-hidden"},W={class:"relative w-full h-0 pb-[120%] md:pb-[60%] lg:pb-[50%]"},Y={class:"absolute inset-0 z-10 flex flex-col justify-center p-8 lg:max-w-md lg:ml-8"},Z={class:"mb-4"},ee={class:"flex justify-center"},se={key:1,class:"max-w-5xl mx-auto p-8 mb-8"},le={class:"lg:col-span-2 grid grid-cols-1 sm:grid-cols-2 gap-6"},oe={class:"text-lg break-all"},ae={class:"text-lg break-all"},te={class:"text-lg break-all"},re={class:"text-lg break-all"},ne={class:"text-lg break-all"},pe={__name:"IdentificationView",setup(x){const a=E(),A=G({cedula:I().required()}),o=k({}),t=k(!1),{defineField:N,errors:V,handleSubmit:B}=U({validationSchema:A}),[u,j]=N("cedula"),b=B(m=>{X(m.cedula).then(e=>{a.success("Colaborador encontrado"),o.value=e.colaborador,t.value=!0}).catch(()=>{a.error("Colaborador no encontrado"),o.value={},t.value=!1})}),l=z(()=>O.contrast);return(m,e)=>{var g,f,v,w,_;return p(),c(q,null,[t.value?y("",!0):(p(),c("div",J,[h(P,null,{default:C(()=>e[3]||(e[3]=[S("Identificar personal Gases del oriente")])),_:1}),e[7]||(e[7]=s("p",{class:"mb-12"},"Por su seguridad debe confirmar que el personal técnico que lo visita esté autorizado por Gases del Oriente. A continuación ingrese el documento del técnico y presione validar documento.",-1)),s("div",K,[s("div",W,[e[6]||(e[6]=s("img",{src:H,alt:"Background Image",class:"absolute inset-0 w-full h-full object-cover rounded-[35px]"},null,-1)),s("div",Y,[s("form",{onSubmit:e[1]||(e[1]=M((...i)=>r(b)&&r(b)(...i),["prevent"])),class:"w-full"},[s("div",Z,[e[4]||(e[4]=s("label",{for:"documento",class:"block text-2xl font-bold text-[#404e7b] mb-4"},"Documento",-1)),R(s("input",F({type:"number",id:"documento","onUpdate:modelValue":e[0]||(e[0]=i=>L(u)?u.value=i:null)},r(j),{class:["mt-1 block w-full px-3 py-4 rounded-xl shadow-[0_5px_25px_rgba(0,0,0,0.1)]",{"border border-red-500":r(V).cedula}],placeholder:"Ingrese su numero de documento"}),null,16),[[T,r(u)]])]),s("div",ee,[h(Q,null,{default:C(()=>e[5]||(e[5]=[S("VALIDAR DOCUMENTO")])),_:1})])],32)])])])])),t.value?(p(),c("div",se,[s("div",{onClick:e[2]||(e[2]=i=>t.value=!1),class:"flex justify-start items-center gap-3 mb-6 cursor-pointer"},e[8]||(e[8]=[$('<svg class="w-5 h-5 cursor-pointer" fill="#404e7b" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M222.927 580.115l301.354 328.512c24.354 28.708 20.825 71.724-7.883 96.078s-71.724 20.825-96.078-7.883L19.576 559.963a67.846 67.846 0 01-13.784-20.022 68.03 68.03 0 01-5.977-29.488l.001-.063a68.343 68.343 0 017.265-29.134 68.28 68.28 0 011.384-2.6 67.59 67.59 0 0110.102-13.687L429.966 21.113c25.592-27.611 68.721-29.247 96.331-3.656s29.247 68.721 3.656 96.331L224.088 443.784h730.46c37.647 0 68.166 30.519 68.166 68.166s-30.519 68.166-68.166 68.166H222.927z"></path></g></svg><span class="text-[#404e7b] font-bold text-2xl"> Volver </span>',2)])),s("div",le,[s("div",{class:n([{"bg-black":l.value,"bg-white":!l.value},"flex flex-col items-start gap-2 p-6 rounded-xl shadow-[0_5px_25px_rgba(0,0,0,0.1)] w-full"])},[e[9]||(e[9]=s("span",{class:"font-semibold text-xl"},"Cedula:",-1)),s("span",oe,d(((g=o.value)==null?void 0:g.cedula)||"N/A"),1)],2),s("div",{class:n([{"bg-black":l.value,"bg-white":!l.value},"flex flex-col items-start gap-2 p-6 rounded-xl shadow-[0_5px_25px_rgba(0,0,0,0.1)] w-full"])},[e[10]||(e[10]=s("span",{class:"font-semibold text-xl"},"Nombre:",-1)),s("span",ae,d(((f=o.value)==null?void 0:f.nombre)||"N/A"),1)],2),s("div",{class:n([{"bg-black":l.value,"bg-white":!l.value},"flex flex-col items-start gap-2 p-6 rounded-xl shadow-[0_5px_25px_rgba(0,0,0,0.1)] w-full"])},[e[11]||(e[11]=s("span",{class:"font-semibold text-xl"},"Area:",-1)),s("span",te,d(((v=o.value)==null?void 0:v.area)||"N/A"),1)],2),s("div",{class:n([{"bg-black":l.value,"bg-white":!l.value},"flex flex-col items-start gap-2 p-6 rounded-xl shadow-[0_5px_25px_rgba(0,0,0,0.1)] w-full"])},[e[12]||(e[12]=s("span",{class:"font-semibold text-xl"},"Municipio:",-1)),s("span",re,d(((w=o.value)==null?void 0:w.municipio)||"N/A"),1)],2),s("div",{class:n([{"bg-black":l.value,"bg-white":!l.value},"flex flex-col items-start gap-2 p-6 rounded-xl shadow-[0_5px_25px_rgba(0,0,0,0.1)] w-full"])},[e[13]||(e[13]=s("span",{class:"font-semibold text-xl"},"Cargo:",-1)),s("span",ne,d(((_=o.value)==null?void 0:_.cargo)||"N/A"),1)],2)])])):y("",!0)],64)}}};export{pe as default};
|