Bursa Investasi
# feat: - Tampilan portofolio selesai - Hapus investasi - Function get data publish ### no issue
This commit is contained in:
@@ -3,8 +3,9 @@ import { cookies } from "next/headers";
|
||||
import fs from "fs";
|
||||
import yaml from "yaml";
|
||||
import { unsealData } from "iron-session";
|
||||
import getInvestasiById from "@/app_modules/investasi/fun/get_investasi_by_id";
|
||||
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";
|
||||
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
|
||||
@@ -16,13 +17,23 @@ export default async function Page() {
|
||||
})
|
||||
);
|
||||
|
||||
const dataInvestasi = await getInvestasiById(tkn.id)
|
||||
const listStatusInvestasi = await getStatusInvestasi()
|
||||
// console.log(listStatusInvestasi)
|
||||
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)
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<PortofolioInvestasi dataInvestasi={dataInvestasi as any} listStatusInvestasi={listStatusInvestasi as any} />
|
||||
<PortofolioInvestasi
|
||||
listStatusInvestasi={listStatusInvestasi as any}
|
||||
dataDraft={dataDraft}
|
||||
dataReview={dataReview}
|
||||
dataPublish={dataPublish}
|
||||
dataReject={dataReject}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user