Fix all TypeScript errors: restore proper types and typed route casts
- Restore `as any` casts for Next.js typedRoutes on dynamic routes - Use proper types for PDF templates, invoice/expense data, DB schema - Fix PgColumn casts in sort helpers for expenses/invoices - Add null guards for optional port/client in record-export - Fix vitest config (remove invalid poolOptions) - Lint: 0 errors, TypeScript: 0 errors Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,13 +64,13 @@ export function buildInterestSummaryInputs(
|
||||
.join(' | ');
|
||||
|
||||
const milestones = [
|
||||
`First contact: ${formatDate(interest.dateFirstContact)}`,
|
||||
`Last contact: ${formatDate(interest.dateLastContact)}`,
|
||||
`EOI sent: ${formatDate(interest.dateEoiSent)}`,
|
||||
`EOI signed: ${formatDate(interest.dateEoiSigned)}`,
|
||||
`Contract sent: ${formatDate(interest.dateContractSent)}`,
|
||||
`Contract signed: ${formatDate(interest.dateContractSigned)}`,
|
||||
`Deposit received: ${formatDate(interest.dateDepositReceived)}`,
|
||||
`First contact: ${formatDate(interest.dateFirstContact as Date | string | null | undefined)}`,
|
||||
`Last contact: ${formatDate(interest.dateLastContact as Date | string | null | undefined)}`,
|
||||
`EOI sent: ${formatDate(interest.dateEoiSent as Date | string | null | undefined)}`,
|
||||
`EOI signed: ${formatDate(interest.dateEoiSigned as Date | string | null | undefined)}`,
|
||||
`Contract sent: ${formatDate(interest.dateContractSent as Date | string | null | undefined)}`,
|
||||
`Contract signed: ${formatDate(interest.dateContractSigned as Date | string | null | undefined)}`,
|
||||
`Deposit received: ${formatDate(interest.dateDepositReceived as Date | string | null | undefined)}`,
|
||||
].join('\n');
|
||||
|
||||
const notesText = interest.notes
|
||||
@@ -82,13 +82,13 @@ export function buildInterestSummaryInputs(
|
||||
? timeline
|
||||
.map(
|
||||
(e) =>
|
||||
`${formatDate(e.createdAt)} ${e.action ?? e.eventType ?? 'event'} ${e.entityType ?? e.type ?? ''}${e.fieldChanged ? ` [${e.fieldChanged}]` : ''}`,
|
||||
`${formatDate(e.createdAt as Date | string | null | undefined)} ${e.action ?? e.eventType ?? 'event'} ${e.entityType ?? e.type ?? ''}${e.fieldChanged ? ` [${e.fieldChanged}]` : ''}`,
|
||||
)
|
||||
.join('\n')
|
||||
: 'No timeline events';
|
||||
|
||||
return {
|
||||
portName: port?.name ?? 'Port Nimara',
|
||||
portName: (port?.name as string) ?? 'Port Nimara',
|
||||
title: `Interest Summary — ${client?.fullName ?? 'Unknown Client'}`,
|
||||
clientInfo,
|
||||
berthInfo,
|
||||
|
||||
Reference in New Issue
Block a user