fix
Deskripsi: - Upload ke stroage untuk job ## Np Issuee
This commit is contained in:
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user