Penerapan notifikasi di event

Add:
components/Button/BackButtonFromNotification.tsx
types/type-collect-other.ts

Fix:
- android/app/build.gradle
- app/(application)/(user)/_layout.tsx
- app/(application)/(user)/event/(tabs)/_layout.tsx
- app/(application)/(user)/event/(tabs)/status.tsx
- app/(application)/(user)/event/create.tsx
- app/(application)/(user)/job/(tabs)/_layout.tsx
- app/(application)/(user)/notifications/index.tsx
- app/(application)/admin/event/[id]/[status]/index.tsx
- app/(application)/admin/event/[id]/reject-input.tsx
- app/(application)/admin/notification/index.tsx
- components/Notification/NotificationInitializer.tsx
- hipmi-note.md
- hooks/use-notification-store.tsx
- screens/Admin/Event/funUpdateStatus.ts
- service/api-notifications.ts
- utils/formatChatTime.ts

### No Issue
This commit is contained in:
2026-01-13 17:41:30 +08:00
parent ca33dd83bb
commit 6e2046467f
18 changed files with 325 additions and 83 deletions

View File

@@ -1,6 +1,6 @@
import {
NotificationProp,
TypeNotificationCategoryApp
TypeNotificationCategoryApp,
} from "@/types/type-notification-category";
import { apiConfig } from "./api-config";
@@ -78,9 +78,22 @@ export async function apiNotificationUnreadCount({
}
}
export async function apiNotificationMarkAsRead({ id }: { id: string }) {
/**
* @param id | notification id atau user id
* @param category | "all" | "one" , jika "all" id yang harus di masukan adalah user id, jika "one" id yang harus di masukan adalah notification id
* @type {string}
*/
export async function apiNotificationMarkAsRead({
id,
category,
}: {
id: string;
category: "all" | "one";
}) {
try {
const response = await apiConfig.put(`/mobile/notification/${id}`);
const response = await apiConfig.put(
`/mobile/notification/${id}?category=${category}`
);
return response.data;
} catch (error) {
throw error;