fix: File view
Deksripsi: - Tampilan file view pdf - Optimalisasi admin ## No Isuue
This commit is contained in:
@@ -6,24 +6,17 @@ 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_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
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 = await user_getOneUserId();
|
||||
const listStatusInvestasi = await getStatusInvestasi();
|
||||
const dataDraft = await getPortoByStatusId(tkn.id, 1)
|
||||
const dataReview = await getPortoByStatusId(tkn.id, 2)
|
||||
const dataPublish = await getPortoByStatusId(tkn.id, 3)
|
||||
const dataReject = await getPortoByStatusId(tkn.id, 4)
|
||||
|
||||
|
||||
const dataDraft = await getPortoByStatusId(userId, 1);
|
||||
const dataReview = await getPortoByStatusId(userId, 2);
|
||||
const dataPublish = await getPortoByStatusId(userId, 3);
|
||||
const dataReject = await getPortoByStatusId(userId, 4);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
import { InvestasiSahamTerbeli } from "@/app_modules/investasi";
|
||||
import getListTransaksiBerhasilInvestasi from "@/app_modules/investasi/fun/get_list_transaksi_berhasil_by_id";
|
||||
import yaml from "yaml";
|
||||
import { investasi_funGetSuccessTransactionById } from "@/app_modules/investasi/_fun";
|
||||
import { Investasi_UiSahamSaya } from "@/app_modules/investasi/_ui";
|
||||
import fs from "fs";
|
||||
import { cookies } from "next/headers";
|
||||
import { unsealData } from "iron-session";
|
||||
import yaml from "yaml";
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
|
||||
export default async function Page() {
|
||||
const c = cookies().get("ssn");
|
||||
const user = JSON.parse(
|
||||
await unsealData(c?.value as string, {
|
||||
password: config.server.password,
|
||||
})
|
||||
);
|
||||
const listTransaksi = await getListTransaksiBerhasilInvestasi(user.id)
|
||||
// const c = cookies().get("ssn");
|
||||
// const user = JSON.parse(
|
||||
// await unsealData(c?.value as string, {
|
||||
// password: config.server.password,
|
||||
// })
|
||||
// );
|
||||
// const listTransaksi = await getListTransaksiBerhasilInvestasi(user.id);
|
||||
|
||||
const dataSaham = await investasi_funGetSuccessTransactionById({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<InvestasiSahamTerbeli listTransaksi={listTransaksi as any} />
|
||||
{/* <InvestasiSahamTerbeli listTransaksi={listTransaksi as any} /> */}
|
||||
<Investasi_UiSahamSaya dataSaham={dataSaham as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user