Notifikas Job

# fix
- Notifikasi to admin
- Notifikasi to user
- Perubahan tampilan admin
## No issue
This commit is contained in:
2024-06-12 14:25:04 +08:00
parent 76f0396005
commit 3b11b30473
62 changed files with 2209 additions and 527 deletions

View File

@@ -0,0 +1,18 @@
"use server";
import prisma from "@/app/lib/prisma";
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
export default async function notifikasi_countUserNotifikasi() {
const userId = await user_getOneUserId();
const count = await prisma.notifikasi.findMany({
where: {
userId: userId,
isRead: false,
userRoleId: "1"
},
});
return count.length;
}