diff --git a/src/app/(dashboard)/[portSlug]/invoices/new/page.tsx b/src/app/(dashboard)/[portSlug]/invoices/new/page.tsx index 605d3b1..3a9d9c0 100644 --- a/src/app/(dashboard)/[portSlug]/invoices/new/page.tsx +++ b/src/app/(dashboard)/[portSlug]/invoices/new/page.tsx @@ -55,7 +55,13 @@ export default function NewInvoicePage() { }, }); - const { register, handleSubmit, watch, setValue, formState: { errors } } = methods; + const { + register, + handleSubmit, + watch, + setValue, + formState: { errors }, + } = methods; const watchedValues = watch(); const lineItems = watchedValues.lineItems ?? []; @@ -87,7 +93,7 @@ export default function NewInvoicePage() { async function goNext() { if (step === 1) { const valid = await methods.trigger([ - 'clientName', + 'billingEntity', 'billingEmail', 'billingAddress', 'dueDate', @@ -112,11 +118,7 @@ export default function NewInvoicePage() {
{/* Header */}
-

New Invoice

@@ -131,22 +133,16 @@ export default function NewInvoicePage() { step > s.id ? 'bg-primary text-primary-foreground' : step === s.id - ? 'bg-primary text-primary-foreground' - : 'bg-muted text-muted-foreground' + ? 'bg-primary text-primary-foreground' + : 'bg-muted text-muted-foreground' }`} > {step > s.id ? : s.id}
- + {s.label} - {idx < STEPS.length - 1 && ( -
- )} + {idx < STEPS.length - 1 &&
}
))}
@@ -161,17 +157,36 @@ export default function NewInvoicePage() {
-
@@ -202,11 +217,7 @@ export default function NewInvoicePage() { - + {errors.dueDate && (

{errors.dueDate.message}

)} @@ -216,7 +227,9 @@ export default function NewInvoicePage() {