diff --git a/src/app/admin/kyc/page.tsx b/src/app/admin/kyc/page.tsx
index 0e5879b..d01b716 100644
--- a/src/app/admin/kyc/page.tsx
+++ b/src/app/admin/kyc/page.tsx
@@ -98,7 +98,7 @@ interface Request {
appointmentDate?: string;
notes: string[];
- messageHistory: { date: string; message: string; from: 'admin' | 'user' }[];
+ smsHistory: { id: string; message: string; sentAt: string; sentBy: string }[];
}
const mockRequests: Request[] = [
@@ -123,7 +123,7 @@ const mockRequests: Request[] = [
riderPlan: 'daily_rent',
employmentInfo: { company: 'Foodpanda', monthlyEarning: 2500, whyEV: 'Low maintenance, good for delivery', experience: '3 years bike riding' },
notes: ['Downloaded app and applied through mobile'],
- messageHistory: [],
+ smsHistory: [],
},
{
id: 'REQ002',
@@ -143,9 +143,9 @@ const mockRequests: Request[] = [
{ id: 'd6', name: 'TIN Certificate', status: 'pending' },
{ id: 'd7', name: 'Bank Statement', status: 'pending' },
],
- messageHistory: [
- { date: '2024-03-19', message: 'Please upload your TIN certificate and latest bank statement', from: 'admin' },
- { date: '2024-03-19', message: 'I will upload them today', from: 'user' },
+ smsHistory: [
+ { id: 'sms1', message: 'Please upload your TIN certificate and latest bank statement', sentAt: '2024-03-19', sentBy: 'admin' },
+ { id: 'sms2', message: 'I will upload them today', sentAt: '2024-03-19', sentBy: 'user' },
],
notes: ['Walked in at Gulshan office - referred by current biker'],
},
@@ -167,7 +167,7 @@ const mockRequests: Request[] = [
{ id: 'd10', name: 'Shop Photos', status: 'uploaded', uploadedAt: '2024-03-18' },
],
notes: ['Applied through website'],
- messageHistory: [],
+ smsHistory: [],
},
{
id: 'REQ004',
@@ -199,7 +199,7 @@ const mockRequests: Request[] = [
scheduleDate: '2024-03-15',
appointmentDate: '2024-03-15',
notes: ['Approved and active - EV allocated'],
- messageHistory: [],
+ smsHistory: [],
},
{
id: 'REQ005',
@@ -219,8 +219,8 @@ const mockRequests: Request[] = [
{ id: 'd15', name: 'TIN Certificate', status: 'uploaded', uploadedAt: '2024-03-10' },
{ id: 'd16', name: 'Bank Statement', status: 'uploaded', uploadedAt: '2024-03-10' },
],
- messageHistory: [
- { date: '2024-03-10', message: 'Your NID document is not clear. Please re-upload.', from: 'admin' },
+ smsHistory: [
+ { id: 'sms3', message: 'Your NID document is not clear. Please re-upload.', sentAt: '2024-03-10', sentBy: 'admin' },
],
notes: ['NID was unclear/blurry'],
},
@@ -245,7 +245,7 @@ const mockRequests: Request[] = [
nomineeDetails: { name: 'Rashid', phone: '01798765432', relationship: 'Brother', nid: '9876543210987' },
employmentInfo: { company: ' ssl', monthlyEarning: 2000, whyEV: 'Better income than fuel bike', experience: '2 years' },
notes: [],
- messageHistory: [],
+ smsHistory: [],
},
];
@@ -398,9 +398,9 @@ export default function RequestsPage() {
return {
...req,
status: 'documents_needed' as const,
- messageHistory: [
- ...req.messageHistory,
- { date: new Date().toISOString().split('T')[0], message: messageText, from: 'admin' as const }
+ smsHistory: [
+ ...req.smsHistory,
+ { id: `sms-${Date.now()}`, message: messageText, sentAt: new Date().toISOString(), sentBy: 'admin' }
],
notes: [...req.notes, messageText]
};
@@ -630,9 +630,9 @@ export default function RequestsPage() {
-
{msg.message}