Admin dashboard
# feat: - Tampilan admin (web view) - Tampilan dashboard investasi - Get data review ### no issue
This commit is contained in:
36
src/app_modules/admin/investasi/fun/get_all_investasi.ts
Normal file
36
src/app_modules/admin/investasi/fun/get_all_investasi.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
"use server"
|
||||
|
||||
import prisma from "@/app/lib/prisma"
|
||||
|
||||
export default async function Admin_funGetAllInvestasi() {
|
||||
const res = await prisma.investasi.findMany({
|
||||
where: {
|
||||
MasterStatusInvestasi: {
|
||||
name: {
|
||||
not: "Draft"
|
||||
}
|
||||
}
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
authorId: true,
|
||||
hargaLembar: true,
|
||||
targetDana: true,
|
||||
totalLembar: true,
|
||||
roi: true,
|
||||
active: true,
|
||||
imagesId: true,
|
||||
MasterStatusInvestasi: true,
|
||||
BeritaInvestasi: true,
|
||||
DokumenInvestasi: true,
|
||||
ProspektusInvestasi: true,
|
||||
MasterPembagianDeviden: true,
|
||||
MasterPencarianInvestor: true,
|
||||
MasterPeriodeDeviden: true,
|
||||
SahamTerbeli: true,
|
||||
},
|
||||
})
|
||||
// console.log(res)
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user