fix donasi
deksripsi: - fix text editor di create & edit cerita penggalang - tampilan khusus html di detail setatus
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { MainColor } from "../../color";
|
import { MainColor } from "../../color";
|
||||||
|
|
||||||
export function Comp_V3_SetInnerHTML({
|
export function Comp_V3_SetInnerHTMLWithStiker({
|
||||||
props,
|
props,
|
||||||
className,
|
className,
|
||||||
color,
|
color,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Comp_V3_SetInnerHTML } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { Box, Spoiler } from "@mantine/core";
|
import { Box, Spoiler } from "@mantine/core";
|
||||||
|
|
||||||
export const AdminForum_CompTableSetHtmlStiker = ({
|
export const AdminForum_CompTableSetHtmlStiker = ({
|
||||||
@@ -20,7 +20,7 @@ export const AdminForum_CompTableSetHtmlStiker = ({
|
|||||||
hideLabel="sembunyikan"
|
hideLabel="sembunyikan"
|
||||||
showLabel="tampilkan"
|
showLabel="tampilkan"
|
||||||
>
|
>
|
||||||
<Comp_V3_SetInnerHTML props={data} className={classname} />
|
<Comp_V3_SetInnerHTMLWithStiker props={data} className={classname} />
|
||||||
</Spoiler>
|
</Spoiler>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import { Admin_V3_ComponentPaginationBreakpoint } from "../../_components_v3/com
|
|||||||
import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete";
|
import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete";
|
||||||
import { apiGetAdminForumPublish } from "../lib/api_fetch_admin_forum";
|
import { apiGetAdminForumPublish } from "../lib/api_fetch_admin_forum";
|
||||||
import { Comp_DangerouslySetInnerHTML } from "@/app_modules/_global/component/new/comp_set_inner_html";
|
import { Comp_DangerouslySetInnerHTML } from "@/app_modules/_global/component/new/comp_set_inner_html";
|
||||||
import { Comp_V3_SetInnerHTML } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { AdminForum_CompTableSetHtmlStiker } from "../component/comp_table_set_html_stiker";
|
import { AdminForum_CompTableSetHtmlStiker } from "../component/comp_table_set_html_stiker";
|
||||||
|
|
||||||
export default function AdminForum_TablePosting() {
|
export default function AdminForum_TablePosting() {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
import { Card, Center, Grid, Stack, Text, Title } from "@mantine/core";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { MODEL_COLLABORATION } from "../../model/interface";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { ComponentGlobal_CardLoadingOverlay } from "@/app_modules/_global/component";
|
import { ComponentGlobal_CardLoadingOverlay } from "@/app_modules/_global/component";
|
||||||
import { Component_V3_GridDetailData } from "@/app_modules/_global/component/new/comp_V3_grid_detail_data";
|
import { Component_V3_GridDetailData } from "@/app_modules/_global/component/new/comp_V3_grid_detail_data";
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
||||||
|
import { Card, Center, Stack, Title } from "@mantine/core";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { MODEL_COLLABORATION } from "../../model/interface";
|
||||||
|
|
||||||
export default function ComponentColab_CardSectionData({
|
export default function ComponentColab_CardSectionData({
|
||||||
colabId,
|
colabId,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { Stack, Box, Center, Title, Grid, Text } from "@mantine/core";
|
import { Stack, Box, Center, Title, Grid, Text } from "@mantine/core";
|
||||||
import ComponentColab_AuthorNameOnHeader from "../header_author_name";
|
import ComponentColab_AuthorNameOnHeader from "../header_author_name";
|
||||||
import { MODEL_COLLABORATION } from "../../model/interface";
|
import { MODEL_COLLABORATION } from "../../model/interface";
|
||||||
import { Comp_V3_SetInnerHTML } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { Component_V3_GridDetailData } from "@/app_modules/_global/component/new/comp_V3_grid_detail_data";
|
import { Component_V3_GridDetailData } from "@/app_modules/_global/component/new/comp_V3_grid_detail_data";
|
||||||
|
|
||||||
export default function ComponentColab_DetailData({
|
export default function ComponentColab_DetailData({
|
||||||
@@ -25,11 +25,11 @@ export default function ComponentColab_DetailData({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Tujuan Proyek",
|
title: "Tujuan Proyek",
|
||||||
value: <Comp_V3_SetInnerHTML props={data?.purpose} />,
|
value: <Comp_V3_SetInnerHTMLWithStiker props={data?.purpose} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Keuntungan Proyek",
|
title: "Keuntungan Proyek",
|
||||||
value: <Comp_V3_SetInnerHTML props={data?.benefit} />,
|
value: <Comp_V3_SetInnerHTMLWithStiker props={data?.benefit} />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,15 @@
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { MODEL_DONASI } from "../../model/interface";
|
import { MODEL_DONASI } from "../../model/interface";
|
||||||
import { RouterDonasi } from "@/lib/router_hipmi/router_donasi";
|
import { RouterDonasi } from "@/lib/router_hipmi/router_donasi";
|
||||||
import { Stack, Title, Paper, Group, ActionIcon, Text } from "@mantine/core";
|
import {
|
||||||
|
Stack,
|
||||||
|
Title,
|
||||||
|
Paper,
|
||||||
|
Group,
|
||||||
|
ActionIcon,
|
||||||
|
Text,
|
||||||
|
Box,
|
||||||
|
} from "@mantine/core";
|
||||||
import { IconCircleChevronRight } from "@tabler/icons-react";
|
import { IconCircleChevronRight } from "@tabler/icons-react";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -12,6 +20,8 @@ import {
|
|||||||
MainColor,
|
MainColor,
|
||||||
} from "@/app_modules/_global/color/color_pallet";
|
} from "@/app_modules/_global/color/color_pallet";
|
||||||
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
||||||
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
|
import { funReplaceHtml } from "@/app_modules/_global/fun/fun_replace_html";
|
||||||
|
|
||||||
export default function ComponentDonasi_CeritaPenggalangMain({
|
export default function ComponentDonasi_CeritaPenggalangMain({
|
||||||
donasi,
|
donasi,
|
||||||
@@ -63,7 +73,9 @@ export default function ComponentDonasi_CeritaPenggalangMain({
|
|||||||
)}
|
)}
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Group>
|
</Group>
|
||||||
<Text lineClamp={4}>{donasi?.CeritaDonasi.cerita}</Text>
|
<Text lineClamp={4}>
|
||||||
|
{funReplaceHtml({ html: donasi?.CeritaDonasi.cerita })}
|
||||||
|
</Text>
|
||||||
{/* <Text c={"blue"}>Baca selengkapnya</Text> */}
|
{/* <Text c={"blue"}>Baca selengkapnya</Text> */}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
Image,
|
Image,
|
||||||
Stack,
|
Stack,
|
||||||
TextInput,
|
TextInput,
|
||||||
Textarea
|
Textarea,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconPhoto } from "@tabler/icons-react";
|
import { IconPhoto } from "@tabler/icons-react";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
@@ -34,6 +34,10 @@ import { WibuRealtime } from "wibu-pkg";
|
|||||||
import { Donasi_funCreate } from "../fun/create/fun_create_donasi";
|
import { Donasi_funCreate } from "../fun/create/fun_create_donasi";
|
||||||
import { gs_donasi_hot_menu } from "../global_state";
|
import { gs_donasi_hot_menu } from "../global_state";
|
||||||
import { MODEL_DONASI_TEMPORARY } from "../model/interface";
|
import { MODEL_DONASI_TEMPORARY } from "../model/interface";
|
||||||
|
import { Component_V3_TextEditor } from "@/app_modules/_global/component/new/comp_V3_text_editor";
|
||||||
|
import Component_V3_Label_TextInput from "@/app_modules/_global/component/new/comp_V3_label_text_input";
|
||||||
|
import { funReplaceHtml } from "@/app_modules/_global/fun/fun_replace_html";
|
||||||
|
import { maxInputLength } from "@/app_modules/_global/lib/maximal_setting";
|
||||||
|
|
||||||
export default function CreateCeritaPenggalangDonasi({
|
export default function CreateCeritaPenggalangDonasi({
|
||||||
dataTemporary,
|
dataTemporary,
|
||||||
@@ -138,11 +142,48 @@ export default function CreateCeritaPenggalangDonasi({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={50} px={"xl"} pb={"md"}>
|
<Stack spacing={50} px={"xl"} pb={"md"}>
|
||||||
{/* <pre>{JSON.stringify(dataTempo, null, 2)}</pre> */}
|
|
||||||
<Stack spacing={"sm"}>
|
<Stack spacing={"sm"}>
|
||||||
<ComponentGlobal_BoxInformation informasi="Cerita Anda adalah kunci untuk menginspirasi kebaikan. Jelaskan dengan jujur dan jelas tujuan penggalangan dana ini agar calon donatur memahami dampak positif yang dapat mereka wujudkan melalui kontribusi mereka." />
|
<ComponentGlobal_BoxInformation informasi="Cerita Anda adalah kunci untuk menginspirasi kebaikan. Jelaskan dengan jujur dan jelas tujuan penggalangan dana ini agar calon donatur memahami dampak positif yang dapat mereka wujudkan melalui kontribusi mereka." />
|
||||||
|
|
||||||
<Stack spacing={5}>
|
<Stack spacing={5}>
|
||||||
|
<Component_V3_Label_TextInput text="Pembukaan cerita" />
|
||||||
|
|
||||||
|
<Component_V3_TextEditor
|
||||||
|
data={data.pembukaan}
|
||||||
|
onSetData={(val) => {
|
||||||
|
setData({
|
||||||
|
...data,
|
||||||
|
pembukaan: val,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ComponentGlobal_InputCountDown
|
||||||
|
lengthInput={funReplaceHtml({ html: data.pembukaan }).length}
|
||||||
|
maxInput={maxInputLength}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
<Stack spacing={5}>
|
||||||
|
<Component_V3_Label_TextInput text="Inti cerita" />
|
||||||
|
|
||||||
|
<Component_V3_TextEditor
|
||||||
|
data={data.cerita}
|
||||||
|
onSetData={(val) => {
|
||||||
|
setData({
|
||||||
|
...data,
|
||||||
|
cerita: val,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ComponentGlobal_InputCountDown
|
||||||
|
lengthInput={funReplaceHtml({ html: data.cerita }).length}
|
||||||
|
maxInput={maxInputLength}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
{/* <Stack spacing={5}>
|
||||||
<Textarea
|
<Textarea
|
||||||
styles={{
|
styles={{
|
||||||
label: {
|
label: {
|
||||||
@@ -173,9 +214,9 @@ export default function CreateCeritaPenggalangDonasi({
|
|||||||
maxInput={500}
|
maxInput={500}
|
||||||
lengthInput={data.pembukaan.length}
|
lengthInput={data.pembukaan.length}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack> */}
|
||||||
|
|
||||||
<Stack spacing={5}>
|
{/* <Stack spacing={5}>
|
||||||
<Textarea
|
<Textarea
|
||||||
styles={{
|
styles={{
|
||||||
label: {
|
label: {
|
||||||
@@ -206,7 +247,7 @@ export default function CreateCeritaPenggalangDonasi({
|
|||||||
maxInput={1000}
|
maxInput={1000}
|
||||||
lengthInput={data.cerita.length}
|
lengthInput={data.cerita.length}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack> */}
|
||||||
|
|
||||||
<Stack spacing={5}>
|
<Stack spacing={5}>
|
||||||
<ComponentGlobal_BoxUploadImage>
|
<ComponentGlobal_BoxUploadImage>
|
||||||
@@ -289,7 +330,14 @@ export default function CreateCeritaPenggalangDonasi({
|
|||||||
style={{
|
style={{
|
||||||
transition: "0.5s",
|
transition: "0.5s",
|
||||||
}}
|
}}
|
||||||
disabled={_.values(data).includes("") || file === null ? true : false}
|
disabled={
|
||||||
|
_.values(data).includes("") ||
|
||||||
|
file === null ||
|
||||||
|
funReplaceHtml({ html: data.pembukaan }).length > maxInputLength ||
|
||||||
|
funReplaceHtml({ html: data.pembukaan }).length === 0 ||
|
||||||
|
funReplaceHtml({ html: data.cerita }).length > maxInputLength ||
|
||||||
|
funReplaceHtml({ html: data.cerita }).length === 0
|
||||||
|
}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
loading={isLoading ? true : false}
|
loading={isLoading ? true : false}
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
import { AccentColor } from "@/app_modules/_global/color/color_pallet";
|
||||||
import { ComponentGlobal_LoadImageLandscape } from "@/app_modules/_global/component";
|
import { ComponentGlobal_LoadImageLandscape } from "@/app_modules/_global/component";
|
||||||
|
import { Comp_DangerouslySetInnerHTML } from "@/app_modules/_global/component/new/comp_set_inner_html";
|
||||||
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { MODEL_CERITA_DONASI } from "@/app_modules/donasi/model/interface";
|
import { MODEL_CERITA_DONASI } from "@/app_modules/donasi/model/interface";
|
||||||
import { Stack, Text } from "@mantine/core";
|
import { Stack, Text } from "@mantine/core";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -31,10 +33,15 @@ export default function CeritaPenggalangDonasi({
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text fw={"bold"}> #HaloOrangBaik</Text>
|
<Text fw={"bold"}> #HaloOrangBaik</Text>
|
||||||
<Text>{data.pembukaan}</Text>
|
{/* <Text>{data.pembukaan}</Text> */}
|
||||||
|
|
||||||
|
<Comp_DangerouslySetInnerHTML props={data?.pembukaan} />
|
||||||
|
|
||||||
<ComponentGlobal_LoadImageLandscape fileId={data.imageId} />
|
<ComponentGlobal_LoadImageLandscape fileId={data.imageId} />
|
||||||
<Text>{data.cerita}</Text>
|
|
||||||
|
<Comp_DangerouslySetInnerHTML props={data?.cerita} />
|
||||||
|
|
||||||
|
{/* <Text>{data.cerita}</Text> */}
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -41,18 +41,11 @@ function ButtonBatalReview({ donasi }: { donasi: MODEL_DONASI }) {
|
|||||||
const [openModal, setOpenModal] = useState(false);
|
const [openModal, setOpenModal] = useState(false);
|
||||||
|
|
||||||
async function onChangeStatus() {
|
async function onChangeStatus() {
|
||||||
|
setLoading(true);
|
||||||
const check = await donasi_checkStatus({ id: donasi.id });
|
const check = await donasi_checkStatus({ id: donasi.id });
|
||||||
if (check) {
|
if (check) {
|
||||||
const res = await Donasi_funGantiStatus(donasi.id, "3");
|
const res = await Donasi_funGantiStatus(donasi.id, "3");
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
// const dataNotif = {
|
|
||||||
// appId: res.data?.id as any,
|
|
||||||
// status: res.data?.DonasiMaster_Status?.name as any,
|
|
||||||
// userId: res.data?.authorId as any,
|
|
||||||
// pesan: res.data?.title as any,
|
|
||||||
// kategoriApp: "DONASI",
|
|
||||||
// title: "Membatalkan review",
|
|
||||||
// };
|
|
||||||
|
|
||||||
const dataNotifikasi: IRealtimeData = {
|
const dataNotifikasi: IRealtimeData = {
|
||||||
appId: res.data?.id as any,
|
appId: res.data?.id as any,
|
||||||
@@ -80,13 +73,14 @@ function ButtonBatalReview({ donasi }: { donasi: MODEL_DONASI }) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ComponentGlobal_NotifikasiBerhasil("Berhasil Dibatalkan");
|
ComponentGlobal_NotifikasiBerhasil("Berhasil Dibatalkan");
|
||||||
setLoading(true);
|
|
||||||
router.push(RouterDonasi.status_galang_dana({ id: "3" }));
|
router.push(RouterDonasi.status_galang_dana({ id: "3" }));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
setLoading(false);
|
||||||
ComponentGlobal_NotifikasiPeringatan(res.message);
|
ComponentGlobal_NotifikasiPeringatan(res.message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
setLoading(false);
|
||||||
ComponentGlobal_NotifikasiPeringatan("Donasi telah direview admin");
|
ComponentGlobal_NotifikasiPeringatan("Donasi telah direview admin");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -96,10 +90,9 @@ function ButtonBatalReview({ donasi }: { donasi: MODEL_DONASI }) {
|
|||||||
mt={"lg"}
|
mt={"lg"}
|
||||||
style={{
|
style={{
|
||||||
transition: "0.5s",
|
transition: "0.5s",
|
||||||
backgroundColor: MainColor.orange
|
backgroundColor: MainColor.orange,
|
||||||
}}
|
}}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
|
|
||||||
c={MainColor.darkblue}
|
c={MainColor.darkblue}
|
||||||
onClick={() => setOpenModal(true)}
|
onClick={() => setOpenModal(true)}
|
||||||
>
|
>
|
||||||
@@ -111,14 +104,18 @@ function ButtonBatalReview({ donasi }: { donasi: MODEL_DONASI }) {
|
|||||||
opened={openModal}
|
opened={openModal}
|
||||||
close={() => setOpenModal(false)}
|
close={() => setOpenModal(false)}
|
||||||
buttonKiri={
|
buttonKiri={
|
||||||
<Button style={{ backgroundColor: AccentColor.blue }}
|
<Button
|
||||||
c={AccentColor.white} radius={"xl"} onClick={() => setOpenModal(false)}>
|
style={{ backgroundColor: AccentColor.blue }}
|
||||||
|
c={AccentColor.white}
|
||||||
|
radius={"xl"}
|
||||||
|
onClick={() => setOpenModal(false)}
|
||||||
|
>
|
||||||
Batal
|
Batal
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
buttonKanan={
|
buttonKanan={
|
||||||
<Button
|
<Button
|
||||||
style={{ backgroundColor: AccentColor.yellow }}
|
style={{ backgroundColor: AccentColor.yellow }}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
loading={isLoading ? true : false}
|
loading={isLoading ? true : false}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ import { useRouter } from "next/navigation";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Donasi_funUpdateCerita } from "../../fun/update/fun_update_cerita_donasi";
|
import { Donasi_funUpdateCerita } from "../../fun/update/fun_update_cerita_donasi";
|
||||||
import { MODEL_CERITA_DONASI } from "../../model/interface";
|
import { MODEL_CERITA_DONASI } from "../../model/interface";
|
||||||
|
import Component_V3_Label_TextInput from "@/app_modules/_global/component/new/comp_V3_label_text_input";
|
||||||
|
import { Component_V3_TextEditor } from "@/app_modules/_global/component/new/comp_V3_text_editor";
|
||||||
|
import { funReplaceHtml } from "@/app_modules/_global/fun/fun_replace_html";
|
||||||
|
import { maxInputLength } from "@/app_modules/_global/lib/maximal_setting";
|
||||||
|
|
||||||
export default function EditCeritaPenggalangDonasi({
|
export default function EditCeritaPenggalangDonasi({
|
||||||
dataCerita,
|
dataCerita,
|
||||||
@@ -109,6 +113,25 @@ export default function EditCeritaPenggalangDonasi({
|
|||||||
<>
|
<>
|
||||||
<Stack px={"sm"}>
|
<Stack px={"sm"}>
|
||||||
<Stack spacing={5}>
|
<Stack spacing={5}>
|
||||||
|
<Component_V3_Label_TextInput text="Pembukaan cerita" />
|
||||||
|
|
||||||
|
<Component_V3_TextEditor
|
||||||
|
data={data.pembukaan}
|
||||||
|
onSetData={(val) => {
|
||||||
|
setData({
|
||||||
|
...data,
|
||||||
|
pembukaan: val,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ComponentGlobal_InputCountDown
|
||||||
|
lengthInput={funReplaceHtml({ html: data.pembukaan }).length}
|
||||||
|
maxInput={maxInputLength}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
{/* <Stack spacing={5}>
|
||||||
<Textarea
|
<Textarea
|
||||||
styles={{
|
styles={{
|
||||||
label: {
|
label: {
|
||||||
@@ -141,7 +164,7 @@ export default function EditCeritaPenggalangDonasi({
|
|||||||
lengthInput={data.pembukaan.length}
|
lengthInput={data.pembukaan.length}
|
||||||
maxInput={500}
|
maxInput={500}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack> */}
|
||||||
|
|
||||||
<Stack spacing={0}>
|
<Stack spacing={0}>
|
||||||
<ComponentGlobal_BoxUploadImage>
|
<ComponentGlobal_BoxUploadImage>
|
||||||
@@ -173,6 +196,25 @@ export default function EditCeritaPenggalangDonasi({
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack spacing={5}>
|
<Stack spacing={5}>
|
||||||
|
<Component_V3_Label_TextInput text="Inti cerita" />
|
||||||
|
|
||||||
|
<Component_V3_TextEditor
|
||||||
|
data={data.cerita}
|
||||||
|
onSetData={(val) => {
|
||||||
|
setData({
|
||||||
|
...data,
|
||||||
|
cerita: val,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ComponentGlobal_InputCountDown
|
||||||
|
lengthInput={funReplaceHtml({ html: data.cerita }).length}
|
||||||
|
maxInput={maxInputLength}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
{/* <Stack spacing={5}>
|
||||||
<Textarea
|
<Textarea
|
||||||
styles={{
|
styles={{
|
||||||
label: {
|
label: {
|
||||||
@@ -205,7 +247,7 @@ export default function EditCeritaPenggalangDonasi({
|
|||||||
lengthInput={data.cerita.length}
|
lengthInput={data.cerita.length}
|
||||||
maxInput={1000}
|
maxInput={1000}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack> */}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
my={"lg"}
|
my={"lg"}
|
||||||
@@ -214,7 +256,14 @@ export default function EditCeritaPenggalangDonasi({
|
|||||||
}}
|
}}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
loading={isLoading ? true : false}
|
loading={isLoading ? true : false}
|
||||||
disabled={data.cerita === "" || data.pembukaan === "" ? true : false}
|
disabled={
|
||||||
|
data.cerita === "" ||
|
||||||
|
data.pembukaan === "" ||
|
||||||
|
funReplaceHtml({ html: data.pembukaan }).length > maxInputLength ||
|
||||||
|
funReplaceHtml({ html: data.pembukaan }).length === 0 ||
|
||||||
|
funReplaceHtml({ html: data.cerita }).length > maxInputLength ||
|
||||||
|
funReplaceHtml({ html: data.cerita }).length === 0
|
||||||
|
}
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { MODEL_FORUM_KOMENTAR } from "../../model/interface";
|
|||||||
import ComponentForum_KomentarAuthorNameOnHeader from "../komentar_component/komentar_author_header_name";
|
import ComponentForum_KomentarAuthorNameOnHeader from "../komentar_component/komentar_author_header_name";
|
||||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { Comp_V3_SetInnerHTML } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
|
||||||
export default function ComponentForum_KomentarView({
|
export default function ComponentForum_KomentarView({
|
||||||
@@ -71,7 +71,7 @@ export default function ComponentForum_KomentarView({
|
|||||||
maxHeight={100}
|
maxHeight={100}
|
||||||
showLabel="tampilkan"
|
showLabel="tampilkan"
|
||||||
>
|
>
|
||||||
<Comp_V3_SetInnerHTML
|
<Comp_V3_SetInnerHTMLWithStiker
|
||||||
props={data?.komentar}
|
props={data?.komentar}
|
||||||
className="chat-content"
|
className="chat-content"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { IconMessageCircle, IconMessageCircleX } from "@tabler/icons-react";
|
|||||||
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
||||||
import ComponentForum_DetailHeader from "./detail_header";
|
import ComponentForum_DetailHeader from "./detail_header";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { Comp_V3_SetInnerHTML } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
|
||||||
export default function ComponentForum_DetailForumView({
|
export default function ComponentForum_DetailForumView({
|
||||||
@@ -59,7 +59,7 @@ export default function ComponentForum_DetailForumView({
|
|||||||
>
|
>
|
||||||
<Text fz={"sm"} color="white">
|
<Text fz={"sm"} color="white">
|
||||||
{data?.diskusi ? (
|
{data?.diskusi ? (
|
||||||
<Comp_V3_SetInnerHTML
|
<Comp_V3_SetInnerHTMLWithStiker
|
||||||
props={data?.diskusi}
|
props={data?.diskusi}
|
||||||
// className="chat-content"
|
// className="chat-content"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { useRouter } from "next/navigation";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
||||||
import ComponentForum_ForumkuHeaderCard from "./forumku_header";
|
import ComponentForum_ForumkuHeaderCard from "./forumku_header";
|
||||||
import { Comp_V3_SetInnerHTML } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ export default function ComponentForum_ForumkuMainCardView({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text c={"white"} fz={"sm"} lineClamp={4}>
|
<Text c={"white"} fz={"sm"} lineClamp={4}>
|
||||||
<Comp_V3_SetInnerHTML
|
<Comp_V3_SetInnerHTMLWithStiker
|
||||||
props={data?.diskusi}
|
props={data?.diskusi}
|
||||||
className="chat-content"
|
className="chat-content"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { useRouter } from "next/navigation";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
||||||
import ComponentForum_BerandaHeaderCard from "./card_header";
|
import ComponentForum_BerandaHeaderCard from "./card_header";
|
||||||
import { Comp_V3_SetInnerHTML } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ export default function ComponentForum_BerandaCardView({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text c={"white"} fz={"sm"} lineClamp={4}>
|
<Text c={"white"} fz={"sm"} lineClamp={4}>
|
||||||
<Comp_V3_SetInnerHTML
|
<Comp_V3_SetInnerHTMLWithStiker
|
||||||
props={data?.diskusi}
|
props={data?.diskusi}
|
||||||
className="chat-content"
|
className="chat-content"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user