From 4f2c97d0d73aec47cc85aa0fb571300685396008 Mon Sep 17 00:00:00 2001 From: Regiaaaaaa Date: Fri, 14 Nov 2025 11:06:58 +0700 Subject: [PATCH] refactor: place the add button on the location tab --- Views/Lokasi/Index.cshtml | 31 ++++++++----------------------- Views/Lokasi/_ModalTambah.cshtml | 12 +++++------- 2 files changed, 13 insertions(+), 30 deletions(-) diff --git a/Views/Lokasi/Index.cshtml b/Views/Lokasi/Index.cshtml index 58302ec..8dd9241 100644 --- a/Views/Lokasi/Index.cshtml +++ b/Views/Lokasi/Index.cshtml @@ -16,11 +16,7 @@

Profil Rw

- +
@@ -46,6 +42,13 @@
+
+ +
@@ -192,22 +195,4 @@ console.log('Detail clicked for ID:', id); }); }); - - - // Toggle "Tambah" button visibility based on active tab - const toggleTambahButton = () => { - const active = $('input[name="tab_profil_rw"]:checked').attr('aria-label'); - if (active === "Lokasi TP3SR & Parkir Pengumpulan Sampah") { - $('#btn-tambah').show(); - } else { - $('#btn-tambah').hide(); - } - }; - - // initial check - toggleTambahButton(); - - // bind change event - $('input[name="tab_profil_rw"]').on('change', toggleTambahButton); - diff --git a/Views/Lokasi/_ModalTambah.cshtml b/Views/Lokasi/_ModalTambah.cshtml index 298816a..d72a2c0 100644 --- a/Views/Lokasi/_ModalTambah.cshtml +++ b/Views/Lokasi/_ModalTambah.cshtml @@ -1,9 +1,7 @@ - - - + \ No newline at end of file