PageSourceSearch

https://smadar.ai/assets/DoctorOnboarding-D_J_iy5b.js

js smadar.ai collected 2026-10-05 15:06:16 UTC 4,318 bytes, 1 lines download raw bytes

1import{b as S,u as k,d as w,e as m,j as e,C as F,h as L,B as n,s as u}from"./index-BoPK12rZ.js";import{I as c}from"./input-B7jnFymG.js";import{L as r}from"./label-CCd9oABz.js";import{S as B,a as E,b as O,c as D,d}from"./select-B6XUQb0n.js";import{P as H}from"./progress-B2ndVF8r.js";import{S as I}from"./stethoscope-BHnL3bfQ.js";import{C as P}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 M=()=>{const{t:s,language:j}=S(),g=j==="he",N=k(),{toast:h}=w(),[i,o]=m.useState(1),[p,x]=m.useState(!1),[a,v]=m.useState({fullName:"",specialty:"",hospital:"",department:"",licenseNumber:"",phone:""}),t=(l,b)=>v(C=>({...C,[l]:b})),f=i/3*100,y=async()=>{x(!0);try{const{data:{user:l}}=await u.auth.getUser();if(!l)throw new Error("Not authenticated");await u.from("profiles").update({full_name:a.fullName,specialty:a.specialty,hospital:a.hospital,department:a.department,license_number:a.licenseNumber,phone:a.phone,onboarding_completed:!0}).eq("id",l.id),h({title:s("האונבורדינג הושלם!","Onboarding complete!")}),N("/physician")}catch{h({title:s("שגיאה","Error"),variant:"destructive"})}finally{x(!1)}};return e.jsx("div",{className:"min-h-screen bg-background p-4 pb-24",dir:g?"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",children:[e.jsx(I,{className:"h-7 w-7 text-primary"}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:s("אונבורדינג רופא","Doctor Onboarding")})]}),e.jsx(H,{value:f,className:"h-2"}),e.jsx(F,{children:e.jsxs(L,{className:"p-4 space-y-4",children:[i===1&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("שם מלא","Full Name")}),e.jsx(c,{value:a.fullName,onChange:l=>t("fullName",l.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("מספר רישיון","License Number")}),e.jsx(c,{value:a.licenseNumber,onChange:l=>t("licenseNumber",l.target.value)})]}),e.jsx(n,{className:"w-full",onClick:()=>o(2),disabled:!a.fullName,children:s("הבא","Next")})]}),i===2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("התמחות","Specialty")}),e.jsxs(B,{value:a.specialty,onValueChange:l=>t("specialty",l),children:[e.jsx(E,{children:e.jsx(O,{placeholder:s("בחר התמחות","Select specialty")})}),e.jsxs(D,{children:[e.jsx(d,{value:"oncology",children:s("אונקולוגיה","Oncology")}),e.jsx(d,{value:"surgery",children:s("כירורגיה","Surgery")}),e.jsx(d,{value:"radiology",children:s("רדיולוגיה","Radiology")}),e.jsx(d,{value:"hematology",children:s("המטולוגיה","Hematology")})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("בית חולים","Hospital")}),e.jsx(c,{value:a.hospital,onChange:l=>t("hospital",l.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("מחלקה","Department")}),e.jsx(c,{value:a.department,onChange:l=>t("department",l.target.value)})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(n,{variant:"outline",onClick:()=>o(1),className:"flex-1",children:s("חזור","Back")}),e.jsx(n,{onClick:()=>o(3),className:"flex-1",children:s("הבא","Next")})]})]}),i===3&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("טלפון","Phone")}),e.jsx(c,{value:a.phone,onChange:l=>t("phone",l.target.value),type:"tel"})]}),e.jsxs("div",{className:"bg-muted/50 rounded-lg p-3 text-sm space-y-1",children:[e.jsxs("p",{children:[e.jsxs("strong",{children:[s("שם","Name"),":"]})," ",a.fullName]}),e.jsxs("p",{children:[e.jsxs("strong",{children:[s("התמחות","Specialty"),":"]})," ",a.specialty]}),e.jsxs("p",{children:[e.jsxs("strong",{children:[s("בית חולים","Hospital"),":"]})," ",a.hospital]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(n,{variant:"outline",onClick:()=>o(2),className:"flex-1",children:s("חזור","Back")}),e.jsxs(n,{onClick:y,disabled:p,className:"flex-1",children:[e.jsx(P,{className:"h-4 w-4 me-2"}),p?s("שומר...","Saving..."):s("סיום","Finish")]})]})]})]})})]})})};export{M 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.