fix notifikasi

deskripsi:
- fix load data notifikasi: semua, event, job, donasi, investasi
This commit is contained in:
2025-03-03 14:11:04 +08:00
parent b71ced595a
commit 76042d9224
17 changed files with 428 additions and 165 deletions

View File

@@ -8,33 +8,19 @@ import notifikasi_countUserNotifikasi from "../../fun/count/fun_count_by_id";
export async function notifikasi_eventCheckStatus({
appId,
dataId,
categoryPage,
router,
onLoadDataEvent,
onSetEventMenuId,
onSetVisible,
onLoadCountNtf,
}: {
appId: string;
dataId: string;
categoryPage: string
router: AppRouterInstance;
onLoadDataEvent: (val: any) => void;
onSetEventMenuId(val: number): void;
onSetVisible(val: boolean): void;
onLoadCountNtf(val: number): void;
}) {
const check = await notifikasi_funEventCheckStatus({ id: appId });
if (check.status == 200) {
const loadListNotifikasi = await notifikasi_getByUserId({
page: 1,
kategoriApp: categoryPage as any,
});
onLoadDataEvent(loadListNotifikasi);
const loadCountNotifikasi = await notifikasi_countUserNotifikasi();
onLoadCountNtf(loadCountNotifikasi);
const updateReadNotifikasi = await notifikasi_funUpdateIsReadById({
notifId: dataId,