- UI Event
- Perbaiki create button ke beberapa app
## No Issuee
This commit is contained in:
2024-07-18 10:52:27 +08:00
parent 3ee32351e2
commit 38d4d04436
67 changed files with 1287 additions and 836 deletions

View File

@@ -6,13 +6,7 @@ import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
import { MODEL_DEFAULT_MASTER_OLD } from "@/app_modules/model_global/interface";
import {
Button,
Select,
Stack,
TextInput,
Textarea
} from "@mantine/core";
import { Button, Select, Stack, TextInput, Textarea } from "@mantine/core";
import { DateTimePicker } from "@mantine/dates";
import _ from "lodash";
import moment from "moment";
@@ -21,6 +15,7 @@ import { useRouter } from "next/navigation";
import { useState } from "react";
import { Event_funEditById } from "../fun/edit/fun_edit_by_id";
import { MODEL_EVENT } from "../model/interface";
import { MainColor } from "@/app_modules/_global/color/color_pallet";
export default function Event_Edit({
dataEvent,
@@ -44,6 +39,11 @@ export default function Event_Edit({
{/* <pre>{JSON.stringify(value, null, 2)}</pre> */}
<Stack px={"sm"}>
<TextInput
styles={{
label: {
color: "white",
},
}}
label="Judul"
placeholder="judul"
withAsterisk
@@ -66,6 +66,11 @@ export default function Event_Edit({
/>
<Select
styles={{
label: {
color: "white",
},
}}
withAsterisk
label="Tipe Acara"
placeholder="Pilih Tipe Acara"
@@ -85,6 +90,11 @@ export default function Event_Edit({
/>
<TextInput
styles={{
label: {
color: "white",
},
}}
label="Lokasi"
placeholder="lokasi acara"
withAsterisk
@@ -106,6 +116,11 @@ export default function Event_Edit({
}}
/>
<DateTimePicker
styles={{
label: {
color: "white",
},
}}
excludeDate={(date) => {
return moment(date).diff(Date.now(), "days") < 0;
}}
@@ -133,6 +148,11 @@ export default function Event_Edit({
<Stack spacing={5}>
<Textarea
styles={{
label: {
color: "white",
},
}}
label="Deskripsi"
placeholder="Deskripsikan acara yang akan di selenggarakan"
withAsterisk
@@ -178,6 +198,8 @@ export default function Event_Edit({
radius={"xl"}
mt={"xl"}
onClick={() => onUpdate(router, value, setLoading)}
bg={MainColor.yellow}
color="yellow"
>
Update
</Button>

View File

@@ -4,6 +4,8 @@ import { AppShell } from "@mantine/core";
import React from "react";
import ComponentEvent_HeaderTamplate from "../component/header_tamplate";
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
export default function LayoutEvent_Edit({
children,
@@ -12,9 +14,9 @@ export default function LayoutEvent_Edit({
}) {
return (
<>
<AppComponentGlobal_LayoutTamplate header={<ComponentEvent_HeaderTamplate title="Edit Event" />}>
<UIGlobal_LayoutTamplate header={<UIGlobal_LayoutHeaderTamplate title="Edit Event" />}>
{children}
</AppComponentGlobal_LayoutTamplate>
</UIGlobal_LayoutTamplate>
</>
);
}