From 9515c041ad6520762a98795f50698ea16517ba0e Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Mon, 30 Dec 2024 11:33:39 +0800 Subject: [PATCH 01/21] Intergarsi to API Deskripsi: - Intergrasi api voting --- .../dev/vote/detail/kontribusi/[id]/page.tsx | 8 +- src/app/dev/vote/detail/main/[id]/page.tsx | 1 - .../vote/detail/semua_riwayat/[id]/page.tsx | 14 +- .../detail/detail_data_setelah_publish.tsx | 24 ++-- .../vote/detail/kontribusi/index.tsx | 120 ++++++++++++++++-- .../vote/detail/riwayat_saya/index.tsx | 59 ++++++++- .../vote/detail/riwayat_saya/layout.tsx | 39 +++++- .../vote/detail/semua_riwayat/index.tsx | 73 ++++++++--- .../vote/detail/semua_riwayat/layout.tsx | 39 +++++- 9 files changed, 311 insertions(+), 66 deletions(-) diff --git a/src/app/dev/vote/detail/kontribusi/[id]/page.tsx b/src/app/dev/vote/detail/kontribusi/[id]/page.tsx index d42fc576..06ad3e1d 100644 --- a/src/app/dev/vote/detail/kontribusi/[id]/page.tsx +++ b/src/app/dev/vote/detail/kontribusi/[id]/page.tsx @@ -1,13 +1,9 @@ import { Vote_DetailKontribusi } from "@/app_modules/vote"; -import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id"; - -export default async function Page({ params }: { params: { id: string } }) { - let voteId = params.id; - const dataVote = await voting_funGetOneVotingbyId(voteId); +export default async function Page() { return ( <> - + ); } diff --git a/src/app/dev/vote/detail/main/[id]/page.tsx b/src/app/dev/vote/detail/main/[id]/page.tsx index 19084182..b26b402a 100644 --- a/src/app/dev/vote/detail/main/[id]/page.tsx +++ b/src/app/dev/vote/detail/main/[id]/page.tsx @@ -2,7 +2,6 @@ import { funGetUserIdByToken } from "@/app_modules/_global/fun/get"; import { Vote_MainDetail } from "@/app_modules/vote"; export default async function Page({ params }: { params: { id: string } }) { - const voteId = params.id; const userLoginId = await funGetUserIdByToken(); return ( <> diff --git a/src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx b/src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx index 6d943acd..e4637b7d 100644 --- a/src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx +++ b/src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx @@ -1,19 +1,9 @@ import { Vote_DetailSemuaRiwayat } from "@/app_modules/vote"; -import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; -import { Vote_getOnePublishbyId } from "@/app_modules/vote/fun/get/get_one_publish_by_id"; - - -export default async function Page({params}: {params: {id: string}}) { - let voteId = params.id - const dataVote = await Vote_getOnePublishbyId(voteId) - const listKontributor = await Vote_getListKontributorById(voteId) +export default async function Page() { return ( <> - + ); } diff --git a/src/app_modules/vote/component/detail/detail_data_setelah_publish.tsx b/src/app_modules/vote/component/detail/detail_data_setelah_publish.tsx index a78d5d47..b8d5893a 100644 --- a/src/app_modules/vote/component/detail/detail_data_setelah_publish.tsx +++ b/src/app_modules/vote/component/detail/detail_data_setelah_publish.tsx @@ -6,6 +6,8 @@ import { } from "@/app_modules/_global/component"; import { Badge, Center, Group, Stack, Text, Title } from "@mantine/core"; import { MODEL_VOTING } from "../../model/interface"; +import moment from "moment" +import "moment/locale/id" export default function ComponentVote_DetailDataSetelahPublish({ data, @@ -48,19 +50,15 @@ export default function ComponentVote_DetailDataSetelahPublish({ }, }} > - - - {data?.awalVote.toLocaleDateString(["id-ID"], { - dateStyle: "medium", - })} - - - - - {data?.akhirVote.toLocaleDateString(["id-ID"], { - dateStyle: "medium", - })} - - + + {data + ? moment(data.awalVote).format("ll") + : "tgl awal voting"}{" "} + -{" "} + {data + ? moment(data.akhirVote).format("ll") + : "tgl akhir voting"} + diff --git a/src/app_modules/vote/detail/kontribusi/index.tsx b/src/app_modules/vote/detail/kontribusi/index.tsx index 037d7abb..ed654821 100644 --- a/src/app_modules/vote/detail/kontribusi/index.tsx +++ b/src/app_modules/vote/detail/kontribusi/index.tsx @@ -1,25 +1,123 @@ "use client"; +import { AccentColor } from "@/app_modules/_global/color"; import { - Stack -} from "@mantine/core"; -import ComponentVote_DetailDataSetelahPublish from "../../component/detail/detail_data_setelah_publish"; + ComponentGlobal_AvatarAndUsername, + ComponentGlobal_CardStyles, +} from "@/app_modules/_global/component"; +import { clientLogger } from "@/util/clientLogger"; +import { Badge, Center, Stack, Text, Title } from "@mantine/core"; +import { useShallowEffect } from "@mantine/hooks"; +import _ from "lodash"; +import moment from "moment"; +import { useParams } from "next/navigation"; +import { useState } from "react"; +import { + apiGetHasilVotingById, + apiGetOneVotingById, +} from "../../_lib/api_voting"; import ComponentVote_HasilVoting from "../../component/detail/detail_hasil_voting"; +import { Voting_ComponentSkeletonDetail } from "../../component/skeleton_view"; import { MODEL_VOTING } from "../../model/interface"; +import ComponentVote_DetailDataSetelahPublish from "../../component/detail/detail_data_setelah_publish"; + +export default function Vote_DetailKontribusi() { + const params = useParams<{ id: string }>(); + const [data, setData] = useState(null); + const [hasil, setHasil] = useState(null); + + useShallowEffect(() => { + onLoadData(); + onLoadHasil(); + }, []); + + async function onLoadData() { + try { + const respone = await apiGetOneVotingById({ + id: params.id, + }); + + if (respone) { + setData(respone.data); + } + } catch (error) { + clientLogger.error("Error get data detail", error); + } + } + + async function onLoadHasil() { + try { + const respone = await apiGetHasilVotingById({ + id: params.id, + }); + + if (respone) { + setHasil(respone.data); + } + } catch (error) { + clientLogger.error("Error get data hasil voting", error); + } + } + + if (_.isNull(data) && _.isNull(hasil)) { + return ( + <> + + + ); + } -export default function Vote_DetailKontribusi({ - dataVote, -}: { - dataVote: MODEL_VOTING; -}) { return ( <> - + + {/* + + + +
+ + {data?.title} + +
+ {data?.deskripsi} + + + + + Batas Voting + + + + {data + ? moment(data.awalVote).format("ll") + : "tgl awal voting"}{" "} + -{" "} + {data + ? moment(data.akhirVote).format("ll") + : "tgl akhir voting"} + + + + +
+
+
*/} - +
); diff --git a/src/app_modules/vote/detail/riwayat_saya/index.tsx b/src/app_modules/vote/detail/riwayat_saya/index.tsx index c130f3e4..6f1ab681 100644 --- a/src/app_modules/vote/detail/riwayat_saya/index.tsx +++ b/src/app_modules/vote/detail/riwayat_saya/index.tsx @@ -5,6 +5,16 @@ import ComponentVote_DaftarKontributorVoter from "../../component/detail/detail_ import ComponentVote_DetailDataSetelahPublish from "../../component/detail/detail_data_setelah_publish"; import ComponentVote_HasilVoting from "../../component/detail/detail_hasil_voting"; import { MODEL_VOTING } from "../../model/interface"; +import { clientLogger } from "@/util/clientLogger"; +import { useShallowEffect } from "@mantine/hooks"; +import _ from "lodash"; +import { useParams } from "next/navigation"; +import { useState } from "react"; +import { + apiGetOneVotingById, + apiGetHasilVotingById, +} from "../../_lib/api_voting"; +import { Voting_ComponentSkeletonDetail } from "../../component/skeleton_view"; export default function Vote_DetailRiwayatSaya({ dataVote, @@ -13,17 +23,58 @@ export default function Vote_DetailRiwayatSaya({ dataVote: MODEL_VOTING; listKontributor: any[]; }) { + const params = useParams<{ id: string }>(); + const [data, setData] = useState(null); + const [hasil, setHasil] = useState(null); + + useShallowEffect(() => { + onLoadData(); + onLoadHasil(); + }, []); + + async function onLoadData() { + try { + const respone = await apiGetOneVotingById({ + id: params.id, + }); + + if (respone) { + setData(respone.data); + } + } catch (error) { + clientLogger.error("Error get data detail", error); + } + } + + async function onLoadHasil() { + try { + const respone = await apiGetHasilVotingById({ + id: params.id, + }); + + if (respone) { + setHasil(respone.data); + } + } catch (error) { + clientLogger.error("Error get data hasil voting", error); + } + } + + if (_.isNull(data) || _.isNull(hasil)) { + return ; + } + return ( <> - - + {/* + /> */} ); diff --git a/src/app_modules/vote/detail/riwayat_saya/layout.tsx b/src/app_modules/vote/detail/riwayat_saya/layout.tsx index df66b5e0..7caf7f2f 100644 --- a/src/app_modules/vote/detail/riwayat_saya/layout.tsx +++ b/src/app_modules/vote/detail/riwayat_saya/layout.tsx @@ -1,21 +1,56 @@ "use client"; +import { RouterVote } from "@/app/lib/router_hipmi/router_vote"; +import { UIGlobal_Drawer } from "@/app_modules/_global/ui"; import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate"; import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; -import React from "react"; +import { ActionIcon } from "@mantine/core"; +import { IconDotsVertical, IconUsersGroup } from "@tabler/icons-react"; +import { useParams } from "next/navigation"; +import React, { useState } from "react"; export default function LayoutVote_DetailRiwayatSaya({ children, }: { children: React.ReactNode; }) { + const params = useParams<{ id: string }>(); + const [openDrawer, setOpenDrawer] = useState(false); + return ( <> } + header={ + { + setOpenDrawer(true); + }} + > + + + } + /> + } > {children} + + setOpenDrawer(false)} + component={[ + { + id: "1", + name: "Daftar Kontribusi", + icon: , + path: RouterVote.daftar_kontributor + params.id, + }, + ]} + /> ); } diff --git a/src/app_modules/vote/detail/semua_riwayat/index.tsx b/src/app_modules/vote/detail/semua_riwayat/index.tsx index 929d94aa..e9df576d 100644 --- a/src/app_modules/vote/detail/semua_riwayat/index.tsx +++ b/src/app_modules/vote/detail/semua_riwayat/index.tsx @@ -1,30 +1,73 @@ "use client"; +import { clientLogger } from "@/util/clientLogger"; import { Stack } from "@mantine/core"; -import ComponentVote_DetailDataTanpaVote from "../../component/detail/detail_data_tanpa_vote"; -import ComponentVote_HasilVoting from "../../component/detail/detail_hasil_voting"; -import ComponentVote_DaftarKontributorVoter from "../../component/detail/detail_daftar_kontributor"; +import { useShallowEffect } from "@mantine/hooks"; +import _ from "lodash"; +import { useParams } from "next/navigation"; +import { useState } from "react"; +import { + apiGetHasilVotingById, + apiGetOneVotingById, +} from "../../_lib/api_voting"; import ComponentVote_DetailDataSetelahPublish from "../../component/detail/detail_data_setelah_publish"; -import { MODEL_VOTE_KONTRIBUTOR, MODEL_VOTING } from "../../model/interface"; +import ComponentVote_HasilVoting from "../../component/detail/detail_hasil_voting"; +import { Voting_ComponentSkeletonDetail } from "../../component/skeleton_view"; +import { MODEL_VOTING } from "../../model/interface"; + +export default function Vote_DetailSemuaRiwayat() { + const params = useParams<{ id: string }>(); + const [data, setData] = useState(null); + const [hasil, setHasil] = useState(null); + + useShallowEffect(() => { + onLoadData(); + onLoadHasil(); + }, []); + + async function onLoadData() { + try { + const respone = await apiGetOneVotingById({ + id: params.id, + }); + + if (respone) { + setData(respone.data); + } + } catch (error) { + clientLogger.error("Error get data detail", error); + } + } + + async function onLoadHasil() { + try { + const respone = await apiGetHasilVotingById({ + id: params.id, + }); + + if (respone) { + setHasil(respone.data); + } + } catch (error) { + clientLogger.error("Error get data hasil voting", error); + } + } + + if (_.isNull(data) || _.isNull(hasil)) { + return ; + } -export default function Vote_DetailSemuaRiwayat({ - dataVote, - listKontributor, -}: { - dataVote: MODEL_VOTING; - listKontributor: MODEL_VOTE_KONTRIBUTOR[]; -}) { return ( <> - - + {/* + /> */} ); diff --git a/src/app_modules/vote/detail/semua_riwayat/layout.tsx b/src/app_modules/vote/detail/semua_riwayat/layout.tsx index 9780dc6d..6b32f082 100644 --- a/src/app_modules/vote/detail/semua_riwayat/layout.tsx +++ b/src/app_modules/vote/detail/semua_riwayat/layout.tsx @@ -1,8 +1,14 @@ "use client"; +import { RouterVote } from "@/app/lib/router_hipmi/router_vote"; +import { UIGlobal_Drawer } from "@/app_modules/_global/ui"; import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate"; import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; -import React from "react"; +import { ActionIcon } from "@mantine/core"; +import { IconDotsVertical } from "@tabler/icons-react"; +import { IconUsersGroup } from "@tabler/icons-react"; +import { IconDots } from "@tabler/icons-react"; +import React, { useState } from "react"; export default function LayoutVote_DetailSemuaRiwayat({ children, @@ -13,13 +19,42 @@ export default function LayoutVote_DetailSemuaRiwayat({ votingId: string; userLoginId: string; }) { + const [openDrawer, setOpenDrawer] = useState(false); + return ( <> } + header={ + { + setOpenDrawer(true); + }} + > + + + } + /> + } > {children} + + setOpenDrawer(false)} + component={[ + { + id: "1", + name: "Daftar Kontribusi", + icon: , + path: RouterVote.daftar_kontributor + votingId, + }, + ]} + /> ); } From a74a32b422e081d0d9fc4ed1ce0361e3d4809375 Mon Sep 17 00:00:00 2001 From: nico Date: Mon, 30 Dec 2024 17:37:44 +0800 Subject: [PATCH 02/21] Add All Skeleton Except Collaboration --- src/app_modules/_global/color/color_pallet.ts | 3 +- .../comp_card_box_and_background.tsx | 4 +- .../component/comp_tampilan_angka_ratusan.tsx | 6 +- .../component/comp_tampilan_rupiah.tsx | 3 +- src/app_modules/_global/ui/ui_drawer.tsx | 4 +- .../component/card_view/card_publish_new.tsx | 7 +- .../detail_main/informasi_penggalang_new.tsx | 5 +- .../skeleton_cerita_penggalang.tsx | 11 +-- .../skeleton_detail_dana_donasi.tsx | 13 +-- .../donasi/component/skeleton_donasi.tsx | 7 +- .../donasi/component/skeleton_donasi_saya.tsx | 7 +- .../edit/edit_donasi/skeleton_edit_donasi.tsx | 13 +-- .../skeleton/comp_skeleton_detail.tsx | 25 +++--- .../event/detail/main_detail/index.tsx | 5 +- src/app_modules/home/component/body_home.tsx | 33 +++++--- .../home/component/footer_home.tsx | 9 ++- src/app_modules/home/view_home_new.tsx | 6 +- .../comp_card_border_and_background.tsx | 4 +- .../detail/comp_box_daftar_berita.tsx | 6 +- .../detail/comp_box_daftar_dokumen.tsx | 6 +- .../_component/detail/comp_box_prospektus.tsx | 6 +- .../detail/comp_title_and_value_in_detail.tsx | 3 +- .../detail/saham_saya/comp_detail_data.tsx | 3 +- .../saham_saya/comp_harga_dan_lembar.tsx | 5 +- .../detail/saham_saya/comp_progress_saham.tsx | 3 +- .../main/comp_card_daftar_transaksi_new.tsx | 4 +- .../main/comp_card_saham_saya_new.tsx | 6 +- .../investasi/_ui/detail/ui_detail_main.tsx | 3 +- .../_ui/detail/ui_detail_portofolio.tsx | 7 +- .../investasi/_ui/main/ui_portofolio_new.tsx | 2 +- .../detail/portofolio/view_detail_publish.tsx | 22 +++--- .../main/portofolio/skeleton_portofolio.tsx | 7 +- .../_view/main/skeleton_saham_saya.tsx | 5 +- .../view_invoice_berhasil.tsx | 6 +- .../_view/transaksi/view_invoice.tsx | 12 +-- .../transaksi/view_metode_pembayaran.tsx | 6 +- .../_view/transaksi/view_proses_pembelian.tsx | 17 ++-- .../_view/transaksi/view_proses_transaksi.tsx | 10 +-- .../component/detail/card_status.tsx | 4 +- src/app_modules/investasi/create/view_new.tsx | 64 +++++++++++++-- .../investasi/portofolio/publish.tsx | 4 +- .../notifikasi/component/skeleton_view.tsx | 21 ++--- .../vote/component/card_view_publish.tsx | 4 +- .../vote/component/card_view_status.tsx | 4 +- .../comp_layout_header_detail_publish.tsx | 11 +-- .../detail/detail_data_sebelum_publish.tsx | 6 +- .../detail/detail_data_setelah_publish.tsx | 4 +- .../component/detail/detail_hasil_voting.tsx | 4 +- .../vote/component/skeleton_view.tsx | 79 ++++++++++--------- src/app_modules/vote/main/beranda.tsx | 3 +- src/app_modules/vote/main/layout.tsx | 2 +- src/app_modules/vote/main/riwayat/index.tsx | 4 +- src/app_modules/vote/main/status/draft.tsx | 2 +- src/app_modules/vote/main/status/index.tsx | 2 +- src/app_modules/vote/main/status/reject.tsx | 2 +- 55 files changed, 305 insertions(+), 219 deletions(-) diff --git a/src/app_modules/_global/color/color_pallet.ts b/src/app_modules/_global/color/color_pallet.ts index 6b417815..bb9d7e65 100644 --- a/src/app_modules/_global/color/color_pallet.ts +++ b/src/app_modules/_global/color/color_pallet.ts @@ -4,7 +4,8 @@ export const MainColor = { yellow: "#E1B525", white: "#D4D0D0", red: "#C74E4E", - orange: "#E58958" + orange: "#E58958", + green: "#468A56" }; export const AccentColor = { diff --git a/src/app_modules/_global/component/comp_card_box_and_background.tsx b/src/app_modules/_global/component/comp_card_box_and_background.tsx index c3064edd..cee4c5f7 100644 --- a/src/app_modules/_global/component/comp_card_box_and_background.tsx +++ b/src/app_modules/_global/component/comp_card_box_and_background.tsx @@ -1,4 +1,4 @@ -import { AccentColor } from "@/app_modules/_global/color"; +import { AccentColor, MainColor } from "@/app_modules/_global/color"; import { Card } from "@mantine/core"; import React from "react"; @@ -30,7 +30,7 @@ export function ComponentGlobal_CardStyles({ paddingInline: "16px", paddingBlock: "16px", borderRadius: "10px", - color: color ? color : "white", + color: color ? color : MainColor.white, height: height ? height : "auto", marginBottom: marginBottom ? marginBottom : "15px", }} diff --git a/src/app_modules/_global/component/comp_tampilan_angka_ratusan.tsx b/src/app_modules/_global/component/comp_tampilan_angka_ratusan.tsx index aa7b2565..ccf3c540 100644 --- a/src/app_modules/_global/component/comp_tampilan_angka_ratusan.tsx +++ b/src/app_modules/_global/component/comp_tampilan_angka_ratusan.tsx @@ -1,4 +1,5 @@ import { Group, Text } from "@mantine/core"; +import { MainColor } from "../color"; export default function ComponentGlobal_TampilanAngkaRatusan({ nominal, @@ -32,7 +33,7 @@ export default function ComponentGlobal_TampilanAngkaRatusan({ fw={fontWeight ? fontWeight : "bold"} fz={fontSize ? fontSize : "md"} style={{ - color: color ? color : "white", + color: color ? color : MainColor.white, }} > {new Intl.NumberFormat("id-ID", { maximumFractionDigits: 10 }).format( @@ -43,6 +44,9 @@ export default function ComponentGlobal_TampilanAngkaRatusan({ {textAfter} diff --git a/src/app_modules/_global/component/comp_tampilan_rupiah.tsx b/src/app_modules/_global/component/comp_tampilan_rupiah.tsx index 9271882f..e5baf1a3 100644 --- a/src/app_modules/_global/component/comp_tampilan_rupiah.tsx +++ b/src/app_modules/_global/component/comp_tampilan_rupiah.tsx @@ -1,4 +1,5 @@ import { Text } from "@mantine/core"; +import { MainColor } from "../color"; export default function ComponentGlobal_TampilanRupiah({ nominal, @@ -17,7 +18,7 @@ export default function ComponentGlobal_TampilanRupiah({ fw={fontWeight ? fontWeight : "bold"} fz={fontSize ? fontSize : "md"} style={{ - color: color ? color : "white", + color: color ? color : MainColor.white, }} > Rp.{" "} diff --git a/src/app_modules/_global/ui/ui_drawer.tsx b/src/app_modules/_global/ui/ui_drawer.tsx index b1f51ef3..fad1cd9d 100644 --- a/src/app_modules/_global/ui/ui_drawer.tsx +++ b/src/app_modules/_global/ui/ui_drawer.tsx @@ -64,7 +64,7 @@ export default function UIGlobal_Drawer({ borderRight: `1px solid ${AccentColor.blue}`, borderLeft: `1px solid ${AccentColor.blue}`, borderRadius: "20px 20px 0px 0px", - color: "white", + color: MainColor.white, paddingBottom: "5%", }, }} @@ -86,7 +86,7 @@ export default function UIGlobal_Drawer({ > {/* PAKE LOADING */} {/* {isLoading && e?.id === pageId ? ( diff --git a/src/app_modules/donasi/component/card_view/card_publish_new.tsx b/src/app_modules/donasi/component/card_view/card_publish_new.tsx index 885fa359..c832683f 100644 --- a/src/app_modules/donasi/component/card_view/card_publish_new.tsx +++ b/src/app_modules/donasi/component/card_view/card_publish_new.tsx @@ -5,6 +5,7 @@ import { Grid, Progress, Stack, Text } from "@mantine/core"; import { useRouter } from "next/navigation"; import ComponentDonasi_TampilanHitungMundur from "../tampilan_hitung_mundur"; import TampilanRupiahDonasi from "../tampilan_rupiah"; +import { MainColor } from "@/app_modules/_global/color"; export default function ComponentDonasi_CardPublishNew({ data }: { data: any; }) { const router = useRouter(); @@ -27,7 +28,7 @@ export default function ComponentDonasi_CardPublishNew({ data }: { data: any; }) - + {data.title} - Terkumpul - + Terkumpul + diff --git a/src/app_modules/donasi/component/detail_main/informasi_penggalang_new.tsx b/src/app_modules/donasi/component/detail_main/informasi_penggalang_new.tsx index 433fff92..19d8af63 100644 --- a/src/app_modules/donasi/component/detail_main/informasi_penggalang_new.tsx +++ b/src/app_modules/donasi/component/detail_main/informasi_penggalang_new.tsx @@ -2,7 +2,8 @@ import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi"; import { AccentColor, MainColor, } from "@/app_modules/_global/color/color_pallet"; import ComponentGlobal_BoxInformation from "@/app_modules/_global/component/box_information"; -import { ActionIcon, Avatar, Group, Paper, Skeleton, Stack, Text, Title, } from "@mantine/core"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; +import { ActionIcon, Avatar, Group, Paper, Stack, Text, Title } from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import { IconCircleChevronRight } from "@tabler/icons-react"; import _ from "lodash"; @@ -54,7 +55,7 @@ export default function ComponentDonasi_InformasiPenggalangMainNew() { }} > { - loading ? + loading ? : diff --git a/src/app_modules/donasi/component/detail_main/skeleton_cerita_penggalang.tsx b/src/app_modules/donasi/component/detail_main/skeleton_cerita_penggalang.tsx index 3c3eb2d7..ffb25e4a 100644 --- a/src/app_modules/donasi/component/detail_main/skeleton_cerita_penggalang.tsx +++ b/src/app_modules/donasi/component/detail_main/skeleton_cerita_penggalang.tsx @@ -1,13 +1,14 @@ -import { Box, Skeleton } from "@mantine/core"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; +import { Box } from "@mantine/core"; export default function SkeletonCeritaPenggalangDonasi() { return ( <> - - - - + + + + ); diff --git a/src/app_modules/donasi/component/detail_main/skeleton_detail_dana_donasi.tsx b/src/app_modules/donasi/component/detail_main/skeleton_detail_dana_donasi.tsx index a8f287a6..ea512c2a 100644 --- a/src/app_modules/donasi/component/detail_main/skeleton_detail_dana_donasi.tsx +++ b/src/app_modules/donasi/component/detail_main/skeleton_detail_dana_donasi.tsx @@ -1,19 +1,20 @@ -import { Box, Skeleton } from "@mantine/core"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; +import { Box } from "@mantine/core"; export default function SkeletonDetailDanaDonasi() { return ( <> - + - - - + + + - + diff --git a/src/app_modules/donasi/component/skeleton_donasi.tsx b/src/app_modules/donasi/component/skeleton_donasi.tsx index 7f461e64..333d70af 100644 --- a/src/app_modules/donasi/component/skeleton_donasi.tsx +++ b/src/app_modules/donasi/component/skeleton_donasi.tsx @@ -1,5 +1,6 @@ import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component"; -import { Box, Grid, Skeleton } from "@mantine/core"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; +import { Box, Grid } from "@mantine/core"; export default function SkeletonDonasi() { return <> @@ -8,7 +9,7 @@ export default function SkeletonDonasi() { - + @@ -16,7 +17,7 @@ export default function SkeletonDonasi() { - + diff --git a/src/app_modules/donasi/component/skeleton_donasi_saya.tsx b/src/app_modules/donasi/component/skeleton_donasi_saya.tsx index 1b3b3a2b..998e328e 100644 --- a/src/app_modules/donasi/component/skeleton_donasi_saya.tsx +++ b/src/app_modules/donasi/component/skeleton_donasi_saya.tsx @@ -1,5 +1,6 @@ import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component"; -import { Box, Grid, Skeleton } from "@mantine/core"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; +import { Box, Grid } from "@mantine/core"; export default function SkeletonDonasiSaya() { return <> @@ -13,7 +14,7 @@ export default function SkeletonDonasiSaya() { - + @@ -22,7 +23,7 @@ export default function SkeletonDonasiSaya() { - + diff --git a/src/app_modules/donasi/edit/edit_donasi/skeleton_edit_donasi.tsx b/src/app_modules/donasi/edit/edit_donasi/skeleton_edit_donasi.tsx index 922e275e..e073fcc9 100644 --- a/src/app_modules/donasi/edit/edit_donasi/skeleton_edit_donasi.tsx +++ b/src/app_modules/donasi/edit/edit_donasi/skeleton_edit_donasi.tsx @@ -1,20 +1,21 @@ -import { Box, Skeleton, Stack } from "@mantine/core"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; +import { Box, Stack } from "@mantine/core"; export default function SkeletonEditDonasi() { return ( <> - - - + + + {[...Array(5)].map((_, index) => ( - + ))} - + diff --git a/src/app_modules/event/component/skeleton/comp_skeleton_detail.tsx b/src/app_modules/event/component/skeleton/comp_skeleton_detail.tsx index 200491a5..2b30756c 100644 --- a/src/app_modules/event/component/skeleton/comp_skeleton_detail.tsx +++ b/src/app_modules/event/component/skeleton/comp_skeleton_detail.tsx @@ -1,5 +1,6 @@ import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component"; -import { Stack, Center, Skeleton, Grid } from "@mantine/core"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; +import { Center, Grid, Stack } from "@mantine/core"; export function Event_ComponentSkeletonDetail() { return ( @@ -8,26 +9,26 @@ export function Event_ComponentSkeletonDetail() { - + - +
- +
- - - - - + + + + + - - - + + +
diff --git a/src/app_modules/event/detail/main_detail/index.tsx b/src/app_modules/event/detail/main_detail/index.tsx index 3438ba1a..bbfefbda 100644 --- a/src/app_modules/event/detail/main_detail/index.tsx +++ b/src/app_modules/event/detail/main_detail/index.tsx @@ -4,8 +4,9 @@ import { API_RouteEvent } from "@/app/lib/api_user_router/route_api_event"; import { IRealtimeData } from "@/app/lib/global_state"; import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; +import CustomSkeleton from "@/app_modules/components/CustomSkeleton"; import notifikasiToUser_funCreate from "@/app_modules/notifikasi/fun/create/create_notif_to_user"; -import { Button, Skeleton, Stack } from "@mantine/core"; +import { Button, Stack } from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import { useState } from "react"; import { WibuRealtime } from "wibu-pkg"; @@ -49,7 +50,7 @@ export default function Event_DetailMain({ /> {isJoinSuccess == null ? ( - + ) : isJoinSuccess ? (