## Deskripsi:
- Notifikasi admin to user
- Notifikasi user to user
### Issue: - Pada table admin harus di sediakan untuk triger update data saat ada notifikasi
This commit is contained in:
2024-07-25 15:06:14 +08:00
parent f336e8ad30
commit 01114e8405
20 changed files with 292 additions and 124 deletions

View File

@@ -0,0 +1,36 @@
import { RouterEvent } from "@/app/lib/router_hipmi/router_event";
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
import { MODEL_NOTIFIKASI } from "../../model/interface";
export function redirectEventPage({
data,
router,
onSetPage,
}: {
data: MODEL_NOTIFIKASI;
router: AppRouterInstance;
onSetPage: (val: any) => void;
}) {
const path = RouterEvent.status_page;
if (data.status === "Publish") {
onSetPage({
menuId: 2,
status: data.status,
});
router.push(path, { scroll: false });
}
// console.log(data)
if (data.status === "Reject") {
onSetPage({
menuId: 2,
status: data.status,
});
router.push(path, { scroll: false });
}
if (data.status === "Peserta event") {
router.push(RouterEvent.detail_main + data.appId, { scroll: false });
}
}