diff --git a/src/app/admin/notifications/page.tsx b/src/app/admin/notifications/page.tsx index 2750fbb..85d06d6 100644 --- a/src/app/admin/notifications/page.tsx +++ b/src/app/admin/notifications/page.tsx @@ -11,7 +11,7 @@ import toast from 'react-hot-toast'; interface Notification { id: string; - category: 'kyc' | 'rental' | 'maintenance' | 'swap_station' | 'investor' | 'system'; + category: 'kyc' | 'rental' | 'maintenance' | 'swap_station' | 'investor' | 'system' | 'withdraw'; priority: 'low' | 'medium' | 'high' | 'critical'; title: string; message: string; @@ -51,7 +51,7 @@ const mockUsersList = [ const initialNotifications: Notification[] = [ { id: 'notif-inv-002', - category: 'investor', + category: 'withdraw', priority: 'high', title: 'New Withdrawal Request', message: 'Investor Md. Hasan Mahmud (inv1) submitted a withdrawal request of ৳15,000 to bank account Islami Bank Bangladesh Ltd.', @@ -232,15 +232,15 @@ export default function AdminNotificationsPage() { const [notifications, setNotifications] = useState([]); const [broadcasts, setBroadcasts] = useState([]); const [selectedTemplateId, setSelectedTemplateId] = useState(''); - + // Tabs: 'inbox' (System Events) vs 'outbox' (Admin Messaging logs) const [activeTab, setActiveTab] = useState<'inbox' | 'outbox'>('inbox'); - + // Filters const [filter, setFilter] = useState('all'); const [categoryFilter, setCategoryFilter] = useState('all'); const [searchQuery, setSearchQuery] = useState(''); - + // Dialog/Modals State const [selectedNotif, setSelectedNotif] = useState(null); const [selectedBroadcast, setSelectedBroadcast] = useState(null); @@ -627,7 +627,7 @@ export default function AdminNotificationsPage() { > Compose Broadcast - + @@ -723,12 +721,12 @@ export default function AdminNotificationsPage() { {/* Main Grid Layout */}
- + {/* Desktop Sidebar Filters: Kept for Desktop views */} -
+

Filter Inbox

- + {activeTab === 'inbox' && (
{[ @@ -738,9 +736,8 @@ export default function AdminNotificationsPage() {
- +
@@ -1146,9 +1137,8 @@ export default function AdminNotificationsPage() { isSelected ? prev.filter(id => id !== usr.id) : [...prev, usr.id] ); }} - className={`flex items-center justify-between p-2 text-xs cursor-pointer hover:bg-slate-50 transition-colors ${ - isSelected ? 'bg-accent/5' : '' - }`} + className={`flex items-center justify-between p-2 text-xs cursor-pointer hover:bg-slate-50 transition-colors ${isSelected ? 'bg-accent/5' : '' + }`} >
@@ -1162,7 +1152,7 @@ export default function AdminNotificationsPage() { {}} // toggled by parent div onClick + onChange={() => { }} // toggled by parent div onClick className="w-3.5 h-3.5 accent-accent" />
@@ -1251,7 +1241,7 @@ export default function AdminNotificationsPage() { /> Schedule for later - + {composeIsScheduled && (
@@ -1331,7 +1321,7 @@ export default function AdminNotificationsPage() {
- +
{getCategoryBadge(selectedNotif.category)} @@ -1408,9 +1398,9 @@ export default function AdminNotificationsPage() {
- +
- +
Dispatched Announcement @@ -1481,7 +1471,7 @@ export default function AdminNotificationsPage() {

Simulate real-time external events to verify database pipelines, toaster notifications, and dashboard stats.

- +
{[ { id: 'kyc', label: 'Simulate Biker KYC Upload', desc: 'Adds walker-in application event', color: 'text-blue-400' },