From 97fe458e1dede3f2faaeb921c44cdc20d3ec25be Mon Sep 17 00:00:00 2001 From: amel Date: Wed, 11 Dec 2024 11:51:34 +0800 Subject: [PATCH 1/3] upd: button back Deskripsi: - ilangin loading button back No s No Issues --- src/app_modules/_global/ui/ui_header_tamplate.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app_modules/_global/ui/ui_header_tamplate.tsx b/src/app_modules/_global/ui/ui_header_tamplate.tsx index 6126711c..6f6425e9 100644 --- a/src/app_modules/_global/ui/ui_header_tamplate.tsx +++ b/src/app_modules/_global/ui/ui_header_tamplate.tsx @@ -77,12 +77,21 @@ export default function UIGlobal_LayoutHeaderTamplate({ : router.push(routerLeft, { scroll: false }); }} > - {isLoading ? ( + {/* PAKE LOADING SAAT KLIK BACK */} + {/* {isLoading ? ( ) : iconLeft ? ( iconLeft ) : ( + )} */} + + + {/* GA PAKE LOADING SAAT KLIK BACK */} + {iconLeft ? ( + iconLeft + ) : ( + )} )} From eab293dd35a6f061cfa4675679de1ce68f506c3c Mon Sep 17 00:00:00 2001 From: amel Date: Wed, 11 Dec 2024 12:03:56 +0800 Subject: [PATCH 2/3] fix: drawer katalog Deskripsi: - on click kotak drawer No Issues --- .../katalog/component/drawer_katalog_new.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/app_modules/katalog/component/drawer_katalog_new.tsx b/src/app_modules/katalog/component/drawer_katalog_new.tsx index 752a7643..ab0ef95c 100644 --- a/src/app_modules/katalog/component/drawer_katalog_new.tsx +++ b/src/app_modules/katalog/component/drawer_katalog_new.tsx @@ -108,14 +108,12 @@ export default function DrawerKatalogNew({ {listPage.map((e, i) => ( - - { - router.push(e.path, { scroll: false }); - }} - > + { + router.push(e.path, { scroll: false }); + }} + > + {e.icon} From 8823a01b067928cbeea195402f2bb454df8e8bea Mon Sep 17 00:00:00 2001 From: amel Date: Wed, 11 Dec 2024 14:02:04 +0800 Subject: [PATCH 3/3] fix: loading button tambah portofolio Deskripsi: - loading button selanjutjnya - loading button simpan pin No Issues --- .../component/button/comp_button_selanjutnya.tsx | 2 +- .../map/_component/button/comp_button_save_pin.tsx | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx b/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx index c7e3fcd5..41c037b9 100644 --- a/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx +++ b/src/app_modules/katalog/portofolio/component/button/comp_button_selanjutnya.tsx @@ -30,6 +30,7 @@ export function Portofolio_ComponentButtonSelanjutnya({ const [loading, setLoading] = useState(false); async function onSubmit() { + setLoading(true); const porto = { namaBisnis: dataPortofolio.namaBisnis, masterBidangBisnisId: dataPortofolio.masterBidangBisnisId, @@ -56,7 +57,6 @@ export function Portofolio_ComponentButtonSelanjutnya({ fileId: uploadFileToStorage.data.id, }); if (res.status === 201) { - setLoading(true); ComponentGlobal_NotifikasiBerhasil("Berhasil disimpan"); router.replace(RouterMap.create + res.id, { scroll: false }); } else { diff --git a/src/app_modules/map/_component/button/comp_button_save_pin.tsx b/src/app_modules/map/_component/button/comp_button_save_pin.tsx index 8af85a08..40a398d2 100644 --- a/src/app_modules/map/_component/button/comp_button_save_pin.tsx +++ b/src/app_modules/map/_component/button/comp_button_save_pin.tsx @@ -11,6 +11,7 @@ import { useRouter } from "next/navigation"; import { map_funCreatePin } from "../../fun/create/fun_create_pin"; import { DIRECTORY_ID } from "@/app/lib"; import { funGlobal_UploadToStorage } from "@/app_modules/_global/fun"; +import { useState } from "react"; export function ComponentMap_ButtonSavePin({ namePin, @@ -26,7 +27,10 @@ export function ComponentMap_ButtonSavePin({ file: File; }) { const router = useRouter(); + const [loading, setLoading] = useState(false) + async function onSavePin() { + setLoading(true) const uploadFileToStorage = await funGlobal_UploadToStorage({ file: file, dirId: DIRECTORY_ID.map_image, @@ -49,15 +53,19 @@ export function ComponentMap_ButtonSavePin({ res.status === 200 ? (ComponentGlobal_NotifikasiBerhasil(res.message), router.back()) : ComponentGlobal_NotifikasiGagal(res.message); + + setLoading(false) } return ( <>