Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-22 17:52:23 +00:00
co-authored by renee-png
parent 411e252819
commit 5b094ff5da
2 changed files with 39 additions and 36 deletions
+36 -35
View File
@@ -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<FileRouteTypes>()
import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
declare module '@tanstack/react-start' {
interface Register {
ssr: true
router: Awaited<ReturnType<typeof getRouter>>
}
}
+3 -1
View File
@@ -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() {
<Button variant="outline" onClick={() => navigate({ to: "/invoices/new/$clientId", params: { clientId: client.id } })}>
<Receipt className="h-4 w-4 mr-2" /> Generate invoice
</Button>
<Button variant="outline" onClick={() => navigate({ to: "/clients/$clientId/fees", params: { clientId: client.id } })}>
<DollarSign className="h-4 w-4 mr-2" /> Adjust Fees
</Button>
<Button onClick={() => navigate({ to: "/cases/new", search: { clientId: client.id } })}>
<Plus className="h-4 w-4 mr-2" /> New case
</Button>