#fix: bug

- Desk:
- Perbaikan penempatan file
## No issuee
This commit is contained in:
2024-07-10 23:42:54 +08:00
parent ab6f2fe8a7
commit e744bb95fa
408 changed files with 779 additions and 861 deletions

View File

@@ -0,0 +1,52 @@
import { Center, Grid, Group, Paper, Stack, Text, Title } from "@mantine/core";
import { AccentColor, MainColor } from "../color/color_pallet";
export default function ComponentGlobal_BoxInformation({
informasi,
isReport,
}: {
informasi: string;
isReport?: boolean;
}) {
return (
<>
{isReport ? (
<Paper
bg={"blue.3"}
p={10}
style={{
backgroundColor: AccentColor.blue,
border: `1px solid ${AccentColor.skyblue}`,
}}
>
<Stack spacing={0}>
<Text fz={10} fs={"italic"} c={"orange"} fw={"bold"}>
* Report
</Text>
<Text fz={10} c={"white"}>
{informasi}
</Text>
</Stack>
</Paper>
) : (
<Paper
bg={"blue.3"}
p={10}
style={{
backgroundColor: AccentColor.blue,
border: `1px solid ${AccentColor.skyblue}`,
}}
>
<Group>
<Text fz={10} c={"red"} fw={"bold"}>
*{" "}
<Text span inherit c={"white"} fw={"normal"}>
{informasi}
</Text>
</Text>
</Group>
</Paper>
)}
</>
);
}

View File

@@ -0,0 +1,25 @@
"use client";
import { Group, Text } from "@mantine/core";
import { IconAlertTriangle } from "@tabler/icons-react";
export default function ComponentGlobal_ErrorInput({
max,
text,
color,
}: {
max?: number;
text?: string;
color?: string;
}) {
return (
<>
<Group spacing={"xs"}>
<IconAlertTriangle size={15} color={color ? color : "red"} />
<Text fz={10} fs={"italic"} color={color ? color : "red"}>
{text ? text : ` Maksimal ${max ? max : "-"} karakter !`}
</Text>
</Group>
</>
);
}

View File

@@ -0,0 +1,23 @@
"use client";
import { Text } from "@mantine/core";
import { useState } from "react";
export default function ComponentGlobal_InputCountDown({
maxInput,
lengthInput,
}: {
maxInput: number;
lengthInput: number;
}) {
return (
<>
<Text fz={"xs"} fs={"italic"} color="gray">
{maxInput - lengthInput < 0 ? 0 : maxInput - lengthInput} /{" "}
<Text span inherit c={maxInput - lengthInput < 0 ? "red" : ""} style={{transition: "0.5s"}}>
{maxInput}
</Text>
</Text>
</>
);
}

View File

@@ -0,0 +1,23 @@
"use client";
import { Center, Text } from "@mantine/core";
export default function ComponentGlobal_IsEmptyData({
text,
height,
}: {
text?: string;
height?: number;
}) {
return (
<>
<Center
h={height ? `${height}vh` : "70vh"}
fz={"sm"}
fw={"bold"}
>
<Text c={"gray"}>{text ? text : "Tidak Ada Data"}</Text>
</Center>
</>
);
}

View File

@@ -0,0 +1,10 @@
import { Loader } from "@mantine/core";
import { MainColor } from "../color/color_pallet";
export default function ComponentGlobal_Loader({ size }: { size?: number }) {
return (
<>
<Loader color={MainColor.yellow} size={size ? size : 20} />
</>
);
}

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
);
};