Revisi Tampilan Admin
# fix : - Tampilan Donasi # feat : - Penambahan App Information ## No Issuee
This commit is contained in:
@@ -1,42 +1,26 @@
|
||||
"use client";
|
||||
|
||||
import { RouterEvent } from "@/app/lib/router_hipmi/router_event";
|
||||
import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown";
|
||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
||||
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||
import { MODEL_DEFAULT_MASTER_OLD } from "@/app_modules/model_global/interface";
|
||||
import {
|
||||
AspectRatio,
|
||||
Avatar,
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
FileButton,
|
||||
Image,
|
||||
MultiSelect,
|
||||
Paper,
|
||||
Select,
|
||||
Stack,
|
||||
Text,
|
||||
TextInput,
|
||||
Textarea,
|
||||
Textarea
|
||||
} from "@mantine/core";
|
||||
import { DateInput, DatePicker, DateTimePicker } from "@mantine/dates";
|
||||
import { TimeInput } from "@mantine/dates";
|
||||
import { IconCamera } from "@tabler/icons-react";
|
||||
import { DateTimePicker } from "@mantine/dates";
|
||||
import { useAtom } from "jotai";
|
||||
import moment from "moment";
|
||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { gs_event_hotMenu, gs_event_status } from "../global_state";
|
||||
import { MODEL_DEFAULT_MASTER_OLD } from "@/app_modules/model_global/interface";
|
||||
import { Event_funCreate } from "../fun/create/fun_create";
|
||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||
import { kMaxLength } from "buffer";
|
||||
import _ from "lodash";
|
||||
import toast from "react-simple-toasts";
|
||||
import moment from "moment";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||
import ComponentEvent_ErrorMaximalInput from "../component/error_maksimal_input";
|
||||
import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown";
|
||||
import { Event_funCreate } from "../fun/create/fun_create";
|
||||
import { gs_event_hotMenu, gs_event_status } from "../global_state";
|
||||
|
||||
export default function Event_Create({
|
||||
listTipeAcara,
|
||||
|
||||
@@ -31,8 +31,9 @@ import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/component_global/a
|
||||
import _ from "lodash";
|
||||
import { IconCirclePlus, IconPencilPlus } from "@tabler/icons-react";
|
||||
import ComponentEvent_IsEmptyData from "../component/is_empty_data";
|
||||
import { useWindowScroll } from "@mantine/hooks";
|
||||
import { useShallowEffect, useWindowScroll } from "@mantine/hooks";
|
||||
import ComponentGlobal_CardLoadingOverlay from "@/app_modules/component_global/loading_card";
|
||||
import { Event_getListAllPublish } from "../fun/get/get_list_all_publish";
|
||||
|
||||
export default function Event_Beranda({
|
||||
dataEvent,
|
||||
@@ -40,11 +41,25 @@ export default function Event_Beranda({
|
||||
dataEvent: MODEL_EVENT[];
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [data, setData] = useState(dataEvent);
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [scroll, scrollTo] = useWindowScroll();
|
||||
const [eventId, setEventId] = useState("");
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
useShallowEffect(() => {
|
||||
onLoad({
|
||||
onPublish(val) {
|
||||
setData(val);
|
||||
},
|
||||
});
|
||||
}, [setData]);
|
||||
|
||||
async function onLoad({ onPublish }: { onPublish: (val: any) => void }) {
|
||||
const loadData = await Event_getListAllPublish();
|
||||
onPublish(loadData);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Affix position={{ bottom: rem(150), right: rem(30) }} zIndex={99}>
|
||||
@@ -66,10 +81,10 @@ export default function Event_Beranda({
|
||||
<IconPencilPlus color="white" />
|
||||
</ActionIcon>
|
||||
</Affix>
|
||||
{_.isEmpty(dataEvent) ? (
|
||||
{_.isEmpty(data) ? (
|
||||
<ComponentEvent_IsEmptyData text="Tidak ada data" />
|
||||
) : (
|
||||
dataEvent.map((e, i) => (
|
||||
data.map((e, i) => (
|
||||
<Card key={i} shadow="lg" radius={"md"} withBorder mb={"sm"}>
|
||||
<Card.Section px={"sm"} pt={"sm"}>
|
||||
<ComponentGlobal_AuthorNameOnHeader
|
||||
|
||||
Reference in New Issue
Block a user