mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2026-05-08 09:38:55 -04:00
Refactor invoice data table and templates page for improved readability and functionality
- Cleaned up imports and formatted code for better readability in invoices-data-table.tsx. - Enhanced invoice interface definitions for clarity. - Improved toast messages for bulk delete and update actions. - Refactored date formatting and status type retrieval for better readability. - Simplified template management in templates page, extracting TemplateList component. - Added registration toggle based on environment variable DISABLE_SIGNUPS. - Updated navbar to conditionally render registration link based on allowRegistration prop. - Enhanced error handling and validation in expenses and settings routers. - Improved PDF export footer handling. - Updated TRPC react integration for cleaner type imports.
This commit is contained in:
@@ -58,11 +58,11 @@ export const expensesRouter = createTRPCRouter({
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const clean = {
|
||||
...input,
|
||||
clientId: input.clientId?.trim() || null,
|
||||
businessId: input.businessId?.trim() || null,
|
||||
invoiceId: input.invoiceId?.trim() || null,
|
||||
category: input.category?.trim() || null,
|
||||
notes: input.notes?.trim() || null,
|
||||
clientId: input.clientId?.trim() ?? null,
|
||||
businessId: input.businessId?.trim() ?? null,
|
||||
invoiceId: input.invoiceId?.trim() ?? null,
|
||||
category: input.category?.trim() ?? null,
|
||||
notes: input.notes?.trim() ?? null,
|
||||
};
|
||||
|
||||
if (clean.clientId) {
|
||||
@@ -121,11 +121,11 @@ export const expensesRouter = createTRPCRouter({
|
||||
|
||||
const clean = {
|
||||
...data,
|
||||
clientId: data.clientId?.trim() || null,
|
||||
businessId: data.businessId?.trim() || null,
|
||||
invoiceId: data.invoiceId?.trim() || null,
|
||||
category: data.category?.trim() || null,
|
||||
notes: data.notes?.trim() || null,
|
||||
clientId: data.clientId?.trim() ?? null,
|
||||
businessId: data.businessId?.trim() ?? null,
|
||||
invoiceId: data.invoiceId?.trim() ?? null,
|
||||
category: data.category?.trim() ?? null,
|
||||
notes: data.notes?.trim() ?? null,
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user