fix
Deskripsi: - Upload ke stroage untuk job ## Np Issuee
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { AdminDonasi_TableReview } from "@/app_modules/admin/donasi";
|
||||
import adminDonasi_getListReview from "@/app_modules/admin/donasi/fun/get/get_list_review";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const listReview = await adminDonasi_getListReview({page: 1});
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { AdminLayout } from "@/app_modules/admin/main_dashboard";
|
||||
import adminNotifikasi_countNotifikasi from "@/app_modules/admin/notifikasi/fun/count/count_is_read";
|
||||
import adminNotifikasi_getByUserId from "@/app_modules/admin/notifikasi/fun/get/get_notifikasi_by_user_id";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
@@ -11,10 +10,9 @@ export default async function Layout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userId = await user_funGetOneUserId();
|
||||
if (!userId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataUser = await user_getOneByUserId(userId);
|
||||
const dataUser = await user_getOneByUserId(userLoginId);
|
||||
const listNotif = await adminNotifikasi_getByUserId();
|
||||
const countNotifikasi = await adminNotifikasi_countNotifikasi();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Login } from "@/app_modules/auth";
|
||||
|
||||
export default function Page() {
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Login />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Register } from "@/app_modules/auth";
|
||||
import { auth_getKodeOtpById } from "@/app_modules/auth/fun/get_kode_otp_by_id";
|
||||
import { auth_getCodeOtpByNumber } from "@/app_modules/auth/fun/get_kode_otp_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let otpId = params.id
|
||||
const dataOtp = await auth_getKodeOtpById(otpId)
|
||||
let otpId = params.id;
|
||||
const dataOtp = await auth_getCodeOtpByNumber({ kodeId: otpId });
|
||||
return <Register dataOtp={dataOtp} />;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { SplashScreen } from "@/app_modules/auth";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
|
||||
export default async function PageSplash() {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Validasi } from "@/app_modules/auth";
|
||||
import { auth_getKodeOtpById } from "@/app_modules/auth/fun/get_kode_otp_by_id";
|
||||
import { ServerEnv } from "@/app/lib/server_env";
|
||||
|
||||
import { auth_getCodeOtpByNumber } from "@/app_modules/auth/fun/get_kode_otp_by_id";
|
||||
import { redirect } from "next/navigation";
|
||||
import { RouterAuth } from "@/app/lib/router_hipmi/router_auth";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let nomor = params.id;
|
||||
const dataOtp = await auth_getKodeOtpById({nomor: nomor});
|
||||
|
||||
let kodeId = params.id;
|
||||
const dataOtp = await auth_getCodeOtpByNumber({ kodeId: kodeId });
|
||||
if (dataOtp === null) return redirect(RouterAuth.login);
|
||||
|
||||
return <Validasi dataOtp={dataOtp} />;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import adminColab_getOneRoomChatById from "@/app_modules/admin/colab/fun/get/get_one_room_chat_by_id";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import {
|
||||
Colab_DetailGrupDiskusi,
|
||||
Colab_GroupChatView,
|
||||
} from "@/app_modules/colab";
|
||||
import { Colab_GroupChatView } from "@/app_modules/colab";
|
||||
import colab_getMessageByRoomId from "@/app_modules/colab/fun/get/room_chat/get_message_by_room_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const roomId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const getData = (await adminColab_getOneRoomChatById({ roomId: roomId }))
|
||||
.data;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutColab_MainDetail } from "@/app_modules/colab";
|
||||
import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -11,9 +11,10 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const colabId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataColab = await colab_getOneCollaborationById(colabId);
|
||||
const authorId = dataColab?.Author?.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Colab_MainDetail } from "@/app_modules/colab";
|
||||
import colab_funCekPartisipasiById from "@/app_modules/colab/fun/get/cek_partisipasi_by_user_id";
|
||||
import colab_getListPartisipanByColabId from "@/app_modules/colab/fun/get/get_list_partisipan_by_id";
|
||||
import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let colabId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataColab = await colab_getOneCollaborationById(colabId);
|
||||
const listPartisipan = await colab_getListPartisipanByColabId(colabId);
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Colab_Beranda } from "@/app_modules/colab";
|
||||
import colab_getListAllProyek from "@/app_modules/colab/fun/get/get_list_all_proyek";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const listData = await colab_getListAllProyek({ page: 1 });
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { CreateCeritaPenggalangDonasi } from "@/app_modules/donasi";
|
||||
import { Donasi_getTemporaryCreate } from "@/app_modules/donasi/fun/get/get_temporary_create";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const getTemporaryCreate = await Donasi_getTemporaryCreate(params.id);
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
Donasi_getMasterDurasi,
|
||||
Donasi_getMasterKategori,
|
||||
} from "@/app_modules/donasi/fun";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const masterKategori = await Donasi_getMasterKategori();
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { DetailMainDonasi } from "@/app_modules/donasi";
|
||||
import { Donasi_getCountDonatur } from "@/app_modules/donasi/fun/count/get_count_donatur";
|
||||
import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let donasiId = params.id;
|
||||
const dataDonasi = await Donasi_getOneById(donasiId);
|
||||
const countDonatur = await Donasi_getCountDonatur(donasiId)
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataDonasi = await Donasi_getOneById(donasiId);
|
||||
const countDonatur = await Donasi_getCountDonatur(donasiId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<DetailMainDonasi dataDonasi={dataDonasi as any} countDonatur={countDonatur} userLoginId={userLoginId}/>
|
||||
<DetailMainDonasi
|
||||
dataDonasi={dataDonasi as any}
|
||||
countDonatur={countDonatur}
|
||||
userLoginId={userLoginId}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { DetailPublishDonasi } from "@/app_modules/donasi";
|
||||
import { Donasi_getCountDonatur } from "@/app_modules/donasi/fun/count/get_count_donatur";
|
||||
import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const dataPublish = await Donasi_getOneById(params.id);
|
||||
const countDonatur = await Donasi_getCountDonatur(params.id);
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
// console.log(userLoginId)
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
import { PostingDonasi } from "@/app_modules/donasi";
|
||||
import Donasi_getByStatus from "@/app_modules/donasi/fun/get/get_donasi_by_status";
|
||||
import { donasi_funGetAllStatusDraft } from "@/app_modules/donasi/fun/get/status/get_all_status_draft";
|
||||
import { donasi_funGetAllStatusPublish } from "@/app_modules/donasi/fun/get/status/get_all_status_publish";
|
||||
import { donasi_funGetAllStatusReject } from "@/app_modules/donasi/fun/get/status/get_all_status_reject";
|
||||
import { donasi_funGetAllStatusReview } from "@/app_modules/donasi/fun/get/status/get_all_status_review";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const listPublish = await donasi_funGetAllStatusPublish({page: 1});
|
||||
const listReview = await donasi_funGetAllStatusReview({page: 1});
|
||||
const listDraft = await donasi_funGetAllStatusDraft({page: 1});
|
||||
const listReject = await donasi_funGetAllStatusReject({page: 1});
|
||||
|
||||
|
||||
const listPublish = await donasi_funGetAllStatusPublish({ page: 1 });
|
||||
const listReview = await donasi_funGetAllStatusReview({ page: 1 });
|
||||
const listDraft = await donasi_funGetAllStatusDraft({ page: 1 });
|
||||
const listReject = await donasi_funGetAllStatusReject({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<PostingDonasi listPublish={listPublish} listReview={listReview} listDraft={listDraft} listReject={listReject} />
|
||||
<PostingDonasi
|
||||
listPublish={listPublish}
|
||||
listReview={listReview}
|
||||
listDraft={listDraft}
|
||||
listReject={listReject}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutDonasi } from "@/app_modules/donasi";
|
||||
import { Donasi_getNotifByUserId } from "@/app_modules/donasi/fun/get/get_notif_by_user_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -9,8 +8,7 @@ export default async function Layout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const isRead = await Donasi_getNotifByUserId(userLoginId).then((res: any) =>
|
||||
res.map((val: any) => val.isRead)
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Donasi_MetodePembayaran } from "@/app_modules/donasi";
|
||||
import { Donasi_getMasterBank } from "@/app_modules/donasi/fun/master/get_bank";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
let donasiId= params.id
|
||||
const listBank = await Donasi_getMasterBank()
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let donasiId = params.id;
|
||||
const listBank = await Donasi_getMasterBank();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
|
||||
return<>
|
||||
<Donasi_MetodePembayaran listBank={listBank} donasiId={donasiId} authorId={userLoginId}/>
|
||||
return (
|
||||
<>
|
||||
<Donasi_MetodePembayaran
|
||||
listBank={listBank}
|
||||
donasiId={donasiId}
|
||||
authorId={userLoginId}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Event_Create } from "@/app_modules/event";
|
||||
import { Event_getMasterTipeAcara } from "@/app_modules/event/fun/master/get_tipe_acara";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const listTipeAcara = await Event_getMasterTipeAcara();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Event_DetailMain } from "@/app_modules/event";
|
||||
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
|
||||
import { Event_CekUserJoinById } from "@/app_modules/event/fun/get/cek_user_join_by_id";
|
||||
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
|
||||
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let eventId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataEvent = await Event_getOneById(eventId);
|
||||
const listPeserta = await Event_getListPesertaById(eventId);
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
import { Event_DetailRiwayat } from "@/app_modules/event";
|
||||
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
|
||||
import { Event_CekUserJoinById } from "@/app_modules/event/fun/get/cek_user_join_by_id";
|
||||
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
|
||||
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let eventId = params.id;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Event_Kontribusi } from "@/app_modules/event";
|
||||
import { event_getListKontibusiByUserId } from "@/app_modules/event/fun/get/get_list_kontribusi_by_user_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const listKontribusi = await event_getListKontibusiByUserId({page: 1})
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Event_Riwayat } from "@/app_modules/event";
|
||||
import { event_getListRiwayatSaya } from "@/app_modules/event/fun/get/get_list_riwayat_saya";
|
||||
import { event_getListSemuaRiwayat } from "@/app_modules/event/fun/get/riwayat/get_list_semua_riwayat";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let eventId = params.id;
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Event_StatusPage } from "@/app_modules/event";
|
||||
import { event_getAllDraft } from "@/app_modules/event/fun/get/status/get_all_draft";
|
||||
import { event_getAllReject } from "@/app_modules/event/fun/get/status/get_all_reject";
|
||||
import { event_getAllReview } from "@/app_modules/event/fun/get/status/get_all_review";
|
||||
import { event_funGetAllStatusPublish } from "@/app_modules/event/fun/get/status/get_all_status_publish";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const listPublish = await event_funGetAllStatusPublish({ page: 1 });
|
||||
const listReview = await event_getAllReview({ page: 1 });
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
import { RouterForum } from "@/app/lib/router_hipmi/router_forum";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import Forum_MainDetail from "@/app_modules/forum/detail/main_detail";
|
||||
import { forum_countTotalKomenById } from "@/app_modules/forum/fun/count/count_total_komentar_by_id";
|
||||
import { forum_funGetAllKomentarById } from "@/app_modules/forum/fun/get/get_all_komentar_by_id";
|
||||
import { forum_getOnePostingById } from "@/app_modules/forum/fun/get/get_one_posting_by_id";
|
||||
import { forum_countOneTotalKomentarById } from "@/app_modules/forum/fun/count/count_one_total_komentar_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { RouterForum } from "@/app/lib/router_hipmi/router_forum";
|
||||
import { redirect } from "next/navigation";
|
||||
import { forum_countTotalKomenById } from "@/app_modules/forum/fun/count/count_total_komentar_by_id";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let postingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataPosting = await forum_getOnePostingById(postingId);
|
||||
const listKomentar = await forum_funGetAllKomentarById({
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { LayoutForum_Forumku } from "@/app_modules/forum";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_Forumku } from "@/app_modules/forum";
|
||||
import { forum_countPostingByAuthorId } from "@/app_modules/forum/fun/count/count_posting_by_author_id";
|
||||
import { forum_getAllPostingByAuhtorId } from "@/app_modules/forum/fun/get/get_list_posting_by_author_id";
|
||||
import { forum_countOneTotalKomentarById } from "@/app_modules/forum/fun/count/count_one_total_komentar_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import _ from "lodash";
|
||||
import { forum_countPostingByAuthorId } from "@/app_modules/forum/fun/count/count_posting_by_author_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const authorId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataAuthor = await user_getOneByUserId(authorId);
|
||||
const auhtorSelectedData = _.omit(dataAuthor, [
|
||||
"Profile.email",
|
||||
@@ -25,7 +25,10 @@ export default async function Page({ params }: { params: { id: string } }) {
|
||||
// setTimeout(a, 1000);
|
||||
// });
|
||||
|
||||
const dataPosting = await forum_getAllPostingByAuhtorId({authorId: authorId, page: 1});
|
||||
const dataPosting = await forum_getAllPostingByAuhtorId({
|
||||
authorId: authorId,
|
||||
page: 1,
|
||||
});
|
||||
const totalPosting = await forum_countPostingByAuthorId(authorId);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_Komentar } from "@/app_modules/forum";
|
||||
import { forum_getOnePostingById } from "@/app_modules/forum/fun/get/get_one_posting_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let postingId = params.id;
|
||||
const dataPosting = await forum_getOnePostingById(postingId);
|
||||
const userLoginId = await user_funGetOneUserId()
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutForum_Main } from "@/app_modules/forum";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
@@ -9,14 +8,14 @@ export default async function Layout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const dataAuthor = await user_getOneByUserId(userLoginId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutForum_Main dataAuthor={dataAuthor as any}>{children}</LayoutForum_Main>
|
||||
<LayoutForum_Main dataAuthor={dataAuthor as any}>
|
||||
{children}
|
||||
</LayoutForum_Main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_Beranda } from "@/app_modules/forum";
|
||||
import { forum_new_getAllPosting } from "@/app_modules/forum/fun/get/new_get_all_posting";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const listForum = await forum_new_getAllPosting({ page: 1 });
|
||||
|
||||
|
||||
// console.log(JSON.stringify(listForum, null, 2));
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_ReportKomentarLainnya } from "@/app_modules/forum";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let komentarId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_ReportKomentar } from "@/app_modules/forum";
|
||||
import { forum_getMasterKategoriReport } from "@/app_modules/forum/fun/master/get_master_kategori_report";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let komentarId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const listReport = await forum_getMasterKategoriReport();
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
|
||||
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_ReportPostingLainnya } from "@/app_modules/forum";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let postingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_ReportPosting } from "@/app_modules/forum";
|
||||
import { forum_getMasterKategoriReport } from "@/app_modules/forum/fun/master/get_master_kategori_report";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let postingId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const listReport = await forum_getMasterKategoriReport();
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin";
|
||||
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { HomeView } from "@/app_modules/home";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { job_getTwoForHomeView } from "@/app_modules/job/fun/get/get_two_for_home_view";
|
||||
@@ -9,8 +8,7 @@ import notifikasi_countUserNotifikasi from "@/app_modules/notifikasi/fun/count/f
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataUser = await user_getOneByUserId(userLoginId);
|
||||
const dataJob = await job_getTwoForHomeView();
|
||||
@@ -24,9 +22,6 @@ export default async function Page() {
|
||||
|
||||
const countNotifikasi = await notifikasi_countUserNotifikasi();
|
||||
|
||||
// const cekCookies = await fetch("/api/check-cookies");
|
||||
// console.log(await cekCookies.json());
|
||||
|
||||
return (
|
||||
<>
|
||||
<HomeView
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { DetailInvestasi } from "@/app_modules/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const investasiId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataInvestasi = await getOneInvestasiById(investasiId);
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,26 +1,12 @@
|
||||
import { PortofolioInvestasi } from "@/app_modules/investasi";
|
||||
import { cookies } from "next/headers";
|
||||
import fs from "fs";
|
||||
import yaml from "yaml";
|
||||
import { unsealData } from "iron-session";
|
||||
import getInvestasiByStatusId from "@/app_modules/investasi/fun/get_investasi_by_id";
|
||||
import getStatusInvestasi from "@/app_modules/investasi/fun/master/get_status_investasi";
|
||||
import getPortoByStatusId from "@/app_modules/investasi/fun/get_porto_status_by_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { Investasi_UiPortofolio } from "@/app_modules/investasi/_ui";
|
||||
import {
|
||||
investasi_funGetAllInvestasiNonPublishByUserId,
|
||||
investasi_funGetAllPublishByUserId,
|
||||
} from "@/app_modules/investasi/_fun";
|
||||
import { Investasi_UiPortofolio } from "@/app_modules/investasi/_ui";
|
||||
import getStatusInvestasi from "@/app_modules/investasi/fun/master/get_status_investasi";
|
||||
|
||||
export default async function Page() {
|
||||
const userId = await user_funGetOneUserId();
|
||||
if (!userId) return <div>{"User Tidak ditemukan"}</div>;
|
||||
const listStatus = await getStatusInvestasi();
|
||||
const dataDraft = await getPortoByStatusId(userId, 1);
|
||||
const dataReview = await getPortoByStatusId(userId, 2);
|
||||
const dataPublish = await getPortoByStatusId(userId, 3);
|
||||
const dataReject = await getPortoByStatusId(userId, 4);
|
||||
|
||||
const listDataPublish = await investasi_funGetAllPublishByUserId({ page: 1 });
|
||||
const listDataReview = await investasi_funGetAllInvestasiNonPublishByUserId({
|
||||
@@ -38,13 +24,6 @@ export default async function Page() {
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* <PortofolioInvestasi
|
||||
listStatusInvestasi={listStatusInvestasi as any}
|
||||
dataDraft={dataDraft}
|
||||
dataReview={dataReview}
|
||||
dataPublish={dataPublish}
|
||||
dataReject={dataReject}
|
||||
/> */}
|
||||
<Investasi_UiPortofolio
|
||||
listStatus={listStatus}
|
||||
listDataPublish={listDataPublish}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import getListAllTransaksiById_Investasi from "@/app_modules/investasi/fun/get_list_all_transaksi_by_id";
|
||||
import getMaster_StatusTransaksiInvestasi from "@/app_modules/investasi/fun/master/get_status_transaksi";
|
||||
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { investasi_funGetTransaksiByUserId } from "@/app_modules/investasi/_fun";
|
||||
import { Investasi_UiDaftarTransaksi } from "@/app_modules/investasi/_ui";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const statusTransaksi = await getMaster_StatusTransaksiInvestasi();
|
||||
const listTransaksi = await getListAllTransaksiById_Investasi(userLoginId);
|
||||
|
||||
@@ -2,12 +2,10 @@ import { MetodeTransferInvestasi } from "@/app_modules/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
import getMaster_NamaBank from "@/app_modules/investasi/fun/master/get_nama_bank";
|
||||
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||
const namaBank = await getMaster_NamaBank();
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||
import { ProsesTransaksiInvestasi } from "@/app_modules/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const userLogin = await funGetUserProfile(userLoginId);
|
||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { KatalogLayout } from "@/app_modules/katalog/main";
|
||||
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
|
||||
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { Katalog_MainView } from "@/app_modules/katalog";
|
||||
import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/get_list_portofolio";
|
||||
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let profileId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const listPorto = await funGetListPortofolio(profileId);
|
||||
const dataProfile = await Profile_getOneProfileAndUserById(profileId);
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Katalog_MainView
|
||||
|
||||
@@ -8,9 +8,6 @@ export default async function Layout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// const cekCookies = await funCheckToken();
|
||||
// if (cekCookies === false) redirect(RouterAuth.login);
|
||||
|
||||
return (
|
||||
<>
|
||||
<CheckCookies_UiLayout>{children}</CheckCookies_UiLayout>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
||||
import { portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/get_one_portofolio";
|
||||
|
||||
@@ -12,8 +11,7 @@ export default async function Layout({
|
||||
}) {
|
||||
let portoId = params.id;
|
||||
const getPorto = await portofolio_getOneById(portoId);
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { ViewPortofolio } from "@/app_modules/katalog/portofolio";
|
||||
import { portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/get_one_portofolio";
|
||||
|
||||
const mapboxToken = process.env.MAPBOX_TOKEN!;
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const getPorto = await portofolio_getOneById(params.id);
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { CreateProfile } from "@/app_modules/katalog/profile";
|
||||
|
||||
export default async function Page() {
|
||||
const userId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
<CreateProfile userId={userId} />
|
||||
<CreateProfile userLoginId={userLoginId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Home_UserNonActive } from "@/app_modules/home";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataUser = await user_getOneByUserId(userLoginId);
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutVote_DetailKontribusi } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
@@ -11,9 +10,7 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutVote_MainDetail } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
@@ -11,8 +10,7 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Vote_MainDetail } from "@/app_modules/vote";
|
||||
import { Vote_cekKontributorById } from "@/app_modules/vote/fun/get/cek_kontributor_by_id";
|
||||
import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id";
|
||||
import { Vote_getHasilVoteById } from "@/app_modules/vote/fun/get/get_list_hasil_by_id";
|
||||
import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id";
|
||||
import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id";
|
||||
import { Vote_getOnePilihanVotingByUserId } from "@/app_modules/vote/fun/get/get_one_pilihan_voting_by_user_id";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const voteId = params.id;
|
||||
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataVote = await voting_funGetOneVotingbyId(voteId);
|
||||
const hasilVoting = await Vote_getHasilVoteById(voteId as any);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutVote_DetailPublish } from "@/app_modules/vote";
|
||||
import { Voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get";
|
||||
import React from "react";
|
||||
@@ -12,11 +11,9 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataVoting = await Voting_funGetOneVotingbyId(votingId);
|
||||
const authorId = dataVoting?.authorId;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { LayoutVote_DetailSemuaRiwayat } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
@@ -11,7 +11,8 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user