PageSourceSearch

https://bluerevolution-cc.manus.space/assets/CompleteProfile-DeDjPptY.js

js bluerevolution-cc.manus.space collected 2026-10-03 05:02:12 UTC 5,096 bytes, 1 lines download raw bytes

1import{j as e}from"./editor-BhGk7_S1.js";import{b as a}from"./leaflet-DcfcX7a_.js";import{d as b,b as y,t as n,A as S,f as L,a as E}from"./index-BjIHAQhU.js";import{B as F}from"./button-CK76V7Lo.js";import{I as u}from"./input-BtSXPsMX.js";import{L as r}from"./label-DwWfObJM.js";import{C as w,a as I,b as T,c as A,d as V}from"./card-CaSmhJ1l.js";import{C as k}from"./CountryCombobox-D-DmjyR9.js";import{C as z}from"./CityAutocomplete-t8y1NAcF.js";import{C as q}from"./circle-check-Bm_Q9Bqk.js";import"./mapbox-BPFQ-Sfv.js";import"./trpc-DqtxhgQo.js";import"./dialog-DDbhAKMR.js";import"./index-CmmlU_cv.js";import"./x-rm1_-8OE.js";import"./countryTranslations--xXtAg9U.js";import"./search-DBs4wGfH.js";import"./chevrons-up-down-nO4j0qv-.js";import"./check-DFqoFjW9.js";function se(){const[,f]=b(),[o,g]=a.useState(""),[i,C]=a.useState(""),[l,P]=a.useState(""),[c,m]=a.useState(""),[h,d]=a.useState(),[j,p]=a.useState(),[N,x]=a.useState(),s=y.auth.completeProfile.useMutation({onSuccess:()=>{n.success("Profil complété avec succès !"),setTimeout(()=>{f("/")},1e3)},onError:t=>{n.error(t.message||"Erreur lors de la complétion du profil")}}),v=t=>{if(t.preventDefault(),!o.trim()||!i.trim()||!l.trim()||!c.trim()){n.error("Tous les champs sont obligatoires");return}s.mutate({firstName:o.trim(),lastName:i.trim(),country:l.trim(),city:c.trim(),geonameId:h,latitude:j,longitude:N})};return e.jsx("div",{"data-loc":"client/src/pages/CompleteProfile.tsx:57",className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background via-background to-muted p-4",children:e.jsxs(w,{"data-loc":"client/src/pages/CompleteProfile.tsx:58",className:"w-full max-w-md",children:[e.jsxs(I,{"data-loc":"client/src/pages/CompleteProfile.tsx:59",className:"text-center space-y-4",children:[e.jsx("div",{"data-loc":"client/src/pages/CompleteProfile.tsx:60",className:"flex justify-center",children:e.jsx("img",{"data-loc":"client/src/pages/CompleteProfile.tsx:61",src:L,alt:S,className:"h-16 w-16 rounded-lg"})}),e.jsxs("div",{"data-loc":"client/src/pages/CompleteProfile.tsx:63",children:[e.jsx(T,{"data-loc":"client/src/pages/CompleteProfile.tsx:64",className:"text-2xl",children:"Complétez votre profil"}),e.jsx(A,{"data-loc":"client/src/pages/CompleteProfile.tsx:65",className:"mt-2",children:"Pour continuer, veuillez renseigner ces informations obligatoires"})]})]}),e.jsx(V,{"data-loc":"client/src/pages/CompleteProfile.tsx:70",children:e.jsxs("form",{"data-loc":"client/src/pages/CompleteProfile.tsx:71",onSubmit:v,className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/CompleteProfile.tsx:72",className:"space-y-2",children:[e.jsxs(r,{"data-loc":"client/src/pages/CompleteProfile.tsx:73",htmlFor:"firstName",children:["Prénom ",e.jsx("span",{"data-loc":"client/src/pages/CompleteProfile.tsx:74",className:"text-destructive",children:"*"})]}),e.jsx(u,{"data-loc":"client/src/pages/CompleteProfile.tsx:76",id:"firstName",type:"text",value:o,onChange:t=>g(t.target.value),placeholder:"Votre prénom",required:!0,disabled:s.isPending})]}),e.jsxs("div",{"data-loc":"client/src/pages/CompleteProfile.tsx:87",className:"space-y-2",children:[e.jsxs(r,{"data-loc":"client/src/pages/CompleteProfile.tsx:88",htmlFor:"lastName",children:["Nom ",e.jsx("span",{"data-loc":"client/src/pages/CompleteProfile.tsx:89",className:"text-destructive",children:"*"})]}),e.jsx(u,{"data-loc":"client/src/pages/CompleteProfile.tsx:91",id:"lastName",type:"text",value:i,onChange:t=>C(t.target.value),placeholder:"Votre nom",required:!0,disabled:s.isPending})]}),e.jsxs("div",{"data-loc":"client/src/pages/CompleteProfile.tsx:102",className:"space-y-2",children:[e.jsxs(r,{"data-loc":"client/src/pages/CompleteProfile.tsx:103",htmlFor:"country",children:["Pays ",e.jsx("span",{"data-loc":"client/src/pages/CompleteProfile.tsx:104",className:"text-destructive",children:"*"})]}),e.jsx(k,{"data-loc":"client/src/pages/CompleteProfile.tsx:106",value:l,onValueChange:t=>{P(t),m(""),d(void 0),p(void 0),x(void 0)},disabled:s.isPending})]}),e.jsxs("div",{"data-loc":"client/src/pages/CompleteProfile.tsx:120",className:"space-y-2",children:[e.jsxs(r,{"data-loc":"client/src/pages/CompleteProfile.tsx:121",htmlFor:"city",children:["Ville ",e.jsx("span",{"data-loc":"client/src/pages/CompleteProfile.tsx:122",className:"text-destructive",children:"*"})]}),e.jsx(z,{"data-loc":"client/src/pages/CompleteProfile.tsx:124",countryCode:l,value:c,onChange:t=>{m(t?.city??""),t&&(d(t.geonameId),p(t.latitude),x(t.longitude))},disabled:!l||s.isPending,placeholder:l?"Rechercher une ville...":"Sélectionnez d'abord un pays"})]}),e.jsx(F,{"data-loc":"client/src/pages/CompleteProfile.tsx:140",type:"submit",className:"w-full",disabled:s.isPending,children:s.isPending?e.jsxs(e.Fragment,{children:[e.jsx(E,{"data-loc":"client/src/pages/CompleteProfile.tsx:147",className:"mr-2 h-4 w-4 animate-spin"}),"Enregistrement..."]}):e.jsxs(e.Fragment,{children:[e.jsx(q,{"data-loc":"client/src/pages/CompleteProfile.tsx:152",className:"mr-2 h-4 w-4"}),"Enregistrer et continuer"]})})]})})]})})}export{se 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.