fix responsive admin
deksripsi: - app infomation - user serach - project collaboration
This commit is contained in:
32
src/app/api/admin/master/bank/route.ts
Normal file
32
src/app/api/admin/master/bank/route.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { prisma } from "@/lib";
|
||||
|
||||
export { GET };
|
||||
|
||||
async function GET(request: Request) {
|
||||
try {
|
||||
const data = await prisma.masterBank.findMany({
|
||||
orderBy: {
|
||||
createdAt: "desc",
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json(
|
||||
{ success: true, message: "Berhasil mendapatkan data", data: data },
|
||||
{ status: 200 }
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"Error Get Master Bank >>",
|
||||
error || (error as Error).message
|
||||
);
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: false,
|
||||
message: "API Error Get Master Bank ",
|
||||
reason: (error as Error).message,
|
||||
},
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
32
src/app/api/admin/master/bidang-bisnis/route.ts
Normal file
32
src/app/api/admin/master/bidang-bisnis/route.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { prisma } from "@/lib";
|
||||
|
||||
export { GET };
|
||||
|
||||
async function GET(request: Request) {
|
||||
try {
|
||||
const data = await prisma.masterBidangBisnis.findMany({
|
||||
orderBy: {
|
||||
createdAt: "desc",
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json(
|
||||
{ success: true, message: "Berhasil mendapatkan data", data: data },
|
||||
{ status: 200 }
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"Error Get Master Bidang Bisnis >>",
|
||||
error || (error as Error).message
|
||||
);
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: false,
|
||||
message: "API Error Get Master Bidang Bisnis ",
|
||||
reason: (error as Error).message,
|
||||
},
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,9 @@
|
||||
import { adminAppInformation_funGetBidangBisnis } from "@/app_modules/admin/app_info/fun";
|
||||
import adminAppInformation_getMasterBank from "@/app_modules/admin/app_info/fun/master/get_list_bank";
|
||||
import adminAppInformation_getNomorAdmin from "@/app_modules/admin/app_info/fun/master/get_nomor_admin";
|
||||
import { AdminAppInformation_UiMain } from "@/app_modules/admin/app_info/ui";
|
||||
|
||||
export default async function Page() {
|
||||
const listBank = await adminAppInformation_getMasterBank();
|
||||
const dataBidangBisnis = await adminAppInformation_funGetBidangBisnis()
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminAppInformation_UiMain
|
||||
listBank={listBank}
|
||||
dataBidangBisnis={dataBidangBisnis}
|
||||
/>
|
||||
<AdminAppInformation_UiMain />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { AdminUserAccess_View } from "@/app_modules/admin/user-access";
|
||||
|
||||
export default async function Page() {
|
||||
// const listUser = await adminUserAccess_getListUser({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminUserAccess_View />
|
||||
|
||||
Reference in New Issue
Block a user