- Deskripsi:
- Notifikasi collaboration
## Issue: Scroll dari chat akan di ubah dengan package yang mas malik buat
This commit is contained in:
2024-07-29 10:07:52 +08:00
parent 01114e8405
commit 810ce1c00d
42 changed files with 892 additions and 997 deletions

View File

@@ -14,6 +14,7 @@ import {
import notifikasi_getByUserId from "../fun/get/get_notifiaksi_by_id";
import { redirectVotingPage } from "./path/voting";
import { redirectEventPage } from "./path/event";
import { redirectDetailCollaborationPage } from "./path/collaboration";
export function ComponentNotifiaksi_CardView({
data,
@@ -42,7 +43,6 @@ export function ComponentNotifiaksi_CardView({
}}
my={"xs"}
onClick={async () => {
await notifikasi_funUpdateIsReadById({
notifId: data?.id,
});
@@ -53,6 +53,7 @@ export function ComponentNotifiaksi_CardView({
// });
// onLoadData(loadData);
// }
console.log(data.status);
data?.kategoriApp === "JOB" &&
redirectJobPage({
@@ -86,6 +87,12 @@ export function ComponentNotifiaksi_CardView({
onSetMenu(val);
},
});
data?.kategoriApp === "COLLABORATION" &&
redirectDetailCollaborationPage({
data: data,
router: router,
});
}}
>
{/* <pre>{JSON.stringify(e, null, 2)}</pre> */}

View File

@@ -0,0 +1,33 @@
import { RouterColab } from "@/app/lib/router_hipmi/router_colab";
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
import { MODEL_NOTIFIKASI } from "../../model/interface";
export function redirectDetailCollaborationPage({
data,
router,
}: {
data: MODEL_NOTIFIKASI;
router: AppRouterInstance;
}) {
if (data.status === "Partisipan Project") {
const path = RouterColab.main_detail + data.appId;
router.push(path, { scroll: false });
}
if (data.status === "Collaboration Group") {
const path = RouterColab.grup_diskusi;
router.push(path, { scroll: false });
}
// if (data.status === "Report Komentar") {
// const path = RouterForum.detail_report_komentar + data.appId;
// router.push(path, { scroll: false });
// }
// if (data.status === "Report Posting") {
// const path = RouterForum.detail_report_posting + data.appId;
// router.push(path, { scroll: false });
// }
}

View File

@@ -30,7 +30,7 @@ export function redirectEventPage({
router.push(path, { scroll: false });
}
if (data.status === "Peserta event") {
if (data.status === "Peserta Event") {
router.push(RouterEvent.detail_main + data.appId, { scroll: false });
}
}