diff --git a/Controllers/ProfilRwController.cs b/Controllers/ProfilRwController.cs
index 9edfd75..dba682e 100644
--- a/Controllers/ProfilRwController.cs
+++ b/Controllers/ProfilRwController.cs
@@ -103,5 +103,130 @@ namespace BpsRwApp.Controllers
return Json(response);
}
+
+ [HttpGet]
+ public IActionResult TableSuratUsulan()
+ {
+ var data = new[]
+ {
+ new {
+ nama_surat = "Surat Permohonan Perbaikan Jalan Lingkungan",
+ tanggal_surat = "11/07/2023",
+ file_upload = "Surat Pengantar Proposal",
+ status = "
-
+
- @await Html.PartialAsync("_TabIndexProfil")
+ @await Html.PartialAsync("_TabIndexProfil")
- @await Html.PartialAsync("_TabIndexBpsRw")
+ @await Html.PartialAsync("_TabIndexBpsRw")
-
+
+ @await Html.PartialAsync("_TabIndexSuratUsulan")
+
@@ -44,7 +46,7 @@
-
+
@await Html.PartialAsync("_TabIndexLokasi")
@@ -118,6 +120,51 @@
);
});
});
+
+ // Datatable Surat Usulan
+ var tableSuratUsulan = new DataTable('#tableSuratUsulan', {
+ ajax: '@Url.Action("TableSuratUsulan", "ProfilRw")',
+ scrollX: true,
+ autoWidth: false,
+ initComplete: function () {
+ $('div.dt-scroll-body thead').css('visibility', 'collapse');
+ },
+ columns: [
+ { data: null, render: (d, t, r, m) => m.row + 1, orderable: false, searchable: false },
+ { data: 'nama_surat' },
+ { data: 'tanggal_surat' },
+ { data: 'file_upload' },
+ { data: 'status' },
+ {
+ data: 'aksi',
+ orderable: false,
+ searchable: false
+ },
+ ]
+ });
+
+ // Delete Button
+ tableSuratUsulan.on('click', '.btn-error', function () {
+ const id = $(this).data('id');
+
+ Swal.fire({
+ title: 'Apakah Anda yakin?',
+ text: "Data yang dihapus tidak dapat dikembalikan!",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#ef4444',
+ cancelButtonColor: '#6b7280',
+ confirmButtonText: 'Ya, Hapus!',
+ cancelButtonText: 'Batal'
+ }).then((result) => {
+ Swal.fire(
+ 'Terhapus!',
+ 'Data berhasil dihapus.',
+ 'success'
+ );
+ });
+ });
+
});
}
\ No newline at end of file
diff --git a/Views/ProfilRw/_TabIndexSuratUsulan.cshtml b/Views/ProfilRw/_TabIndexSuratUsulan.cshtml
new file mode 100644
index 0000000..702fed0
--- /dev/null
+++ b/Views/ProfilRw/_TabIndexSuratUsulan.cshtml
@@ -0,0 +1,79 @@
+
+
+ add
+ Tambah
+
+
+
+
+
+
+ No
+ Nama Surat
+ Tanggal Surat
+ File Upload
+ Status
+ Aksi
+
+
+
+
+
+
+
+
+
+
+
+ ✕
+
+
+
+
Tambah Lokasi
+
+
+
+
+