Transaksi
# feat: - proses transfer - metode pembayaran ### issue: - data nama bank dan rekenening belum masuk
This commit is contained in:
@@ -2,10 +2,30 @@ import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||
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 dataInvestasi = await getOneInvestasiById(params.id)
|
||||
const dataUser = await funGetUserProfile(dataInvestasi?.authorId as any)
|
||||
return<>
|
||||
<DetailInvestasi dataInvestasi={dataInvestasi as any} dataUser={dataUser as any}/>
|
||||
import yaml from "yaml";
|
||||
import fs from "fs";
|
||||
import { cookies } from "next/headers";
|
||||
import { unsealData } from "iron-session";
|
||||
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);
|
||||
return (
|
||||
<>
|
||||
<DetailInvestasi
|
||||
dataInvestasi={dataInvestasi as any}
|
||||
dataUser={dataUser as any}
|
||||
loginUserId={loginUserId}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
32
src/app/dev/investasi/metode_transfer/[id]/page.tsx
Normal file
32
src/app/dev/investasi/metode_transfer/[id]/page.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
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 yaml from "yaml";
|
||||
import fs from "fs";
|
||||
import { cookies } from "next/headers";
|
||||
import { unsealData } from "iron-session";
|
||||
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 authorId = usr.id;
|
||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||
const namaBank = await getMaster_NamaBank();
|
||||
// console.log(namaBank)
|
||||
return (
|
||||
<>
|
||||
<MetodeTransferInvestasi
|
||||
dataInvestasi={dataInvestasi as any}
|
||||
namaBank={namaBank as any}
|
||||
authorId={authorId}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { MetodeTransferInvestasi } from "@/app_modules/investasi";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<MetodeTransferInvestasi />
|
||||
</>
|
||||
);
|
||||
}
|
||||
11
src/app/dev/investasi/proses_investasi/[id]/page.tsx
Normal file
11
src/app/dev/investasi/proses_investasi/[id]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { ProsesInvestasi } 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)
|
||||
|
||||
return<>
|
||||
<ProsesInvestasi dataInvestasi={dataInvestasi as any}/>
|
||||
</>
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { ProsesInvestasi } from "@/app_modules/investasi";
|
||||
|
||||
export default async function Page() {
|
||||
return<>
|
||||
<ProsesInvestasi/>
|
||||
</>
|
||||
}
|
||||
11
src/app/dev/investasi/transfer/[id]/page.tsx
Normal file
11
src/app/dev/investasi/transfer/[id]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { TransferInvestasi } from "@/app_modules/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
import getTransaksiInvestasi from "@/app_modules/investasi/fun/get_transaksi_investasi";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const dataTransaksi = await getTransaksiInvestasi(params.id);
|
||||
|
||||
return <>
|
||||
<TransferInvestasi dataTransaksi={dataTransaksi as any}/>
|
||||
</>;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { TransferInvestasi } from "@/app_modules/investasi";
|
||||
|
||||
export default async function Page() {
|
||||
return<>
|
||||
<TransferInvestasi/>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user