Fix notifikasi system

Add:
- screens/Admin/AdminNotificationBell.tsx

Fix:
- app.config.js
- app/(application)/(user)/home.tsx
- app/(application)/(user)/test-notifications.tsx
- app/(application)/admin/_layout.tsx
- app/_layout.tsx
- components/Notification/NotificationInitializer.tsx
- context/AuthContext.tsx
- hooks/use-notification-store.tsx
- ios/HIPMIBadungConnect/Info.plist
- screens/Home/HeaderBell.tsx
- service/api-device-token.ts
- service/api-notifications.ts

### No Issue
This commit is contained in:
2025-12-23 17:45:30 +08:00
parent 1503707eed
commit 54611ef812
13 changed files with 103 additions and 44 deletions

View File

@@ -70,6 +70,7 @@ export const NotificationProvider = ({ children }: { children: ReactNode }) => {
try {
const count = await apiNotificationUnreadCount({
id: user?.id as any,
role: user?.masterUserRoleId as any
}); // ← harus return number
const result = count.data;
console.log("📖 Unread count:", result);
@@ -105,8 +106,10 @@ export const NotificationProvider = ({ children }: { children: ReactNode }) => {
try {
const count = await apiNotificationUnreadCount({
id: user?.id as any,
role: user?.masterUserRoleId as any,
}); // ← harus return number
const result = count.data;
console.log("📖 Unread count sync:", result);
setUnreadCount(result);
} catch (error) {
console.warn("⚠️ Gagal sync unread count:", error);