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,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";
interface Model_Invoice_Masuk {
total: number;
@@ -14,14 +14,14 @@ export async function investasi_funCreateInvoice({
}: {
data: Model_Invoice_Masuk;
}) {
const authorId = await user_funGetOneUserId();
const userLoginId = await funGetUserIdByToken();
const create = await prisma.investasi_Invoice.create({
data: {
nominal: "" + data.total,
lembarTerbeli: "" + data.jumlah ,
lembarTerbeli: "" + data.jumlah,
masterBankId: data.pilihBank,
authorId: authorId,
authorId: userLoginId,
investasiId: data.investasiId,
statusInvoiceId: "3",
},

View File

@@ -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 investasi_funGetAllPublishByUserId({
page,
}: {
page: number;
}) {
const authorId = await user_funGetOneUserId();
const userLoginId = await funGetUserIdByToken();
const takeData = 10;
const skipData = page * takeData - takeData;
@@ -19,7 +20,7 @@ export async function investasi_funGetAllPublishByUserId({
countDown: "desc",
},
where: {
authorId: authorId,
authorId: userLoginId,
masterStatusInvestasiId: "1",
},
include: {

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";
export async function investasi_funGetAllInvestasiNonPublishByUserId({
page,
@@ -10,7 +10,8 @@ export async function investasi_funGetAllInvestasiNonPublishByUserId({
page: number;
statusId: string;
}) {
const authorId = await user_funGetOneUserId();
const userLoginId = await funGetUserIdByToken();
const takeData = 10;
const skipData = page * takeData - takeData;
@@ -21,7 +22,7 @@ export async function investasi_funGetAllInvestasiNonPublishByUserId({
updatedAt: "desc",
},
where: {
authorId: authorId,
authorId: userLoginId,
masterStatusInvestasiId: statusId,
},
});

View File

@@ -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 investasi_funGetTransaksiByUserId({
page,
}: {
page: number;
}) {
const authorId = await user_funGetOneUserId();
const userLoginId = await funGetUserIdByToken();
const takeData = 10;
const skipData = page * takeData - takeData;
@@ -19,7 +20,7 @@ export async function investasi_funGetTransaksiByUserId({
updatedAt: "desc",
},
where: {
authorId: authorId,
authorId: userLoginId,
},
include: {
Investasi: true,

View File

@@ -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 investasi_funGetSuccessTransactionById({
page,
}: {
page: number;
}) {
const authorId = await user_funGetOneUserId();
const userLoginId = await funGetUserIdByToken();
const takeData = 10;
const skipData = page * takeData - takeData;
@@ -19,7 +20,7 @@ export async function investasi_funGetSuccessTransactionById({
updatedAt: "desc",
},
where: {
authorId: authorId,
authorId: userLoginId,
statusInvoiceId: "1",
isActive: true,
},