feat(ekonomi): implement UMKM module with CRUD API and Dashboard analytics

This commit is contained in:
2026-04-20 16:51:59 +08:00
parent 97902f6277
commit 58ab306428
34 changed files with 2944 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
import prisma from "@/lib/prisma";
async function umkmFindManyAll() {
try {
const data = await prisma.umkm.findMany({
where: {
isActive: true,
deletedAt: null,
},
select: {
id: true,
nama: true,
},
orderBy: { nama: 'asc' },
});
return {
success: true,
message: "Berhasil mengambil semua UMKM aktif",
data,
};
} catch (e) {
console.error("Error di umkmFindManyAll:", e);
return {
success: false,
message: "Gagal mengambil data UMKM",
};
}
}
export default umkmFindManyAll;