Merge pull request #318 from bipproduction/bagas/19-feb-25
fix api job: beranda , status, arsip
This commit is contained in:
@@ -12,8 +12,6 @@ export async function GET(request: Request, { params }: { params: { id: string }
|
||||
const takeData = 10;
|
||||
const skipData = Number(page) * takeData - takeData;
|
||||
|
||||
console.log("status >", status)
|
||||
|
||||
if (!page) {
|
||||
|
||||
fixData = await prisma.investasi_Invoice.findMany({
|
||||
|
||||
9
src/app/api/job/[id]/route.ts
Normal file
9
src/app/api/job/[id]/route.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export { GET };
|
||||
|
||||
async function GET(request: Request) {
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
});
|
||||
}
|
||||
95
src/app/api/job/arsip/route.ts
Normal file
95
src/app/api/job/arsip/route.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import backendLogger from "@/util/backendLogger";
|
||||
import { NextResponse } from "next/server";
|
||||
import { prisma } from "@/lib";
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
|
||||
export { GET };
|
||||
|
||||
async function GET(request: Request) {
|
||||
try {
|
||||
let fixData;
|
||||
const { searchParams } = new URL(request.url);
|
||||
const page = searchParams.get("page");
|
||||
const dataTake = 10
|
||||
const dataSkip = Number(page) * dataTake - dataTake;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
if (!userLoginId) {
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: false,
|
||||
message: "Gagal mendapatkan data",
|
||||
reason: "Unauthorized",
|
||||
},
|
||||
{
|
||||
status: 401,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (!page) {
|
||||
fixData = await prisma.job.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
masterStatusId: "1",
|
||||
isActive: true,
|
||||
isArsip: true,
|
||||
authorId: userLoginId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isArsip: true,
|
||||
Author: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
} else {
|
||||
fixData = await prisma.job.findMany({
|
||||
take: dataTake,
|
||||
skip: dataSkip,
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
masterStatusId: "1",
|
||||
isActive: true,
|
||||
isArsip: true,
|
||||
authorId: userLoginId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isArsip: true,
|
||||
Author: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
message: "Berhasil mendapatkan data",
|
||||
data: fixData,
|
||||
});
|
||||
} catch (error) {
|
||||
backendLogger.error("Error get data job");
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
message: "Error get data job",
|
||||
error: (error as Error).message,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
import prisma from "@/lib/prisma";
|
||||
import fs from "fs";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import path from "path";
|
||||
const root = process.cwd();
|
||||
|
||||
export async function GET(
|
||||
req: NextRequest,
|
||||
{ params }: { params: { id: string } }
|
||||
) {
|
||||
const get = await prisma.images.findUnique({
|
||||
where: {
|
||||
id: params.id,
|
||||
},
|
||||
select: {
|
||||
url: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!fs.existsSync(path.join(root, `public/job/${get?.url}`))) {
|
||||
const notFile = fs.readFileSync(
|
||||
path.join(root, "public/aset/global/no-file.png")
|
||||
);
|
||||
return new NextResponse(notFile, {
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
},
|
||||
});
|
||||
}
|
||||
const file = fs.readFileSync(path.join(root, `public/job/${get?.url}`));
|
||||
return new NextResponse(file, {
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1,19 +1,20 @@
|
||||
import { prisma } from "@/lib";
|
||||
import backendLogger from "@/util/backendLogger";
|
||||
import { NextResponse } from "next/server";
|
||||
export const dynamic = "force-dynamic";
|
||||
import { prisma } from "@/lib";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
export { GET };
|
||||
|
||||
async function GET(request: Request) {
|
||||
try {
|
||||
let fixData;
|
||||
const { searchParams } = new URL(request.url);
|
||||
const search = searchParams.get("search");
|
||||
const page = searchParams.get("page");
|
||||
const dataTake = 10;
|
||||
const dataTake = 5;
|
||||
const dataSkip = Number(page) * dataTake - dataTake;
|
||||
|
||||
if (search != "") {
|
||||
const data = await prisma.job.findMany({
|
||||
take: dataTake,
|
||||
skip: dataSkip,
|
||||
if (!page) {
|
||||
fixData = await prisma.job.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
@@ -23,7 +24,7 @@ export async function GET(request: Request) {
|
||||
isArsip: false,
|
||||
title: {
|
||||
mode: "insensitive",
|
||||
contains: search as string,
|
||||
contains: search ? search : "",
|
||||
},
|
||||
},
|
||||
select: {
|
||||
@@ -38,17 +39,8 @@ export async function GET(request: Request) {
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: true,
|
||||
message: "Berhasil ambil data",
|
||||
data: data,
|
||||
},
|
||||
{ status: 200 }
|
||||
);
|
||||
} else {
|
||||
const data = await prisma.job.findMany({
|
||||
fixData = await prisma.job.findMany({
|
||||
take: dataTake,
|
||||
skip: dataSkip,
|
||||
orderBy: {
|
||||
@@ -60,6 +52,7 @@ export async function GET(request: Request) {
|
||||
isArsip: false,
|
||||
title: {
|
||||
mode: "insensitive",
|
||||
contains: search ? search : "",
|
||||
},
|
||||
},
|
||||
select: {
|
||||
@@ -74,21 +67,19 @@ export async function GET(request: Request) {
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: true,
|
||||
message: "Berhasil ambil data",
|
||||
data: data,
|
||||
},
|
||||
{ status: 200 }
|
||||
);
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
message: "Berhasil mendapatkan data",
|
||||
data: fixData,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
backendLogger.error("Error get data job");
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
message: "Gagal ambil data",
|
||||
message: "Error get data job",
|
||||
error: (error as Error).message,
|
||||
});
|
||||
}
|
||||
}
|
||||
87
src/app/api/job/status/[name]/route.ts
Normal file
87
src/app/api/job/status/[name]/route.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import backendLogger from "@/util/backendLogger";
|
||||
import _ from "lodash";
|
||||
import { redirect } from "next/navigation";
|
||||
import { NextResponse } from "next/server";
|
||||
export async function GET(
|
||||
request: Request,
|
||||
{ params }: { params: { name: string } }
|
||||
) {
|
||||
try {
|
||||
let fixData;
|
||||
const { name } = params;
|
||||
const { searchParams } = new URL(request.url);
|
||||
const page = searchParams.get("page");
|
||||
const takeData = 10
|
||||
const skipData = Number(page) * takeData - takeData;
|
||||
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
if (!userLoginId) {
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: false,
|
||||
message: "Gagal mendapatkan data",
|
||||
reason: "Unauthorized",
|
||||
},
|
||||
{
|
||||
status: 401,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (!page) {
|
||||
fixData = await prisma.job.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: userLoginId,
|
||||
isActive: true,
|
||||
isArsip: false,
|
||||
},
|
||||
include: {
|
||||
Author: true,
|
||||
MasterStatus: true,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const fixStatusName = _.startCase(name);
|
||||
fixData = await prisma.job.findMany({
|
||||
take: takeData,
|
||||
skip: skipData,
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: userLoginId,
|
||||
isActive: true,
|
||||
MasterStatus: {
|
||||
name: fixStatusName || name,
|
||||
},
|
||||
},
|
||||
include: {
|
||||
Author: true,
|
||||
MasterStatus: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
message: "Berhasil mendapatkan data",
|
||||
data: fixData,
|
||||
});
|
||||
} catch (error) {
|
||||
backendLogger.error("Error Get Data Job", error);
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: false,
|
||||
message: "Gagal mendapatkan data",
|
||||
reason: (error as Error).message,
|
||||
},
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,10 @@ import { Job_Arsip } from "@/app_modules/job";
|
||||
import { job_getAllArsipById } from "@/app_modules/job/fun/get/get_all_arsip";
|
||||
|
||||
export default async function Page() {
|
||||
const dataJob = await job_getAllArsipById({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Job_Arsip dataJob={dataJob as any} />
|
||||
<Job_Arsip />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,23 +1,9 @@
|
||||
import { Job_Status } from "@/app_modules/job";
|
||||
import { job_funGetAllByStatusId } from "@/app_modules/job/fun";
|
||||
import { job_funGetMasterStatus } from "@/app_modules/job/fun/get/get_master_status";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let statusId = params.id;
|
||||
|
||||
const dataJob = await job_funGetAllByStatusId({
|
||||
page: 1,
|
||||
statusId: statusId,
|
||||
});
|
||||
const listStatus = await job_funGetMasterStatus();
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Job_Status
|
||||
statusId={statusId}
|
||||
dataJob={dataJob}
|
||||
listStatus={listStatus as any}
|
||||
/>
|
||||
<Job_Status />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { globalStatusApp } from "./list_status_app";
|
||||
import { MAX_SIZE } from "./max_size";
|
||||
|
||||
export { MAX_SIZE };
|
||||
export { globalStatusApp };
|
||||
|
||||
18
src/app_modules/_global/lib/list_status_app.ts
Normal file
18
src/app_modules/_global/lib/list_status_app.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export const globalStatusApp = [
|
||||
{
|
||||
id: "1",
|
||||
name: "Publish",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "Review",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "Draft",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
name: "Reject",
|
||||
},
|
||||
];
|
||||
@@ -32,7 +32,7 @@ import { useShallowEffect } from "@mantine/hooks";
|
||||
import { apiGetAdminAllTransaksiById, apiGetAdminStatusTransaksi } from "../../_lib/api_fetch_admin_investasi";
|
||||
import { clientLogger } from "@/util/clientLogger";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
import { apiGetMasterStatusTransaksi } from "@/app_modules/_global/lib/api_master";
|
||||
import { apiGetMasterStatusTransaksi } from "@/app_modules/_global/lib/api_fetch_master";
|
||||
|
||||
export function AdminInvestasi_ViewDaftarTransaksi() {
|
||||
const params = useParams<{ id: string }>();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { RouterEvent } from "@/lib/router_hipmi/router_event";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { apiGetMasterBank } from "@/app_modules/_global/lib/api_master";
|
||||
import { apiGetMasterBank } from "@/app_modules/_global/lib/api_fetch_master";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
import {
|
||||
gs_event_bank_id,
|
||||
|
||||
126
src/app_modules/job/component/api_fetch_job.ts
Normal file
126
src/app_modules/job/component/api_fetch_job.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
export { apiGetJobByStatus, apiGetJob, apiGetJobArsip };
|
||||
|
||||
const apiGetJobByStatus = async ({
|
||||
status,
|
||||
page,
|
||||
}: {
|
||||
status?: string;
|
||||
page: string;
|
||||
}) => {
|
||||
try {
|
||||
// Fetch token from cookie
|
||||
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||
if (!token) {
|
||||
console.error("No token found");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Send PUT request to update portfolio logo
|
||||
const isPage = `?page=${page}`;
|
||||
const response = await fetch(`/api/job/status/${status}${isPage}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
// Check if the response is OK
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json().catch(() => null);
|
||||
console.error(
|
||||
"Error updating portfolio logo:",
|
||||
errorData?.message || "Unknown error"
|
||||
);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error("Error updating portfolio medsos:", error);
|
||||
throw error; // Re-throw the error to handle it in the calling function
|
||||
}
|
||||
};
|
||||
|
||||
const apiGetJob = async ({ page, search }: { page: string, search?: string }) => {
|
||||
try {
|
||||
// Fetch token from cookie
|
||||
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||
if (!token) {
|
||||
console.error("No token found");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Send PUT request to update portfolio logo
|
||||
const isPage = `?page=${page}`;
|
||||
const isSearch = search ? `&search=${search}` : "";
|
||||
const response = await fetch(`/api/job${isPage}${isSearch}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
// Check if the response is OK
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json().catch(() => null);
|
||||
console.error(
|
||||
"Error updating portfolio logo:",
|
||||
errorData?.message || "Unknown error"
|
||||
);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error("Error updating portfolio logo:", error);
|
||||
throw error; // Re-throw the error to handle it in the calling function
|
||||
}
|
||||
};
|
||||
|
||||
const apiGetJobArsip = async ({
|
||||
page,
|
||||
}: {
|
||||
page: string;
|
||||
}) => {
|
||||
try {
|
||||
// Fetch token from cookie
|
||||
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||
if (!token) {
|
||||
console.error("No token found");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Send PUT request to update portfolio logo
|
||||
const isPage = `?page=${page}`;
|
||||
const response = await fetch(`/api/job/arsip${isPage}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
// Check if the response is OK
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json().catch(() => null);
|
||||
console.error(
|
||||
"Error updating portfolio logo:",
|
||||
errorData?.message || "Unknown error"
|
||||
);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error("Error updating portfolio logo:", error);
|
||||
throw error; // Re-throw the error to handle it in the calling function
|
||||
}
|
||||
};
|
||||
@@ -1,20 +1,21 @@
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
import { Box, Center, Group, Skeleton, Stack } from "@mantine/core";
|
||||
|
||||
export default function Job_ComponentSkeletonBeranda() {
|
||||
return (
|
||||
<>
|
||||
<Box>
|
||||
{Array.from(new Array(10)).map((e, i) => (
|
||||
{Array.from(new Array(3)).map((e, i) => (
|
||||
<ComponentGlobal_CardStyles key={i} marginBottom={"15px"}>
|
||||
<Stack>
|
||||
<Group position="left">
|
||||
<Skeleton height={40} width={40} circle />
|
||||
<Skeleton height={20} width={200} />
|
||||
<CustomSkeleton height={40} width={40} circle />
|
||||
<CustomSkeleton height={20} width={200} />
|
||||
</Group>
|
||||
|
||||
<Center my={"md"}>
|
||||
<Skeleton height={20} width={300} />
|
||||
<CustomSkeleton height={20} width={300} />
|
||||
</Center>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Job_ViewBeranda from "./main/beranda/view_beranda";
|
||||
import LayoutJob_Main from "./main/layout";
|
||||
import Job_ViewSplash from "./splash/view_splash";
|
||||
import Job_ViewStatus from "./main/status/view_status";
|
||||
import Job_UiStatus from "./main/status/ui_status";
|
||||
import Job_ViewArsip from "./main/arsip/view_arsip";
|
||||
import Job_Create from "./create/view";
|
||||
import LayoutJob_Create from "./create/layout";
|
||||
@@ -26,7 +26,7 @@ export {
|
||||
Job_ViewBeranda,
|
||||
LayoutJob_Main,
|
||||
Job_ViewSplash,
|
||||
Job_ViewStatus as Job_Status,
|
||||
Job_UiStatus as Job_Status,
|
||||
Job_ViewArsip as Job_Arsip,
|
||||
Job_Create,
|
||||
LayoutJob_Create,
|
||||
|
||||
@@ -1,11 +1,109 @@
|
||||
import { Box } from "@mantine/core";
|
||||
"use client";
|
||||
|
||||
import { Box, Center, Stack } from "@mantine/core";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
import { Job_UI_Arsip } from "./ui_arsip";
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { RouterJob } from "@/lib/router_hipmi/router_job";
|
||||
import _ from "lodash";
|
||||
import { ScrollOnly } from "next-scroll-loader";
|
||||
import { useState } from "react";
|
||||
import ComponentJob_CardStatus from "../../component/card/card_view";
|
||||
import { job_getAllArsipById } from "../../fun/get/get_all_arsip";
|
||||
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
||||
import { clientLogger } from "@/util/clientLogger";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { apiGetJob, apiGetJobArsip } from "../../component/api_fetch_job";
|
||||
import { Job_ComponentSkeletonBeranda } from "../../component";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
|
||||
export default function Job_ViewArsip() {
|
||||
const [data, setData] = useState<MODEL_JOB[]>([]);
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
const [hasMore, setHasMore] = useState(true);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
useShallowEffect(() => {
|
||||
onLoadNewData();
|
||||
}, []);
|
||||
|
||||
async function onLoadNewData() {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const response = await apiGetJobArsip({
|
||||
page: `${activePage}`,
|
||||
});
|
||||
|
||||
if (response.success) {
|
||||
setData(response.data);
|
||||
setActivePage(1);
|
||||
setHasMore(response.data.length > 0);
|
||||
} else {
|
||||
setData([]);
|
||||
setHasMore(false);
|
||||
}
|
||||
} catch (error) {
|
||||
clientLogger.error("Error get job", error);
|
||||
setData([]);
|
||||
setHasMore(false);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
const handleMoreData = async () => {
|
||||
if (!hasMore || isLoading) return null;
|
||||
|
||||
try {
|
||||
const nextPage = activePage + 1;
|
||||
|
||||
const response = await apiGetJob({
|
||||
page: `${nextPage}`,
|
||||
});
|
||||
|
||||
if (response?.data && response.data.length > 0) {
|
||||
setActivePage(nextPage);
|
||||
setHasMore(response.data.length > 0);
|
||||
return response.data;
|
||||
} else {
|
||||
setHasMore(false);
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
clientLogger.error("Error get job", error);
|
||||
setHasMore(false);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export default function Job_ViewArsip({ dataJob }: { dataJob: MODEL_JOB[] }) {
|
||||
return (
|
||||
<>
|
||||
<Job_UI_Arsip listData={dataJob} />;
|
||||
{!data?.length && isLoading ? (
|
||||
<Stack>
|
||||
<CustomSkeleton height={70} width={"100%"} />
|
||||
<CustomSkeleton height={70} width={"100%"} />
|
||||
</Stack>
|
||||
) : _.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
) : (
|
||||
// --- Main component --- //
|
||||
<Box>
|
||||
<ScrollOnly
|
||||
height="85vh"
|
||||
renderLoading={() => <ComponentGlobal_Loader />}
|
||||
data={data}
|
||||
setData={setData}
|
||||
moreData={handleMoreData}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentJob_CardStatus
|
||||
data={item}
|
||||
path={RouterJob.detail_arsip}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { API_RouteJob } from "@/lib/api_user_router/route_api_job";
|
||||
import { gs_jobTiggerBeranda } from "@/lib/global_state";
|
||||
import { RouterJob } from "@/lib/router_hipmi/router_job";
|
||||
import ComponentGlobal_CreateButton from "@/app_modules/_global/component/button_create";
|
||||
@@ -18,11 +17,15 @@ import {
|
||||
} from "../../component";
|
||||
import ComponentJob_BerandaCardView from "../../component/beranda/card_view";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
import { apiGetJob } from "../../component/api_fetch_job";
|
||||
import { clientLogger } from "@/util/clientLogger";
|
||||
|
||||
export default function Job_ViewBeranda() {
|
||||
const [data, setData] = useState<MODEL_JOB[] | null>(null);
|
||||
const [data, setData] = useState<MODEL_JOB[]>([]);
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
const [isSearch, setIsSearch] = useState("");
|
||||
const [hasMore, setHasMore] = useState(true);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
// Notifikasi
|
||||
const [isShowUpdate, setIsShowUpdate] = useState(false);
|
||||
@@ -38,26 +41,65 @@ export default function Job_ViewBeranda() {
|
||||
setIsTriggerJob(false);
|
||||
setIsShowUpdate(false);
|
||||
onLoadNewData();
|
||||
}, []);
|
||||
}, [isSearch]);
|
||||
|
||||
async function onSearch(text: string) {
|
||||
setIsSearch(text);
|
||||
const loadData = await fetch(
|
||||
API_RouteJob.get_all({ page: activePage, search: text })
|
||||
);
|
||||
const res = await loadData.json();
|
||||
|
||||
setData(res.data as any);
|
||||
setActivePage(1);
|
||||
setHasMore(true);
|
||||
}
|
||||
|
||||
async function onLoadNewData() {
|
||||
const loadData = await fetch(API_RouteJob.get_all({ page: activePage }));
|
||||
const res = await loadData.json();
|
||||
// console.log(res.data);
|
||||
setData(res.data);
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const response = await apiGetJob({
|
||||
page: `${activePage}`,
|
||||
search: isSearch,
|
||||
});
|
||||
|
||||
if (response.success) {
|
||||
setData(response.data);
|
||||
setActivePage(1);
|
||||
setHasMore(response.data.length > 0);
|
||||
} else {
|
||||
setData([]);
|
||||
setHasMore(false);
|
||||
}
|
||||
} catch (error) {
|
||||
clientLogger.error("Error get job", error);
|
||||
setData([]);
|
||||
setHasMore(false);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
const handleMoreData = async () => {
|
||||
if (!hasMore || isLoading) return null;
|
||||
|
||||
try {
|
||||
const nextPage = activePage + 1;
|
||||
|
||||
const response = await apiGetJob({
|
||||
page: `${nextPage}`,
|
||||
search: isSearch,
|
||||
});
|
||||
|
||||
if (response?.data && response.data.length > 0) {
|
||||
setActivePage(nextPage);
|
||||
setHasMore(response.data.length > 0);
|
||||
return response.data;
|
||||
} else {
|
||||
setHasMore(false);
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
clientLogger.error("Error get job", error);
|
||||
setHasMore(false);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack my={1} spacing={30}>
|
||||
@@ -89,7 +131,7 @@ export default function Job_ViewBeranda() {
|
||||
}}
|
||||
/>
|
||||
|
||||
{_.isNull(data) ? (
|
||||
{!data?.length && isLoading ? (
|
||||
<Job_ComponentSkeletonBeranda />
|
||||
) : _.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
@@ -104,16 +146,7 @@ export default function Job_ViewBeranda() {
|
||||
)}
|
||||
data={data}
|
||||
setData={setData as any}
|
||||
moreData={async () => {
|
||||
const loadData = await fetch(
|
||||
API_RouteJob.get_all({ page: activePage, search: isSearch })
|
||||
);
|
||||
|
||||
const res = await loadData.json();
|
||||
setActivePage((val) => val + 1);
|
||||
|
||||
return res.data;
|
||||
}}
|
||||
moreData={handleMoreData}
|
||||
>
|
||||
{(item) => <ComponentJob_BerandaCardView data={item} />}
|
||||
</ScrollOnly>
|
||||
|
||||
@@ -8,43 +8,58 @@ import { ScrollOnly } from "next-scroll-loader";
|
||||
import { useState } from "react";
|
||||
import ComponentJob_CardStatus from "../../component/card/card_view";
|
||||
import job_getAllStatusPublish from "../../fun/get/status/get_list_publish";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { apiGetJobByStatus } from "../../component/api_fetch_job";
|
||||
|
||||
export default function Job_Publish({ listPublish }: { listPublish: any }) {
|
||||
const [data, setData] = useState(listPublish);
|
||||
export default function Job_Publish({ nameStatus }: { nameStatus: string }) {
|
||||
const [data, setData] = useState<any[] | null>(null);
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
|
||||
useShallowEffect(() => {
|
||||
handleLoadData();
|
||||
}, []);
|
||||
|
||||
const handleLoadData = async () => {
|
||||
try {
|
||||
// const response = await apiGetJobByStatus({ status: nameStatus });
|
||||
// if (response.success) {
|
||||
// console.log(response.data);
|
||||
// }
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{_.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
) : (
|
||||
// --- Main component --- //
|
||||
<ScrollOnly
|
||||
height="75vh"
|
||||
renderLoading={() => (
|
||||
<Center mt={"lg"}>
|
||||
<Loader color={"yellow"} />
|
||||
</Center>
|
||||
)}
|
||||
data={data}
|
||||
setData={setData}
|
||||
moreData={async () => {
|
||||
const loadData = await job_getAllStatusPublish({
|
||||
page: activePage + 1,
|
||||
});
|
||||
"Publish"
|
||||
// <ScrollOnly
|
||||
// height="75vh"
|
||||
// renderLoading={() => (
|
||||
// <Center mt={"lg"}>
|
||||
// <Loader color={"yellow"} />
|
||||
// </Center>
|
||||
// )}
|
||||
// data={data}
|
||||
// setData={setData}
|
||||
// moreData={async () => {
|
||||
// const loadData = await job_getAllStatusPublish({
|
||||
// page: activePage + 1,
|
||||
// });
|
||||
|
||||
setActivePage((val) => val + 1);
|
||||
// setActivePage((val) => val + 1);
|
||||
|
||||
return loadData;
|
||||
}}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentJob_CardStatus
|
||||
data={item}
|
||||
path={RouterJob.detail_publish}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
// return loadData;
|
||||
// }}
|
||||
// >
|
||||
// {(item) => (
|
||||
// <ComponentJob_CardStatus
|
||||
// data={item}
|
||||
// path={RouterJob.detail_publish}
|
||||
// />
|
||||
// )}
|
||||
// </ScrollOnly>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -8,43 +8,58 @@ import { ScrollOnly } from "next-scroll-loader";
|
||||
import { useState } from "react";
|
||||
import ComponentJob_CardStatus from "../../component/card/card_view";
|
||||
import job_getAllStatusReview from "../../fun/get/status/get_list_review";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { apiGetJobByStatus } from "../../component/api_fetch_job";
|
||||
|
||||
export default function Job_Review({ listReview }: { listReview: any[] }) {
|
||||
const [data, setData] = useState(listReview);
|
||||
export default function Job_Review({ nameStatus }: { nameStatus: string }) {
|
||||
const [data, setData] = useState<any[] | null>(null);
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
|
||||
useShallowEffect(() => {
|
||||
handleLoadData();
|
||||
}, []);
|
||||
|
||||
const handleLoadData = async () => {
|
||||
try {
|
||||
// const response = await apiGetJobByStatus({ status: nameStatus });
|
||||
// if (response.success) {
|
||||
// console.log(response.data);
|
||||
// }
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{_.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
) : (
|
||||
// --- Main component --- //
|
||||
<ScrollOnly
|
||||
height="75vh"
|
||||
renderLoading={() => (
|
||||
<Center mt={"lg"}>
|
||||
<Loader color={"yellow"} />
|
||||
</Center>
|
||||
)}
|
||||
data={data}
|
||||
setData={setData}
|
||||
moreData={async () => {
|
||||
const loadData = await job_getAllStatusReview({
|
||||
page: activePage + 1,
|
||||
});
|
||||
"Review"
|
||||
// <ScrollOnly
|
||||
// height="75vh"
|
||||
// renderLoading={() => (
|
||||
// <Center mt={"lg"}>
|
||||
// <Loader color={"yellow"} />
|
||||
// </Center>
|
||||
// )}
|
||||
// data={data}
|
||||
// setData={setData}
|
||||
// moreData={async () => {
|
||||
// const loadData = await job_getAllStatusReview({
|
||||
// page: activePage + 1,
|
||||
// });
|
||||
|
||||
setActivePage((val) => val + 1);
|
||||
// setActivePage((val) => val + 1);
|
||||
|
||||
return loadData;
|
||||
}}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentJob_CardStatus
|
||||
data={item}
|
||||
path={RouterJob.detail_review}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
// return loadData;
|
||||
// }}
|
||||
// >
|
||||
// {(item) => (
|
||||
// <ComponentJob_CardStatus
|
||||
// data={item}
|
||||
// path={RouterJob.detail_review}
|
||||
// />
|
||||
// )}
|
||||
// </ScrollOnly>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
74
src/app_modules/job/main/status/ui_status.tsx
Normal file
74
src/app_modules/job/main/status/ui_status.tsx
Normal file
@@ -0,0 +1,74 @@
|
||||
"use client";
|
||||
|
||||
import { MainColor } from "@/app_modules/_global/color";
|
||||
import { globalStatusApp } from "@/app_modules/_global/lib";
|
||||
import { RouterJob } from "@/lib/router_hipmi/router_job";
|
||||
import { Stack, Tabs } from "@mantine/core";
|
||||
import { useParams, useRouter } from "next/navigation";
|
||||
import Job_NewViewStatus from "./view_status";
|
||||
|
||||
export default function Job_UiStatus() {
|
||||
const router = useRouter();
|
||||
const param = useParams<{ id: string }>();
|
||||
const statusId = param.id;
|
||||
|
||||
// const [changeStatus, setChangeStatus] = useState(statusId);
|
||||
// const [nameStatus, setNameStatus] = useState<string | undefined>("");
|
||||
|
||||
// async function onChangeStatus({ statusId }: { statusId: string }) {
|
||||
// router.replace(RouterJob.status({ id: statusId }));
|
||||
// const cek = globalStatusApp.find((e) => e.id === statusId);
|
||||
|
||||
// setNameStatus(cek?.name);
|
||||
// }
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tabs
|
||||
mt={1}
|
||||
color="yellow"
|
||||
variant="pills"
|
||||
radius={"xl"}
|
||||
defaultValue={statusId}
|
||||
value={statusId}
|
||||
onTabChange={(val: any) => {
|
||||
router.replace(RouterJob.status({ id: val }));
|
||||
}}
|
||||
styles={{
|
||||
tabsList: {
|
||||
backgroundColor: MainColor.darkblue,
|
||||
position: "sticky",
|
||||
top: 0,
|
||||
zIndex: 99,
|
||||
},
|
||||
panel: {
|
||||
paddingTop: 10,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Tabs.List grow>
|
||||
{globalStatusApp.map((e) => (
|
||||
<Tabs.Tab
|
||||
key={e.id}
|
||||
value={e.id}
|
||||
fw={"bold"}
|
||||
color={statusId === e.id ? "black" : MainColor.darkblue}
|
||||
style={{
|
||||
transition: "0.5s",
|
||||
backgroundColor:
|
||||
statusId === e.id ? MainColor.yellow : "white",
|
||||
color: MainColor.darkblue,
|
||||
}}
|
||||
>
|
||||
{e.name}
|
||||
</Tabs.Tab>
|
||||
))}
|
||||
</Tabs.List>
|
||||
|
||||
<Job_NewViewStatus />
|
||||
</Stack>
|
||||
</Tabs>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,107 +1,104 @@
|
||||
"use client";
|
||||
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { globalStatusApp } from "@/app_modules/_global/lib";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
import { RouterJob } from "@/lib/router_hipmi/router_job";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import { MODEL_NEW_DEFAULT_MASTER } from "@/app_modules/model_global/interface";
|
||||
import { Stack, Tabs } from "@mantine/core";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { clientLogger } from "@/util/clientLogger";
|
||||
import { Center, Loader, Stack } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import _ from "lodash";
|
||||
import { ScrollOnly } from "next-scroll-loader";
|
||||
import { useParams } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import Job_Draft from "./draft";
|
||||
import Job_Publish from "./publish";
|
||||
import Job_Reject from "./reject";
|
||||
import Job_Review from "./review";
|
||||
import { apiGetJobByStatus } from "../../component/api_fetch_job";
|
||||
import ComponentJob_CardStatus from "../../component/card/card_view";
|
||||
|
||||
export default function Job_ViewStatus({
|
||||
statusId,
|
||||
dataJob,
|
||||
listStatus,
|
||||
}: {
|
||||
statusId: string;
|
||||
dataJob: any[];
|
||||
listStatus: MODEL_NEW_DEFAULT_MASTER[];
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [changeStatus, setChangeStatus] = useState(statusId);
|
||||
export default function Job_NewViewStatus() {
|
||||
const param = useParams<{ id: string }>();
|
||||
const [data, setData] = useState<any[] | null>(null);
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
|
||||
// const listTabs = [
|
||||
// {
|
||||
// id: 1,
|
||||
// path: <Job_Publish listPublish={listPublish} />,
|
||||
// value: "Publish",
|
||||
// },
|
||||
// {
|
||||
// id: 2,
|
||||
// path: <Job_Review listReview={listReview} />,
|
||||
// value: "Review",
|
||||
// },
|
||||
// {
|
||||
// id: 3,
|
||||
// path: <Job_Draft listDraft={listDraft} />,
|
||||
// value: "Draft",
|
||||
// },
|
||||
// {
|
||||
// id: 4,
|
||||
// path: <Job_Reject listReject={listReject} />,
|
||||
// value: "Reject",
|
||||
// },
|
||||
// ];
|
||||
useShallowEffect(() => {
|
||||
handleLoadData();
|
||||
}, []);
|
||||
|
||||
async function onChangeStatus({ statusId }: { statusId: string }) {
|
||||
router.replace(RouterJob.status({ id: statusId }));
|
||||
}
|
||||
const handleLoadData = async () => {
|
||||
try {
|
||||
const cek = globalStatusApp.find((e) => e.id === param.id);
|
||||
const response = await apiGetJobByStatus({
|
||||
status: cek?.name,
|
||||
page: `${activePage}`,
|
||||
});
|
||||
if (response.success) {
|
||||
setData(response.data);
|
||||
}
|
||||
} catch (error) {
|
||||
clientLogger.error("Error get job", error);
|
||||
}
|
||||
};
|
||||
|
||||
const hanldeMoreData = async () => {
|
||||
try {
|
||||
const cek = globalStatusApp.find((e) => e.id === param.id);
|
||||
const nextPage = activePage + 1;
|
||||
const response = await apiGetJobByStatus({
|
||||
status: cek?.name,
|
||||
page: `${nextPage}`,
|
||||
});
|
||||
if (response.success) {
|
||||
setActivePage(nextPage);
|
||||
return response.data;
|
||||
}
|
||||
} catch (error) {
|
||||
clientLogger.error("Error get job", error);
|
||||
}
|
||||
};
|
||||
|
||||
if (!data)
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<CustomSkeleton height={70} width={"100%"} />
|
||||
<CustomSkeleton height={70} width={"100%"} />
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tabs
|
||||
mt={1}
|
||||
color="yellow"
|
||||
variant="pills"
|
||||
radius={"xl"}
|
||||
value={changeStatus}
|
||||
onTabChange={(val: any) => {
|
||||
setChangeStatus(val);
|
||||
onChangeStatus({ statusId: val });
|
||||
}}
|
||||
styles={{
|
||||
tabsList: {
|
||||
backgroundColor: MainColor.darkblue,
|
||||
position: "sticky",
|
||||
top: 0,
|
||||
zIndex: 99,
|
||||
},
|
||||
panel: {
|
||||
paddingTop: 10,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Tabs.List grow>
|
||||
{listStatus.map((e) => (
|
||||
<Tabs.Tab
|
||||
key={e.id}
|
||||
value={e.id}
|
||||
fw={"bold"}
|
||||
color={statusId === e.id ? "black" : "white"}
|
||||
style={{
|
||||
transition: "0.5s",
|
||||
backgroundColor:
|
||||
statusId === e.id ? MainColor.yellow : "white",
|
||||
border:
|
||||
statusId === e.id
|
||||
? `1px solid ${AccentColor.yellow}`
|
||||
: `1px solid white`,
|
||||
}}
|
||||
>
|
||||
{e.name}
|
||||
</Tabs.Tab>
|
||||
))}
|
||||
</Tabs.List>
|
||||
{statusId === "1" && <Job_Publish listPublish={dataJob} />}
|
||||
{statusId === "2" && <Job_Review listReview={dataJob} />}
|
||||
{statusId === "3" && <Job_Draft listDraft={dataJob} />}
|
||||
{statusId === "4" && <Job_Reject listReject={dataJob} />}
|
||||
</Stack>
|
||||
</Tabs>
|
||||
{_.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
) : (
|
||||
<ScrollOnly
|
||||
height="75vh"
|
||||
renderLoading={() => (
|
||||
<Center mt={"lg"}>
|
||||
<Loader color={"yellow"} />
|
||||
</Center>
|
||||
)}
|
||||
data={data}
|
||||
setData={setData as any}
|
||||
moreData={hanldeMoreData}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentJob_CardStatus
|
||||
data={item}
|
||||
path={
|
||||
param.id == "1"
|
||||
? RouterJob.detail_publish
|
||||
: param.id == "2"
|
||||
? RouterJob.detail_review
|
||||
: param.id === "3"
|
||||
? RouterJob.detail_draft
|
||||
: param.id === "4"
|
||||
? RouterJob.detail_reject
|
||||
: ""
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import "react-international-phone/style.css";
|
||||
import { Portofolio_ComponentButtonSelanjutnya } from "../component";
|
||||
import { useParams } from "next/navigation";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { apiGetMasterBidangBisnis } from "@/app_modules/_global/lib/api_master";
|
||||
import { apiGetMasterBidangBisnis } from "@/app_modules/_global/lib/api_fetch_master";
|
||||
import { MODEL_PORTOFOLIO_BIDANG_BISNIS } from "../model/interface";
|
||||
import { clientLogger } from "@/util/clientLogger";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { MainColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import ComponentGlobal_ErrorInput from "@/app_modules/_global/component/error_input";
|
||||
import ComponentGlobal_InputCountDown from "@/app_modules/_global/component/input_countdown";
|
||||
import { apiGetMasterBidangBisnis } from "@/app_modules/_global/lib/api_master";
|
||||
import { apiGetMasterBidangBisnis } from "@/app_modules/_global/lib/api_fetch_master";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global";
|
||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
export const RouterJob = {
|
||||
//api
|
||||
api_gambar: "/api/job/gambar/",
|
||||
|
||||
//spalsh
|
||||
spalsh: "/dev/job/splash",
|
||||
|
||||
@@ -414,7 +414,6 @@ export const apies = {
|
||||
`/api/portofolio/logo/${id}`,
|
||||
"/api/map/pin/[id]": ({ id }: { id: string }) => `/api/map/pin/${id}`,
|
||||
"/api/map/foto/[id]": ({ id }: { id: string }) => `/api/map/foto/${id}`,
|
||||
"/api/job/gambar/[id]": ({ id }: { id: string }) => `/api/job/gambar/${id}`,
|
||||
"/api/investasi/prospektus/[id]": ({ id }: { id: string }) =>
|
||||
`/api/investasi/prospektus/${id}`,
|
||||
"/api/investasi/midtrans/[id]": ({ id }: { id: string }) =>
|
||||
|
||||
@@ -27,7 +27,6 @@ const middlewareConfig: MiddlewareConfig = {
|
||||
"/api/collaboration/*",
|
||||
"/api/notifikasi/*",
|
||||
"/api/logs/*",
|
||||
"/api/job/*",
|
||||
"/api/auth/*",
|
||||
"/api/origin-url",
|
||||
"/api/event/*",
|
||||
|
||||
Reference in New Issue
Block a user