Update Versi 1.5.27 #32
@@ -0,0 +1,9 @@
|
||||
import AdminAppInformation_ViewCreateBidangBisnis from "@/app_modules/admin/app_info/view/view_create_bidang";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<AdminAppInformation_ViewCreateBidangBisnis />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
import { AdminAppInformation_ViewKategoriPortofolio } from "@/app_modules/admin/app_info/view";
|
||||
import { AdminAppInformation_V3_ViewKategoriBidangBisnis } from "@/app_modules/admin/app_info/view/new_kategori_bidang_bisnis";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<AdminAppInformation_ViewKategoriPortofolio />
|
||||
{/* <AdminAppInformation_V3_ViewKategoriBidangBisnis /> */}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { IconChevronLeft } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function AdminGlobal_ComponentBackButton({
|
||||
export default function Admin_ComponentBackButton({
|
||||
path,
|
||||
}: {
|
||||
path?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Box, Center, Image, ScrollArea, Skeleton, Stack, Text } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "./back_button";
|
||||
import Admin_ComponentBackButton from "./back_button";
|
||||
import { APIs, pathAssetImage } from "@/lib";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useState } from "react";
|
||||
@@ -34,7 +34,7 @@ export function Admin_ComponentPreviewImageAdmin({
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<Box style={{ zIndex: 0 }} h={"90vh"} pos={"static"} px={"lg"}>
|
||||
{isImage === null ? (
|
||||
<Center>
|
||||
|
||||
@@ -24,17 +24,11 @@ export default function AdminAppInformation_Layout({
|
||||
}) {
|
||||
const pathname = usePathname();
|
||||
const listPage = [
|
||||
// {
|
||||
// id: "1",
|
||||
// name: "Whatsapp",
|
||||
// },
|
||||
{
|
||||
id: "2",
|
||||
name: "Informasi Bank",
|
||||
path: "/dev/admin/app-information/info-bank",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "Bidang Bisnis",
|
||||
path: "/dev/admin/app-information/bidang-bisnis",
|
||||
},
|
||||
@@ -58,8 +52,9 @@ export default function AdminAppInformation_Layout({
|
||||
component={Link}
|
||||
href={e.path}
|
||||
radius={"xl"}
|
||||
c={isActive(e.path) ? AdminColor.white : "gray"}
|
||||
bg={isActive(e.path) ? AccentColor.blue : AccentColor.blackgray}
|
||||
c={isActive(e.path) ? MainColor.black : MainColor.white}
|
||||
color="yellow"
|
||||
bg={isActive(e.path) ? AccentColor.yellow : AccentColor.blackgray}
|
||||
style={{
|
||||
transition: "all 0.5s",
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
AdminColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
import { MODEL_DEFAULT_MASTER_OLD } from "@/app_modules/model_global/interface";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
Paper,
|
||||
ScrollArea,
|
||||
Stack,
|
||||
Switch,
|
||||
Table,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { IconCirclePlus, IconEdit } from "@tabler/icons-react";
|
||||
import { useState } from "react";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../_admin_global/admin_notifikasi/notifikasi_berhasil";
|
||||
import { ComponentAdminGlobal_NotifikasiGagal } from "../../_admin_global/admin_notifikasi/notifikasi_gagal";
|
||||
import {
|
||||
adminAppInformation_funCreateBidangBisnis,
|
||||
adminAppInformation_funGetBidangBisnis,
|
||||
adminAppInformation_funUpdateBidangBisnis,
|
||||
} from "../fun";
|
||||
import { apiGetMasterAdminBidangBisnis } from "../lib/api_fetch_master";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { RouterAdminAppInformation } from "@/lib/router_admin/router_app_information";
|
||||
|
||||
export function AdminAppInformation_V3_ViewKategoriBidangBisnis() {
|
||||
const router = useRouter();
|
||||
const [data, setData] = useState<MODEL_DEFAULT_MASTER_OLD[] | null>(null);
|
||||
|
||||
useShallowEffect(() => {
|
||||
handleLoadData();
|
||||
}, []);
|
||||
|
||||
async function handleLoadData() {
|
||||
try {
|
||||
const response = await apiGetMasterAdminBidangBisnis();
|
||||
|
||||
if (response && response.success) {
|
||||
setData(response.data);
|
||||
} else {
|
||||
setData([]);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("Error load data", error);
|
||||
setData([]);
|
||||
}
|
||||
}
|
||||
|
||||
// Create
|
||||
const [isLoadingCreate, setLoadingCreate] = useState(false);
|
||||
const [isCreate, setIsCreate] = useState(true);
|
||||
const [newData, setNewData] = useState("");
|
||||
async function onCreate() {
|
||||
try {
|
||||
const create = await adminAppInformation_funCreateBidangBisnis({
|
||||
name: newData,
|
||||
});
|
||||
|
||||
if (create.status === 201) {
|
||||
setLoadingCreate(true);
|
||||
const loadData = await adminAppInformation_funGetBidangBisnis();
|
||||
setData(loadData);
|
||||
setNewData("");
|
||||
ComponentAdminGlobal_NotifikasiBerhasil(create.message);
|
||||
} else {
|
||||
ComponentAdminGlobal_NotifikasiGagal(create.message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
ComponentAdminGlobal_NotifikasiGagal("Gagal menambah bidang bisnis");
|
||||
} finally {
|
||||
setLoadingCreate(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Update Data
|
||||
const [isLoadingUpdate, setLoadingUpdate] = useState(false);
|
||||
|
||||
const [isUpdate, setIsUpdate] = useState(false);
|
||||
const [updateData, setUpdateData] = useState({
|
||||
id: "",
|
||||
name: "",
|
||||
});
|
||||
|
||||
async function onUpdate() {
|
||||
try {
|
||||
setLoadingUpdate(true);
|
||||
const updt = await adminAppInformation_funUpdateBidangBisnis({
|
||||
data: updateData as any,
|
||||
});
|
||||
if (updt?.status === 200) {
|
||||
const loadData = await adminAppInformation_funGetBidangBisnis();
|
||||
setData(loadData);
|
||||
|
||||
ComponentAdminGlobal_NotifikasiBerhasil(updt.message);
|
||||
} else {
|
||||
ComponentAdminGlobal_NotifikasiGagal(updt?.message as any);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
setIsUpdate(false);
|
||||
setIsCreate(true);
|
||||
setLoadingUpdate(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Activation
|
||||
const [openModal, setOpenModal] = useState(false);
|
||||
const [updateStatus, setUpdateStatus] = useState({
|
||||
id: "",
|
||||
active: null,
|
||||
});
|
||||
const [isLoadingActivation, setLoadingActivation] = useState(false);
|
||||
|
||||
async function onUpdateActivation({
|
||||
id,
|
||||
active,
|
||||
}: {
|
||||
id: string;
|
||||
active: boolean;
|
||||
}) {
|
||||
try {
|
||||
setLoadingActivation(true);
|
||||
const updt = await adminAppInformation_funUpdateBidangBisnis({
|
||||
data: { id: id, active: active },
|
||||
});
|
||||
|
||||
if (updt?.status === 200) {
|
||||
const loadData = await adminAppInformation_funGetBidangBisnis();
|
||||
setData(loadData);
|
||||
setOpenModal(false);
|
||||
setLoadingActivation(false);
|
||||
ComponentAdminGlobal_NotifikasiBerhasil(updt?.message);
|
||||
} else {
|
||||
ComponentAdminGlobal_NotifikasiGagal(updt?.message as any);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
ComponentAdminGlobal_NotifikasiGagal("Gagal mengupdate status");
|
||||
}
|
||||
}
|
||||
|
||||
const rowTable = () => {
|
||||
if (!Array.isArray(data) || data.length === 0) {
|
||||
return (
|
||||
<tr>
|
||||
<td colSpan={12}>
|
||||
<Center>
|
||||
<Text color={"gray"}>Tidak ada data</Text>
|
||||
</Center>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
}
|
||||
return data.map((e, i) => (
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<Stack align="center" justify="center">
|
||||
<Button
|
||||
leftIcon={<IconEdit />}
|
||||
radius={"xl"}
|
||||
bg={MainColor.green}
|
||||
color="green"
|
||||
onClick={() => {
|
||||
setIsUpdate(true);
|
||||
setIsCreate(false);
|
||||
setUpdateData({
|
||||
id: e?.id,
|
||||
name: e?.name,
|
||||
});
|
||||
}}
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
</Stack>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<Center>
|
||||
<Switch
|
||||
color="orange"
|
||||
onLabel="ON"
|
||||
offLabel="OFF"
|
||||
checked={e?.active}
|
||||
onChange={(val) => {
|
||||
setOpenModal(true);
|
||||
setUpdateStatus({
|
||||
id: e?.id,
|
||||
active: val.currentTarget.checked as any,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</Center>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<Box>
|
||||
<Text c={AdminColor.white}>{e?.name}</Text>
|
||||
</Box>
|
||||
</td>
|
||||
</tr>
|
||||
));
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_TitlePage name="Kategori Bidang Bisnis" />
|
||||
|
||||
<Button
|
||||
w={120}
|
||||
radius={"xl"}
|
||||
leftIcon={<IconCirclePlus />}
|
||||
onClick={() => {
|
||||
router.push(RouterAdminAppInformation.createBidangBisnis);
|
||||
}}
|
||||
>
|
||||
Tambah
|
||||
</Button>
|
||||
|
||||
<div>
|
||||
{!data ? (
|
||||
<CustomSkeleton height={"80vh"} width="100%" />
|
||||
) : (
|
||||
<Paper p={"md"} bg={AdminColor.softBlue} h={"65dvh"}>
|
||||
<ScrollArea w={"100%"} h={"100%"} scrollbarSize={"md"}>
|
||||
<Table
|
||||
verticalSpacing={"md"}
|
||||
horizontalSpacing={"md"}
|
||||
p={"md"}
|
||||
w={"100%"}
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center c={AdminColor.white}>Aksi</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AdminColor.white}>Status</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Text c={AdminColor.white}>Kategori</Text>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>{rowTable()}</tbody>
|
||||
</Table>
|
||||
</ScrollArea>
|
||||
</Paper>
|
||||
)}
|
||||
</div>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
75
src/app_modules/admin/app_info/view/view_create_bidang.tsx
Normal file
75
src/app_modules/admin/app_info/view/view_create_bidang.tsx
Normal file
@@ -0,0 +1,75 @@
|
||||
"use client";
|
||||
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { Button, Center, Group, Stack, TextInput, Title } from "@mantine/core";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { Admin_ComponentBoxStyle } from "../../_admin_global/_component/comp_admin_boxstyle";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { Admin_V3_ComponentBreakpoint } from "../../_components_v3/comp_simple_grid_breakpoint";
|
||||
|
||||
export default function AdminAppInformation_ViewCreateBidangBisnis() {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_TitlePage name="Tambah Bidang Bisnis" />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
<Admin_V3_ComponentBreakpoint>
|
||||
{/* BIDANG */}
|
||||
<Admin_ComponentBoxStyle
|
||||
style={{
|
||||
maxHeight: "15dvh",
|
||||
overflow: "auto",
|
||||
}}
|
||||
>
|
||||
<Stack p={"xs"}>
|
||||
<Title c={AdminColor.white} order={5}>
|
||||
Tambah Bidang Bisnis
|
||||
</Title>
|
||||
|
||||
<TextInput
|
||||
placeholder="Masukan nama bidang bisnis"
|
||||
// value={newData}
|
||||
// onChange={(val) => {
|
||||
// setNewData(val.currentTarget.value);
|
||||
// }}
|
||||
/>
|
||||
</Stack>
|
||||
</Admin_ComponentBoxStyle>
|
||||
|
||||
{/* SUB BIDANG */}
|
||||
<Admin_ComponentBoxStyle>
|
||||
<Stack p={"xs"}>
|
||||
<Title c={AdminColor.white} order={5}>
|
||||
Tambah Sub Bidang Bisnis
|
||||
</Title>
|
||||
|
||||
<TextInput
|
||||
placeholder="Masukan nama bidang bisnis"
|
||||
// value={newData}
|
||||
// onChange={(val) => {
|
||||
// setNewData(val.currentTarget.value);
|
||||
// }}
|
||||
/>
|
||||
<Group position="right" align="flex-end">
|
||||
<Button
|
||||
// loading={isLoadingCreate}
|
||||
loaderPosition="center"
|
||||
style={{ transition: "0.5s" }}
|
||||
// disabled={newData == "" || !data}
|
||||
radius={"xl"}
|
||||
color="green"
|
||||
onClick={() => {
|
||||
// onCreate();
|
||||
}}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
</Admin_ComponentBoxStyle>
|
||||
</Admin_V3_ComponentBreakpoint>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -184,22 +184,6 @@ export function AdminAppInformation_ViewKategoriPortofolio() {
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
{/* <ActionIcon
|
||||
radius={"xl"}
|
||||
variant="transparent"
|
||||
onClick={() => {
|
||||
setIsUpdate(true);
|
||||
setIsCreate(false);
|
||||
setUpdateData({
|
||||
id: e?.id,
|
||||
name: e?.name,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Tooltip label="Edit">
|
||||
<IconEdit color={AdminColor.white} />
|
||||
</Tooltip>
|
||||
</ActionIcon> */}
|
||||
</Stack>
|
||||
</td>
|
||||
|
||||
@@ -233,21 +217,7 @@ export function AdminAppInformation_ViewKategoriPortofolio() {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Kategori Bidang Bisnis"
|
||||
// component={
|
||||
// <Button
|
||||
// radius={"xl"}
|
||||
// leftIcon={<IconCirclePlus />}
|
||||
// onClick={() => {
|
||||
// setIsCreate(true);
|
||||
// setIsUpdate(false);
|
||||
// }}
|
||||
// >
|
||||
// Tambah
|
||||
// </Button>
|
||||
// }
|
||||
/>
|
||||
<ComponentAdminGlobal_TitlePage name="Kategori Bidang Bisnis" />
|
||||
|
||||
<Admin_V3_ComponentBreakpoint>
|
||||
<div>
|
||||
@@ -270,14 +240,6 @@ export function AdminAppInformation_ViewKategoriPortofolio() {
|
||||
/>
|
||||
|
||||
<Group position="right" align="flex-end">
|
||||
{/* <Button
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
setIsCreate(false);
|
||||
}}
|
||||
>
|
||||
Batal
|
||||
</Button> */}
|
||||
<Button
|
||||
loading={isLoadingCreate}
|
||||
loaderPosition="center"
|
||||
@@ -361,10 +323,10 @@ export function AdminAppInformation_ViewKategoriPortofolio() {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center c={AdminColor.white}>Status</Center>
|
||||
<Center c={AdminColor.white}>Aksi</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center c={AdminColor.white}>Aksi</Center>
|
||||
<Center c={AdminColor.white}>Status</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Text c={AdminColor.white}>Kategori</Text>
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useParams } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import { apiGetAdminCollaborationGroupById } from "../lib/api_fetch_admin_collaboration";
|
||||
import { Admin_ComponentBoxStyle } from "../../_admin_global/_component/comp_admin_boxstyle";
|
||||
@@ -85,7 +85,7 @@ function DetailGroup() {
|
||||
return (
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name={`Detail group`} />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{!data ? (
|
||||
<Admin_V3_ComponentSkeletonBreakpoint skeletonRequest={2} />
|
||||
|
||||
@@ -21,7 +21,7 @@ import { IconCheck, IconFlag2Off } from "@tabler/icons-react";
|
||||
import { useParams, useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { Admin_ComponentBoxStyle } from "../../_admin_global/_component/comp_admin_boxstyle";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import adminColab_funReportProjectById from "../fun/edit/fun_report_project_by_id";
|
||||
import { apiGetAdminCollaborationById } from "../lib/api_fetch_admin_collaboration";
|
||||
@@ -111,7 +111,7 @@ function DetailPublish() {
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name={`Detail publish`} />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{!data ? (
|
||||
<Admin_V3_ComponentSkeletonBreakpoint />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import {
|
||||
Button,
|
||||
Flex,
|
||||
@@ -116,7 +116,7 @@ function DetailReject() {
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name={`Detail reject`} />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{!data ? (
|
||||
<Admin_V3_ComponentSkeletonBreakpoint />
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
import { useDisclosure, useShallowEffect } from "@mantine/hooks";
|
||||
import React, { useState } from "react";
|
||||
import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../_admin_global/admin_notifikasi/notifikasi_berhasil";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminDonasi_CeritaPenggalangDana from "../component/tampilan_detail_cerita";
|
||||
import ComponentAdminDonasi_TampilanDetailDonasi from "../component/tampilan_detail_donasi";
|
||||
import { AdminDonasi_getOneById } from "../fun/get/get_one_by_id";
|
||||
@@ -122,7 +122,7 @@ function ButtonOnHeader({
|
||||
<>
|
||||
<Stack>
|
||||
<Group position="apart">
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<Button
|
||||
radius={"xl"}
|
||||
bg={"orange"}
|
||||
|
||||
@@ -17,7 +17,7 @@ import Admin_ComponentModalPublish from "../../_admin_global/_component/comp_adm
|
||||
import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../_admin_global/admin_notifikasi/notifikasi_berhasil";
|
||||
import { ComponentAdminGlobal_NotifikasiGagal } from "../../_admin_global/admin_notifikasi/notifikasi_gagal";
|
||||
import { ComponentAdminGlobal_NotifikasiPeringatan } from "../../_admin_global/admin_notifikasi/notifikasi_peringatan";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import adminNotifikasi_funCreateToAllUser from "../../notifikasi/fun/create/fun_create_notif_to_all_user";
|
||||
import adminNotifikasi_funCreateToUser from "../../notifikasi/fun/create/fun_create_notif_user";
|
||||
|
||||
@@ -235,7 +235,7 @@ function ButtonOnHeader({
|
||||
return (
|
||||
<>
|
||||
<Group position="apart">
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
{donasi.donasiMaster_StatusDonasiId === "2" ? (
|
||||
<Group>
|
||||
<Button
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_TampilanRupiah } from "@/app_modules/_global/component";
|
||||
import { Admin_ComponentLoadImageLandscape } from "@/app_modules/admin/_admin_global";
|
||||
import CustomSkeletonAdmin from "@/app_modules/admin/_admin_global/_component/skeleton/customSkeletonAdmin";
|
||||
import AdminGlobal_ComponentBackButton from "@/app_modules/admin/_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "@/app_modules/admin/_admin_global/back_button";
|
||||
import {
|
||||
MODEL_DONASI,
|
||||
MODEL_DONASI_PENCAIRAN_DANA,
|
||||
@@ -71,7 +71,7 @@ export default function AdminDonasi_DetailPublish({
|
||||
{/* <pre>{JSON.stringify(pencairan, null, 2)}</pre> */}
|
||||
<Stack>
|
||||
<>
|
||||
<AdminGlobal_ComponentBackButton
|
||||
<Admin_ComponentBackButton
|
||||
path={RouterAdminDonasi.table_publish}
|
||||
/>
|
||||
{!data ? (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { AspectRatio, Box, Image, Paper, Stack } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { RouterAdminDonasi_OLD } from "@/lib/router_hipmi/router_admin";
|
||||
import { Admin_ComponentLoadImageLandscape } from "../../_admin_global";
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function AdminDonasi_BuktiTransfer({
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<BuktiTransfer imageId={imageId} />
|
||||
</Stack>
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { AspectRatio, Box, Image, Paper, Stack } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { RouterAdminDonasi_OLD } from "@/lib/router_hipmi/router_admin";
|
||||
import { RouterDonasi } from "@/lib/router_hipmi/router_donasi";
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function AdminDonasi_BuktiTransferPencairan({
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<BuktiTransfer imageId={imageId} />
|
||||
</Stack>
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Stack } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { AdminEvent_ViewDetailPeserta } from "../_view";
|
||||
import { MODEL_EVENT_PESERTA } from "@/app_modules/event/_lib/interface";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
@@ -10,7 +10,7 @@ export function AdminEvent_UiDetailPeserta() {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<ComponentAdminGlobal_TitlePage name="Detail Peserta" />
|
||||
<AdminEvent_ViewDetailPeserta
|
||||
/>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { SimpleGrid, Stack } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useParams } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import { apiGetAdminDetailEventById } from "../_lib/api_fecth_admin_event";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
@@ -47,7 +47,7 @@ export function AdminEvent_UiNewDetail() {
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Detail event" />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{data === undefined ? (
|
||||
<Admin_V3_ComponentSkeletonBreakpoint/>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { IconCircleCheck } from "@tabler/icons-react";
|
||||
import { useAtom } from "jotai";
|
||||
import { gs_admin_event_menu_publish } from "../_lib/global_state";
|
||||
import { Stack, Group, Button } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import AdminEvent_ComponentDetailPublish from "../_component/comp_detail_publish";
|
||||
import { AdminEvent_ViewDetailPeserta } from "./view_detail_peserta";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Button, Group, Stack } from '@mantine/core';
|
||||
import { IconCircleCheck } from '@tabler/icons-react';
|
||||
import { useAtom } from 'jotai';
|
||||
import AdminGlobal_ComponentBackButton from '../../_admin_global/back_button';
|
||||
import Admin_ComponentBackButton from '../../_admin_global/back_button';
|
||||
import AdminEvent_ComponentDetailPublish from '../_component/comp_detail_publish';
|
||||
import { gs_admin_event_menu_publish } from '../_lib/global_state';
|
||||
import { AdminEvent_ViewDetailPeserta } from '../_view';
|
||||
@@ -29,7 +29,7 @@ function AdminEvent_DetailPublish() {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
<Group>
|
||||
{listPage.map((e) => (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
import { ActionIcon, Badge, Button, Center, Group, Paper, ScrollArea, Select, Stack, Table, Title } from '@mantine/core';
|
||||
import React from 'react';
|
||||
import AdminGlobal_ComponentBackButton from '../../_admin_global/back_button';
|
||||
import Admin_ComponentBackButton from '../../_admin_global/back_button';
|
||||
import { IconImageInPicture, IconReload } from '@tabler/icons-react';
|
||||
|
||||
const tableRows = [
|
||||
@@ -54,7 +54,7 @@ function AdminEvent_DetailSponsor() {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<Group
|
||||
position='apart'
|
||||
|
||||
@@ -32,7 +32,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { Admin_ComponentModal } from "../../_admin_global/_component/comp_admin_modal";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { Admin_V3_ComponentPaginationBreakpoint } from "../../_components_v3/comp_pagination_breakpoint";
|
||||
import ComponentAdminForum_ViewOneDetailPosting from "../component/detail_one_posting";
|
||||
import { adminForum_funDeleteKomentarById } from "../fun/delete/fun_delete_komentar_by_id";
|
||||
@@ -49,7 +49,7 @@ export default function AdminForum_DetailPosting({
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Forum: Detail" />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<Admin_V3_ComponentBreakpoint>
|
||||
<ComponentAdminForum_ViewOneDetailPosting dataPosting={dataPosting} />
|
||||
</Admin_V3_ComponentBreakpoint>
|
||||
|
||||
@@ -30,7 +30,7 @@ import _ from "lodash";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { Admin_ComponentModal } from "../../_admin_global/_component/comp_admin_modal";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||
import { Admin_V3_ComponentPaginationBreakpoint } from "../../_components_v3/comp_pagination_breakpoint";
|
||||
import { Admin_V3_ComponentBreakpoint } from "../../_components_v3/comp_simple_grid_breakpoint";
|
||||
@@ -54,7 +54,7 @@ export default function AdminForum_HasilReportKomentar({
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Forum: Report" />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
<Admin_V3_ComponentBreakpoint>
|
||||
<ComponentAdminForum_ViewOneDetailKomentar dataKomentar={data} />
|
||||
|
||||
@@ -30,7 +30,7 @@ import { IconTrash } from "@tabler/icons-react";
|
||||
import _ from "lodash";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||
import { Admin_V3_ComponentPaginationBreakpoint } from "../../_components_v3/comp_pagination_breakpoint";
|
||||
import { Admin_V3_ComponentBreakpoint } from "../../_components_v3/comp_simple_grid_breakpoint";
|
||||
@@ -52,7 +52,7 @@ export default function AdminForum_HasilReportPosting({
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Forum: Report" />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
<Admin_V3_ComponentBreakpoint>
|
||||
<ComponentAdminForum_ViewOneDetailPosting dataPosting={dataPosting} />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use client";
|
||||
import AdminGlobal_ComponentBackButton from "@/app_modules/admin/_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "@/app_modules/admin/_admin_global/back_button";
|
||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||
import { MODEL_INVOICE_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
||||
import { clientLogger } from "@/util/clientLogger";
|
||||
@@ -110,7 +110,7 @@ function DetailTransaksi() {
|
||||
return (
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name={"Detail Transaksi"} />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
<>
|
||||
{!data ? (
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { Stack } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { AdminInvestasi_ViewBuktiTransfer } from "../_view";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
|
||||
export function AdminInvestasi_DetailBuktiTransfer({ imageId }: { imageId: string }) {
|
||||
return (
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<ComponentAdminGlobal_TitlePage name="Bukti Transfer" />
|
||||
<AdminInvestasi_ViewBuktiTransfer imageId={imageId} />
|
||||
</Stack>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { Button, Group, Stack } from "@mantine/core";
|
||||
import { IconCircleCheck } from "@tabler/icons-react";
|
||||
import { useAtom } from "jotai";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import { gs_admin_invetasi_menu_publish } from "../_lib/global_state";
|
||||
import {
|
||||
@@ -35,7 +35,7 @@ export function AdminInvestasi_DetailPublish() {
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name={"Investasi: Publish"} />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
<Group>
|
||||
{listPage.map((e) => (
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { MODEL_INVESTASI } from "@/app_modules/investasi/_lib/interface";
|
||||
import { Paper, SimpleGrid, Stack, Text, Title } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { ComponentAdminInvestasi_DetailDataAuthor } from "../_component/detail_data_author";
|
||||
import { ComponentAdminInvestasi_DetailData } from "../_component/detail_data_investasi";
|
||||
import { ComponentAdminInvestasi_DetailGambar } from "../_component/detail_gambar_investasi";
|
||||
@@ -46,7 +46,7 @@ export function AdminInvestasi_DetailReject() {
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name={"Investasi: Reject"} />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{!data ? (
|
||||
<CustomSkeleton h={200} w={"50%"} />
|
||||
|
||||
@@ -15,7 +15,7 @@ import Admin_ComponentModalPublish from "../../_admin_global/_component/comp_adm
|
||||
import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../_admin_global/admin_notifikasi/notifikasi_berhasil";
|
||||
import { ComponentAdminGlobal_NotifikasiGagal } from "../../_admin_global/admin_notifikasi/notifikasi_gagal";
|
||||
import { ComponentAdminGlobal_NotifikasiPeringatan } from "../../_admin_global/admin_notifikasi/notifikasi_peringatan";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import adminNotifikasi_funCreateToUser from "../../notifikasi/fun/create/fun_create_notif_user";
|
||||
import { ComponentAdminInvestasi_DetailDataAuthor } from "../_component/detail_data_author";
|
||||
import { ComponentAdminInvestasi_DetailData } from "../_component/detail_data_investasi";
|
||||
@@ -177,7 +177,7 @@ export default function AdminInvestasi_DetailReview() {
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Investasi: Review" />
|
||||
<Group position="apart">
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{data?.masterStatusInvestasiId === "2" ? (
|
||||
<Group>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Stack } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useParams } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import { Admin_V3_ComponentSkeletonBreakpoint } from "../../_components_v3/comp_skeleton_breakpoint";
|
||||
import { AdminJob_DetailPublish } from "../_components/detail/publish";
|
||||
@@ -40,7 +40,7 @@ export function AdminJob_ViewDetailPublish() {
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name={`Detail data`} />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{!data ? (
|
||||
<Admin_V3_ComponentSkeletonBreakpoint />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { RouterJob } from "@/lib/router_hipmi/router_job";
|
||||
import { Center, Image, Stack } from "@mantine/core";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import { APIs } from "@/lib";
|
||||
import { useState } from "react";
|
||||
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
||||
@@ -17,7 +17,7 @@ export default function AdminJob_DetailPoster({
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
<Center>
|
||||
<Image
|
||||
onLoad={() => setLoading(false)}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Stack } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useParams } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import Admin_ComponentBackButton from "../../_admin_global/back_button";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import { Admin_V3_ComponentSkeletonBreakpoint } from "../../_components_v3/comp_skeleton_breakpoint";
|
||||
import { AdminVoting_ComponentDetailPublish } from "../component/comp_detail_publish";
|
||||
@@ -41,7 +41,7 @@ export function AdminVote_DetailVoting() {
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Detail voting" />
|
||||
<AdminGlobal_ComponentBackButton />
|
||||
<Admin_ComponentBackButton />
|
||||
|
||||
{data === undefined || !data && (
|
||||
<Admin_V3_ComponentSkeletonBreakpoint skeletonRequest={2}/>
|
||||
|
||||
@@ -2,4 +2,5 @@ export const RouterAdminAppInformation = {
|
||||
main: "/dev/admin/app-information/main",
|
||||
infoBank: "/dev/admin/app-information/info-bank",
|
||||
bidangBisnis: "/dev/admin/app-information/bidang-bisnis",
|
||||
createBidangBisnis: "/dev/admin/app-information/bidang-bisnis/create",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user