-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
89 lines (79 loc) · 1.71 KB
/
Copy pathtypes.ts
File metadata and controls
89 lines (79 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
export enum Division {
WORKSHOP = 'Taller',
SPARE_PARTS = 'Repuestera'
}
export type OrderStatus = 'Pendiente' | 'En Revisión' | 'Presupuestado' | 'Aprobado' | 'En Progreso' | 'Terminado' | 'Entregado';
export interface User {
id: string;
name: string;
role: 'Admin' | 'Mecánico' | 'Vendedor';
division?: Division;
}
export interface Distributor {
id: string;
name: string;
contact: string;
phone: string;
category: string;
debt: number;
lastOrderDate: string;
}
export interface Motorcycle {
brand: string;
model: string;
year: number;
plate: string;
mileage?: number;
}
export interface Product {
id: string;
name: string;
sku: string;
price: number;
cost: number;
stock: number;
division: Division;
category: string;
distributorId: string;
isPublished?: boolean;
imageUrl?: string;
description?: string;
createdAt: string;
}
export interface QuoteRequest {
id: string;
clientName: string;
phone: string;
type: Division;
motorcycle: Motorcycle;
description: string;
status: OrderStatus;
date: string;
assignedTo?: string; // Mechanic ID
urgency: 'Normal' | 'Urgente' | 'Emergencia';
}
export interface SaleItem {
productId?: string;
description: string;
quantity: number;
unitPrice: number;
}
export interface Sale {
id: string;
clientId: string;
clientName: string;
items: SaleItem[];
total: number;
method: 'Efectivo' | 'Tarjeta' | 'Transferencia';
date: string;
division: Division;
}
// StockOrder interface added to handle procurement orders in dataStore
export interface StockOrder {
id: string;
distributorId: string;
items: SaleItem[];
total: number;
status: 'Pendiente' | 'Recibido' | 'Cancelado';
date: string;
}