feat: add email message field to invoices and update related components

This commit is contained in:
2026-04-28 01:06:45 -04:00
parent 4108019eab
commit 915ec103fc
16 changed files with 361 additions and 356 deletions
+3
View File
@@ -94,6 +94,7 @@ const InvoiceBackupSchema = z.object({
totalAmount: z.number().default(0),
taxRate: z.number().default(0),
notes: z.string().optional(),
emailMessage: z.string().optional(),
items: z.array(InvoiceItemBackupSchema),
});
@@ -562,6 +563,7 @@ export const settingsRouter = createTRPCRouter({
totalAmount: invoice.totalAmount,
taxRate: invoice.taxRate,
notes: invoice.notes ?? undefined,
emailMessage: invoice.emailMessage ?? undefined,
items: invoice.items,
})),
};
@@ -641,6 +643,7 @@ export const settingsRouter = createTRPCRouter({
totalAmount: invoiceData.totalAmount,
taxRate: invoiceData.taxRate,
notes: invoiceData.notes,
emailMessage: invoiceData.emailMessage,
createdById: userId,
})
.returning({ id: invoices.id });