PageSourceSearch

https://psorka.cz/_nuxt/activate-account.e7dc618f.js

js psorka.cz collected 2026-10-08 10:16:34 UTC 9,488 bytes, 1 lines download raw bytes

1import{_ as X}from"./InputPassword.vue.7b53aea2.js";import{d as O,u as Y,a as ee,b as te,c as W,r as se,e as B,f as x,g as U,o,h as p,i as n,j as g,w as k,F as D,k as q,t as z,l as _,m as l,n as a,p as oe,_ as re,q as ve,s as fe,v as ge,x as _e}from"./entry.65b976a3.js";import{u as we}from"./useReps.c27ace8e.js";import{u as ae,a as ne}from"./useInput.948d5af4.js";import{s as L}from"./scroll.2c771c1c.js";import{_ as ye}from"./Register.vue.d37023ce.js";import{_ as he}from"./InputText.vue.fba8eff6.js";import{_ as be}from"./InputDegrees.vue.99c88268.js";import{D as j,_ as Ve}from"./InputGender.vue.7619d870.js";import{_ as ke}from"./InputEmail.vue.74f18de6.js";import{_ as Ie}from"./InputPhoneNumber.vue.43e7b3ac.js";import{u as $e}from"./useCenterDoctors.4e215839.js";import{r as Ce,d as Se}from"./revma-icon.36f351ef.js";import{_ as Ue}from"./FormCard.4ab50028.js";import{u as xe}from"./usePeriferalDoctors.8c90b1f9.js";import"./useAppError.fa3cbdfd.js";import"./InputAddress.vue.08f4958c.js";const Ne=l("div",{class:"tw-text-xl tw-mb-6"}
1,"Zadejte prosím přihlašovací údaje",-1),Te={class:"text-right"},De=O({name:"ServiceUserFormSignUp",__name:"Register",setup(G){const{submitActivation:I,errors:A,otherErrors:N}=we(),{login:E}=Y(),{sameAs:$}=ae();ee();const v=te(),y=W(),d=se({password:"",passwordConfirm:""}),C=B(()=>({passwordConfirm:{sameAsPassword:$}})),u=ne(C,d),m=x(!1),h=async()=>{var b;if(await u.value.$validate(),u.value.$invalid){L();return}m.value=!0;const c=y.query.code,r=await I(c,d.password);m.value=!1,((r==null?void 0:r.status)===201||(r==null?void 0:r.status)===200)&&(E(r.data),await v.push("/app")),(b=A.value)!=null&&b.length&&L()};return(c,r)=>{const b=U("v-alert"),V=X,e=re;return o(),p(D,null,[n(N).length?(o(),g(b,{key:0,color:"warning tw-mb-4"},{default:k(()=>[(o(!0),p(D,null,q(n(N),(i,S)=>(o(),p("div",{key:i.message??`error-${S}`},z(i.message),1))),128))]),_:1})):_("",!0),l("section",null,[Ne,a(V,{modelValue:d.password,"onUpdate:modelValue":r[0]||(r[0]=i=>d.password=i),errors:c.passwordErrors,autocomplete:"new-password",name:"password"},null,8,["modelValue","errors"]),a(V,{modelValue:d.passwordConfirm,"onUpdate:modelValue":r[1]||(r[1]=i=>d.passwordConfirm=i),"label-translation-key":"input.password-confirm.label","hint-translation-key":"input.password-confirm.hint",errors:c.passwordConfirmErrors,autocomplete:"new-password",name:"passwordConfirm"},null,8,["modelValue","errors"])]),l("div",Te,[a(e,{loading:m.value,block:"",onClick:h},{default:k(()=>[oe(" Registrovat ")]),_:1},8,["loading"])])],64)}}}),Ae={class:"tw-grid tw-grid-cols-2 tw-gap-4 tw-mb-4"},Ee=["onClick"],Re=["src"],Pe={class:"text-center"},Fe=l("div",{class:"mb-4 tw-text-lg"},"Osobní údaje",-1),je=l("span",{class:"tw-mr-4"},"Využíváte systémovou léčbu?",-1),Be=l("div",{class:"mb-4 tw-text-lg"},"Kontaktní údaje",-1),qe=l("div",{class:"mb-4 tw-text-lg"}
1,"Přihlašovací údaje",-1),ze={class:"text-right"},Le=O({name:"ServiceUserFormSignUp",__name:"Register",props:{isInvited:{type:Boolean}},emits:["activation-success"],setup(G,{emit:I}){const{emailErrors:A,passwordErrors:N,firstNameErrors:E,lastNameErrors:$,degreesIdsErrors:v,submitActivation:y,genderErrors:d,otherErrors:C,errors:u}=$e(),{sameAs:m}=ae(),{t:h}=ee();te();const c=W(),r=G,b=I,V=x([{title:"Revmatologie",type:j.Revma,imgUrl:Ce,isActive:!1},{title:"Dermatologie",type:j.Derma,imgUrl:Se,isActive:!1}]),e=se({specialityType:"",firstName:"",lastName:"",phoneNumber:"",isUsingSystemicTherapy:null,workplaceAddress:{street:"",city:"",zipCode:"",district:""},degreesIds:[],specialitiesIds:[],email:"",gender:null,password:"",passwordConfirm:""}),i=B(()=>({passwordConfirm:{sameAsPassword:m}})),S=ne(i,e),J=x(!1),R=x(!1),K=B(()=>e.specialityType===j.Derma);function le(f){V.value.forEach(T=>T.isActive=!1);const t=V.value.find(T=>T.type===f.type);t&&(t.isActive=!0),e.specialityType=f.type,f.type!==j.Derma&&(e.isUsingSystemicTherapy=null,R.value=!1)}const ie=async()=>{var t;if(await S.value.$validate(),R.value=K.value&&e.isUsingSystemicTherapy===null,S.value.$invalid||R.value){L();return}if(J.value=!0,!e.specialityType||!e.gender&&!r.isInvited)return;const f={centerDoctor:{specialityType:e.specialityType,firstName:e.firstName,lastName:e.lastName,phoneNumber:e.phoneNumber,isUsingSystemicTherapy:K.value?e.isUsingSystemicTherapy:null,...e.degreesIds.length?{degreesIds:e.degreesIds}:{degreesIds:[]},...e.specialitiesIds.length?{specialitiesIds:e.specialitiesIds}:{specialitiesIds:[]}},email:e.email,gender:e.gender,password:e.password};if(r.isInvited){const{email:T,gender:P,...F}=f,M={...F,code:c.query.code,extendSession:!0},w=await y(M);((w==null?void 0:w.status)===201||(w==null?void 0:w.status)===200)&&b("activation-success",w.data),J.value=!1}(t=u.value)!=null&&t.length&&L()};ve(()=>e.isUsingSystemicTherapy,()=>{e.isUsingSystemicTherapy!==null&&(R.value=!1)});const me=B(()=>[...S.value.passwordConfirm.$errors.map(f=>{const t={code:null,message:null,attribute:void 0};return t.message=h(typeof f.$message=="string"?f.$message:f.$message.value),t})]);return(f,t)=>{const T=U("v-alert"),P=U("v-divider"),F=he,M=be,w=Ve,Z=U("v-radio"),ue=U("v-radio-group"),de=ke,ce=Ie,H=X,pe=re;return o(),p(D,null,[n(C).length?(o(),g(T,{key:0,color:"warning tw-mb-4"},{default:k(()=>[(o(!0),p(D,null,q(n(C),(s,Q)=>(o(),p("div",{key:s.message??`error-${Q}`},z(s.message),1))),128))]),_:1})):_("",!0),l("div",Ae,[(o(!0),p(D,null,q(V.value,s=>(o(),p("div",{key:s.title,class:fe(["tw-border tw-border-gray-200 tw-rounded-lg tw-border-solid tw-p-4 tw-cursor-pointer hover:tw-bg-gray-50",{"tw-border-purple-600 tw-border-2 tw-bg-purple-50 hover:tw-bg-purple-50":s.isActive}]),onClick:Q=>le(s)},[l("img",{src:s.imgUrl,class:"tw-w-full"},null,8,Re),l("div",Pe,z(s.title),1)],10,Ee))),128))]),a(P),l("section",null,[Fe,a(F,{modelValue:e.firstName,"onUpdate:modelValue":t[0]||(t[0]=s=>
1e.firstName=s),errors:n(E),"max-length":64,inputLabel:"Jméno",name:"first-name",autocomplete:"given-name"},null,8,["modelValue","errors"]),a(F,{modelValue:e.lastName,"onUpdate:modelValue":t[1]||(t[1]=s=>e.lastName=s),errors:n($),"max-length":64,"label-translation-key":"user.form.add.last-name",inputLabel:"Přijmení",autocomplete:"family-name"},null,8,["modelValue","errors"]),a(M,{modelValue:e.degreesIds,"onUpdate:modelValue":t[2]||(t[2]=s=>e.degreesIds=s),errors:n(v),"label-translation-key":"user.form.add.degrees",name:"degrees"},null,8,["modelValue","errors"]),r.isInvited?_("",!0):(o(),g(w,{key:0,modelValue:e.gender,"onUpdate:modelValue":t[3]||(t[3]=s=>e.gender=s),errors:n(d),"label-translation-key":"user.form.add.gender",name:"gender",autocomplete:"sex"},null,8,["modelValue","errors"])),K.value?(o(),g(ue,{key:1,modelValue:e.isUsingSystemicTherapy,"onUpdate:modelValue":t[4]||(t[4]=s=>e.isUsingSystemicTherapy=s),"error-messages":[R.value?"Požadované":""],inline:""},{label:k(()=>[je]),default:k(()=>[a(Z,{label:"Ano",value:!0,color:"primary"}),a(Z,{label:"Ne",value:!1,color:"primary"})]),_:1},8,["modelValue","error-messages"])):_("",!0)]),a(P),l("section",null,[Be,r.isInvited?_("",!0):(o(),g(de,{key:0,modelValue:e.email,"onUpdate:modelValue":t[5]||(t[5]=s=>e.email=s),errors:n(A),autocomplete:"email",name:"email"},null,8,["modelValue","errors"])),a(ce,{modelValue:e.phoneNumber,"onUpdate:modelValue":t[6]||(t[6]=s=>e.phoneNumber=s)},null,8,["modelValue"])]),a(P),l("section",null,[qe,a(H,{modelValue:e.password,"onUpdate:modelValue":t[7]||(t[7]=s=>e.password=s),errors:n(N),autocomplete:"new-password",name:"password"},null,8,["modelValue","errors"]),a(H,{modelValue:e.passwordConfirm,"onUpdate:modelValue":t[8]||(t[8]=s=>e.passwordConfirm=s),"label-translation-key":"input.password-confirm.label","hint-translation-key":"input.password-confirm.hint",errors:me.value,autocomplete:"new-password",name:"passwordConfirm"},null,8,["modelValue","errors"])]),l("div",ze,[a(pe,{loading:J.value,onClick:ie},{default:k(()=>[oe(" Registrovat ")]),_:1},8,["loading"])])],64)}}}),Ge={class:"tw-h-full tw-grid md:tw-grid-cols-12 tw-items-center"},Je={class:"tw-col-span-4 tw-col-start-5 tw-mt-12"},Ke=l("h1",{class:"tw-text-center"},"Dokončení registrace",-1),mt=O({__name:"activate-account",setup(G){const I=W(),A=ge(),{login:N}=Y(),{submitActivation:E}=xe(),$=x([]),v=x(!1),y=x({rep:!1,peripheralDoctor:!1,centerDoctor:!1});async function d(u){await N(u),await A.push("/app")}async function C(u){await d(u)}return _e(async()=>{v.value=!0;const u=I.query.code,m=I.query.role,h=I.query.registrationType;if(!u){$.value.push({message:"Chybí aktivační kód. Prosím, zkontrolujte odkaz v e-mailu."}),v.value=!1;return}if(h==="public"){v.value=!0;try{const c=await E(u);c&&await d(c.data)}finally{v.value=!1}}h==="invitation"&&m&&(v.value=!1,y.value[m]=!0)}),(u,m)=>{const h=U("v-alert"),c=U("v-progress-circular"),r=De,b=ye,V=Le,e=Ue;return o(),p("div",Ge,[n($).length?(o(),g(h,{key:0,class:"tw-max-w-4xl tw-mx-auto",type:"error",position:"absolute",location:"top right"},{default:k(()=>[(o(!0),p(D,null,q(n($),(i,S)=>(o(),p("div",{key:i.message??`error-${S}`},z(i.message),1))),128))]),_:1})):_("",!0),l("div",Je,[Ke,n(v)?(o(),g(c,{key:0,indeterminate:"",color:"primary",class:"mt-4",size:"50"})):_("",!0),a(e,null,{default:k(()=>[n(y).rep?(o(),g(r,{key:0})):_("",!0),n(y).peripheralDoctor?(o(),g(b,{key:1,isInvited:"",onActivationSuccess:m[0]||(m[0]=i=>C(i))})):_("",!0),n(y).centerDoctor?(o(),g(V,{key:2,isInvited:"",onActivationSuccess:m[1]||(m[1]=i=>C(i))})):_("",!0)]),_:1})])])}}});export{mt 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.