feat(customers): implement customer management page with mock data

- Created CustomersPage component to display a list of companies with search and pagination features.
- Added mock data for companies, including various statuses and profiles.
- Implemented a service layer to simulate API calls for fetching company data, bookings, documents, and payments.
- Defined TypeScript types for company and related entities to ensure type safety.
- Integrated Mantine components for UI consistency and improved user experience.
This commit is contained in:
Nathnael
2026-06-22 12:32:52 +00:00
parent d66ccc5363
commit c6bc636495
12 changed files with 2124 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
import type { BookingListFilter } from "@/services/bookings.service";
import type { CompanyListFilter } from "@/types/customer";
import type { RuleEngineListParams } from "@/services/ruleEngine/ruleEngine.service";
import type { TrainScheduleFilters } from "@/types/trainScheduling";
import type { FleetResourceSlug } from "@/pages/fleet/config/resources";
@@ -26,8 +27,12 @@ export const QUERY_KEYS = {
CUSTOMERS: {
ROOT: ["customers"] as const,
list: () => ["customers", "list"] as const,
list: (filter?: CompanyListFilter) =>
["customers", "list", filter ?? {}] as const,
byId: (id: string) => ["customers", "detail", id] as const,
bookings: (id: string) => ["customers", "detail", id, "bookings"] as const,
documents: (id: string) => ["customers", "detail", id, "documents"] as const,
payments: (id: string) => ["customers", "detail", id, "payments"] as const,
},
BOOKINGS: {