-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.ts
More file actions
262 lines (250 loc) · 9.02 KB
/
constants.ts
File metadata and controls
262 lines (250 loc) · 9.02 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
import { Carrier, Shipment, ShipmentStatus, SourceChannel, Transaction, TransactionStatus, TransactionType, SystemUser, Customer, SupportTicket, Invoice } from './types';
export const MOCK_SHIPMENTS: Shipment[] = [
{
id: 'SH-001',
trackingNumber: 'OTO-1001',
carrierTracking: 'ARX-998877',
carrier: Carrier.ARAMEX,
status: ShipmentStatus.DELIVERED,
customerName: 'Ahmed Al-Fahad',
destination: 'Riyadh',
cost: 25,
price: 35,
source: SourceChannel.WHATSAPP,
date: '2023-10-25',
},
{
id: 'SH-002',
trackingNumber: 'OTO-1002',
carrierTracking: 'SMS-223344',
carrier: Carrier.SMSA,
status: ShipmentStatus.IN_TRANSIT,
customerName: 'Sarah Khalid',
destination: 'Jeddah',
cost: 22,
price: 32,
source: SourceChannel.STORE,
date: '2023-10-26',
},
{
id: 'SH-003',
trackingNumber: 'OTO-1003',
carrierTracking: 'DHL-556677',
carrier: Carrier.DHL,
status: ShipmentStatus.CREATED,
customerName: 'Omar Bin Saleh',
destination: 'Dammam',
cost: 45,
price: 60,
source: SourceChannel.API,
date: '2023-10-27',
},
{
id: 'SH-004',
trackingNumber: 'OTO-1004',
carrierTracking: 'SPL-112233',
carrier: Carrier.SPL,
status: ShipmentStatus.PICKED_UP,
customerName: 'Fatima Al-Otaibi',
destination: 'Abha',
cost: 20,
price: 30,
source: SourceChannel.TELEGRAM,
date: '2023-10-27',
},
{
id: 'SH-005',
trackingNumber: 'OTO-1005',
carrierTracking: 'ARX-112299',
carrier: Carrier.ARAMEX,
status: ShipmentStatus.EXCEPTION,
customerName: 'Khalid Al-Malki',
destination: 'Tabuk',
cost: 28,
price: 38,
source: SourceChannel.LANDING,
date: '2023-10-24',
},
{
id: 'SH-006',
trackingNumber: 'OTO-1006',
carrierTracking: 'OTO-LOG-8822',
carrier: Carrier.OTO,
status: ShipmentStatus.IN_TRANSIT,
customerName: 'Mona Al-Shehri',
destination: 'Mecca',
cost: 18,
price: 28,
source: SourceChannel.WHATSAPP,
date: '2023-10-28',
},
{
id: 'SH-007',
trackingNumber: 'OTO-1007',
carrierTracking: 'MAPT-Express-001',
carrier: Carrier.MAPT,
status: ShipmentStatus.DELIVERED,
customerName: 'Faisal Al-Saud',
destination: 'Riyadh',
cost: 30,
price: 45,
source: SourceChannel.STORE,
date: '2023-10-28',
},
{
id: 'SH-008',
trackingNumber: 'OTO-1008',
carrierTracking: 'OTO-LOG-9911',
carrier: Carrier.OTO,
status: ShipmentStatus.CREATED,
customerName: 'Laila Mahmoud',
destination: 'Jazan',
cost: 22,
price: 35,
source: SourceChannel.API,
date: '2023-10-29',
}
];
export const MOCK_TRANSACTIONS: Transaction[] = [
{ id: 'TRX-991', type: TransactionType.DEBIT, amount: 28.75, currency: 'SAR', description: 'Shipment Created (OTO-1006)', date: '2023-10-28 10:30', status: TransactionStatus.COMPLETED, referenceId: 'SH-006' },
{ id: 'TRX-992', type: TransactionType.CREDIT, amount: 1500.00, currency: 'SAR', description: 'Wallet Top-up via Moyasar', date: '2023-10-27 09:15', status: TransactionStatus.COMPLETED },
{ id: 'TRX-993', type: TransactionType.DEBIT, amount: 35.00, currency: 'SAR', description: 'Shipment Created (OTO-1008)', date: '2023-10-29 14:20', status: TransactionStatus.PENDING, referenceId: 'SH-008' },
{ id: 'TRX-994', type: TransactionType.CREDIT, amount: 45.00, currency: 'SAR', description: 'Refund: Shipment Cancelled (OTO-1009)', date: '2023-10-26 11:00', status: TransactionStatus.COMPLETED },
{ id: 'TRX-995', type: TransactionType.FEE, amount: 5.00, currency: 'SAR', description: 'Monthly Subscription Fee', date: '2023-10-01 00:00', status: TransactionStatus.COMPLETED },
];
export const MOCK_USERS: SystemUser[] = [
{ id: 'U-1', name: 'Admin User', email: 'admin@logisa.com', role: 'Admin', status: 'Active', lastLogin: '2023-10-30 10:00' },
{ id: 'U-2', name: 'Sara Support', email: 'sara@logisa.com', role: 'Support', status: 'Active', lastLogin: '2023-10-30 09:30' },
{ id: 'U-3', name: 'Khalid Ops', email: 'khalid@logisa.com', role: 'Supervisor', status: 'Inactive', lastLogin: '2023-10-25 14:00' },
];
// --- New Mock Data for CRM, Support, Accounting ---
export const MOCK_CUSTOMERS: Customer[] = [
{ id: 'C-001', name: 'Ahmed Al-Fahad', email: 'ahmed@example.com', phone: '+966500000001', city: 'Riyadh', totalSpent: 1250, orderCount: 15, lastOrderDate: '2023-10-25', status: 'Active' },
{ id: 'C-002', name: 'Sarah Khalid', email: 'sarah@example.com', phone: '+966500000002', city: 'Jeddah', totalSpent: 3400, orderCount: 42, lastOrderDate: '2023-10-26', status: 'Active' },
{ id: 'C-003', name: 'Omar Bin Saleh', email: 'omar@example.com', phone: '+966500000003', city: 'Dammam', totalSpent: 450, orderCount: 5, lastOrderDate: '2023-10-20', status: 'Inactive' },
{ id: 'C-004', name: 'Mona Al-Shehri', email: 'mona@example.com', phone: '+966500000004', city: 'Mecca', totalSpent: 890, orderCount: 12, lastOrderDate: '2023-10-28', status: 'Active' },
];
export const MOCK_TICKETS: SupportTicket[] = [
{ id: 'T-1001', subject: 'Delayed Shipment #SH-005', customer: 'Khalid Al-Malki', status: 'Open', priority: 'High', date: '2023-10-28' },
{ id: 'T-1002', subject: 'Refund Request', customer: 'Omar Bin Saleh', status: 'Resolved', priority: 'Medium', date: '2023-10-25' },
{ id: 'T-1003', subject: 'Address Change', customer: 'Sarah Khalid', status: 'In Progress', priority: 'Low', date: '2023-10-29' },
];
export const MOCK_INVOICES: Invoice[] = [
{ id: 'INV-2023-001', customerName: 'Al-Nour Trading Est.', amount: 5400.00, date: '2023-10-01', status: 'Paid', items: 'Logistics Services - Sep 2023' },
{ id: 'INV-2023-002', customerName: 'Modern Solutions Co.', amount: 2150.50, date: '2023-10-05', status: 'Unpaid', items: 'Express Shipping Bulk' },
{ id: 'INV-2023-003', customerName: 'Green Valley', amount: 980.00, date: '2023-10-15', status: 'Paid', items: 'International Freight' },
];
export const NAV_ITEMS = [
{ name: 'Dashboard', nameAr: 'لوحة التحكم', path: '/' },
{ name: 'Shipments', nameAr: 'الشحنات', path: '/shipments' },
{ name: 'Tracking', nameAr: 'تتبع الشحنات', path: '/tracking' }, // New
{ name: 'CRM', nameAr: 'إدارة العملاء', path: '/crm' }, // New
{ name: 'Finance', nameAr: 'المالية', path: '/finance' },
{ name: 'Accounting', nameAr: 'المحاسبة', path: '/accounting' }, // New
{ name: 'Integrations', nameAr: 'التكاملات والربط', path: '/integrations' },
{ name: 'Support', nameAr: 'الدعم الفني', path: '/support' }, // New
{ name: 'Warehouse', nameAr: 'المستودعات', path: '/warehouse' }, // New
{ name: 'AI Advisor', nameAr: 'المستشار الذكي', path: '/advisor' },
{ name: 'Settings', nameAr: 'الإعدادات', path: '/settings' },
];
export const MOCK_WAREHOUSES: Warehouse[] = [
{
id: "W-001",
name: "مستودع الرياض الرئيسي",
city: "Riyadh",
address: "طريق الملك فهد، الرياض",
manager: "أحمد محمد",
phone: "+966500000001",
status: "active",
capacity: 10000,
currentStock: 7500,
},
{
id: "W-002",
name: "مستودع جدة",
city: "Jeddah",
address: "شارع المكة، جدة",
manager: "سارة علي",
phone: "+966500000002",
status: "active",
capacity: 5000,
currentStock: 3200,
},
{
id: "W-003",
name: "مستودع الدمام",
city: "Dammam",
address: "طريق الظهران، الدمام",
manager: "خالد عبدالله",
phone: "+966500000003",
status: "active",
capacity: 8000,
currentStock: 2500,
},
]
export const MOCK_INVENTORY_ITEMS: InventoryItem[] = [
{
id: "I-001",
warehouseId: "W-001",
sku: "SKU-001",
name: "صناديق الشحن الصغيرة",
quantity: 500,
minThreshold: 100,
maxThreshold: 1000,
unitPrice: 2.5,
lastUpdated: "2023-10-30",
},
{
id: "I-002",
warehouseId: "W-001",
sku: "SKU-002",
name: "أشرطة الشحن",
quantity: 45,
minThreshold: 200,
maxThreshold: 500,
unitPrice: 0.5,
lastUpdated: "2023-10-30",
},
{
id: "I-003",
warehouseId: "W-002",
sku: "SKU-003",
name: "فقاعات الحماية",
quantity: 3000,
minThreshold: 500,
maxThreshold: 5000,
unitPrice: 1.0,
lastUpdated: "2023-10-30",
},
{
id: "I-004",
warehouseId: "W-003",
sku: "SKU-004",
name: "أكياس حماية",
quantity: 2500,
minThreshold: 300,
maxThreshold: 3000,
unitPrice: 0.8,
lastUpdated: "2023-10-30",
},
]
export const MOCK_WAREHOUSE_ALERTS: WarehouseAlert[] = [
{
id: "A-001",
warehouseId: "W-001",
itemId: "I-002",
alertType: "low_stock",
message: "مستوى أشرطة الشحن منخفض جداً (45 من 200)",
severity: "high",
resolved: false,
},
{
id: "A-002",
warehouseId: "W-002",
itemId: "I-003",
alertType: "high_stock",
message: "مستوى فقاعات الحماية مرتفع جداً",
severity: "low",
resolved: false,
},
]