Admin Investasi

# feat:
- Ganti status dan reject
### No issue
This commit is contained in:
2023-11-14 12:01:26 +08:00
parent 67212ca035
commit 989c9eed32
16 changed files with 341 additions and 158 deletions

View File

@@ -0,0 +1,21 @@
"use server"
import prisma from "@/app/lib/prisma"
export default async function funRejectInvestasi(data: any) {
// console.log(data)
const res = await prisma.investasi.update({
where: { id: data.id },
data: {
masterStatusInvestasiId: data.status,
catatan: data.catatan
}
})
if(!res) return {status: 400, message: "Gagal reject"}
return {
status: 200,
message: "Reject berhasil"
}
}

View File

@@ -21,6 +21,7 @@ export default async function Admin_funGetAllInvestasi() {
roi: true,
active: true,
imagesId: true,
catatan: true,
MasterStatusInvestasi: true,
BeritaInvestasi: true,
DokumenInvestasi: true,