PageSourceSearch

https://nivest.ai/assets/index-LPSyKYfJ.js

js nivest.ai collected 2026-10-05 15:41:09 UTC 3,266 bytes, 1 lines download raw bytes

1import{e as q,a as A,f as F,d as z,g as B,r as s,h as I,j as t,i as R}from"./index-CBsrGlZ8.js";function $(a){return a?a.slice(0,16):""}function H(){const{id:a}=q(),l=A(),[w]=F(),C=w.get("returnTo")??`/advisor/meetings/${a}`,i=z(B),L=i.MeetingType??[],T=i.MeetingPlatform??[],[u,o]=s.useState(""),[d,c]=s.useState(""),[m,p]=s.useState(""),[x,g]=s.useState(""),[h,b]=s.useState(60),[f,j]=s.useState(""),[P,E]=s.useState(!0),[v,y]=s.useState(!1),[N,S]=s.useState(null);s.useEffect(()=>{a&&I(a).then(e=>{o(e.title??""),c($(e.scheduledAt)),p(e.type??""),g(e.platform??""),b(e.durationMinutes??60),j(e.meetingLink??""),E(!1)})},[a]);const D=async e=>{var M,k;e.preventDefault(),S(null),y(!0);try{await R(a,{title:u,scheduledAt:d,type:m,platform:x,durationMinutes:h,meetingLink:f||void 0}),l(C)}catch(r){S(((k=(M=r==null?void 0:r.response)==null?void 0:M.data)==null?void 0:k.title)??"Failed to update meeting.")}finally{y(!1)}};return P?t.jsx("div",{className:"p-6 text-sm text-neutral-500 animate-pulse",children:"Loading…"}):t.jsxs("div",{className:"max-w-lg space-y-5",children:[t.jsx("button",{type:"button",className:"btn-outline text-sm",onClick:()=>l(-1),children:"← Back"}),t.jsx("h2",{className:"text-xl font-semibold text-neutral-900",children:"Edit Meeting"}),t.jsxs("form",{onSubmit:D,className:"rounded-2xl border border-neutral-200 bg-white p-5 shadow-card space-y-4",children:[t.jsx(n,{label:"Title *",children:t.jsx("input",{type:"text",required:!0,value:u,onChange:e=>o(e.target.value),className:"w-full border border-neutral-200 rounded-lg px-3 py-2 text-sm"})}),t.jsx(n,{label:"Date & Time *",children:t.jsx("input",{type:"datetime-local",required:!0,value:d,onChange:e=>c(e.target.value),className:"w-full border border-neutral-200 rounded-lg px-3 py-2 text-sm"})}),t.jsx(n,{label:"Meeting Type *",children:t.jsx("select",{required:!0,value:m,onChange:e=>p(e.target.value),className:"w-full border border-neutral-200 rounded-lg px-3 py-2 text-sm",children:L.map(e=>t.jsx("option",{value:e.name??"",children:e.description??e.name},e.name))})}),t.jsx(n,{label:"Platform *",children:t.jsx("select",{required:!0,value:x,onChange:e=>g(e.target.value),className:"w-full border border-neutral-200 rounded-lg px-3 py-2 text-sm",children:T.map(e=>t.jsx("option",{value:e.name??"",children:e.description??e.name},e.name))})}),t.jsx(n,{label:"Duration (minutes)",children:t.jsx("input",{type:"number",min:15,max:480,value:h,onChange:e=>b(Number(e.target.value)),className:"w-full border border-neutral-200 rounded-lg px-3 py-2 text-sm"})}),t.jsx(n,{label:"Meeting Link",children:t.jsx("input",{type:"url",value:f,onChange:e=>j(e.target.value),className:"w-full border border-neutral-200 rounded-lg px-3 py-2 text-sm",placeholder:"https://zoom.us/j/..."})}),N&&t.jsx("p",{className:"text-sm text-red-500",children:N}),t.jsxs("div",{className:"flex gap-3 pt-2",children:[t.jsx("button",{type:"submit",className:"btn-primary text-sm",disabled:v,children:v?"Saving…":"Save Changes"}),t.jsx("button",{type:"button",className:"btn-outline text-sm",onClick:()=>l(-1),children:"Cancel"})]})]})]})}function n({label:a,children:l}){return t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs text-neutral-500 mb-1",children:a}),l]})}export{H 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.