PageSourceSearch

https://www.innera.ai/_next/static/chunks/pages/therapist/profile-987892f07d9bfab0.js

js innera.ai collected 2026-10-05 13:58:59 UTC 9,812 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3988],{47288:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>h,default:()=>m});var a=l(37876),s=l(77328),r=l.n(s),i=l(14232),n=l(81153),d=l(9641);let o=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];function c(e){return e.join(", ")}function x(e){return e.split(",").map(e=>e.trim()).filter(Boolean)}function u(){var e,t,l,s,n,u,h;let[m,p]=(0,i.useState)({display_name:"",credentials_line:null,license_no:null,bio:null,photo_url:null,modalities:[],languages:[],years_experience:null,accepting_clients:!0}),[b,g]=(0,i.useState)(""),[w,y]=(0,i.useState)(""),[v,k]=(0,i.useState)([]),[j,f]=(0,i.useState)(!0),[N,_]=(0,i.useState)(!1),[C,S]=(0,i.useState)(!1),[P,T]=(0,i.useState)(null),[A,E]=(0,i.useState)(null);async function F(){_(!0),T(null),E(null);try{let e={...m,modalities:x(b),languages:x(w)},t=await (0,d.FHQ)("/therapist/profile",{method:"PUT",body:e});p(t),E("Profile saved.")}catch(a){var e,t,l;T(null!=(l=null!=(t=null==a||null==(e=a.body)?void 0:e.detail)?t:null==a?void 0:a.message)?l:"Could not save profile.")}finally{_(!1)}}function R(e,t){k(l=>l.map((l,a)=>a===e?{...l,...t}:l))}async function X(){S(!0),T(null),E(null);try{let e=v.map(e=>{let{weekday:t,start_time:l,end_time:a}=e;return{weekday:t,start_time:l,end_time:a}}),t=await (0,d.FHQ)("/therapist/slots",{method:"PUT",body:e});k(t.slots),E("Weekly availability saved.")}catch(a){var e,t,l;T(null!=(l=null!=(t=null==a||null==(e=a.body)?void 0:e.detail)?t:null==a?void 0:a.message)?l:"Could not save availability.")}finally{S(!1)}}(0,i.useEffect)(()=>{Promise.all([(0,d.FHQ)("/therapist/profile"),(0,d.FHQ)("/therapist/slots")]).then(e=>{let[t,l]=e;p(t),g(c(t.modalities)),y(c(t.languages)),k(l.slots)}).catch(e=>{var t,l,a;return T(null!=(a=null!=(l=null==e||null==(t=e.body)?void 0:t.detail)?l:null==e?void 0:e.message)?a:"Could not load profile.")}).finally(()=>f(!1))},[]);let H=null!=(t=null==(e=m.bio)?void 0:e.length)?t:0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r(),{children:(0,a.jsx)("title",{children:"Profile \xb7 Innera Therapist"})}),(0,a.jsxs)("div",{className:"w-full max-w-2xl space-y-8",children:[(0,a.jsx)("div",{children:(0,a.jsx)("p",{className:"text-sm text-slate-400",children:"This is what clients see before they choose you. Keep it clear and current."})}),P&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:P}),A&&(0,a.jsx)("p",{className:"text-sm text-emerald-600",children:A}),j?(0,a.jsx)("p",{className:"text-sm text-slate-400",children:"Loading…"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:"space-y-4 rounded-2xl p-5 backdrop-blur-xl bg-white/40 dark:bg-white/5 ring-1 ring-white/50 dark:ring-white/10 shadow-[0_8px_30px_rgba(0,0,0,0.06)] dark:shadow-[0_16px_48px_rgba(0,0,0,0.22)]",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"Display name"}),(0,a.jsx)("input",{className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",value:m.display_name,onChange:e=>p({...m,display_name:e.target.value}),placeholder:"e.g. Anita Rao"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"Credentials line"}),(0,a.jsx)("input",{className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",value:null!=(l=m.credentials_line)?l:"",onChange:e=>p({...m,credentials_line:e.target.value}),placeholder:"e.g. Clinical Psychologist \xb7 M.Phil, RCI CRR-XXXX"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"Shown on your public card exactly as written."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"License number"}),(0,a.jsx)("input",{className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",value:null!=(s=m.license_no)?s:"",onCh
1ange:e=>p({...m,license_no:e.target.value}),placeholder:"For verification only — never shown to clients"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"Display-only here; verification is a manual step on our side."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"Bio"}),(0,a.jsx)("textarea",{className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",rows:4,maxLength:600,value:null!=(n=m.bio)?n:"",onChange:e=>p({...m,bio:e.target.value}),placeholder:"A few sentences on how you work, and who you work best with."}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-slate-400",children:[H,"/",600]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"Photo URL"}),(0,a.jsx)("input",{className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",value:null!=(u=m.photo_url)?u:"",onChange:e=>p({...m,photo_url:e.target.value}),placeholder:"https://…"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"Modalities"}),(0,a.jsx)("input",{className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",value:b,onChange:e=>g(e.target.value),placeholder:"CBT, ACT, EMDR"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"Comma-separated."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"Languages"}),(0,a.jsx)("input",{className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",value:w,onChange:e=>y(e.target.value),placeholder:"English, Hindi"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"Comma-separated."})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 dark:text-white/80",children:"Years of experience"}),(0,a.jsx)("input",{type:"number",min:0,className:"mt-1 w-full rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-3 py-2 text-sm",value:null!=(h=m.years_experience)?h:"",onChange:e=>p({...m,years_experience:e.target.value?Number(e.target.value):null})})]}),(0,a.jsx)("div",{className:"flex items-end",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-slate-700 dark:text-white/80",children:[(0,a.jsx)("input",{type:"checkbox",checked:m.accepting_clients,onChange:e=>p({...m,accepting_clients:e.target.checked})}),"Accepting new clients"]})})]}),(0,a.jsx)("button",{type:"button",onClick:F,disabled:N||!m.display_name.trim(),className:"rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white disabled:opacity-50",children:N?"Saving…":"Save profile"})]}),(0,a.jsxs)("section",{className:"space-y-4 rounded-2xl p-5 backdrop-blur-xl bg-white/40 dark:bg-white/5 ring-1 ring-white/50 dark:ring-white/10 shadow-[0_8px_30px_rgba(0,0,0,0.06)] dark:shadow-[0_16px_48px_rgba(0,0,0,0.22)]",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800 dark:text-white/90",children:"Weekly availability"}),(0,a.jsx)("p",{className:"mt-0.5 text-sm text-slate-400",children:"A simple recurring weekly grid — no calendar sync, just the hours you're open to booking."})]}),0===v.length&&(0,a.jsx)("p",{className:"text-sm text-slate-400",children:"No availability set yet. Add a slot below so clients can book you."}),(0,a.jsx)("div",{className:"space-y-2",children:v.map((e,t)=>{var l;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("select",{className:"rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-2 py-1.5 text-sm",value:e.weekday,onChange:e=>R(t,{weekday:Number(e.target.value)}),children:o.map((e,t)=>(0,a.jsx)("option",{value:t,children:e},t))}),(0,a.jsx)("input",{type:"time",className:"rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-2 py-1.5 text-sm",value:e.start_time.slice(0,5),onChange:e=>R(t,{start_time:"".concat(e.target.value,":00")})}),(0,a.jsx)("span",{className:"text-slate-400",children:"–"}),(0,a.jsx)("input",{type:"time",className:"rounded-lg border border-slate-200 dark:border-white/10 bg-white dark:bg-white/5 px-2 py-1.5 text-sm",value:e.end_time.slice(0,5),onChange:e=>R(t,{end_time:"".concat(e.target.value,":00")})}),(0,a.jsx)("button",{type:"button",onClick:()=>{k(e=>e.filter((e,l)=>l!==t))},className:"text-sm text-red-500 hover:underline",children:"Remove"})]},null!=(l=e.id)?l:t)})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:function(){k(e=>[...e,{weekday:0,start_time:"09:00:00",end_time:"17:00:00"}])},className:"rounded-lg border border-slate-200 dark:border-white/10 px-3 py-1.5 text-sm",children:"Add slot"}),(0,a.jsx)("button",{type:"button",onClick:X,disabled:C,className:"rounded-lg bg-indigo-600 px-4 py-1.5 text-sm font-medium text-white disabled:opacity-50",children:C?"Saving…":"Save availability"})]})]})]})]})]})}var h=!0;function m(){return(0,a.jsx)(n.A,{children:(0,a.jsx)(u,{})})}},88060:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/therapist/profile",function(){return l(47288)}])}},e=>{e.O(0,[1488,636,6593,8792],()=>e(e.s=88060)),_N_E=e.O()}]);

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.