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

@@ -1,10 +1,22 @@
import { apiConfig } from "./api-config";
type NotificationProp = {
fcmToken: string;
title: string;
body: Object;
userLoginId?: string;
body: string;
userLoginId: string;
appId?: string;
status?: string;
type?: "announcement" | "trigger";
deepLink?: string;
kategoriApp?:
| "JOB"
| "VOTING"
| "EVENT"
| "DONASI"
| "INVESTASI"
| "COLLABORATION"
| "FORUM"
| "ACCESS"; // Untuk trigger akses user;
};
export async function apiNotificationsSend({
@@ -44,11 +56,13 @@ export async function apiGetNotificationsById({
}
}
export async function apiNotificationUnreadCount({ id }: { id: string }) {
export async function apiNotificationUnreadCount({ id, role }: { id: string, role: "user" | "admin" }) {
try {
const response = await apiConfig.get(
`/mobile/notification/${id}/unread-count`
`/mobile/notification/${id}/unread-count?role=${role}`
);
console.log("Response Unread Count", response.data);
return response.data;
} catch (error) {
throw error;