fix event
deskripsi: - mengubah tampilan text biasa ke html view - menambahkan text editor pada create & edit
This commit is contained in:
@@ -16,6 +16,9 @@ import { useState } from "react";
|
||||
import { Event_ComponentCreateButton } from "../component";
|
||||
import ComponentEvent_ErrorMaximalInput from "../component/error_maksimal_input";
|
||||
import { MainColor } from "@/app_modules/_global/color";
|
||||
import { Component_V3_TextEditor } from "@/app_modules/_global/component/new/comp_V3_text_editor";
|
||||
import { maxInputLength } from "@/app_modules/_global/lib/maximal_setting";
|
||||
import { funReplaceHtml } from "@/app_modules/_global/fun/fun_replace_html";
|
||||
|
||||
export default function Event_Create({
|
||||
listTipeAcara,
|
||||
@@ -55,7 +58,7 @@ export default function Event_Create({
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
},
|
||||
}}
|
||||
label="Judul"
|
||||
placeholder="Masukan judul"
|
||||
@@ -81,7 +84,7 @@ export default function Event_Create({
|
||||
},
|
||||
dropdown: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
},
|
||||
}}
|
||||
withAsterisk
|
||||
label="Tipe Acara"
|
||||
@@ -108,7 +111,7 @@ export default function Event_Create({
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
},
|
||||
}}
|
||||
label="Lokasi"
|
||||
placeholder="Masukan lokasi acara"
|
||||
@@ -122,7 +125,6 @@ export default function Event_Create({
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
<DateTimePicker
|
||||
styles={{
|
||||
label: {
|
||||
@@ -133,7 +135,7 @@ export default function Event_Create({
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
},
|
||||
}}
|
||||
excludeDate={(date) => {
|
||||
return moment(date).diff(Date.now(), "days") < 0;
|
||||
@@ -179,7 +181,7 @@ export default function Event_Create({
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
},
|
||||
}}
|
||||
excludeDate={(date) => {
|
||||
return moment(date).diff(Date.now(), "days") < 0;
|
||||
@@ -218,6 +220,30 @@ export default function Event_Create({
|
||||
/>
|
||||
|
||||
<Stack spacing={5}>
|
||||
<Text c={MainColor.white} fz={"sm"}>
|
||||
Deskripsi
|
||||
<Text inherit span c={"red"} px={5}>
|
||||
*
|
||||
</Text>
|
||||
</Text>
|
||||
|
||||
<Component_V3_TextEditor
|
||||
data={value.deskripsi}
|
||||
onSetData={(val) => {
|
||||
setValue({
|
||||
...value,
|
||||
deskripsi: val,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
<ComponentGlobal_InputCountDown
|
||||
lengthInput={funReplaceHtml({ html: value.deskripsi }).length}
|
||||
maxInput={maxInputLength}
|
||||
/>
|
||||
</Stack>
|
||||
|
||||
{/* <Stack spacing={5}>
|
||||
<Textarea
|
||||
styles={{
|
||||
label: {
|
||||
@@ -228,7 +254,7 @@ export default function Event_Create({
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
},
|
||||
}}
|
||||
label="Deskripsi"
|
||||
placeholder="Deskripsikan acara yang akan di selenggarakan"
|
||||
@@ -246,7 +272,7 @@ export default function Event_Create({
|
||||
lengthInput={value.deskripsi.length}
|
||||
maxInput={300}
|
||||
/>
|
||||
</Stack>
|
||||
</Stack> */}
|
||||
|
||||
<Event_ComponentCreateButton
|
||||
value={value}
|
||||
|
||||
Reference in New Issue
Block a user