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,14 +1,17 @@
// components/HeaderBell.tsx
import { MainColor } from "@/constants/color-palet";
import { useAuth } from "@/hooks/use-auth";
import { useNotificationStore } from "@/hooks/use-notification-store";
import { Ionicons } from "@expo/vector-icons";
import { router } from "expo-router";
import { useEffect } from "react";
import { Text, View } from "react-native";
export default function HeaderBell() {
const { notifications , unreadCount} = useNotificationStore();
// console.log("NOTIF:", JSON.stringify(notifications, null, 2));
const { unreadCount } = useNotificationStore();
const { user } = useAuth();
const pathDetector =
user?.masterUserRoleId === "1" ? "/notifications" : "/admin/notification";
return (
<View style={{ position: "relative" }}>
@@ -17,7 +20,7 @@ export default function HeaderBell() {
size={20}
color={MainColor.yellow}
onPress={() => {
router.push("/notifications");
router.push(pathDetector);
}}
/>
{unreadCount > 0 && (