QC Investasi

# fix
Tampilan admin investasi
Tampilan admin donasi
## No issuee
This commit is contained in:
2024-05-31 16:41:34 +08:00
parent c28cceb46f
commit 5b8cd3a4b6
175 changed files with 4785 additions and 2296 deletions

View File

@@ -3,6 +3,7 @@
import { Header, Group, ActionIcon, Text, Title } from "@mantine/core";
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
import { useRouter } from "next/navigation";
import { useState } from "react";
export default function ComponentGlobal_HeaderTamplate({
route,
@@ -16,13 +17,18 @@ export default function ComponentGlobal_HeaderTamplate({
icon?: any;
}) {
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
const [isRightLoading, setRightLoading] = useState(false);
return (
<>
<Header height={50} sx={{ borderStyle: "none" }}>
<Group h={50} position="apart" px={"md"}>
<ActionIcon
loading={isLoading ? true : false}
variant="transparent"
onClick={() => {
setIsLoading(true);
if (route === null || route === undefined) {
return router.back();
} else {
@@ -39,8 +45,12 @@ export default function ComponentGlobal_HeaderTamplate({
} else {
return (
<ActionIcon
loading={isRightLoading ? true : false}
variant="transparent"
onClick={() => router.push(route2)}
onClick={() => {
setRightLoading(true);
router.push(route2);
}}
>
{icon}
</ActionIcon>

View File

@@ -0,0 +1,18 @@
import { ComponentGlobal_NotifikasiPeringatan } from "./notif_global/notifikasi_peringatan";
/**
* @returns nilai maksimal untuk upload file di semua module
*/
export let maksimalUploadFile = 2000000;
export const ComponentGlobal_WarningMaxUpload = ({
text,
time,
}: {
text?: string;
time?: number;
}) => {
ComponentGlobal_NotifikasiPeringatan(
text ? text : "Maaf, Ukuran file terlalu besar, maximum 2mb",
time ? time : 3000
);
};