Admin Investasi
# feat: - Ganti status dan reject ### No issue
This commit is contained in:
21
src/app_modules/admin/investasi/fun/fun_reject_investasi.ts
Normal file
21
src/app_modules/admin/investasi/fun/fun_reject_investasi.ts
Normal 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"
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ export default async function Admin_funGetAllInvestasi() {
|
||||
roi: true,
|
||||
active: true,
|
||||
imagesId: true,
|
||||
catatan: true,
|
||||
MasterStatusInvestasi: true,
|
||||
BeritaInvestasi: true,
|
||||
DokumenInvestasi: true,
|
||||
|
||||
Reference in New Issue
Block a user