fix
Deskripsi: - Upload ke stroage untuk job ## Np Issuee
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
"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 event_getListKontibusiByUserId({page}: {page: number}) {
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
export async function event_getListKontibusiByUserId({
|
||||
page,
|
||||
}: {
|
||||
page: number;
|
||||
}) {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 10;
|
||||
const skipData = page * takeData - takeData;
|
||||
@@ -41,8 +45,8 @@ export async function event_getListKontibusiByUserId({page}: {page: number}) {
|
||||
userId: true,
|
||||
User: {
|
||||
select: {
|
||||
Profile: true
|
||||
}
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -50,7 +54,7 @@ export async function event_getListKontibusiByUserId({page}: {page: number}) {
|
||||
},
|
||||
},
|
||||
});
|
||||
// console.log(data);
|
||||
// console.log(data);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import _ from "lodash";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
|
||||
export async function event_getListRiwayatSaya({page}: {page: number}) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
export async function event_getListRiwayatSaya({ page }: { page: number }) {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 10;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
|
||||
const data = await prisma.event.findMany({
|
||||
take: takeData,
|
||||
skip: skipData,
|
||||
@@ -18,7 +16,7 @@ export async function event_getListRiwayatSaya({page}: {page: number}) {
|
||||
tanggal: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: authorId,
|
||||
authorId: userLoginId,
|
||||
eventMaster_StatusId: "1",
|
||||
tanggal: {
|
||||
lte: new Date(),
|
||||
|
||||
@@ -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 event_getAllDraft({ page }: { page: number }) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 10;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
@@ -17,7 +18,7 @@ export async function event_getAllDraft({ page }: { page: number }) {
|
||||
where: {
|
||||
active: true,
|
||||
eventMaster_StatusId: "3",
|
||||
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 event_getAllReject({ page }: { page: number }) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 10;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
@@ -17,7 +18,7 @@ export async function event_getAllReject({ page }: { page: number }) {
|
||||
where: {
|
||||
active: true,
|
||||
eventMaster_StatusId: "4",
|
||||
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 event_getAllReview({ page }: { page: number }) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 10;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
@@ -17,7 +18,7 @@ export async function event_getAllReview({ page }: { page: number }) {
|
||||
where: {
|
||||
active: true,
|
||||
eventMaster_StatusId: "2",
|
||||
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 event_funGetAllStatusPublish({ page }: { page: number }) {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const takeData = 10;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
@@ -17,7 +18,7 @@ export async function event_funGetAllStatusPublish({ page }: { page: number }) {
|
||||
where: {
|
||||
active: true,
|
||||
eventMaster_StatusId: "1",
|
||||
authorId: authorId,
|
||||
authorId: userLoginId,
|
||||
tanggal: {
|
||||
gte: new Date(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user