PageSourceSearch

https://smadar.ai/assets/CompleteProfile-BH6h--4p.js

js smadar.ai collected 2026-10-05 15:06:11 UTC 3,450 bytes, 1 lines download raw bytes

1import{b as L,u as R,d as k,e as t,j as e,C as B,h as I,B as M,s as j}from"./index-BoPK12rZ.js";import{I as p}from"./input-B7jnFymG.js";import{L as r}from"./label-CCd9oABz.js";import{S as g,a as v,b as f,c as N,d as a}from"./select-B6XUQb0n.js";import{P as T}from"./progress-B2ndVF8r.js";import{C as V}from"./circle-user-C0UBtafJ.js";import{C as H}from"./circle-check-BHOaP-8t.js";import"./index-DuY6vpjC.js";import"./index-DR_KIw6N.js";import"./chevron-down-BAeWndFz.js";import"./chevron-up-BRs2jkXF.js";const W=()=>{const{t:s,language:C}=L(),S=C==="he",b=R(),{toast:c}=k(),[n,y]=t.useState(""),[i,w]=t.useState(""),[o,P]=t.useState(""),[d,F]=t.useState(""),[h,u]=t.useState(!1),m=[n,i,o,d].filter(Boolean).length,x=m/4*100,E=async()=>{u(!0);try{const{data:{user:l}}=await j.auth.getUser();if(!l)throw new Error("Not authenticated");await j.from("profiles").update({full_name:n,phone:i,onboarding_completed:!0}).eq("id",l.id),c({title:s("הפרופיל נשמר!","Profile saved!")}),b("/dashboard")}catch{c({title:s("שגיאה בשמירה","Error saving"),variant:"destructive"})}finally{u(!1)}};return e.jsx("div",{className:"min-h-screen bg-background p-4 pb-24",dir:S?"rtl":"ltr",children:e.jsxs("div",{className:"max-w-lg mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(V,{className:"h-7 w-7 text-primary"}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:s("השלמת פרופיל","Complete Profile")})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[e.jsx("span",{children:s("התקדמות","Progress")}),e.jsxs("span",{children:[Math.round(x),"%"]})]}),e.jsx(T,{value:x,className:"h-2"})]}),e.jsx(B,{children:e.jsxs(I,{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("שם מלא","Full Name")}),e.jsx(p,{value:n,onChange:l=>y(l.target.value),placeholder:s("הכנס שם מלא","Enter full name")}
1)]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("טלפון","Phone")}),e.jsx(p,{value:i,onChange:l=>w(l.target.value),placeholder:"050-000-0000",type:"tel"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("קופת חולים","Health Fund")}),e.jsxs(g,{value:o,onValueChange:P,children:[e.jsx(v,{children:e.jsx(f,{placeholder:s("בחר קופת חולים","Select health fund")})}),e.jsxs(N,{children:[e.jsx(a,{value:"clalit",children:s("כללית","Clalit")}),e.jsx(a,{value:"maccabi",children:s("מכבי","Maccabi")}),e.jsx(a,{value:"meuhedet",children:s("מאוחדת","Meuhedet")}),e.jsx(a,{value:"leumit",children:s("לאומית","Leumit")})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("אזור מגורים","Region")}),e.jsxs(g,{value:d,onValueChange:F,children:[e.jsx(v,{children:e.jsx(f,{placeholder:s("בחר אזור","Select region")})}),e.jsxs(N,{children:[e.jsx(a,{value:"north",children:s("צפון","North")}),e.jsx(a,{value:"center",children:s("מרכז","Center")}),e.jsx(a,{value:"south",children:s("דרום","South")}),e.jsx(a,{value:"jerusalem",children:s("ירושלים","Jerusalem")})]})]})]}),e.jsxs(M,{className:"w-full",size:"lg",onClick:E,disabled:h||m<2,children:[e.jsx(H,{className:"h-4 w-4 me-2"}),h?s("שומר...","Saving..."):s("שמור והמשך","Save & Continue")]})]})})]})})};export{W 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.