Files
soft_usite/dist/assets/UpdateCredentialsView-D75ikiIH.js
T
2025-02-06 14:22:29 -05:00

2 lines
3.4 KiB
JavaScript

import{p as b,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 V,y as j,h as o,E as B,G as A,i as P,b as d,m as x,s as R}from"./index-BmU8V2V2.js";import{S as T}from"./SectionTitle-CrHOP_mf.js";import{P as z}from"./PrimaryButton-Bm01EosZ.js";import{u as E}from"./vee-validate-uNXg2txt.js";import{r as G}from"./request-password-reset.action-Btp5YP5O.js";const M={class:"max-w-5xl mx-auto p-8"},N={class:"relative w-full h-auto p-6 md:p-8 lg:p-12"},q={key:0,class:"flex flex-col items-center"},F={key:1,class:"flex flex-col items-center"},U={class:"flex justify-center"},Q={__name:"UpdateCredentialsView",setup($){const s=b(),n=L(()=>R.contrast),f=k({codigo:S().required()}),{values:D,defineField:v,errors:g,handleSubmit:w,resetForm:I}=E({validationSchema:f}),[r,h]=v("codigo"),i=y(!1),c=w(async u=>{try{const e=await G(u.codigo);i.value=e.success,i.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",M,[m(T,null,{default:p(()=>e[2]||(e[2]=[x("Actualización de credenciales")])),_: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"])},[t("div",N,[i.value?(d(),l("div",q,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 con tu nueva contraseña a el <strong>correo electrónico </strong> asociado a tu codigo de usuario. </p></div></div>',2)]))):(d(),l("div",F,[e[6]||(e[6]=t("h1",{class:"text-2xl lg:text-4xl font-bold mb-6 text-[#404e7b] text-center"}," Actualización de credenciales ",-1)),t("form",{onSubmit:e[1]||(e[1]=C((...a)=>o(c)&&o(c)(...a),["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)),V(t("input",B({"onUpdate:modelValue":e[0]||(e[0]=a=>A(r)?r.value=a:null)},o(h),{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),[[j,o(r)]])]),t("div",U,[m(z,null,{default:p(()=>e[5]||(e[5]=[x(" Actualizar credenciales ")])),_:1})])],32)]))])],2)]))}};export{Q as default};