Deskripsi:
- Upload ke stroage untuk job
## Np Issuee
This commit is contained in:
2024-09-19 15:59:21 +08:00
parent 128dc98839
commit f96d80d55d
153 changed files with 1369 additions and 1200 deletions

View File

@@ -1,16 +1,16 @@
"use server";
import prisma from "@/app/lib/prisma";
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
export default async function notifikasi_countUserNotifikasi() {
const userId = await user_funGetOneUserId();
const userLoginId = await funGetUserIdByToken();
const count = await prisma.notifikasi.findMany({
where: {
userId: userId,
userId: userLoginId,
isRead: false,
userRoleId: "1"
userRoleId: "1",
},
});

View File

@@ -1,7 +1,7 @@
"use server";
import prisma from "@/app/lib/prisma";
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import _ from "lodash";
export default async function notifikasi_getByUserId({
@@ -11,7 +11,7 @@ export default async function notifikasi_getByUserId({
page: number;
kategoriApp?: string;
}) {
const userId = await user_funGetOneUserId();
const userLoginId = await funGetUserIdByToken();
const takeData = 10;
const skipData = page * takeData - takeData;
@@ -26,7 +26,7 @@ export default async function notifikasi_getByUserId({
{ createdAt: "desc" },
],
where: {
userId: userId,
userId: userLoginId,
userRoleId: "1",
},
});
@@ -44,7 +44,7 @@ export default async function notifikasi_getByUserId({
{ createdAt: "desc" },
],
where: {
userId: userId,
userId: userLoginId,
userRoleId: "1",
kategoriApp: _.upperCase(kategoriApp),
},