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,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;
}

View File

@@ -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(),

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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(),
},