PageSourceSearch

https://admin-snowy-three.vercel.app/assets/edit-WopHBqXl.js

js admin-snowy-three.vercel.app collected 2026-10-03 06:11:12 UTC 2,562 bytes, 1 lines download raw bytes

1import{j as s}from"./vendor-ui-r4iVzRl6.js";import{a as t,B as c,P as p,t as o}from"./index-DrTqwVsL.js";import{C as h,t as g}from"./client-form-ecihaml8.js";import{c as j,d as b}from"./use-clients-DPg42HOk.js";import{A as m}from"./arrow-left-tscW42Lh.js";import{m as y,i as C}from"./vendor-react-BfGFalVa.js";import"./vendor-query-DHLwvY3K.js";import"./vendor-supabase-OAvKDiam.js";import"./vendor-charts-D47kEIWf.js";import"./textarea-CYUWIRDh.js";function L(){const{id:a}=y(),i=C(),{data:e,isLoading:d,error:_}=j(a),l=b(),u=async n=>{if(a)try{const x=g(n);await l.mutateAsync({id:a,data:x}),o({title:"Client updated",description:`${n.first_name} ${n.last_name} has been updated successfully.`}),i(`/clients/${a}`)}catch{o({title:"Error",description:"Failed to update client. Please try again.",variant:"destructive"})}},r=()=>{i(`/clients/${a}`)};if(d)return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(t,{className:"h-10 w-64"}),s.jsx(t,{className:"h-10 w-24"})]}),s.jsx(t,{className:"h-64 w-full max-w-3xl"}),s.jsx(t,{className:"h-48 w-full max-w-3xl"}),s.jsx(t,{className:"h-48 w-full max-w-3xl"})]});if(_||!e)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx("p",{className:"text-destructive mb-4",children:"Client not found"}),s.jsxs(c,{variant:"outline",onClick:()=>i("/clients"),children:[s.jsx(m,{className:"mr-2 h-4 w-4"}),"Back to Clients"]})]});const f={first_name:e.first_name,last_name:e.last_name,email:e.email||"",phone:e.phone||"",secondary_first_name:e.secondary_first_name||"",secondary_last_name:e.secondary_last_name||"",secondary_email:e.secondary_email||"",secondary_phone:e.secondary_phone||"",secondary_relationship:e.secondary_relationship||"",billing_email:e.billing_email||"",billing_address_line1:e.billing_address_line1||"",billing_address_line2:e.billing_address_line2||"",billing_city:e.b
1illing_city||"",billing_state:e.billing_state||"",billing_zip:e.billing_zip||"",source:e.source||"",referral_source:e.referral_source||"",notes:e.notes||"",tags:e.tags||[]};return s.jsxs("div",{children:[s.jsx(p,{title:`Edit ${e.first_name} ${e.last_name}`,description:"Update client information",children:s.jsxs(c,{variant:"outline",onClick:r,children:[s.jsx(m,{className:"mr-2 h-4 w-4"}),"Back to Client"]})}),s.jsx("div",{className:"max-w-3xl",children:s.jsx(h,{defaultValues:f,onSubmit:u,onCancel:r,isSubmitting:l.isPending,submitLabel:"Save Changes"})})]})}export{L as EditClientPage,L 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.