fix
Deskripsi: - Upload ke stroage untuk job ## Np Issuee
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
"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 async function donasi_funGetAllInvoiceByAuthorId({
|
||||
page,
|
||||
}: {
|
||||
page: number;
|
||||
}) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 5;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
@@ -19,7 +20,7 @@ export async function donasi_funGetAllInvoiceByAuthorId({
|
||||
createdAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: authorId,
|
||||
authorId: userLoginId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
"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 async function donasi_funGetAllStatusDraft({ page }: { page: number }) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 5;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
@@ -15,10 +16,10 @@ export async function donasi_funGetAllStatusDraft({ page }: { page: number }) {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: authorId,
|
||||
authorId: userLoginId,
|
||||
donasiMaster_StatusDonasiId: "3",
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
"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 async function donasi_funGetAllStatusPublish({
|
||||
page,
|
||||
}: {
|
||||
page: number;
|
||||
}) {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
export async function donasi_funGetAllStatusPublish({ page }: { page: number }) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const takeData = 5;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
|
||||
const data = await prisma.donasi.findMany({
|
||||
take: takeData,
|
||||
skip: skipData,
|
||||
@@ -16,7 +20,7 @@ export async function donasi_funGetAllStatusPublish({ page }: { page: number })
|
||||
publishTime: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: authorId,
|
||||
authorId: userLoginId,
|
||||
donasiMaster_StatusDonasiId: "1",
|
||||
active: true,
|
||||
},
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
"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 async function donasi_funGetAllStatusReject({ page }: { page: number }) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 5;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
@@ -15,7 +16,7 @@ export async function donasi_funGetAllStatusReject({ page }: { page: number }) {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: authorId,
|
||||
authorId: userLoginId,
|
||||
donasiMaster_StatusDonasiId: "4",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
"use server"
|
||||
"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 async function donasi_funGetAllStatusReview({page}: {page: number}) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const takeData = 5;
|
||||
const skipData = page * takeData - takeData;
|
||||
export async function donasi_funGetAllStatusReview({ page }: { page: number }) {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const data = await prisma.donasi.findMany({
|
||||
take: takeData,
|
||||
skip: skipData,
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: authorId,
|
||||
donasiMaster_StatusDonasiId: "2",
|
||||
},
|
||||
});
|
||||
const takeData = 5;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
return data;
|
||||
}
|
||||
const data = await prisma.donasi.findMany({
|
||||
take: takeData,
|
||||
skip: skipData,
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: userLoginId,
|
||||
donasiMaster_StatusDonasiId: "2",
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user