## 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

@@ -13,6 +13,7 @@ import {
} from "@/app_modules/_global/color/color_pallet";
import notifikasi_getByUserId from "../fun/get/get_notifiaksi_by_id";
import { redirectVotingPage } from "./path/voting";
import { redirectEventPage } from "./path/event";
export function ComponentNotifiaksi_CardView({
data,
@@ -41,6 +42,18 @@ export function ComponentNotifiaksi_CardView({
}}
my={"xs"}
onClick={async () => {
await notifikasi_funUpdateIsReadById({
notifId: data?.id,
});
// if (updateIsRead.status === 200) {
// const loadData = await notifikasi_getByUserId({
// page: activePage + 1,
// });
// onLoadData(loadData);
// }
data?.kategoriApp === "JOB" &&
redirectJobPage({
data: data,
@@ -65,16 +78,14 @@ export function ComponentNotifiaksi_CardView({
},
});
const updateIsRead = await notifikasi_funUpdateIsReadById({
notifId: data?.id,
});
if (updateIsRead.status === 200) {
// console.log(updateIsRead.status);
// const loadData = await notifikasi_getByUserId({ page: activePage });
// onLoadData(loadData);
// console.log("berhasil load")
}
data?.kategoriApp === "EVENT" &&
redirectEventPage({
data: data,
router: router,
onSetPage(val) {
onSetMenu(val);
},
});
}}
>
{/* <pre>{JSON.stringify(e, null, 2)}</pre> */}