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() {
{errors.clientName.message}
+ {errors.billingEntity.message ?? + errors.billingEntity.id?.message ?? + errors.billingEntity.type?.message} +
+ Picker UI is coming in Task 10.2 — for now paste the client or company ID. +
{errors.dueDate.message}
{watchedValues.clientName}
+ {watchedValues.billingEntity?.type}: {watchedValues.billingEntity?.id} +
- {watchedValues.paymentTerms} -
{watchedValues.paymentTerms}