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

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 });
}