diff --git a/client/src/pages/domains.tsx b/client/src/pages/domains.tsx index e0ea3b4..cca5e6d 100644 --- a/client/src/pages/domains.tsx +++ b/client/src/pages/domains.tsx @@ -92,10 +92,14 @@ export default function DomainsPage() { // Add domain mutation const addDomainMutation = useMutation({ mutationFn: async (data: z.infer) => { + if (!currentCustomer?.id) { + throw new Error("No customer selected"); + } + // Prepare domain data with customerId const domainData: InsertDomain = { ...data, - customerId: currentCustomer?.id || "", + customerId: currentCustomer.id, }; // Add special handling for providerId @@ -106,6 +110,7 @@ export default function DomainsPage() { } console.log("Submitting domain with provider:", domainData.providerId); + console.log("Customer ID:", domainData.customerId); const res = await apiRequest("POST", "/api/domains", domainData); return await res.json(); diff --git a/client/src/pages/settings.tsx b/client/src/pages/settings.tsx index 4061d67..0acf4b8 100644 --- a/client/src/pages/settings.tsx +++ b/client/src/pages/settings.tsx @@ -461,17 +461,17 @@ export default function SettingsPage() {
{ - createOrganizationMutation.mutate(data); - createOrganizationForm.reset(); + createCustomerMutation.mutate(data); + createCustomerForm.reset(); })} className="space-y-4" > ( - Customer Name + Customer Name* @@ -481,7 +481,218 @@ export default function SettingsPage() { /> ( + + Description + + + + + A brief description of the customer's business + + + + )} + /> + +
+ ( + + Email + + + + + + )} + /> + + ( + + Phone + + + + + + )} + /> +
+ + ( + + Website + + + + + + )} + /> + + ( + + Industry + + + + + + )} + /> + +
+

Address Information

+
+ ( + + Address + + + + + + )} + /> + + ( + + City + + + + + + )} + /> + + ( + + State/Province + + + + + + )} + /> + + ( + + ZIP/Postal Code + + + + + + )} + /> + + ( + + Country + + + + + + )} + /> +
+
+ +
+

Billing Information

+
+ ( + + Billing Email + + + + + + )} + /> + + ( + + Billing Address + + + + + + )} + /> +
+
+ + ( + + Account Manager + + + + + + )} + /> + + ( + + Notes + +