feat(07-unified-service-catalog): rewire /admin/catalog CRUD + query layer to services table
- Task 1: Update getAllServices() and activeServices queries to read from services table instead of service_catalog - Both ClientFullDetail and ProjectFullDetail now return Service[] (not ServiceCatalog[]) - Quote items label join remains unchanged — still references service_catalog for historical quote_items.service_id FK integrity - Task 2: Rewire /admin/catalog actions and components to operate on services table - src/app/admin/catalog/actions.ts: createService/updateService/toggleServiceActive now write to services with optional category field - ServiceTable.tsx: Updated to Service[] type, added category column rendering - ServiceForm.tsx: Added optional category input field - QuoteTab.tsx: Updated activeServices type annotation to Service[] - New services created via /admin/catalog have migrated_from=null, migrated_id=null (not migrated) - TypeScript compiles successfully - npm run build: PASS Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,12 +11,12 @@ import {
|
||||
updateAcceptedTotal,
|
||||
} from "@/app/admin/clients/[id]/quote-actions";
|
||||
import type { QuoteItemWithLabel } from "@/lib/admin-queries";
|
||||
import type { ServiceCatalog } from "@/db/schema";
|
||||
import type { Service } from "@/db/schema";
|
||||
|
||||
type Props = {
|
||||
clientId: string;
|
||||
items: QuoteItemWithLabel[];
|
||||
activeServices: ServiceCatalog[];
|
||||
activeServices: Service[];
|
||||
acceptedTotal: string;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user