PageSourceSearch

https://ruitersbos-connect.manus.space/assets/Profiel-Bwvcz7Bz.js

js ruitersbos-connect.manus.space collected 2026-10-03 05:05:05 UTC 16,762 bytes, 11 lines download raw bytes

1import{r as i,j as e}from"./react-core-Bm2Tgkay.js";import{c as K,d as ae,t as d,b as l,z as te,o as ie,L as E}from"./index-DzU_n_eR.js";import{A as le,b as re,a as ce}from"./avatar-CXvFU2U8.js";import{B as ne}from"./badge-BvwQX87x.js";import{B as F}from"./button-DIzZirXq.js";import{C as T,c as I,a as V,b as H}from"./card-DBiTrsBa.js";import{I as o}from"./input-DNYuYpWQ.js";import{L as r}from"./label-BX22j6l8.js";import{S as D}from"./switch-BQyvXmvO.js";import{S as oe,a as de,b as pe,c as ge,d as me}from"./select-D6d6L6zM.js";import{K as xe}from"./key-round-CzUVb7Lh.js";import{B as fe}from"./bell-D5nyrbfy.js";import{M as ue}from"./mail-CvEBmqW0.js";import"./data-client-BVkRvsMm.js";import"./index-CJAMpL9k.js";import"./index-47lbaGh3.js";import"./useComposition-CzJUH7ZJ.js";import"./index-CNNaq2td.js";import"./index-CDLILjaV.js";import"./index-DFdKgMjI.js";import"./index-BdQq_4o_.js";import"./index-C1EaGkWm.js";import"./index-Dkzgt3AI.js";import"./index-CdBaep3J.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const he=K("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
7 * @license lucide-react v0.453.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const je=K("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),Pe={available:"Beschikbaar",busy:"Bezet",away:"Afwezig",offline:"Offline"};function be(a){return a?a.trim().split(/\s+/).slice(0,2).map(c=>c[0]?.toUpperCase()??"").join(""):"?"}const ve=[{key:"leave_decisions",label:"Verlofbeslissingen",desc:"Goedkeuring of afwijzing van je verlofaanvraag."},{key:"task_assigned",label:"Taak toegewezen",desc:"Wanneer een taak aan jou wordt toegewezen."},{key:"task_due",label:"Taak verloopt",desc:"Herinnering wanneer een taak bijna de deadline bereikt."},{key:"chat_mention",label:"Chat @vermelding",desc:"Wanneer een collega je met @naam noemt."},{key:"chat_direct",label:"Direct bericht",desc:"Nieuwe berichten in een privégesprek."},{key:"document_required",label:"Verplicht document",desc:"Wanneer een nieuw document je leesbevestiging vereist."},{key:"announcement",label:"Aankondigingen",desc:"Nieuwe praktijkbrede mededelingen."},{key:"admin_action",label:"Beheeracties",desc:"Acties die je aandacht als beheerder vereisen."},{key:"appointments",label:"Agenda-afspraken",desc:"Nieuwe, gewijzigde of geannuleerde afspraken waarbij je bent ingepland."}];function we(){const a=d.notificationPreferences.list.useQuery(void 0,{refetchOnWindowFocus:!1}),c=d.notificationPreferences.update.useMutation({onSuccess:()=>{a.refetch()}}),p=a.data??{},f=p.chat_mention??{inApp:!0,email:!1},u=p.chat_direct??{inApp:!0,email:!1},h=f.email||u.email,j=(t,n)=>{const g=t==="chat_mention"||t==="chat_direct",P=p[t]??{inApp:!0,email:!g},b={...P,[n]:!P[n]};c.mutate({preferences:[{category:t,inApp:b.inApp,email:b.email}]})},v=()=>{const t=!h;c.mutate({preferences:[{category:"chat_mention",inApp:f.inApp,email:t},{category:"chat_direct",inApp:u.inApp,email:t}]})};return a.isLoading?e.jsx("div",{"data-loc":"client/src/pages/Profiel.tsx:78",className:"py-4 text-center text-sm text-muted-foreground",children:"Laden..."}):e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:81",className:"mt-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:82",className:"flex items-center justify-between gap-4 rounded-xl border border-primary/20 bg-primary/5 p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:83",children:[e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:84",className:"text-sm font-semibold",children:"E-mail bij Chat-berichten"}),e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:85",className:"mt-1 text-xs leading-5 text-muted-foreground",children:"Standaard uit. Chat blijft wel direct zichtbaar in de app en bij je meldingen."})]}),e.jsx(D,{"data-loc":"client/src/pages/Profiel.tsx:89",checked:h,disabled:c.isPending,onCheckedChange:v,"aria-label":"E-mail bij Chat-berichten"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:96",className:"grid grid-cols-[1fr_auto_auto] items-center gap-x-3 gap-y-0 text-xs font-semibold text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/pages/Profiel.tsx:97"}),e.jsxs("span",{"data-loc":"client/src/pages/Profiel.tsx:98",className:"flex items-center gap-1",children:[e.jsx(fe,{"data-loc":"client/src/pages/Profiel.tsx:98",className:"size-3"})," App"]}
11),e.jsxs("span",{"data-loc":"client/src/pages/Profiel.tsx:99",className:"flex items-center gap-1",children:[e.jsx(ue,{"data-loc":"client/src/pages/Profiel.tsx:99",className:"size-3"})," E-mail"]})]}),ve.map(t=>{const n=t.key==="chat_mention"||t.key==="chat_direct",g=p[t.key]??{inApp:!0,email:!n};return e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:105",className:"grid grid-cols-[1fr_auto_auto] items-center gap-x-3 rounded-lg border border-border/50 p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:106",children:[e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:107",className:"text-sm font-semibold",children:t.label}),e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:108",className:"text-xs text-muted-foreground",children:t.desc})]}),e.jsx(D,{"data-loc":"client/src/pages/Profiel.tsx:110",checked:g.inApp,onCheckedChange:()=>j(t.key,"inApp"),"aria-label":`${t.label} in-app`}),n?e.jsx("span",{"data-loc":"client/src/pages/Profiel.tsx:112",className:"w-10 text-center text-[10px] font-medium text-muted-foreground",children:"Boven"}):e.jsx(D,{"data-loc":"client/src/pages/Profiel.tsx:114",checked:g.email,onCheckedChange:()=>j(t.key,"email"),"aria-label":`${t.label} e-mail`})]},t.key)})]})}function Qe(){const{user:a,refresh:c}=ae(),p=d.useUtils(),f=i.useRef(null),[u,h]=i.useState(""),[j,v]=i.useState(""),[t,n]=i.useState(""),[g,P]=i.useState(""),[b,W]=i.useState("available"),[N,O]=i.useState(""),[G,Q]=i.useState(!0),[q,J]=i.useState(!0),[$,Y]=i.useState(!0),[k,R]=i.useState(""),[w,C]=i.useState(""),[y,A]=i.useState(""),m=d.localAuth.accountSecurity.useQuery(),S=d.localAuth.setPassword.useMutation({onSuccess:()=>{C(""),A(""),m.refetch(),l.success("Eigen praktijklogin geactiveerd")},onError:s=>l.error(s.message)}),M=d.localAuth.changePassword.useMutation({onSuccess:()=>{R(""),C(""),A(""),l.success("Wachtwoord gewijzigd; andere sessies zijn uitgelogd")},onError:s=>l.error(s.message)});i.useEffect(()=>{a&&(h(a.jobTitle??""),v(a.department??""),n(a.phone??""),P(a.specialties??""),W(a.availability??"available"),O(a.statusMessage??""),Q(a.notifyLeaveDecisions??!0),J(a.notifyAnnouncements??!0),Y(a.notifyMentions??!0))},[a]);const z=d.profile.update.useMutation({onSuccess:async()=>{await p.auth.me.invalidate(),await c(),l.success("Profiel opgeslagen")},onError:()=>l.error("Opslaan mislukt, probeer opnieuw")}),L=d.profile.uploadAvatar.useMutation({onSuccess:async()=>{await p.auth.me.invalidate(),await c(),l.success("Profielfoto bijgewerkt")},onError:s=>l.error(s.message||"Upload mislukt, probeer een kleinere afbeelding")});function X(){z.mutate({jobTitle:u.trim()||null,department:j.trim()||null,phone:t.trim()||null,specialties:g.trim()||null,availability:b,statusMessage:N.trim()||null,notifyLeaveDecisions:G,notifyAnnouncements:q,notifyMentions:$})}function Z(s){const x=s.target.files?.[0];if(s.target.value="",!x)return;if(x.size>35e5){l.error("Afbeelding te groot (max 3MB)");return}const _=new FileReader;_.onload=()=>{const B=String(_.result),se=B.includes(",")?B.split(",")[1]:B;L.mutate({fileName:x.name,mimeType:x.type||"image/png",contentBase64:se})},_.readAsDataURL(x)}const U=a?.avatarUrl,ee=a?.role==="superadmin"?"Platformbeheerder":a?.role==="admin"?"Beheerder":"Medewerker";return e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:225",className:"space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:226",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:227",className:"flex items-center gap-2 text-2xl font-semibold tracking-tight",children:[e.jsx(te,{"data-loc":"client/src/pages/Profiel.tsx:228",className:"size-6 text-primary"}),"Mijn Profiel"]}),e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:231",className:"text-sm text-muted-foreground",children:"Beheer je persoonlijke informatie"})]}),e.jsx(T,{"data-loc":"client/src/pages/Profiel.tsx:237",children:e.jsxs(I,{"data-loc":"client/src/pages/Profiel.tsx:238",className:"flex flex-col gap-4 pt-6 sm:flex-row sm:items-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Profiel.tsx:239",className:"relative",children:e.jsxs(le,{"data-loc":"client/src/pages/Profiel.tsx:240",className:"size-20 border",children:[U?e.jsx(re,{"data-loc":"client/src/pages/Profiel.tsx:241",src:U,alt:a?.name??""}):null,e.jsx(ce,{"data-loc":"client/src/pages/Profiel.tsx:242",className:"bg-primary/10 text-xl font-semibold text-primary",children:be(a?.name)}
11)]})}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:247",className:"flex-1 space-y-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Profiel.tsx:248",className:"text-xl font-semibold",children:a?.name??"—"}),e.jsx("div",{"data-loc":"client/src/pages/Profiel.tsx:249",className:"text-sm text-muted-foreground",children:a?.email??"Geen e-mailadres"}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:252",className:"flex items-center gap-2 pt-1",children:[e.jsxs(ne,{"data-loc":"client/src/pages/Profiel.tsx:253",variant:"secondary",className:"gap-1",children:[a?.role==="admin"?e.jsx(ie,{"data-loc":"client/src/pages/Profiel.tsx:255",className:"size-3"}):null,ee]}),e.jsx("input",{"data-loc":"client/src/pages/Profiel.tsx:259",ref:f,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",className:"hidden",onChange:Z}),e.jsxs(F,{"data-loc":"client/src/pages/Profiel.tsx:266",size:"sm",onClick:()=>f.current?.click(),disabled:L.isPending,children:[L.isPending?e.jsx(E,{"data-loc":"client/src/pages/Profiel.tsx:272",className:"size-4 animate-spin"}):e.jsx(he,{"data-loc":"client/src/pages/Profiel.tsx:274",className:"size-4"}),"Upload foto"]})]})]})]})}),e.jsxs(T,{"data-loc":"client/src/pages/Profiel.tsx:283",children:[e.jsx(V,{"data-loc":"client/src/pages/Profiel.tsx:284",children:e.jsx(H,{"data-loc":"client/src/pages/Profiel.tsx:284",children:"Inloggen en beveiliging"})}),e.jsxs(I,{"data-loc":"client/src/pages/Profiel.tsx:285",className:"space-y-5",children:[e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:286",className:"text-sm text-muted-foreground",children:m.data?.hasPassword?"Je logt in met een eigen RuitersbosConnect-account. Wij bewaren uitsluitend een beveiligde wachtwoordhash.":"Activeer je eigen praktijklogin. Daarna heb je geen Manus-account meer nodig."}),m.data?.hasPassword&&e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:287",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:287",htmlFor:"currentPassword",children:"Huidig wachtwoord"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:287",id:"currentPassword",type:"password",autoComplete:"current-password",value:k,onChange:s=>R(s.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:288",className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:288",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:288",htmlFor:"profileNewPassword",children:m.data?.hasPassword?"Nieuw wachtwoord":"Kies een wachtwoord"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:288",id:"profileNewPassword",type:"password",autoComplete:"new-password",minLength:12,value:w,onChange:s=>C(s.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:288",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:288",htmlFor:"profilePasswordConfirmation",children:"Herhaal wachtwoord"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:288",id:"profilePasswordConfirmation",type:"password",autoComplete:"new-password",minLength:12,value:y,onChange:s=>A(s.target.value)})]})]}),e.jsxs(F,{"data-loc":"client/src/pages/Profiel.tsx:289",disabled:!w||!y||m.data?.hasPassword&&!k||S.isPending||M.isPending,onClick:()=>m.data?.hasPassword?M.mutate({currentPassword:k,password:w,confirmation:y}):S.mutate({password:w,confirmation:y}),children:[S.isPending||M.isPending?e.jsx(E,{"data-loc":"client/src/pages/Profiel.tsx:289",className:"size-4 animate-spin"}):e.jsx(xe,{"data-loc":"client/src/pages/Profiel.tsx:289",className:"size-4"}),m.data?.hasPassword?"Wachtwoord wijzigen":"Eigen login activeren"]})]})]}),e.jsxs(T,{"data-loc":"client/src/pages/Profiel.tsx:294",children:[e.jsx(V,{"data-loc":"client/src/pages/Profiel.tsx:295",children:e.jsx(H,{"data-loc":"client/src/pages/Profiel.tsx:296",children:"Werkgegevens"})}),e.jsxs(I,{"data-loc":"client/src/pages/Profiel.tsx:298",className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:299",className:"grid gap-5 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:300",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:301",htmlFor:"jobTitle",children:"Functietitel"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:302",id:"jobTitle",placeholder:"bijv. Fysiotherapeut",value:u,onChange:s=>h(s.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:309",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:310",htmlFor:"department",children:"Afdeling"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:311",id:"department",placeholder:"bijv. Behandeling",value:j,onChange:s=>v(s.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:318",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:319",htmlFor:"phone",children:"Telefoonnummer"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:320",id:"phone",placeholder:"+31 6 12345678",value:t,onChange:s=>n(s.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:327",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:328",htmlFor:"availability",children:"Beschikbaarheid"}),e.jsxs(oe,{"data-loc":"client/src/pages/Profiel.tsx:329",value:b,onValueChange:s=>W(s),children:[e.jsx(de,{"data-loc":"client/src/pages/Profiel.tsx:333",id:"availability",children:e.jsx(pe,{"data-loc":"client/src/pages/Profiel.tsx:334"})}),e.jsx(ge,{"data-loc":"client/src/pages/Profiel.tsx:336",children:Object.entries(Pe).map(([s,x])=>e.jsx(me,{"data-loc":"client/src/pages/Profiel.tsx:338",value:s,children:x},s))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:347",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:348",htmlFor:"specialties",children:"Specialisaties"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:349",id:"specialties",placeholder:"bijv. Manuele therapie, Dry needling, Sportrevalidatie",value:g,onChange:s=>P(s.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:357",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Profiel.tsx:358",htmlFor:"statusMessage",children:"Statusbericht"}),e.jsx(o,{"data-loc":"client/src/pages/Profiel.tsx:359",id:"statusMessage",placeholder:"Waar werk je momenteel aan?",maxLength:120,value:N,onChange:s=>O(s.target.value)}),e.jsxs("p",{"data-loc":"client/src/pages/Profiel.tsx:366",className:"text-xs text-muted-foreground",children:[N.length,"/120"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profiel.tsx:371",className:"rounded-2xl border border-[#e4d6bd] bg-[#fffdf7] p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:372",className:"font-display font-bold text-foreground",children:"Meldingsvoorkeuren"}),e.jsx("p",{"data-loc":"client/src/pages/Profiel.tsx:373",className:"mt-1 text-sm text-muted-foreground",children:"Kies per categorie of je meldingen in de app en/of per e-mail wilt ontvangen."}),e.jsx(we,{"data-loc":"client/src/pages/Profiel.tsx:374"})]}),e.jsxs(F,{"data-loc":"client/src/pages/Profiel.tsx:377",onClick:X,disabled:z.isPending,children:[z.isPending?e.jsx(E,{"data-loc":"client/src/pages/Profiel.tsx:379",className:"size-4 animate-spin"}):e.jsx(je,{"data-loc":"client/src/pages/Profiel.tsx:381",className:"size-4"}),"Opslaan"]})]})]})]})}export{Qe 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.