Progres dan Bursa Investasi

# fix:
- Bar progres berfungsi
- Urutan bursa investasi
# No issue
This commit is contained in:
2023-12-19 15:47:54 +08:00
parent 8ee62b875d
commit 414cf8f776
104 changed files with 1307 additions and 513 deletions

28
coba.sh Normal file
View File

@@ -0,0 +1,28 @@
curl -X POST
http://localhost:3000/api/investasi/midtrans/ \
-H 'User-Agent: Veritrans' \
-H 'Accept: application/json'\
-H 'Content-Type: application/json' \
-d '{
"transaction_time": "2020-01-09 18:27:19",
"transaction_status": "capture",
"transaction_id":
"57d5293c-e65f-4a29-95e4-5959c3fa335b",
"status_message": "midtrans payment notification",
"status_code": "200",
"signature_key":
"16d6f84b2fb0468e2a9cf99a8ac4e5d803d42180347aaa70cb2a7abb13b5c6130458ca9c71956a962c0827637cd3bc7d40b21a8ae9fab12c7c3efe351b18d00a",
"payment_type": "credit_card",
"order_id": "Postman-1578568851",
"merchant_id": "G141532850",
"masked_card": "48111111-1114",
"gross_amount": "10000.00",
"fraud_status": "accept",
"eci": "05",
"currency": "IDR",
"channel_response_message": "Approved",
"channel_response_code": "00",
"card_type": "credit",
"bank": "bni",
"approval_code": "1578569243927"
}'

View File

@@ -0,0 +1,257 @@
-- CreateTable
CREATE TABLE "Katalog" (
"id" TEXT NOT NULL,
"namaBisnis" TEXT NOT NULL,
"alamatKantor" TEXT NOT NULL,
"tlpn" TEXT NOT NULL,
"deskripsi" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"profileId" TEXT,
"masterBidangBisnisId" TEXT NOT NULL,
CONSTRAINT "Katalog_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterBidangBisnis" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "MasterBidangBisnis_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Investasi" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"targetDana" TEXT NOT NULL,
"hargaLembar" TEXT NOT NULL,
"totalLembar" TEXT NOT NULL,
"roi" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"countDown" TIMESTAMP(3),
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"authorId" TEXT,
"catatan" TEXT,
"sisaLembar" TEXT NOT NULL,
"lembarTerbeli" TEXT DEFAULT '0',
"progress" TEXT DEFAULT '0',
"masterPeriodeDevidenId" TEXT,
"masterPembagianDevidenId" TEXT,
"masterPencarianInvestorId" TEXT,
"imagesId" TEXT,
"masterStatusInvestasiId" TEXT DEFAULT '2',
"masterProgresInvestasiId" TEXT,
CONSTRAINT "Investasi_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterPencarianInvestor" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "MasterPencarianInvestor_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterPeriodeDeviden" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "MasterPeriodeDeviden_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterPembagianDeviden" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "MasterPembagianDeviden_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterStatusInvestasi" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"color" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "MasterStatusInvestasi_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "ProspektusInvestasi" (
"id" TEXT NOT NULL,
"url" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"investasiId" TEXT,
CONSTRAINT "ProspektusInvestasi_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "DokumenInvestasi" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"url" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"investasiId" TEXT,
CONSTRAINT "DokumenInvestasi_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "BeritaInvestasi" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"deskripsi" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"imagesId" TEXT,
"investasiId" TEXT NOT NULL,
CONSTRAINT "BeritaInvestasi_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterBank" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"norek" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "MasterBank_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterProgresInvestasi" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "MasterProgresInvestasi_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "TransaksiInvestasi" (
"id" TEXT NOT NULL,
"investasiId" TEXT NOT NULL,
"authorId" TEXT NOT NULL,
"namaBank" TEXT,
"nomorRekening" TEXT,
"token" TEXT,
"redirect_url" TEXT,
"quantity" TEXT NOT NULL,
"price" TEXT NOT NULL,
"gross_amount" TEXT NOT NULL,
"merchant_name" TEXT NOT NULL,
"status_code" TEXT,
"status_message" TEXT,
"transaction_id" TEXT,
"order_id" TEXT,
"payment_type" TEXT,
"transaction_time" TEXT,
"transaction_status" TEXT,
"fraud_status" TEXT,
"pdf_url" TEXT,
"finish_redirect_url" TEXT,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"masterStatusTransaksiInvestasiId" TEXT DEFAULT '1',
CONSTRAINT "TransaksiInvestasi_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "MasterStatusTransaksiInvestasi" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"color" TEXT,
"active" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "MasterStatusTransaksiInvestasi_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Investasi_imagesId_key" ON "Investasi"("imagesId");
-- CreateIndex
CREATE UNIQUE INDEX "ProspektusInvestasi_investasiId_key" ON "ProspektusInvestasi"("investasiId");
-- AddForeignKey
ALTER TABLE "Katalog" ADD CONSTRAINT "Katalog_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "Profile"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Katalog" ADD CONSTRAINT "Katalog_masterBidangBisnisId_fkey" FOREIGN KEY ("masterBidangBisnisId") REFERENCES "MasterBidangBisnis"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterPeriodeDevidenId_fkey" FOREIGN KEY ("masterPeriodeDevidenId") REFERENCES "MasterPeriodeDeviden"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterPembagianDevidenId_fkey" FOREIGN KEY ("masterPembagianDevidenId") REFERENCES "MasterPembagianDeviden"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterPencarianInvestorId_fkey" FOREIGN KEY ("masterPencarianInvestorId") REFERENCES "MasterPencarianInvestor"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES "Images"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterStatusInvestasiId_fkey" FOREIGN KEY ("masterStatusInvestasiId") REFERENCES "MasterStatusInvestasi"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterProgresInvestasiId_fkey" FOREIGN KEY ("masterProgresInvestasiId") REFERENCES "MasterProgresInvestasi"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "ProspektusInvestasi" ADD CONSTRAINT "ProspektusInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "DokumenInvestasi" ADD CONSTRAINT "DokumenInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "BeritaInvestasi" ADD CONSTRAINT "BeritaInvestasi_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES "Images"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "BeritaInvestasi" ADD CONSTRAINT "BeritaInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "TransaksiInvestasi" ADD CONSTRAINT "TransaksiInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "TransaksiInvestasi" ADD CONSTRAINT "TransaksiInvestasi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "TransaksiInvestasi" ADD CONSTRAINT "TransaksiInvestasi_masterStatusTransaksiInvestasiId_fkey" FOREIGN KEY ("masterStatusTransaksiInvestasiId") REFERENCES "MasterStatusTransaksiInvestasi"("id") ON DELETE SET NULL ON UPDATE CASCADE;

View File

@@ -22,7 +22,6 @@ model User {
UserSession UserSession?
Profile Profile?
Investasi Investasi[]
// Investor Investor[]
TransaksiInvestasi TransaksiInvestasi[]
}
@@ -124,19 +123,17 @@ model Investasi {
masterPembagianDevidenId String?
MasterPencarianInvestor MasterPencarianInvestor? @relation(fields: [masterPencarianInvestorId], references: [id])
masterPencarianInvestorId String?
ImageInvestasi Images? @relation(fields: [imagesId], references: [id])
imagesId String? @unique
ProspektusInvestasi ProspektusInvestasi?
MasterStatusInvestasi MasterStatusInvestasi? @relation(fields: [masterStatusInvestasiId], references: [id])
masterStatusInvestasiId String? @default("2")
ProspektusInvestasi ProspektusInvestasi?
BeritaInvestasi BeritaInvestasi[]
DokumenInvestasi DokumenInvestasi[]
// Investor Investor[]
TransaksiInvestasi TransaksiInvestasi[]
TransaksiInvestasi TransaksiInvestasi[]
MasterProgresInvestasi MasterProgresInvestasi? @relation(fields: [masterProgresInvestasiId], references: [id])
masterProgresInvestasiId String?
}
model MasterPencarianInvestor {
@@ -219,6 +216,15 @@ model MasterBank {
updatedAt DateTime @updatedAt
}
model MasterProgresInvestasi {
id String @id @default(cuid())
name String
active Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
Investasi Investasi[]
}
model TransaksiInvestasi {
id String @id @default(cuid())
Investasi Investasi @relation(fields: [investasiId], references: [id])
@@ -262,16 +268,3 @@ model MasterStatusTransaksiInvestasi {
TransaksiInvestasi TransaksiInvestasi[]
}
// model Investor {
// id String @id @default(cuid())
// totalBeli String
// jumlahLembar String
// active Boolean @default(true)
// createdAt DateTime @default(now())
// updatedAt DateTime @updatedAt
// Investasi Investasi? @relation(fields: [investasiId], references: [id])
// investasiId String?
// User User? @relation(fields: [userId], references: [id])
// userId String?
// }

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

View File

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

View File

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 217 KiB

View File

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 KiB

View File

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

View File

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

View File

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 KiB

View File

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

View File

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

View File

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

View File

@@ -20,7 +20,7 @@ export async function POST(req: Request) {
} else {
try {
await fetch(
`https://wa.wibudev.com/code?nom=${body.nomor}&text=${body.otp}`
`https://wa.wibudev.com/code?nom=${body.nomor}&text=Masukan Kode OTP:${body.otp}`
);
return NextResponse.json({
body,

View File

@@ -6,6 +6,7 @@ export async function GET(
req: NextRequest,
{ params }: { params: { id: string } }
) {
const data = await prisma.images.findUnique({
where: {
id: params.id,

View File

@@ -0,0 +1,9 @@
import { NextRequest, NextResponse } from "next/server";
export async function POST(req: NextRequest, {params}: {params: {id: any}}) {
const body = await req.json()
console.log(body)
return NextResponse.json({ status: 200, message: "OK", data: body });
}

View File

@@ -6,7 +6,7 @@ export async function GET(
req: NextRequest,
{ params }: { params: { id: string } }
) {
console.log(params.id)
// console.log(params.id)
const data = await prisma.prospektusInvestasi.findUnique({
where: { id: params.id },
select: {

View File

@@ -8,6 +8,8 @@ import pembagianDeviden from "./../../../bin/seeder/investasi/pembagian_deviden.
import statusInvestasi from "./../../../bin/seeder/investasi/status_investasi.json";
import namaBank from "./../../../bin/seeder/investasi/nama_bank.json";
import statusTransaksiInvestasi from "./../../../bin/seeder/investasi/status_transaksi_investasi.json";
import jenisProgres from "../../../bin/seeder/investasi/master_progres.json";
import userSeeder from "../../../bin/seeder/user_seeder.json";
export async function GET(req: Request) {
const dev = new URL(req.url).searchParams.get("dev");
@@ -28,6 +30,24 @@ export async function GET(req: Request) {
});
}
for (let i of userSeeder) {
await prisma.user.upsert({
where: {
nomor: i.nomor,
},
create: {
nomor: i.nomor,
username: i.name,
masterUserRoleId: i.masterUserRoleId,
},
update: {
nomor: i.nomor,
username: i.name,
masterUserRoleId: i.masterUserRoleId,
},
});
}
for (let i of bidangBisnis) {
await prisma.masterBidangBisnis.upsert({
where: {
@@ -146,6 +166,21 @@ export async function GET(req: Request) {
});
}
for (let i of jenisProgres) {
await prisma.masterProgresInvestasi.upsert({
where: {
id: i.id,
},
create: {
id: i.id,
name: i.name,
},
update: {
name: i.name,
},
});
}
return NextResponse.json({ success: true });
}

View File

@@ -28,6 +28,8 @@ export default async function Page({ params }: { params: { id: string } }) {
const totalInvestor = await funTotalInvestorByIdInvestasi(dataInvestasi?.id)
// console.log(dataInvestasi?.MasterProgresInvestasi?.name)
return (
<>
<DetailInvestasi

View File

@@ -1,6 +1,6 @@
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";
import getOneTransaksiBerhasilByIdInvestasi from "@/app_modules/investasi/fun/get_one_transaksi_by_id";
export default async function Page({ params }: { params: { id: string } }) {
const dataTransaksi = await getOneTransaksiBerhasilByIdInvestasi(params.id);

View File

@@ -1,24 +1,44 @@
import { MainInvestasi } from "@/app_modules/investasi";
import funTotalInvestorByIdInvestasi from "@/app_modules/investasi/fun/fun_total_investor_by_id";
import funUpadteProgresPersenInvestasi from "@/app_modules/investasi/fun/fun_update_progres_persen";
import funUpadteProgresWaktuInvestasi from "@/app_modules/investasi/fun/fun_update_progres_waktu";
import getAllDataPublishInvestasi from "@/app_modules/investasi/fun/get_list_all_investasi";
import { getListAllPublish } from "@/app_modules/investasi/fun/get_list_all_publish";
import getPembagianDeviden from "@/app_modules/investasi/fun/master/get_pembagian_deviden";
import getPencarianInvestor from "@/app_modules/investasi/fun/master/get_pencarian_investor";
import getPeriodeDeviden from "@/app_modules/investasi/fun/master/get_periode_deviden";
import { MODEL_Investasi } from "@/app_modules/investasi/model/model_investasi";
import _ from "lodash";
export default async function Page() {
const data = await getListAllPublish();
const pencarianInvestor = await getPencarianInvestor();
const periodeDeviden = await getPeriodeDeviden();
const pembagianDeviden = await getPembagianDeviden();
const dataOnProgres = await getListAllPublish("1");
const dataSelesai = await getListAllPublish("2");
const dataWaktuHabis = await getListAllPublish("3");
const allData = await getAllDataPublishInvestasi();
// console.log(allData)
// const dataInves: MODEL_Investasi[] = [];
// for (let i of allData as any) {
// await funUpadteProgresWaktuInvestasi(i).then(
// async () =>
// await funUpadteProgresPersenInvestasi(i).then(
// async () =>
// await getAllDataPublishInvestasi().then((val: any) =>
// dataInves.push(val)
// )
// )
// );
// }
// const realData = dataInves.map((e) => e)
// console.log(allData)
// console.log(data)
return (
<>
<MainInvestasi
listData={data as any}
pencarianInvestor={pencarianInvestor as any}
periodeDeviden={periodeDeviden as any}
pembagianDeviden={pembagianDeviden as any}
listData={allData as any}
dataSelesai={dataSelesai as any}
dataWaktuHabis={dataWaktuHabis as any}
/>
</>
);

View File

@@ -17,7 +17,8 @@ export default async function Page({ params }: { params: { id: string } }) {
const userLogin = await funGetUserProfile(user.id);
const dataInvestasi = await getOneInvestasiById(params.id);
// console.log(userLogin);
// console.log(dataInvestasi);
return (
<>
<ProsesTransaksiInvestasi

View File

@@ -0,0 +1,8 @@
import { LayoutStatusPesananInvestasi } from "@/app_modules/investasi";
import React from "react";
export default async function Layout({children}: {children: React.ReactNode}) {
return <>
<LayoutStatusPesananInvestasi>{children}</LayoutStatusPesananInvestasi>
</>
}

View File

@@ -0,0 +1,14 @@
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
import { StatusPesananInvetsatsi } from "@/app_modules/investasi";
import getOneTransaksiByIdInvestasi from "@/app_modules/investasi/fun/get_one_transaksi_by_id";
import getTransaksiByIdInvestasi from "@/app_modules/investasi/fun/get_transaksi_investasi";
export default async function Page({ params }: { params: { id: string } }) {
const dataTransaksi = await getOneTransaksiByIdInvestasi(params.id);
return (
<>
<StatusPesananInvetsatsi dataTransaksi={dataTransaksi as any} />
</>
);
}

View File

@@ -2,6 +2,7 @@ export const RouterInvestasi = {
api_gambar: "/api/investasi/gambar/",
api_file_prospektus: "/api/investasi/prospektus/",
api_file_dokumen: "/api/investasi/dokumen/",
api_get_notif_midtrans: "/api/investasi/midtrans",
//INVESTASI
main: "/dev/investasi/main",
@@ -20,6 +21,7 @@ export const RouterInvestasi = {
proses_investasi: "/dev/investasi/proses_investasi/",
proses_transaksi: "/dev/investasi/proses_transaksi/",
status_transaksi: "/dev/investasi/status_transaksi/berhasil",
status_pesanan:"/dev/investasi/status_pesanan/",
status_transaksi_gagal: "/dev/investasi/status_transaksi/gagal/",
metode_transfer: "/dev/investasi/metode_transfer/",

View File

@@ -122,7 +122,7 @@ export default function Admin_KonfirmasiInvestasi({
}
async function onPublish() {
await funGantiStatusInvestasi(investasi.id, "3").then((res) => {
await funGantiStatusInvestasi(investasi.id, "3", "1").then((res) => {
if (res.status === 200) {
setTimeout(() => setPublish(false), 1000);
router.push(RouterAdminInvestasi.table_status_review);

View File

@@ -0,0 +1,15 @@
"use server";
export default async function funGetNotif({
params,
}: {
params: { data: any };
}) {
const body = params.data;
console.log(body);
return {
status: 200,
message: "OK",
};
}

View File

@@ -75,26 +75,26 @@ export default function InvestasiCreate({
};
// toast("Berhasil disimpan")
// if (_.values(body).includes("")) return toast("Lengkapi data");
if (!fl) return toast("Gambar Kosong");
if (!pdf) return toast("File Kosong");
// if (_.values(body).includes("")) return toast("Lengkapi data");
if (!fl) return toast("Gambar Kosong");
if (!pdf) return toast("File Kosong");
const gmbr = new FormData();
gmbr.append("file", fl);
const gmbr = new FormData();
gmbr.append("file", fl);
const flPdf = new FormData();
flPdf.append("file", pdf);
const flPdf = new FormData();
flPdf.append("file", pdf as any);
await funCreateInvestasi(gmbr, flPdf, body as any).then((res) => {
if (res.status === 201) {
// toast(res.message);
setChangeColor(1);
setActiveTab("Review");
router.push(RouterInvestasi.dialog_create);
} else {
toast(res.message);
}
});
await funCreateInvestasi(gmbr, flPdf, body as any).then((res) => {
if (res.status === 201) {
// toast(res.message);
setChangeColor(1);
setActiveTab("Review");
router.push(RouterInvestasi.dialog_create);
} else {
toast(res.message);
}
});
}
async function onTotalLembar(target: any, harga: any) {

View File

@@ -25,6 +25,7 @@ import {
IconCircleCheck,
IconFileDescription,
IconSpeakerphone,
IconXboxX,
} from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import { useState } from "react";
@@ -41,13 +42,13 @@ export default function DetailInvestasi({
dataUser,
loginUserId,
progress,
totalInvestor
totalInvestor,
}: {
dataInvestasi: MODEL_Investasi;
dataUser: MODEL_User_profile;
loginUserId: string;
progress: number;
totalInvestor: number
totalInvestor: number;
}) {
const router = useRouter();
const [investasi, setInvestasi] = useState(dataInvestasi);
@@ -102,22 +103,54 @@ export default function DetailInvestasi({
</Avatar>
<Text>{user.username}</Text>
</Flex>
{Number(investasi.MasterPencarianInvestor.name) -
moment(new Date()).diff(new Date(investasi.countDown), "days") <=
0 ? (
<Group position="right">
<IconCircleCheck color="green" />
<Text c={"green"}>Selesai</Text>
</Group>
{investasi.MasterProgresInvestasi.id === "1" ? (
<Box>
<Group position="right" spacing={"xs"}>
<Text>Sisa waktu:</Text>
<Text>
{Number(investasi.MasterPencarianInvestor.name) -
moment(new Date()).diff(
new Date(investasi.countDown),
"days"
)}
</Text>
<Text>Hari</Text>
</Group>
</Box>
) : (
<Group position="right" spacing={"xs"}>
<Text>Sisa waktu:</Text>
<Text>
{Number(investasi.MasterPencarianInvestor.name) -
moment(new Date()).diff(new Date(investasi.countDown), "days")}
</Text>
<Text>Hari</Text>
</Group>
<Box>
{investasi.MasterProgresInvestasi.id === "2" ? (
<Group position="right" spacing={"xs"}>
<IconCircleCheck color="green" />
<Text
truncate
variant="text"
c={Warna.hijau_tua}
sx={{ fontFamily: "Greycliff CF, sans-serif" }}
ta="center"
fz="md"
fw={700}
>
Selesai
</Text>
</Group>
) : (
<Group position="right" spacing={"xs"}>
<IconXboxX color="red" />
<Text
truncate
variant="text"
c={Warna.merah}
sx={{ fontFamily: "Greycliff CF, sans-serif" }}
ta="center"
fz="md"
fw={700}
>
Waktu Habis
</Text>
</Group>
)}
</Box>
)}
</Group>
@@ -192,9 +225,13 @@ export default function DetailInvestasi({
</Grid.Col>
<Grid.Col span={6}>
<Stack>
<Box>
<Box>
<Text>Investor</Text>
<Text>{new Intl.NumberFormat("id-ID", {maximumSignificantDigits: 10}).format(totalInvestor)}</Text>
<Text>
{new Intl.NumberFormat("id-ID", {
maximumSignificantDigits: 10,
}).format(totalInvestor)}
</Text>
</Box>
<Box>
<Text>ROI</Text>
@@ -242,25 +279,38 @@ export default function DetailInvestasi({
))}
</Grid>
{loginUserId === investasi.authorId ? (
{investasi.sisaLembar === "0" ||
Number(investasi.MasterPencarianInvestor.name) -
moment(new Date()).diff(new Date(investasi.countDown), "days") <=
0 ? (
<Center mb={"md"}>
<Button disabled radius={50} w={350}>
Investasi Ini Milik Anda
<Button disabled radius={50} w={350} variant="transparent">
Investasi Telah Ditutup
</Button>
</Center>
) : (
<Center mb={"md"}>
<Button
radius={50}
w={350}
bg={Warna.biru}
onClick={() => {
onSubmit();
}}
>
Beli Saham
</Button>
</Center>
<Box>
{loginUserId === investasi.authorId ? (
<Center mb={"md"}>
<Button disabled radius={50} w={350}>
Investasi Ini Milik Anda
</Button>
</Center>
) : (
<Center mb={"md"}>
<Button
radius={50}
w={350}
bg={Warna.biru}
onClick={() => {
onSubmit();
}}
>
Beli Saham
</Button>
</Center>
)}
</Box>
)}
</>
);

View File

@@ -20,19 +20,20 @@ export default function LayoutDialogPageCreateInvestasi({
}: {
children: React.ReactNode;
}) {
const router = useRouter()
const router = useRouter();
useShallowEffect(() => {
setTimeout(() => router.push(RouterInvestasi.portofolio), 3000)
},[])
setTimeout(() => router.push(RouterInvestasi.portofolio), 3000);
}, []);
return (
<>
<AppShell
footer={
<Footer height={70} sx={{ borderStyle: "none" }}>
<Footer height={80} sx={{ borderStyle: "none" }}>
<Group spacing={4} position="center">
<IconAlertTriangle color="orange" size={20} />
<Text fz={"sm"}>Proyek Investasi anda akan berstatus DRAFT</Text>
<Text fz={"sm"}>Mohon menunggu validasi Admin</Text>
</Group>
</Footer>
}
>

View File

@@ -7,11 +7,12 @@ import fs from "fs";
import { revalidatePath } from "next/cache";
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
import { MODEL_Investasi } from "../model/model_investasi";
import funUploadProspektusInvestasi from "./fun_upload_prospek";
export async function funCreateInvestasi(
gamabar: FormData,
filePdf: FormData,
data: MODEL_Investasi
data: MODEL_Investasi
) {
// Function upload gambar
const file: any = gamabar.get("file");
@@ -47,8 +48,8 @@ export async function funCreateInvestasi(
totalLembar: data.totalLembar.toString(),
sisaLembar: data.totalLembar.toString(),
roi: data.roi.toString(),
masterPembagianDevidenId: data.masterPeriodeDevidenId,
masterPeriodeDevidenId: data.masterPembagianDevidenId,
masterPembagianDevidenId: data.masterPembagianDevidenId,
masterPeriodeDevidenId: data.masterPeriodeDevidenId,
masterPencarianInvestorId: data.masterPencarianInvestorId,
imagesId: uploadImage.id,
masterStatusInvestasiId: "2",
@@ -62,26 +63,31 @@ export async function funCreateInvestasi(
};
// File upload function
const dataPdf: any = filePdf.get("file");
const pdfName = dataPdf.name;
const pdfExt = _.lowerCase(dataPdf.name.split(".").pop());
const pdfRandomName = v4(pdfName) + "." + pdfExt;
// const dataPdf: any = filePdf.get("file");
// const pdfName = dataPdf.name;
// const pdfExt = _.lowerCase(dataPdf.name.split(".").pop());
// const pdfRandomName = v4(pdfName) + "." + pdfExt;
const uploadFile = await prisma.prospektusInvestasi.create({
data: {
investasiId: createInvest.id,
url: pdfRandomName,
},
select: {
id: true,
url: true,
},
});
// const uploadFile = await prisma.prospektusInvestasi.create({
// data: {
// investasiId: createInvest.id,
// url: pdfRandomName,
// },
// select: {
// id: true,
// url: true,
// },
// });
// if (!uploadFile) return { status: 400, message: "File Kosong" };
// const upPdfFolder = Buffer.from(await file.arrayBuffer());
// fs.writeFileSync(`./public/file/${uploadFile.url}`, upPdfFolder);
if (!uploadFile) return { status: 400, message: "File Kosong" };
const upPdfFolder = Buffer.from(await file.arrayBuffer());
fs.writeFileSync(`./public/file/${uploadFile.url}`, upPdfFolder);
const updloadPDF = await funUploadProspektusInvestasi(
filePdf,
createInvest.id
);
// console.log(updloadPDF);
revalidatePath(RouterInvestasi.main_porto);

View File

@@ -6,28 +6,64 @@ import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
import moment from "moment";
import { revalidatePath } from "next/cache";
export default async function funGantiStatusInvestasi(id: string, val: string) {
const publishCD = new Date
const data = await prisma.investasi.update({
where: {
id: id,
},
data: {
MasterStatusInvestasi: {
connect: {
id: val,
export default async function funGantiStatusInvestasi(
id: string,
statusInves: string,
statusProgres?: string
) {
console.log(statusProgres)
if (statusProgres === '1') {
const publishCD = new Date();
const data = await prisma.investasi.update({
where: {
id: id,
},
data: {
MasterStatusInvestasi: {
connect: {
id: statusInves,
},
},
countDown: publishCD,
MasterProgresInvestasi: {
connect: {
id: statusProgres,
},
},
},
countDown: publishCD,
},
});
});
if (!data) return { status: 400 };
if (!data) return { status: 400 };
revalidatePath(RouterInvestasi.portofolio);
revalidatePath(RouterAdminInvestasi.main_investasi);
revalidatePath(RouterInvestasi.portofolio);
revalidatePath(RouterAdminInvestasi.main_investasi);
return {
status: 200,
};
return {
status: 200,
};
} else {
const publishCD = new Date();
const data = await prisma.investasi.update({
where: {
id: id,
},
data: {
MasterStatusInvestasi: {
connect: {
id: statusInves,
},
},
countDown: publishCD,
},
});
if (!data) return { status: 400 };
revalidatePath(RouterInvestasi.portofolio);
revalidatePath(RouterAdminInvestasi.main_investasi);
return {
status: 200,
};
}
}

View File

@@ -2,20 +2,67 @@
import prisma from "@/app/lib/prisma";
import { MODEL_Investasi } from "../model/model_investasi";
import { revalidatePath } from "next/cache";
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
export default async function funUpdateInvestasi(
dataLembarSaham: MODEL_Investasi,
dataInvestasi: MODEL_Investasi
) {
const investasi = dataInvestasi;
// console.log(investasi)
const progres =
((+investasi.totalLembar - +dataLembarSaham.sisaLembar) /
+investasi.totalLembar) *
100;
const jumlahTerbeli = +investasi.totalLembar - +dataLembarSaham.sisaLembar;
export default async function funUpdateInvestasi(data: MODEL_Investasi) {
// console.log(data)
const res = await prisma.investasi.update({
where: {
id: data.id,
id: dataLembarSaham.id,
},
data: {
sisaLembar: "" + data.sisaLembar,
sisaLembar: "" + dataLembarSaham.sisaLembar,
progress: "" + progres,
lembarTerbeli: "" + jumlahTerbeli,
},
});
if (!res) return { status: 400, message: "Gagal update" };
if (res.progress === "100") {
const updateStatusProgres = await prisma.investasi.update({
where: {
id: res.id,
},
data: {
masterProgresInvestasiId: "2",
},
});
// console.log(updateStatusProgres)
try {
await fetch(
`https://wa.wibudev.com/code?nom=${investasi.author.nomor}&text=Selamat !! , Project Investasi ${investasi.title} Anda Sukses`
);
return {
status: 200,
message: "Berhasil, kirim pesan ke Author"
}
} catch (error) {
return {
status: 400,
message: "Tidak Terkirim ke Author"
}
}
}
revalidatePath(RouterInvestasi.main);
return {
status: 200,
message: "Update berhasil",

View File

@@ -20,17 +20,39 @@ export interface Model_Midtrans_Success {
finish_redirect_url: string;
}
interface Model_Body {
authorId: string;
customer_name: string;
phone: string;
gross_amount: number;
item_name: string;
price: number;
quantity: number;
merchant_name: string;
investasiId: string;
}
interface Model_Token {
token: string;
redirect_url: string;
}
export default async function funUpdatePaymentInvestasi(
data: Model_Midtrans_Success,
idPay: any,
body: Model_Body,
token: Model_Token
) {
console.log(data)
if (data.status_code === "200") {
const res = await prisma.transaksiInvestasi.update({
where: {
id: idPay,
},
const res = await prisma.transaksiInvestasi.create({
data: {
gross_amount: "" + body.gross_amount,
merchant_name: body.merchant_name,
price: "" + body.price,
quantity: "" + body.quantity,
token: token.token,
redirect_url: token.redirect_url,
authorId: body.authorId,
investasiId: body.investasiId,
status_code: data.status_code,
status_message: data.status_message,
order_id: data.order_id,
@@ -48,49 +70,12 @@ export default async function funUpdatePaymentInvestasi(
if (!res) return { status: 400, message: "Gagal update transaksi" };
// const jumlah = Number(res.quantity);
// const sisa = Number(investasi?.sisaLembar);
// const hasil = sisa - jumlah;
// const updateTransaksi = await prisma.investasi.update({
// where: {
// id: investasi?.id,
// },
// data: {
// sisaLembar: hasil.toString(),
// },
// });
// console.log(updateTransaksi);
// if (!updateTransaksi)
// return { status: 400, message: "Gagal update investasi" };
revalidatePath(RouterInvestasi.main_transaksi)
revalidatePath(RouterInvestasi.main_transaksi);
return {
status: 200,
message: "Process",
message: "Berhasil",
data: res,
};
} else {
if (data.status_code === "201") {
const res = await prisma.transaksiInvestasi.update({
where: {
id: idPay,
},
data: {
status_code: "201",
},
});
return {
message: "Success",
};
} else {
if ((!data.status_code as any) === "400")
return { status: 400, message: "Update Gagal" };
return {
status: 200,
message: "Berhasil Update",
};
}
}
}

View File

@@ -0,0 +1,20 @@
"use server";
import { MODEL_Investasi } from "../model/model_investasi";
import moment from "moment";
import prisma from "@/app/lib/prisma";
export default async function funUpadteProgresPersenInvestasi(data: MODEL_Investasi) {
// console.log(data)
if (data.MasterProgresInvestasi.id !== "2" && data.progress === "100") {
const res = await prisma.investasi.update({
where: {
id: data.id,
},
data: {
masterProgresInvestasiId: "2",
},
});
// console.log(res);
return res;
}
}

View File

@@ -0,0 +1,23 @@
"use server";
import { MODEL_Investasi } from "../model/model_investasi";
import moment from "moment";
import prisma from "@/app/lib/prisma";
export default async function funUpadteProgresWaktuInvestasi(data: MODEL_Investasi) {
const pencarian = data.MasterPencarianInvestor.name;
const countD = moment(new Date()).diff(new Date(data.countDown), "days");
if (+pencarian - +countD <= 0) {
const res = await prisma.investasi.update({
where: {
id: data.id,
},
data: {
masterProgresInvestasiId: "3",
},
});
// console.log(res);
return res;
}
}

View File

@@ -0,0 +1,45 @@
"use server";
import prisma from "@/app/lib/prisma";
export default async function getAllDataPublishInvestasi() {
const data = await prisma.investasi.findMany({
orderBy: [
{
masterProgresInvestasiId: "asc",
},
{
countDown: "desc",
},
],
where: {
MasterStatusInvestasi: {
name: {
equals: "Publish",
},
},
},
select: {
id: true,
title: true,
authorId: true,
hargaLembar: true,
targetDana: true,
totalLembar: true,
sisaLembar: true,
progress: true,
roi: true,
active: true,
createdAt: true,
updatedAt: true,
imagesId: true,
ProspektusInvestasi: true,
MasterPembagianDeviden: true,
MasterPencarianInvestor: true,
MasterPeriodeDeviden: true,
MasterProgresInvestasi: true,
countDown: true,
},
});
return data;
}

View File

@@ -1,46 +1,142 @@
"use server";
import prisma from "@/app/lib/prisma";
/**
*
* @param status progres > 1 - 3
* @type string
* @returns data publish menurut status progresnya
*/
export async function getListAllPublish(status : string) {
export async function getListAllPublish() {
const data = await prisma.investasi.findMany({
orderBy: {
countDown: "asc",
},
where: {
MasterStatusInvestasi: {
name: {
equals: "Publish",
if (status === "1") {
const data = await prisma.investasi.findMany({
orderBy: {
countDown: "asc",
},
where: {
MasterStatusInvestasi: {
name: {
equals: "Publish",
},
},
AND: {
MasterProgresInvestasi: {
id: "1",
},
},
},
AND: {
select: {
id: true,
title: true,
authorId: true,
hargaLembar: true,
targetDana: true,
totalLembar: true,
sisaLembar: true,
progress: true,
roi: true,
active: true,
createdAt: true,
updatedAt: true,
imagesId: true,
// MasterStatusInvestasi: true,
// BeritaInvestasi: true,
// DokumenInvestasi: true,
ProspektusInvestasi: true,
MasterPembagianDeviden: true,
MasterPencarianInvestor: true,
MasterPeriodeDeviden: true,
MasterProgresInvestasi: true,
countDown: true,
},
},
select: {
id: true,
title: true,
authorId: true,
hargaLembar: true,
targetDana: true,
totalLembar: true,
sisaLembar: true,
progress: true,
roi: true,
active: true,
createdAt: true,
updatedAt: true,
imagesId: true,
MasterStatusInvestasi: true,
BeritaInvestasi: true,
DokumenInvestasi: true,
ProspektusInvestasi: true,
MasterPembagianDeviden: true,
MasterPencarianInvestor: true,
MasterPeriodeDeviden: true,
countDown: true,
},
});
return data;
});
return data;
}
if (status === "2") {
const data = await prisma.investasi.findMany({
orderBy: {
masterPencarianInvestorId: "asc",
},
where: {
MasterStatusInvestasi: {
name: {
equals: "Publish",
},
},
AND: {
MasterProgresInvestasi: {
id: "2",
},
},
},
select: {
id: true,
title: true,
authorId: true,
hargaLembar: true,
targetDana: true,
totalLembar: true,
sisaLembar: true,
progress: true,
roi: true,
active: true,
createdAt: true,
updatedAt: true,
imagesId: true,
// MasterStatusInvestasi: true,
// BeritaInvestasi: true,
// DokumenInvestasi: true,
ProspektusInvestasi: true,
MasterPembagianDeviden: true,
MasterPencarianInvestor: true,
MasterPeriodeDeviden: true,
countDown: true,
},
});
return data
}
if (status === "3") {
const data = await prisma.investasi.findMany({
orderBy: {
masterPencarianInvestorId: "asc",
},
where: {
MasterStatusInvestasi: {
name: {
equals: "Publish",
},
},
AND: {
MasterProgresInvestasi: {
id: "3",
},
},
},
select: {
id: true,
title: true,
authorId: true,
hargaLembar: true,
targetDana: true,
totalLembar: true,
sisaLembar: true,
progress: true,
roi: true,
active: true,
createdAt: true,
updatedAt: true,
imagesId: true,
// MasterStatusInvestasi: true,
// BeritaInvestasi: true,
// DokumenInvestasi: true,
ProspektusInvestasi: true,
MasterPembagianDeviden: true,
MasterPencarianInvestor: true,
MasterPeriodeDeviden: true,
countDown: true,
},
});
return data
}
}

View File

@@ -30,6 +30,7 @@ export default async function getOneInvestasiById(id: string) {
MasterPembagianDeviden: true,
MasterPencarianInvestor: true,
MasterPeriodeDeviden: true,
MasterProgresInvestasi: true,
author: true,
countDown: true
},

View File

@@ -6,15 +6,18 @@ export default async function getOneTransaksiBerhasilByIdInvestasi(
idTransaksi: string
) {
const data = await prisma.transaksiInvestasi.findUnique({
where: {
id: idTransaksi,
},
select: {
Investasi: {
select: {
author: true,
author: {
select: {
nomor: true,
username: true,
}
},
BeritaInvestasi: true,
DokumenInvestasi: true,
ProspektusInvestasi: true,
@@ -35,6 +38,10 @@ export default async function getOneTransaksiBerhasilByIdInvestasi(
id: true,
gross_amount: true,
quantity: true,
transaction_id: true,
status_message: true,
payment_type: true,
namaBank: true,
},
});

View File

@@ -33,7 +33,6 @@ export default async function getTokenTransaksi(data) {
customer_details: {
first_name: body.customer_name,
phone: body.phone,
// email: "test@midtrans.com",
},
enabled_payments: [
"permata_va",
@@ -45,7 +44,7 @@ export default async function getTokenTransaksi(data) {
"shopeepay",
],
bca_va: {
va_number: "82340374411111",
va_number: "7725699636222",
sub_company_code: "00000",
free_text: {
inquiry: [
@@ -81,25 +80,15 @@ export default async function getTokenTransaksi(data) {
}
});
// console.log(token)
if (token.status === 400) {
return { token: token };
}
const newTransaksi = await prisma.transaksiInvestasi.create({
data: {
gross_amount: "" + data.gross_amount,
merchant_name: data.merchant_name,
price: "" + data.price,
quantity: "" + data.quantity,
token: token.value.token,
redirect_url: token.value.redirect_url,
authorId: data.authorId,
investasiId: data.investasiId,
},
});
return {
token: token,
dataTransaksi: newTransaksi,
// dataTransaksi: newTransaksi,
};
}

View File

@@ -11,6 +11,10 @@ export default async function getTransaksiByIdInvestasi(id: string) {
id: true,
namaBank: true,
nomorRekening: true,
transaction_id: true,
quantity: true,
gross_amount: true,
status_message: true,
active: true,
createdAt: true,
updatedAt: true,

View File

@@ -13,3 +13,5 @@ export const gs_TransferValue = atomWithStorage("gs_TransferValue", {
namaBank: "",
nomorRekening: "",
});
export const gs_midtrans_snap= atomWithStorage("gs_midtrans_snapssssssssss", false)

View File

@@ -65,6 +65,8 @@ import UploadDokumenInvestasi from "./upload_dokumen/view";
import LayoutUploadDokumenInvestasi from "./upload_dokumen/layout";
import ProsesTransaksiInvestasi from "./proses_transaksi/view";
import LayoutProsesTransaksiInvestasi from "./proses_transaksi/layout";
import StatusPesananInvetsatsi from "./status_pesanan/view";
import LayoutStatusPesananInvestasi from "./status_pesanan/layout";
export {
MainInvestasi,
@@ -134,4 +136,6 @@ export {
LayoutUploadDokumenInvestasi,
ProsesTransaksiInvestasi,
LayoutProsesTransaksiInvestasi,
StatusPesananInvetsatsi,
LayoutStatusPesananInvestasi,
};

View File

@@ -25,7 +25,7 @@ import {
import { useRouter } from "next/navigation";
import dataDummy from "../dummy/data_dummy.json";
import moment from "moment";
import { IconCheck, IconCircleCheck } from "@tabler/icons-react";
import { IconCheck, IconCircleCheck, IconXboxX } from "@tabler/icons-react";
import { MODEL_Investasi } from "../model/model_investasi";
import _ from "lodash";
import { useState } from "react";
@@ -35,39 +35,23 @@ import { Warna } from "@/app/lib/warna";
export default function MainInvestasi({
listData,
pencarianInvestor,
periodeDeviden,
pembagianDeviden,
dataSelesai,
dataWaktuHabis,
}: {
listData: MODEL_Investasi[];
pencarianInvestor: MODEL_DEFAULT_MASTER[];
periodeDeviden: MODEL_DEFAULT_MASTER[];
pembagianDeviden: MODEL_DEFAULT_MASTER[];
dataSelesai: MODEL_Investasi[];
dataWaktuHabis: MODEL_Investasi[];
}) {
// console.log(listData)
const router = useRouter();
const [investasi, setInvestasi] = useState(listData);
const [invesDone, setInvesDone] = useState(dataSelesai);
const [invesFail, setInvesFail] = useState(dataWaktuHabis);
const [statusPublish, setStatusPublish] = useState(false);
async function onProgres(data: MODEL_Investasi) {
// console.log(data)
const total = Number(data.totalLembar);
const sisa = Number(data.sisaLembar);
const beli = total - sisa;
const hasil = (beli / total) * 100;
const progres = Math.round(hasil).toFixed(2);
// console.log(progres)
return progres;
}
// console.log(dataWaktuHabis)
// useShallowEffect(() => {
// onStatusPublish(investasi)
// },[investasi])
// async function onStatusPublish(investasi : MODEL_Investasi[]) {
// }
if (_.isEmpty(investasi))
if (_.isEmpty(investasi) && _.isEmpty(invesDone) && _.isEmpty(invesFail))
return (
<>
{" "}
@@ -79,7 +63,6 @@ export default function MainInvestasi({
return (
<>
{/* <pre>{JSON.stringify(listData, null, 2)}</pre> */}
{investasi.map((e) => (
<Card
@@ -104,25 +87,12 @@ export default function MainInvestasi({
</AspectRatio>
</CardSection>
{/* Progress dan titlr */}
<CardSection p={"lg"}>
<Stack>
<Title order={4}>{e.title}</Title>
<Progress
label={
"" +
(
((+e.totalLembar - +e.sisaLembar) / +e.totalLembar) *
100
).toFixed(1) +
"%"
}
value={
+(
((+e.totalLembar - +e.sisaLembar) / +e.totalLembar) *
100
).toFixed(1)
}
label={(+e.progress).toFixed(2) + " %"}
value={+e.progress}
color="teal"
size="xl"
radius="xl"
@@ -151,7 +121,6 @@ export default function MainInvestasi({
{new Intl.NumberFormat("id-ID", {
maximumSignificantDigits: 10,
}).format(+e.hargaLembar)}
{/* {e.hargaLembar} */}
</Text>
</Box>
</Stack>
@@ -179,15 +148,6 @@ export default function MainInvestasi({
<Divider color="dark.4" />
<CardSection p={"md"}>
<Group position="apart">
{/* <Box>
{e.SahamTerbeli === null ? (
""
) : (
<Badge variant="dot" color="teal">
Saham Anda
</Badge>
)}
</Box> */}
<Button
radius={"xl"}
compact
@@ -198,48 +158,55 @@ export default function MainInvestasi({
Details
</Button>
{(() => {
if (
Number(e.MasterPencarianInvestor.name) -
{e.progress === "100" ? (
<Group position="right" spacing={"xs"}>
<IconCircleCheck color="green" />
<Text
truncate
variant="text"
c={Warna.hijau_tua}
sx={{ fontFamily: "Greycliff CF, sans-serif" }}
ta="center"
fz="md"
fw={700}
>
Selesai
</Text>
</Group>
) : (
<Box>
{+e.MasterPencarianInvestor.name -
moment(new Date()).diff(new Date(e.countDown), "days") <=
0
) {
return (
<>
<Group position="right" spacing={"xs"}>
<IconCircleCheck color="green" />
<Text
truncate
variant="text"
c={Warna.hijau_tua}
sx={{ fontFamily: "Greycliff CF, sans-serif" }}
ta="center"
fz="md"
fw={700}
>
Waktu Habis
</Text>
</Group>
</>
);
} else {
return (
<>
<Group position="right" spacing={"xs"}>
<Text truncate>Sisa waktu:</Text>
<Text truncate>
{Number(e.MasterPencarianInvestor.name) -
moment(new Date()).diff(
new Date(e.countDown),
"days"
)}
</Text>
<Text truncate>Hari</Text>
</Group>
</>
);
}
})()}
0 ? (
<Group position="right" spacing={"xs"}>
<IconXboxX color="red" />
<Text
truncate
variant="text"
c={Warna.merah}
sx={{ fontFamily: "Greycliff CF, sans-serif" }}
ta="center"
fz="md"
fw={700}
>
Waktu Habis
</Text>
</Group>
) : (
<Group position="right" spacing={"xs"}>
<Text truncate>Sisa waktu:</Text>
<Text truncate>
{Number(e.MasterPencarianInvestor.name) -
moment(new Date()).diff(
new Date(e.countDown),
"days"
)}
</Text>
<Text truncate>Hari</Text>
</Group>
)}
</Box>
)}
</Group>
</CardSection>
</Card>

View File

@@ -23,6 +23,7 @@ export interface MODEL_Investasi {
MasterPembagianDeviden: Model_All_Master;
MasterPencarianInvestor: Model_All_Master;
MasterPeriodeDeviden: Model_All_Master;
MasterProgresInvestasi: Model_All_Master,
masterPeriodeDevidenId: string;
masterPembagianDevidenId: string;
masterPencarianInvestorId: string;
@@ -34,6 +35,9 @@ export interface MODEL_Transaksi_Investasi {
id: string;
namaBank: string;
nomorRekening: string;
transaction_id: string,
status_message: string
payment_type: string,
active: boolean;
createdAt: Date;
updatedAt: Date;

View File

@@ -1,18 +1,43 @@
"use client";
import HeaderTamplate from "@/app_modules/component/header_tamplate";
import { AppShell } from "@mantine/core";
import React from "react";
import { ActionIcon, AppShell, Box, Group, Header, Text } from "@mantine/core";
import { useAtom } from "jotai";
import React, { useState } from "react";
import { gs_midtrans_snap } from "../g_state";
import { IconArrowLeft } from "@tabler/icons-react";
import { title } from "process";
import { useRouter } from "next/navigation";
export default function LayoutProsesTransaksiInvestasi({
children,
}: {
children: React.ReactNode;
}) {
const [snapShow, setSnapShow] = useAtom(gs_midtrans_snap);
const router = useRouter();
// console.log(snapShow)
return (
<>
<AppShell header={<HeaderTamplate title="Proses Transaksi" />}>
{children}
<AppShell
header={
<Header height={50} sx={{ borderStyle: "none" }}>
<Group h={50} position="apart" px={"md"}>
<ActionIcon
variant="transparent"
onClick={() => {
router.back();
}}
>
<IconArrowLeft />
</ActionIcon>
<Text fw={500}>Proses Transaksi</Text>
<ActionIcon variant="transparent" disabled></ActionIcon>
</Group>
</Header>
}
>
<Box>{children}</Box>
</AppShell>
</>
);

View File

@@ -12,7 +12,7 @@ import {
Container,
Flex,
} from "@mantine/core";
import { useFocusTrap } from "@mantine/hooks";
import { useFocusTrap, useShallowEffect } from "@mantine/hooks";
import { useRouter } from "next/navigation";
import { MODEL_Investasi } from "../model/model_investasi";
import { MODEL_User_profile } from "@/app_modules/home/models/user_profile";
@@ -22,7 +22,7 @@ import toast from "react-simple-toasts";
import funUpdatePaymentInvestasi from "../fun/fun_update_payment";
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
import { useAtom } from "jotai";
import { gs_investasiFooter } from "../g_state";
import { gs_investasiFooter, gs_midtrans_snap } from "../g_state";
import funUpdateInvestasi from "../fun/fun_update_investasi";
export default function ProsesTransaksiInvestasi({ dataInvestasi, userLogin }) {
@@ -38,6 +38,11 @@ export default function ProsesTransaksiInvestasi({ dataInvestasi, userLogin }) {
const [hotmenu, setHotmenu] = useAtom(gs_investasiFooter);
const [snapShow, setSnapShow] = useState(false);
useShallowEffect(() => {
setJumlah(0)
setTotal(0)
},[])
// console.log(userLogin.id);
// console.log(investasi);
@@ -61,28 +66,29 @@ export default function ProsesTransaksiInvestasi({ dataInvestasi, userLogin }) {
await getTokenTransaksi(body).then(async (res) => {
if (res.token.status === 200) {
// console.log(res.token.value.token)
setSnapShow(true);
snap.embed(res.token.value.token, {
embedId: "embedId",
// setSnapShow(true);
snap.pay(res.token.value.token, {
// embedId: "embedId",
onSuccess: async function (result) {
console.log(result);
// console.log("success");
setSnapShow(false);
// setSnapShow(false);
await funUpdatePaymentInvestasi(result, res.dataTransaksi.id).then(
await funUpdatePaymentInvestasi(result, body, res.token.value).then(
async (resUpdate) => {
if (resUpdate.status === 200) {
const hasil =
investasi.sisaLembar - res.dataTransaksi.quantity;
// console.log(resUpdate.message)
const lembarTersisa = investasi.sisaLembar - resUpdate.data.quantity;
const body = {
const body2 = {
id: investasi.id,
sisaLembar: hasil,
sisaLembar: lembarTersisa,
};
await funUpdateInvestasi(body);
await funUpdateInvestasi(body2, investasi);
toast(res.message);
router.push(RouterInvestasi.main_transaksi);
router.push(
RouterInvestasi.status_pesanan + `${resUpdate.data.id}`
);
setHotmenu(3);
} else {
toast(res.message);
@@ -91,32 +97,30 @@ export default function ProsesTransaksiInvestasi({ dataInvestasi, userLogin }) {
);
},
onPending: async function (result) {
await funUpdatePaymentInvestasi(result, res.dataTransaksi.id);
router.push(RouterInvestasi.proses_transaksi + `${investasi.id}`);
setSnapShow(false);
console.log("pending");
console.log(result);
},
onError: async function (result) {
await funUpdatePaymentInvestasi(result, res.dataTransaksi.id);
router.push(RouterInvestasi.main_transaksi);
setSnapShow(false);
console.log("error");
console.log(result);
// console.log("pending");
// console.log(result);
// await funUpdatePaymentInvestasi(result, res.dataTransaksi.id);
// toast(res.message);
// router.push(
// RouterInvestasi.status_pesanan + `${res.dataTransaksi.id}`
// );
// router.push(RouterInvestasi.detail + `${investasi.id}`)
await router.push(RouterInvestasi.detail + `${investasi.id}`);
setJumlah(0);
},
onClose: async function (result) {
if (result === undefined) {
const data = {
status_code: "400",
};
await funUpdatePaymentInvestasi(data, res.dataTransaksi.id);
router.push(RouterInvestasi.main_transaksi);
setSnapShow(false);
// router.push(RouterPay.home);
console.log(data);
}
await router.push(RouterInvestasi.detail + `${investasi.id}`);
// if (result === undefined) {
// const data = {
// status_code: "400",
// };
// // await funUpdatePaymentInvestasi(data, res.dataTransaksi.id);
// router.push(RouterInvestasi.main_transaksi);
// setSnapShow(false);
// // router.push(RouterPay.home);
// console.log(data);
// }
},
});
} else {
@@ -143,89 +147,90 @@ export default function ProsesTransaksiInvestasi({ dataInvestasi, userLogin }) {
return (
<>
{!snapShow && (
<Box px={"md"}>
{/* Sisa Lembar Saham */}
<Group position="apart" mb={"md"}>
<Text>Sisa Lembar Saham</Text>
<Text fz={23}>
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(+investasi.sisaLembar)}{" "}
</Text>
</Group>
{/* {!snapShow && (
)} */}
<Box>
{/* Sisa Lembar Saham */}
<Group position="apart" mb={"md"}>
<Text>Sisa Lembar Saham</Text>
<Text fz={23}>
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(+investasi.sisaLembar)}{" "}
</Text>
</Group>
{/* Harga perlembar saham */}
<Group position="apart" mb={"md"}>
<Text>Harga Perlembar</Text>
<Text fz={23}>
Rp.{" "}
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(+investasi.hargaLembar)}{" "}
</Text>
</Group>
{/* Harga perlembar saham */}
<Group position="apart" mb={"md"}>
<Text>Harga Perlembar</Text>
<Text fz={23}>
Rp.{" "}
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(+investasi.hargaLembar)}{" "}
</Text>
</Group>
{/* Lembar saham */}
<Group position="apart" mb={"md"}>
<Box>
<Text>Jumlah Pembelian</Text>
<Text c={"blue"} fs={"italic"} fz={10}>
minimal pembelian 10 lembar
</Text>
{/* <Text c={"red"} fs={"italic"} fz={10}>
{/* Lembar saham */}
<Group position="apart" mb={"md"}>
<Box>
<Text>Jumlah Pembelian</Text>
<Text c={"blue"} fs={"italic"} fz={10}>
minimal pembelian 10 lembar
</Text>
{/* <Text c={"red"} fs={"italic"} fz={10}>
maximal pembelian {maxPembelian} lembar
</Text> */}
</Box>
<NumberInput
type="number"
ref={focusTrapRef}
w={100}
max={maxPembelian}
onChange={(val) => {
setTotal(val * +investasi.hargaLembar);
setJumlah(val);
// console.log(val);
</Box>
<NumberInput
type="number"
ref={focusTrapRef}
w={100}
max={maxPembelian}
onChange={(val) => {
setTotal(val * +investasi.hargaLembar);
setJumlah(val);
// console.log(val);
}}
/>
</Group>
<Divider my={"lg"} />
<Group position="apart" mb={"md"}>
<Box>
<Text>Total Harga</Text>
</Box>
<Text fz={25}>
Rp.{" "}
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(total)}
</Text>
</Group>
<Center>
{jumlah < 10 ? (
<Button w={350} radius={50} bg={"gray"} disabled>
Beli
</Button>
) : (
<Button
w={350}
radius={50}
bg={Warna.biru}
onClick={() => {
onProses();
}}
/>
</Group>
>
Beli
</Button>
)}
</Center>
</Box>
<Divider my={"lg"} />
<Group position="apart" mb={"md"}>
<Box>
<Text>Total Harga</Text>
</Box>
<Text fz={25}>
Rp.{" "}
{new Intl.NumberFormat("id-ID", {
maximumFractionDigits: 10,
}).format(total)}
</Text>
</Group>
<Center>
{jumlah < 10 ? (
<Button w={350} radius={50} bg={"gray"} disabled>
Beli Saham
</Button>
) : (
<Button
w={350}
radius={50}
bg={Warna.biru}
onClick={() => {
onProses();
}}
>
Beli Saham
</Button>
)}
</Center>
</Box>
)}
<Flex align={"center"} justify={"center"} id="embedId" />
{/* <Flex align={"center"} justify={"center"} id="embedId" /> */}
</>
);
}

View File

@@ -0,0 +1,30 @@
"use client";
import HeaderTamplate from "@/app_modules/component/header_tamplate";
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
import { IconArrowLeft } from "@tabler/icons-react";
import router from "next/router";
import { title } from "process";
import React from "react";
export default function LayoutStatusPesananInvestasi({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<AppShell
header={
<Header height={50}>
<Group h={50} position="center" px={"md"}>
<Text>Status Transaksi</Text>
</Group>
</Header>
}
>
{children}
</AppShell>
</>
);
}

View File

@@ -0,0 +1,70 @@
"use client";
import { useState } from "react";
import { MODEL_Transaksi_Investasi } from "../model/model_investasi";
import { Button, Group, Paper, Stack, Text } from "@mantine/core";
import { useRouter } from "next/navigation";
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
export default function StatusPesananInvetsatsi({
dataTransaksi,
}: {
dataTransaksi: MODEL_Transaksi_Investasi;
}) {
const router = useRouter()
const [transaksi, setTransaksi] = useState(dataTransaksi);
return (
<>
<Stack>
<Paper withBorder p={"md"}>
<Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Pemilik Investasi</Text>
<Text>{transaksi.Investasi.author.username}</Text>
</Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Nomor Telephone</Text>
<Text>{transaksi.Investasi.author.nomor}</Text>
</Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Nama Proyek Investasi </Text>
<Text>{transaksi.Investasi.title}</Text>
</Stack>
</Stack>
</Paper>
<Paper withBorder p={"md"}>
<Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Transaksi ID</Text>
<Text>{transaksi.transaction_id}</Text>
</Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Lembar Terbeli</Text>
<Text>{new Intl.NumberFormat("id-ID").format(+transaksi.quantity)} lembar</Text>
</Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Total Transfer</Text>
<Text>Rp. {new Intl.NumberFormat("id-ID", {maximumFractionDigits: 10}).format(+transaksi.gross_amount)}</Text>
</Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Tipe Pembayaran</Text>
<Text>{transaksi.payment_type.replace('_', " ")}</Text>
</Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Nama Bank</Text>
<Text>{transaksi.namaBank}</Text>
</Stack>
<Stack spacing={0}>
<Text fw={"bold"}>Status Pembayaran</Text>
<Text>{transaksi.status_message}</Text>
</Stack>
</Stack>
</Paper>
<Button radius={"xl"} onClick={() => router.push(RouterInvestasi.main_transaksi)}>
Kembali ke List Transaksi
</Button>
</Stack>
</>
);
}

View File

@@ -68,8 +68,8 @@ export default function TransaksiInvestasi({
<>
<Stack>
{transaksi.map((e) => (
<Box key={e.id}>
<Link href={e.redirect_url} style={{textDecorationLine: "none"}}>
<Box key={e.id} onClick={() => router.push(RouterInvestasi.status_pesanan + `${e.id}`)}>
<Paper p="xs" bg={"gray"}>
<Group position="apart">
<Title order={6}>{e.Investasi.title}</Title>
@@ -86,62 +86,8 @@ export default function TransaksiInvestasi({
<Text fz={"xs"}>{moment(e.createdAt).format("ll")}</Text>
</Stack>
<Text>{e.quantity} Lembar</Text>
{/* {(() => {
if (e.masterStatusTransaksiInvestasiId === "1") {
return (
<>
<Title
order={5}
c={e.MasterStatusTransaksiInvestasi.color}
>
{e.MasterStatusTransaksiInvestasi.name}
</Title>
</>
);
} else {
if (e.masterStatusTransaksiInvestasiId === "2") {
return (
<>
<Title
order={5}
c={e.MasterStatusTransaksiInvestasi.color}
>
{e.MasterStatusTransaksiInvestasi.name}
</Title>
</>
);
} else {
if (e.masterStatusTransaksiInvestasiId === "3") {
return (
<>
<>
<Title
order={5}
c={e.MasterStatusTransaksiInvestasi.color}
>
{e.MasterStatusTransaksiInvestasi.name}
</Title>
</>
</>
);
} else {
return (
<>
<Title
order={5}
c={e.MasterStatusTransaksiInvestasi.color}
>
{e.MasterStatusTransaksiInvestasi.name}
</Title>
</>
);
}
}
}
})()} */}
</Group>
</Paper>
</Link>
</Box>
))}
</Stack>

View File

@@ -0,0 +1,14 @@
[
{
"id": "1",
"name": "Dalam Proses"
},
{
"id": "2",
"name": "Selesai"
},
{
"id": "3",
"name": "Waktu Habis"
}
]

Some files were not shown because too many files have changed in this diff Show More