fix: File view
Deksripsi: - Tampilan file view pdf - Optimalisasi admin ## No Isuue
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { adminAppInformation_funGetBidangBisnis } from "@/app_modules/admin/app_info/fun";
|
||||
import adminAppInformation_getMasterBank from "@/app_modules/admin/app_info/fun/master/get_list_bank";
|
||||
import adminAppInformation_getNomorAdmin from "@/app_modules/admin/app_info/fun/master/get_nomor_admin";
|
||||
import { AdminAppInformation_UiMain } from "@/app_modules/admin/app_info/ui";
|
||||
@@ -5,10 +6,15 @@ import { AdminAppInformation_UiMain } from "@/app_modules/admin/app_info/ui";
|
||||
export default async function Page() {
|
||||
const nomorAdmin = await adminAppInformation_getNomorAdmin();
|
||||
const listBank = await adminAppInformation_getMasterBank();
|
||||
const dataBidangBisnis = await adminAppInformation_funGetBidangBisnis()
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminAppInformation_UiMain nomorAdmin={nomorAdmin} listBank={listBank} />
|
||||
<AdminAppInformation_UiMain
|
||||
nomorAdmin={nomorAdmin}
|
||||
listBank={listBank}
|
||||
dataBidangBisnis={dataBidangBisnis}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
import { LayoutCreateBeritaInvestasi } from "@/app_modules/investasi";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
||||
return<>
|
||||
<LayoutCreateBeritaInvestasi idInves={params.id}>{children}</LayoutCreateBeritaInvestasi>
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<LayoutCreateBeritaInvestasi idInves={params.id}>
|
||||
{children}
|
||||
</LayoutCreateBeritaInvestasi>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentGlobal_V2_LoadingPage/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
import { CreateBeritaInvestasi } from "@/app_modules/investasi";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
return<>
|
||||
<CreateBeritaInvestasi idInves={params.id}/>
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
return (
|
||||
<>
|
||||
<CreateBeritaInvestasi idInves={params.id} />
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,43 +1,20 @@
|
||||
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||
import { DetailInvestasi } from "@/app_modules/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
|
||||
import yaml from "yaml";
|
||||
import fs from "fs";
|
||||
import { cookies } from "next/headers";
|
||||
import { unsealData } from "iron-session";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import funProgressBar from "@/app_modules/investasi/fun/fun_progress_bar";
|
||||
import funTotalInvestorByIdInvestasi from "@/app_modules/investasi/fun/fun_total_investor_by_id";
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const c = cookies().get("ssn");
|
||||
const usr = JSON.parse(
|
||||
await unsealData(c?.value as string, {
|
||||
password: config.server.password,
|
||||
})
|
||||
);
|
||||
|
||||
const loginUserId = usr.id;
|
||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||
const dataUser = await funGetUserProfile(dataInvestasi?.authorId as any)
|
||||
|
||||
let total = Number(dataInvestasi?.totalLembar)
|
||||
let beli = Number(dataInvestasi?.lembarTerbeli)
|
||||
const progress = await funProgressBar(total, beli)
|
||||
|
||||
const totalInvestor = await funTotalInvestorByIdInvestasi(dataInvestasi?.id)
|
||||
|
||||
// console.log(dataInvestasi?.MasterProgresInvestasi?.name)
|
||||
const investasiId = params.id
|
||||
const dataInvestasi = await getOneInvestasiById(investasiId);
|
||||
const loginUserId = await user_getOneUserId();
|
||||
|
||||
return (
|
||||
<>
|
||||
<DetailInvestasi
|
||||
dataInvestasi={dataInvestasi as any}
|
||||
dataUser={dataUser as any}
|
||||
loginUserId={loginUserId}
|
||||
progress={progress}
|
||||
totalInvestor={totalInvestor}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
13
src/app/dev/investasi/detail/saham/[id]/page.tsx
Normal file
13
src/app/dev/investasi/detail/saham/[id]/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { investasi_funGetOneInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
||||
import { Investasi_UiDetailSahamSaya } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const invoiceId = params.id;
|
||||
const dataSaham = await investasi_funGetOneInvoiceById({ invoiceId });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Investasi_UiDetailSahamSaya dataSaham={dataSaham} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,12 +1,17 @@
|
||||
import { DetailBeritaInvestasi } from "@/app_modules/investasi";
|
||||
import getOneBeritaInvestasiById from "@/app_modules/investasi/fun/get_one_berita_by_id";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
// console.log(params.id)
|
||||
const dataBerita = await getOneBeritaInvestasiById(params.id)
|
||||
// console.log(dataBerita)
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const investasiId = params.id;
|
||||
const dataBerita = await getOneBeritaInvestasiById(investasiId);
|
||||
// console.log(dataBerita)
|
||||
|
||||
return <>
|
||||
<DetailBeritaInvestasi dataBerita={dataBerita as any}/>
|
||||
return (
|
||||
<>
|
||||
<DetailBeritaInvestasi
|
||||
dataBerita={dataBerita as any}
|
||||
investasiId={investasiId}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { DetailDokumenInvestasi } 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 dataInvestasi = await getOneInvestasiById(params.id)
|
||||
// console.log(params.id)
|
||||
return<>
|
||||
<DetailDokumenInvestasi dataInvestasi={dataInvestasi as any}/>
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||
return (
|
||||
<>
|
||||
<DetailDokumenInvestasi dataInvestasi={dataInvestasi as any} />
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
11
src/app/dev/investasi/file-view/dokumen/[id]/page.tsx
Normal file
11
src/app/dev/investasi/file-view/dokumen/[id]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Investasi_UiFileViewDokumen } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const dokumenId = params.id;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Investasi_UiFileViewDokumen dokumenId={dokumenId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -3,8 +3,6 @@ import { Investasi_UiFileView } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const prospekId = params.id;
|
||||
const dataProspek = await investasi_funGetProspekById({ prospekId: prospekId });
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -1,15 +1,13 @@
|
||||
import { ListEditBeritaInvestasi } 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 dataInvestasi = await getOneInvestasiById(params.id)
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||
// console.log(dataInvestasi)
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<ListEditBeritaInvestasi dataInvestasi={dataInvestasi as any} />
|
||||
<ListEditBeritaInvestasi dataInvestasi={dataInvestasi as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { StatusTransaksiInvestasi } from "@/app_modules/investasi";
|
||||
import { investasi_funGetInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
||||
import { investasi_funGetOneInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
||||
import { Investasi_UiTransaksiBerhasil } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
const invoiceId = params.id;
|
||||
const dataTransaksi = await investasi_funGetInvoiceById({ invoiceId });
|
||||
const dataTransaksi = await investasi_funGetOneInvoiceById({ invoiceId });
|
||||
return (
|
||||
<>
|
||||
<Investasi_UiTransaksiBerhasil dataTransaksi={dataTransaksi} />
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { funGlobal_getNomorAdmin } from "@/app_modules/_global/fun/get";
|
||||
import { investasi_funGetInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
||||
import { investasi_funGetOneInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
||||
import { Investasi_UiTransaksiGagal } from "@/app_modules/investasi/_ui/status_transaksi/ui_transaksi_gagal";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const invoiceId = params.id;
|
||||
const dataTransaksi = await investasi_funGetInvoiceById({ invoiceId });
|
||||
const dataTransaksi = await investasi_funGetOneInvoiceById({ invoiceId });
|
||||
const nomorAdmin = await funGlobal_getNomorAdmin();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { investasi_funGetInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
||||
import { investasi_funGetOneInvoiceById } from "@/app_modules/investasi/_fun/get/fun_get_one_invoice_by_id";
|
||||
import { Investasi_UiInvoice } from "@/app_modules/investasi/_ui";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const invoiceId = params.id;
|
||||
const dataInvoice = await investasi_funGetInvoiceById({ invoiceId: invoiceId });
|
||||
const dataInvoice = await investasi_funGetOneInvoiceById({ invoiceId: invoiceId });
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
|
||||
import { Portofolio_getMasterBidangBisnis } from "@/app_modules/katalog/portofolio/fun/master/get_bidang_bisnis";
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ export default async function Page({ params }: { params: { id: string } }) {
|
||||
"profileId",
|
||||
]);
|
||||
|
||||
|
||||
const listBidang = await Portofolio_getMasterBidangBisnis()
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user