Add repair list filters, template management page, and backend filter support
Repairs list now has a filter panel with status (defaults to active only), condition, batch/individual toggle, and date range filters for intake and promised dates. Added Batch column to the repairs table. Backend list endpoint accepts filter query params for status, condition, dates, and batch membership. Template management page (admin only) with CRUD for common repair services (rehair, string change, etc.) with instrument type, size, and default pricing. Sidebar updated with Repair Templates link gated on repairs.admin permission.
This commit is contained in:
@@ -22,6 +22,7 @@ import { Route as AuthenticatedMembersIndexRouteImport } from './routes/_authent
|
||||
import { Route as AuthenticatedAccountsIndexRouteImport } from './routes/_authenticated/accounts/index'
|
||||
import { Route as AuthenticatedRolesNewRouteImport } from './routes/_authenticated/roles/new'
|
||||
import { Route as AuthenticatedRolesRoleIdRouteImport } from './routes/_authenticated/roles/$roleId'
|
||||
import { Route as AuthenticatedRepairsTemplatesRouteImport } from './routes/_authenticated/repairs/templates'
|
||||
import { Route as AuthenticatedRepairsNewRouteImport } from './routes/_authenticated/repairs/new'
|
||||
import { Route as AuthenticatedRepairsTicketIdRouteImport } from './routes/_authenticated/repairs/$ticketId'
|
||||
import { Route as AuthenticatedRepairBatchesNewRouteImport } from './routes/_authenticated/repair-batches/new'
|
||||
@@ -104,6 +105,12 @@ const AuthenticatedRolesRoleIdRoute =
|
||||
path: '/roles/$roleId',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
const AuthenticatedRepairsTemplatesRoute =
|
||||
AuthenticatedRepairsTemplatesRouteImport.update({
|
||||
id: '/repairs/templates',
|
||||
path: '/repairs/templates',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
const AuthenticatedRepairsNewRoute = AuthenticatedRepairsNewRouteImport.update({
|
||||
id: '/repairs/new',
|
||||
path: '/repairs/new',
|
||||
@@ -189,6 +196,7 @@ export interface FileRoutesByFullPath {
|
||||
'/repair-batches/new': typeof AuthenticatedRepairBatchesNewRoute
|
||||
'/repairs/$ticketId': typeof AuthenticatedRepairsTicketIdRoute
|
||||
'/repairs/new': typeof AuthenticatedRepairsNewRoute
|
||||
'/repairs/templates': typeof AuthenticatedRepairsTemplatesRoute
|
||||
'/roles/$roleId': typeof AuthenticatedRolesRoleIdRoute
|
||||
'/roles/new': typeof AuthenticatedRolesNewRoute
|
||||
'/accounts/': typeof AuthenticatedAccountsIndexRoute
|
||||
@@ -214,6 +222,7 @@ export interface FileRoutesByTo {
|
||||
'/repair-batches/new': typeof AuthenticatedRepairBatchesNewRoute
|
||||
'/repairs/$ticketId': typeof AuthenticatedRepairsTicketIdRoute
|
||||
'/repairs/new': typeof AuthenticatedRepairsNewRoute
|
||||
'/repairs/templates': typeof AuthenticatedRepairsTemplatesRoute
|
||||
'/roles/$roleId': typeof AuthenticatedRolesRoleIdRoute
|
||||
'/roles/new': typeof AuthenticatedRolesNewRoute
|
||||
'/accounts': typeof AuthenticatedAccountsIndexRoute
|
||||
@@ -242,6 +251,7 @@ export interface FileRoutesById {
|
||||
'/_authenticated/repair-batches/new': typeof AuthenticatedRepairBatchesNewRoute
|
||||
'/_authenticated/repairs/$ticketId': typeof AuthenticatedRepairsTicketIdRoute
|
||||
'/_authenticated/repairs/new': typeof AuthenticatedRepairsNewRoute
|
||||
'/_authenticated/repairs/templates': typeof AuthenticatedRepairsTemplatesRoute
|
||||
'/_authenticated/roles/$roleId': typeof AuthenticatedRolesRoleIdRoute
|
||||
'/_authenticated/roles/new': typeof AuthenticatedRolesNewRoute
|
||||
'/_authenticated/accounts/': typeof AuthenticatedAccountsIndexRoute
|
||||
@@ -270,6 +280,7 @@ export interface FileRouteTypes {
|
||||
| '/repair-batches/new'
|
||||
| '/repairs/$ticketId'
|
||||
| '/repairs/new'
|
||||
| '/repairs/templates'
|
||||
| '/roles/$roleId'
|
||||
| '/roles/new'
|
||||
| '/accounts/'
|
||||
@@ -295,6 +306,7 @@ export interface FileRouteTypes {
|
||||
| '/repair-batches/new'
|
||||
| '/repairs/$ticketId'
|
||||
| '/repairs/new'
|
||||
| '/repairs/templates'
|
||||
| '/roles/$roleId'
|
||||
| '/roles/new'
|
||||
| '/accounts'
|
||||
@@ -322,6 +334,7 @@ export interface FileRouteTypes {
|
||||
| '/_authenticated/repair-batches/new'
|
||||
| '/_authenticated/repairs/$ticketId'
|
||||
| '/_authenticated/repairs/new'
|
||||
| '/_authenticated/repairs/templates'
|
||||
| '/_authenticated/roles/$roleId'
|
||||
| '/_authenticated/roles/new'
|
||||
| '/_authenticated/accounts/'
|
||||
@@ -434,6 +447,13 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof AuthenticatedRolesRoleIdRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
'/_authenticated/repairs/templates': {
|
||||
id: '/_authenticated/repairs/templates'
|
||||
path: '/repairs/templates'
|
||||
fullPath: '/repairs/templates'
|
||||
preLoaderRoute: typeof AuthenticatedRepairsTemplatesRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
'/_authenticated/repairs/new': {
|
||||
id: '/_authenticated/repairs/new'
|
||||
path: '/repairs/new'
|
||||
@@ -560,6 +580,7 @@ interface AuthenticatedRouteChildren {
|
||||
AuthenticatedRepairBatchesNewRoute: typeof AuthenticatedRepairBatchesNewRoute
|
||||
AuthenticatedRepairsTicketIdRoute: typeof AuthenticatedRepairsTicketIdRoute
|
||||
AuthenticatedRepairsNewRoute: typeof AuthenticatedRepairsNewRoute
|
||||
AuthenticatedRepairsTemplatesRoute: typeof AuthenticatedRepairsTemplatesRoute
|
||||
AuthenticatedRolesRoleIdRoute: typeof AuthenticatedRolesRoleIdRoute
|
||||
AuthenticatedRolesNewRoute: typeof AuthenticatedRolesNewRoute
|
||||
AuthenticatedAccountsIndexRoute: typeof AuthenticatedAccountsIndexRoute
|
||||
@@ -583,6 +604,7 @@ const AuthenticatedRouteChildren: AuthenticatedRouteChildren = {
|
||||
AuthenticatedRepairBatchesNewRoute: AuthenticatedRepairBatchesNewRoute,
|
||||
AuthenticatedRepairsTicketIdRoute: AuthenticatedRepairsTicketIdRoute,
|
||||
AuthenticatedRepairsNewRoute: AuthenticatedRepairsNewRoute,
|
||||
AuthenticatedRepairsTemplatesRoute: AuthenticatedRepairsTemplatesRoute,
|
||||
AuthenticatedRolesRoleIdRoute: AuthenticatedRolesRoleIdRoute,
|
||||
AuthenticatedRolesNewRoute: AuthenticatedRolesNewRoute,
|
||||
AuthenticatedAccountsIndexRoute: AuthenticatedAccountsIndexRoute,
|
||||
|
||||
Reference in New Issue
Block a user