Revisi Admin Investasi
# fix: - Perbaharui tampilan ### No issue
This commit is contained in:
33
src/app_modules/admin/investasi/fun/get_publish_progres.ts
Normal file
33
src/app_modules/admin/investasi/fun/get_publish_progres.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Admin_getPublishProgresInvestasi() {
|
||||
const data = await prisma.investasi.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc"
|
||||
},
|
||||
where: {
|
||||
MasterStatusInvestasi: {
|
||||
name: "Publish",
|
||||
},
|
||||
},
|
||||
|
||||
select: {
|
||||
id: true,
|
||||
|
||||
author: {
|
||||
select: {
|
||||
username: true,
|
||||
},
|
||||
},
|
||||
updatedAt: true,
|
||||
targetDana: true,
|
||||
progress: true,
|
||||
},
|
||||
});
|
||||
|
||||
// console.log(data)
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user