From 39af07933683227fffbf30eaf9e3454d48614167 Mon Sep 17 00:00:00 2001 From: Regiaaaaaa Date: Mon, 1 Dec 2025 16:10:02 +0700 Subject: [PATCH] feat: after save can redirect to index page --- Views/ChecklistHarian/Input.cshtml | 3 +++ Views/LaporanRwRw/Create.cshtml | 4 +++- Views/ProfilRw/CreateAlatPengumpulSampah.cshtml | 2 ++ Views/ProfilRw/CreateKebutuhanSarpras.cshtml | 4 +++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Views/ChecklistHarian/Input.cshtml b/Views/ChecklistHarian/Input.cshtml index ba1e58d..c8fd814 100644 --- a/Views/ChecklistHarian/Input.cshtml +++ b/Views/ChecklistHarian/Input.cshtml @@ -198,6 +198,9 @@ $(document).ready(function () { icon: 'success', confirmButtonText: 'OK', confirmButtonColor: '#22c55e' + }).then(() => { + // 👉 Redirect ke halaman index + window.location.href = '@Url.Action("Index", "ChecklistHarian")'; }); } }); diff --git a/Views/LaporanRwRw/Create.cshtml b/Views/LaporanRwRw/Create.cshtml index 038c3ad..e3e07ff 100644 --- a/Views/LaporanRwRw/Create.cshtml +++ b/Views/LaporanRwRw/Create.cshtml @@ -114,7 +114,7 @@ @@ -146,6 +146,8 @@ icon: 'success', confirmButtonText: 'OK', confirmButtonColor: '#22c55e' + }).then(() => { + window.location.href = '@Url.Action("Index", "LaporanRwRw")'; }); } }); diff --git a/Views/ProfilRw/CreateAlatPengumpulSampah.cshtml b/Views/ProfilRw/CreateAlatPengumpulSampah.cshtml index 8d14600..6a37caa 100644 --- a/Views/ProfilRw/CreateAlatPengumpulSampah.cshtml +++ b/Views/ProfilRw/CreateAlatPengumpulSampah.cshtml @@ -217,6 +217,8 @@ icon: 'success', confirmButtonColor: '#22c55e', confirmButtonText: 'OK' + }).then(() => { + window.location.href = '@Url.Action("Index", "ProfilRw")'; }); }); }); diff --git a/Views/ProfilRw/CreateKebutuhanSarpras.cshtml b/Views/ProfilRw/CreateKebutuhanSarpras.cshtml index 6d4bc87..297a17c 100644 --- a/Views/ProfilRw/CreateKebutuhanSarpras.cshtml +++ b/Views/ProfilRw/CreateKebutuhanSarpras.cshtml @@ -263,7 +263,9 @@ icon: 'success', confirmButtonText: 'OK', confirmButtonColor: '#22c55e' - }); + }).then(() => { + window.location.href = '@Url.Action("Index", "ProfilRw")'; + }); } }); });