diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 9699f6b..95b590e 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -46,7 +46,6 @@ import { Route as InvoicesInvoiceIdRouteImport } from './routes/invoices.$invoic import { Route as HooksPollImapRouteImport } from './routes/hooks/poll-imap' import { Route as ContactsContactIdRouteImport } from './routes/contacts.$contactId' import { Route as CollectionsCollectionIdRouteImport } from './routes/collections.$collectionId' -import { Route as ClientsFeesRouteImport } from './routes/clients..fees' import { Route as ClientsClientIdRouteImport } from './routes/clients.$clientId' import { Route as CasesNewRouteImport } from './routes/cases.new' import { Route as CasesCaseIdRouteImport } from './routes/cases.$caseId' @@ -57,6 +56,7 @@ import { Route as InvoicesNewClientIdRouteImport } from './routes/invoices.new.$ import { Route as DocumentsTemplatesNewRouteImport } from './routes/documents.templates.new' import { Route as DocumentsTemplatesTemplateIdRouteImport } from './routes/documents.templates.$templateId' import { Route as DocumentsPleadingNewRouteImport } from './routes/documents.pleading.new' +import { Route as ClientsClientIdFeesRouteImport } from './routes/clients.$clientId.fees' const SetupRoute = SetupRouteImport.update({ id: '/setup', @@ -243,11 +243,6 @@ const CollectionsCollectionIdRoute = CollectionsCollectionIdRouteImport.update({ path: '/collections/$collectionId', getParentRoute: () => rootRouteImport, } as any) -const ClientsFeesRoute = ClientsFeesRouteImport.update({ - id: '/clients/fees', - path: '/clients/fees', - getParentRoute: () => rootRouteImport, -} as any) const ClientsClientIdRoute = ClientsClientIdRouteImport.update({ id: '/clients/$clientId', path: '/clients/$clientId', @@ -299,6 +294,11 @@ const DocumentsPleadingNewRoute = DocumentsPleadingNewRouteImport.update({ path: '/documents/pleading/new', getParentRoute: () => rootRouteImport, } as any) +const ClientsClientIdFeesRoute = ClientsClientIdFeesRouteImport.update({ + id: '/fees', + path: '/fees', + getParentRoute: () => ClientsClientIdRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -309,8 +309,7 @@ export interface FileRoutesByFullPath { '/api/stripe-webhook': typeof ApiStripeWebhookRoute '/cases/$caseId': typeof CasesCaseIdRoute '/cases/new': typeof CasesNewRoute - '/clients/$clientId': typeof ClientsClientIdRoute - '/clients/fees': typeof ClientsFeesRoute + '/clients/$clientId': typeof ClientsClientIdRouteWithChildren '/collections/$collectionId': typeof CollectionsCollectionIdRoute '/contacts/$contactId': typeof ContactsContactIdRoute '/hooks/poll-imap': typeof HooksPollImapRoute @@ -344,6 +343,7 @@ export interface FileRoutesByFullPath { '/settings/': typeof SettingsIndexRoute '/status/': typeof StatusIndexRoute '/tasks/': typeof TasksIndexRoute + '/clients/$clientId/fees': typeof ClientsClientIdFeesRoute '/documents/pleading/new': typeof DocumentsPleadingNewRoute '/documents/templates/$templateId': typeof DocumentsTemplatesTemplateIdRoute '/documents/templates/new': typeof DocumentsTemplatesNewRoute @@ -358,8 +358,7 @@ export interface FileRoutesByTo { '/api/stripe-webhook': typeof ApiStripeWebhookRoute '/cases/$caseId': typeof CasesCaseIdRoute '/cases/new': typeof CasesNewRoute - '/clients/$clientId': typeof ClientsClientIdRoute - '/clients/fees': typeof ClientsFeesRoute + '/clients/$clientId': typeof ClientsClientIdRouteWithChildren '/collections/$collectionId': typeof CollectionsCollectionIdRoute '/contacts/$contactId': typeof ContactsContactIdRoute '/hooks/poll-imap': typeof HooksPollImapRoute @@ -393,6 +392,7 @@ export interface FileRoutesByTo { '/settings': typeof SettingsIndexRoute '/status': typeof StatusIndexRoute '/tasks': typeof TasksIndexRoute + '/clients/$clientId/fees': typeof ClientsClientIdFeesRoute '/documents/pleading/new': typeof DocumentsPleadingNewRoute '/documents/templates/$templateId': typeof DocumentsTemplatesTemplateIdRoute '/documents/templates/new': typeof DocumentsTemplatesNewRoute @@ -409,8 +409,7 @@ export interface FileRoutesById { '/api/stripe-webhook': typeof ApiStripeWebhookRoute '/cases/$caseId': typeof CasesCaseIdRoute '/cases/new': typeof CasesNewRoute - '/clients/$clientId': typeof ClientsClientIdRoute - '/clients/fees': typeof ClientsFeesRoute + '/clients/$clientId': typeof ClientsClientIdRouteWithChildren '/collections/$collectionId': typeof CollectionsCollectionIdRoute '/contacts/$contactId': typeof ContactsContactIdRoute '/hooks/poll-imap': typeof HooksPollImapRoute @@ -444,6 +443,7 @@ export interface FileRoutesById { '/settings/': typeof SettingsIndexRoute '/status/': typeof StatusIndexRoute '/tasks/': typeof TasksIndexRoute + '/clients/$clientId/fees': typeof ClientsClientIdFeesRoute '/documents/pleading/new': typeof DocumentsPleadingNewRoute '/documents/templates/$templateId': typeof DocumentsTemplatesTemplateIdRoute '/documents/templates/new': typeof DocumentsTemplatesNewRoute @@ -462,7 +462,6 @@ export interface FileRouteTypes { | '/cases/$caseId' | '/cases/new' | '/clients/$clientId' - | '/clients/fees' | '/collections/$collectionId' | '/contacts/$contactId' | '/hooks/poll-imap' @@ -496,6 +495,7 @@ export interface FileRouteTypes { | '/settings/' | '/status/' | '/tasks/' + | '/clients/$clientId/fees' | '/documents/pleading/new' | '/documents/templates/$templateId' | '/documents/templates/new' @@ -511,7 +511,6 @@ export interface FileRouteTypes { | '/cases/$caseId' | '/cases/new' | '/clients/$clientId' - | '/clients/fees' | '/collections/$collectionId' | '/contacts/$contactId' | '/hooks/poll-imap' @@ -545,6 +544,7 @@ export interface FileRouteTypes { | '/settings' | '/status' | '/tasks' + | '/clients/$clientId/fees' | '/documents/pleading/new' | '/documents/templates/$templateId' | '/documents/templates/new' @@ -561,7 +561,6 @@ export interface FileRouteTypes { | '/cases/$caseId' | '/cases/new' | '/clients/$clientId' - | '/clients/fees' | '/collections/$collectionId' | '/contacts/$contactId' | '/hooks/poll-imap' @@ -595,6 +594,7 @@ export interface FileRouteTypes { | '/settings/' | '/status/' | '/tasks/' + | '/clients/$clientId/fees' | '/documents/pleading/new' | '/documents/templates/$templateId' | '/documents/templates/new' @@ -611,8 +611,7 @@ export interface RootRouteChildren { ApiStripeWebhookRoute: typeof ApiStripeWebhookRoute CasesCaseIdRoute: typeof CasesCaseIdRoute CasesNewRoute: typeof CasesNewRoute - ClientsClientIdRoute: typeof ClientsClientIdRoute - ClientsFeesRoute: typeof ClientsFeesRoute + ClientsClientIdRoute: typeof ClientsClientIdRouteWithChildren CollectionsCollectionIdRoute: typeof CollectionsCollectionIdRoute ContactsContactIdRoute: typeof ContactsContactIdRoute HooksPollImapRoute: typeof HooksPollImapRoute @@ -902,13 +901,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof CollectionsCollectionIdRouteImport parentRoute: typeof rootRouteImport } - '/clients/fees': { - id: '/clients/fees' - path: '/clients/fees' - fullPath: '/clients/fees' - preLoaderRoute: typeof ClientsFeesRouteImport - parentRoute: typeof rootRouteImport - } '/clients/$clientId': { id: '/clients/$clientId' path: '/clients/$clientId' @@ -979,6 +971,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DocumentsPleadingNewRouteImport parentRoute: typeof rootRouteImport } + '/clients/$clientId/fees': { + id: '/clients/$clientId/fees' + path: '/fees' + fullPath: '/clients/$clientId/fees' + preLoaderRoute: typeof ClientsClientIdFeesRouteImport + parentRoute: typeof ClientsClientIdRoute + } } } @@ -1014,6 +1013,18 @@ const SettingsRouteWithChildren = SettingsRoute._addFileChildren( SettingsRouteChildren, ) +interface ClientsClientIdRouteChildren { + ClientsClientIdFeesRoute: typeof ClientsClientIdFeesRoute +} + +const ClientsClientIdRouteChildren: ClientsClientIdRouteChildren = { + ClientsClientIdFeesRoute: ClientsClientIdFeesRoute, +} + +const ClientsClientIdRouteWithChildren = ClientsClientIdRoute._addFileChildren( + ClientsClientIdRouteChildren, +) + interface InvoicesNewRouteChildren { InvoicesNewClientIdRoute: typeof InvoicesNewClientIdRoute } @@ -1035,8 +1046,7 @@ const rootRouteChildren: RootRouteChildren = { ApiStripeWebhookRoute: ApiStripeWebhookRoute, CasesCaseIdRoute: CasesCaseIdRoute, CasesNewRoute: CasesNewRoute, - ClientsClientIdRoute: ClientsClientIdRoute, - ClientsFeesRoute: ClientsFeesRoute, + ClientsClientIdRoute: ClientsClientIdRouteWithChildren, CollectionsCollectionIdRoute: CollectionsCollectionIdRoute, ContactsContactIdRoute: ContactsContactIdRoute, HooksPollImapRoute: HooksPollImapRoute, @@ -1067,12 +1077,3 @@ const rootRouteChildren: RootRouteChildren = { export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) ._addFileTypes() - -import type { getRouter } from './router.tsx' -import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { - interface Register { - ssr: true - router: Awaited> - } -} diff --git a/src/routes/clients.$clientId.tsx b/src/routes/clients.$clientId.tsx index 298f92d..227cd1a 100644 --- a/src/routes/clients.$clientId.tsx +++ b/src/routes/clients.$clientId.tsx @@ -12,7 +12,6 @@ import { useAuth } from "@/lib/auth"; import { ArrowLeft, Edit, Plus, Building2, User, MapPin, Mail, Phone, Users, Activity, Briefcase, FileDown, Contact, Receipt, Archive, ArchiveRestore, ListPlus, Save, DollarSign } from "lucide-react"; import { ContactsLinkTab } from "@/components/contacts/contacts-link-tab"; import { ClientCustomFieldsTab } from "@/components/clients/client-custom-fields-tab"; -import { AdjustFeesTab } from "@/components/clients/adjust-fees-tab"; import { formatCurrency, formatDate, formatDateTime, statusBadgeClass } from "@/lib/format"; import { toast } from "sonner"; import { downloadStatusReport, saveStatusReportToDb } from "@/lib/status-pdf"; @@ -152,6 +151,9 @@ function ClientDetail() { +