2 lines
3.4 KiB
JavaScript
2 lines
3.4 KiB
JavaScript
import{p as h,c as L,B as k,C as S,r as y,d as l,l as m,w as p,e as t,j as _,v as C,x as R,y as V,h as o,E as j,G as B,i as P,b as d,m as x,s as T}from"./index-BmU8V2V2.js";import{S as q}from"./SectionTitle-CrHOP_mf.js";import{P as E}from"./PrimaryButton-Bm01EosZ.js";import{u as G}from"./vee-validate-uNXg2txt.js";import{r as M}from"./request-password-reset.action-Btp5YP5O.js";const N={class:"max-w-5xl mx-auto p-8"},F={class:"relative w-full h-auto p-6 md:p-8 lg:p-12"},A={key:0,class:"flex flex-col items-center"},$={key:1,class:"flex flex-col items-center"},z={class:"flex justify-center"},Q={__name:"RequestPasswordView",setup(D){const s=h(),n=L(()=>T.contrast),f=k({codigo:S().required()}),{values:I,defineField:v,errors:g,handleSubmit:w,resetForm:O}=G({validationSchema:f}),[r,b]=v("codigo"),a=y(!1),c=w(async u=>{try{const e=await M(u.codigo);a.value=e.success,a.value?s.success("Solicitud enviada con exito"):s.error("Error al enviar la solicitud, por favor intentalo de nuevo.")}catch{s.error("Error al enviar la solicitud, por favor intentalo de nuevo.")}});return(u,e)=>(d(),l("div",N,[m(q,null,{default:p(()=>e[2]||(e[2]=[x("Recuperar contraseña")])),_:1}),t("div",{class:P([{"bg-black":n.value,"bg-white":!n.value},"relative w-full max-w-4xl shadow-lg rounded-2xl mb-8 overflow-hidden"]),s:""},[t("div",F,[a.value?(d(),l("div",A,e[3]||(e[3]=[_('<h1 class="text-2xl lg:text-4xl font-bold mb-6 text-[#404e7b] text-center"> Solicitud enviada con exito </h1><div class="w-full max-w-md space-y-6"><div class="flex justify-center items-center"><svg class="w-40" viewBox="0 0 48 48" fill="none" 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"><rect width="48" height="48" fill="white" fill-opacity="0.01"></rect><path d="M24 4L29.2533 7.83204L35.7557 7.81966L37.7533 14.0077L43.0211 17.8197L41 24L43.0211 30.1803L37.7533 33.9923L35.7557 40.1803L29.2533 40.168L24 44L18.7467 40.168L12.2443 40.1803L10.2467 33.9923L4.97887 30.1803L7 24L4.97887 17.8197L10.2467 14.0077L12.2443 7.81966L18.7467 7.83204L24 4Z" fill="#0760d5" stroke="#259af4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 24L22 29L32 19" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path></g></svg></div><div><p class="text-[#404e7b] text-lg text-center"> Se ha enviado un correo de restablecimiento de contraseña a el <strong>correo electrónico </strong> asociado a tu codigo de usuario. </p></div></div>',2)]))):(d(),l("div",$,[e[6]||(e[6]=t("h1",{class:"text-2xl lg:text-4xl font-bold mb-6 text-[#404e7b] text-center"}," Recuperar Contraseña ",-1)),t("form",{onSubmit:e[1]||(e[1]=C((...i)=>o(c)&&o(c)(...i),["prevent"])),method:"POST",class:"w-full max-w-md space-y-6"},[t("div",null,[e[4]||(e[4]=t("label",{for:"codigo_usuario",class:"block text-md font-medium"}," Código de usuario ",-1)),R(t("input",j({"onUpdate:modelValue":e[0]||(e[0]=i=>B(r)?r.value=i:null)},o(b),{type:"text",id:"codigo_usuario",name:"email",required:"",placeholder:"Ingrese el código de su usuario",class:["mt-1 block w-full px-3 border py-3 lg:py-4 rounded-xl shadow-[0_5px_25px_rgba(0,0,0,0.1)]",{"border-red-500":o(g).codigo}]}),null,16),[[V,o(r)]])]),t("div",z,[m(E,null,{default:p(()=>e[5]||(e[5]=[x(" Recuperar contraseña ")])),_:1})])],32)]))])],2)]))}};export{Q as default};
|