fix
## Deskripsi: - Optimalisasi admin voting ## No issue
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { AdminVote_Riwayat } from "@/app_modules/admin/vote";
|
||||
import { adminVote_funGetListRiwayat } from "@/app_modules/admin/vote/fun";
|
||||
import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id";
|
||||
|
||||
export default async function Page() {
|
||||
const dataVote = await AdminVote_getListTableByStatusId("0");
|
||||
const dataVote = await adminVote_funGetListRiwayat({page: 1});
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { AdminVote_TablePublish } from "@/app_modules/admin/vote";
|
||||
import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id";
|
||||
import { adminVote_funGetListPublish } from "@/app_modules/admin/vote/fun/get/status/get_list_publish";
|
||||
|
||||
export default async function Page() {
|
||||
const dataVote = await AdminVote_getListTableByStatusId("1")
|
||||
const dataVote = await adminVote_funGetListPublish({page: 1});
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { AdminVote_TableReject } from "@/app_modules/admin/vote";
|
||||
import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id";
|
||||
import { adminVote_funGetListReject } from "@/app_modules/admin/vote/fun";
|
||||
|
||||
export default async function Page() {
|
||||
const dataVote = await AdminVote_getListTableByStatusId("4");
|
||||
const dataVote = await adminVote_funGetListReject({ page: 1 });
|
||||
return (
|
||||
<>
|
||||
<AdminVote_TableReject dataVote={dataVote as any}/>
|
||||
<AdminVote_TableReject dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { AdminVote_TableReview } from "@/app_modules/admin/vote";
|
||||
import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id";
|
||||
|
||||
import { adminVote_funGetListReview } from "@/app_modules/admin/vote/fun";
|
||||
|
||||
export default async function Page() {
|
||||
const listVote = await AdminVote_getListTableByStatusId("2")
|
||||
const listVote = await adminVote_funGetListReview({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/_admin_global/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -8,26 +8,26 @@ import { unsealData } from "iron-session";
|
||||
import { cookies } from "next/headers";
|
||||
import funCountDown from "@/app_modules/investasi/fun/fun_countdown_investasi";
|
||||
import funCekSisaWaktuTransaksiInvestasi from "@/app_modules/investasi/fun/fun_cek_sisa_waktu";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { investasi_funGetTransaksiByUserId } from "@/app_modules/investasi/_fun";
|
||||
import { Investasi_UiDaftarTransaksi } from "@/app_modules/investasi/_ui";
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
|
||||
export default async function Page() {
|
||||
const c = cookies().get("ssn");
|
||||
const tkn = JSON.parse(
|
||||
await unsealData(c?.value as string, {
|
||||
password: config.server.password,
|
||||
})
|
||||
);
|
||||
const userId = tkn.id;
|
||||
const userId = await user_getOneUserId();
|
||||
const statusTransaksi = await getMaster_StatusTransaksiInvestasi();
|
||||
const listTransaksi = await getListAllTransaksiById_Investasi(userId);
|
||||
// console.log(listTransaksi)
|
||||
|
||||
|
||||
// NEW
|
||||
const dataTransaksi = await investasi_funGetTransaksiByUserId({page: 1});
|
||||
|
||||
return (
|
||||
<>
|
||||
<TransaksiInvestasi
|
||||
{/* <TransaksiInvestasi
|
||||
statusTransaksi={statusTransaksi as any}
|
||||
listTransaksi={listTransaksi as any}
|
||||
/>
|
||||
/> */}
|
||||
<Investasi_UiDaftarTransaksi dataTransaksi={dataTransaksi}/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { investasi_funGetInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_invoice_by_id";
|
||||
import { Investasi_UiInvoice } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default function Page({ params }: { params: { id: string } }) {
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const invoiceId = params.id;
|
||||
|
||||
const dataInvoice = await investasi_funGetInvoiceById({ invoiceId: invoiceId });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Investasi_UiInvoice />
|
||||
<Investasi_UiInvoice dataInvoice={dataInvoice as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export default async function Page({ params }: { params: { id: string } }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Investasi_UiMetodePembayaran listBank={listBank} />
|
||||
<Investasi_UiMetodePembayaran listBank={listBank} investasiId={investasiId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { funGlobal_getNomorAdmin } from "@/app_modules/_global/fun/get";
|
||||
import { Investasi_UiProsesTransaksi } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const invoiceId = params.id;
|
||||
|
||||
const nomorAdmin = await funGlobal_getNomorAdmin();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Investasi_UiProsesTransaksi />
|
||||
<Investasi_UiProsesTransaksi nomorAdmin={nomorAdmin} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user