feat(repairs): add repair management foundation
This commit is contained in:
parent
22e54f212c
commit
e9ec207617
37 changed files with 2149 additions and 7 deletions
|
|
@ -15,6 +15,7 @@ export interface DashboardSummary {
|
|||
latest_customers: Customer[];
|
||||
users: MetricCard[];
|
||||
roles: MetricCard[];
|
||||
repairs: MetricCard[];
|
||||
activities: EmptyWidget;
|
||||
tasks: EmptyWidget;
|
||||
tickets: EmptyWidget;
|
||||
|
|
|
|||
89
frontend/athena/types/repair.ts
Normal file
89
frontend/athena/types/repair.ts
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
export type RepairStatus =
|
||||
| "new"
|
||||
| "accepted"
|
||||
| "diagnosis"
|
||||
| "estimate"
|
||||
| "waiting_for_customer"
|
||||
| "approved"
|
||||
| "repair"
|
||||
| "final_test"
|
||||
| "ready_for_pickup"
|
||||
| "shipped"
|
||||
| "completed"
|
||||
| "cancelled";
|
||||
|
||||
export type RepairPriority = "low" | "normal" | "high" | "urgent";
|
||||
export type RepairSource = "manual" | "website" | "customer_portal" | "email" | "phone";
|
||||
|
||||
export interface Repair {
|
||||
id: number;
|
||||
repair_number: string;
|
||||
customer_id: number | null;
|
||||
contact_id: number | null;
|
||||
status: RepairStatus;
|
||||
priority: RepairPriority;
|
||||
source: RepairSource;
|
||||
source_reference: string | null;
|
||||
customer_name: string;
|
||||
customer_email: string;
|
||||
customer_phone: string;
|
||||
device_manufacturer: string;
|
||||
device_model: string;
|
||||
device_serial_number: string | null;
|
||||
device_type: string;
|
||||
accessories: string;
|
||||
fault_description: string;
|
||||
previous_work: string;
|
||||
device_opened: boolean;
|
||||
intake_notes: string;
|
||||
diagnosis_notes: string;
|
||||
repair_notes: string;
|
||||
estimate_notes: string;
|
||||
estimated_cost_cents: number | null;
|
||||
approved_at: string | null;
|
||||
completed_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface RepairPayload {
|
||||
customer_id: number | null;
|
||||
contact_id: number | null;
|
||||
status: RepairStatus;
|
||||
priority: RepairPriority;
|
||||
source: RepairSource;
|
||||
source_reference: string | null;
|
||||
customer_name: string;
|
||||
customer_email: string | null;
|
||||
customer_phone: string;
|
||||
device_manufacturer: string;
|
||||
device_model: string;
|
||||
device_serial_number: string | null;
|
||||
device_type: string;
|
||||
accessories: string;
|
||||
fault_description: string;
|
||||
previous_work: string;
|
||||
device_opened: boolean;
|
||||
intake_notes: string;
|
||||
diagnosis_notes: string;
|
||||
repair_notes: string;
|
||||
estimate_notes: string;
|
||||
estimated_cost_cents: number | null;
|
||||
}
|
||||
|
||||
export interface RepairListResponse {
|
||||
items: Repair[];
|
||||
total: number;
|
||||
limit: number;
|
||||
offset: number;
|
||||
}
|
||||
|
||||
export interface RepairStatusHistory {
|
||||
id: number;
|
||||
repair_id: number;
|
||||
old_status: string | null;
|
||||
new_status: RepairStatus;
|
||||
note: string | null;
|
||||
actor_user_id: number | null;
|
||||
created_at: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue