Alur Payment
# feat - Pembelian saham - Function progres ### No Issue
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { DetailPropektus } 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);
|
||||
|
||||
return<>
|
||||
<DetailPropektus dataInvestasi={dataInvestasi as any}/>
|
||||
return (
|
||||
<>
|
||||
<DetailPropektus dataInvestasi={dataInvestasi as any} />
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import { DetailSahamTerbeli } from "@/app_modules/investasi";
|
||||
import funTotalInvestorByIdInvestasi from "@/app_modules/investasi/fun/fun_total_investor_by_id";
|
||||
import getOneTransaksiBerhasilByIdInvestasi from "@/app_modules/investasi/fun/get_one_transaksi_berhasil_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
return <DetailSahamTerbeli id={params.id} />;
|
||||
const dataTransaksi = await getOneTransaksiBerhasilByIdInvestasi(params.id);
|
||||
const investor = await funTotalInvestorByIdInvestasi(
|
||||
dataTransaksi?.Investasi.id as any
|
||||
);
|
||||
// console.log(investor);
|
||||
|
||||
return <DetailSahamTerbeli dataTransaksi={dataTransaksi as any} investor={investor} />;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
import { InvestasiSahamTerbeli } from "@/app_modules/investasi";
|
||||
import getListTransaksiBerhasilInvestasi from "@/app_modules/investasi/fun/get_list_transaksi_berhasil_by_id";
|
||||
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() {
|
||||
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)
|
||||
// console.log(listTransaksi)
|
||||
return (
|
||||
<>
|
||||
<InvestasiSahamTerbeli />
|
||||
<InvestasiSahamTerbeli listTransaksi={listTransaksi as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ export default async function Page() {
|
||||
const userId = tkn.id;
|
||||
const statusTransaksi = await getMaster_StatusTransaksiInvestasi();
|
||||
const listTransaksi = await getListAllTransaksiById_Investasi(userId);
|
||||
// console.log(listTransaksi)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
12
src/app/dev/investasi/proses_transaksi/[id]/layout.tsx
Normal file
12
src/app/dev/investasi/proses_transaksi/[id]/layout.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { LayoutProsesTransaksiInvestasi } from "@/app_modules/investasi";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<LayoutProsesTransaksiInvestasi>{children}</LayoutProsesTransaksiInvestasi>
|
||||
);
|
||||
}
|
||||
29
src/app/dev/investasi/proses_transaksi/[id]/page.tsx
Normal file
29
src/app/dev/investasi/proses_transaksi/[id]/page.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { ProsesTransaksiInvestasi } from "@/app_modules/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
import { unsealData } from "iron-session";
|
||||
import { cookies } from "next/headers";
|
||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||
import yaml from "yaml";
|
||||
import fs from "fs";
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const c = cookies().get("ssn");
|
||||
const user = JSON.parse(
|
||||
await unsealData(c?.value as string, {
|
||||
password: config.server.password,
|
||||
})
|
||||
);
|
||||
|
||||
const userLogin = await funGetUserProfile(user.id);
|
||||
const dataInvestasi = await getOneInvestasiById(params.id);
|
||||
// console.log(userLogin);
|
||||
return (
|
||||
<>
|
||||
<ProsesTransaksiInvestasi
|
||||
dataInvestasi={dataInvestasi as any}
|
||||
userLogin={userLogin as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user