diff --git a/Controllers/Registrasi/RegistrasiController.cs b/Controllers/Registrasi/RegistrasiController.cs new file mode 100644 index 0000000..b8f3f32 --- /dev/null +++ b/Controllers/Registrasi/RegistrasiController.cs @@ -0,0 +1,56 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BankSampahApp.Controllers.Registrasi +{ + [Route("[controller]/[action]")] + public class RegistrasiController : Controller + { + private readonly ILogger _logger; + + public RegistrasiController(ILogger logger) + { + _logger = logger; + } + + /// + /// Halaman register nasabah + /// + [HttpGet] + public IActionResult RegisterNasabah() + { + return View("~/Views/Registrasi/RegisterNasabah.cshtml"); + } + + /// + /// Handle form submission register nasabah + /// + [HttpPost] + public IActionResult RegisterNasabah(RegisterNasabahViewModel model) + { + if (!ModelState.IsValid) + { + return View("~/Views/Registrasi/RegisterNasabah.cshtml", model); + } + + // TODO: Implement registration logic + // For now, just log and redirect + _logger.LogInformation("New customer registration attempt: {Username}", model.Username); + + TempData["SuccessMessage"] = "Pendaftaran berhasil! Silakan login."; + return RedirectToAction("Login", "Account"); + } + } + + /// + /// ViewModel untuk form register nasabah + /// + public class RegisterNasabahViewModel + { + public string NamaLengkap { get; set; } = string.Empty; + public string AlamatEmail { get; set; } = string.Empty; + public string JenisNasabah { get; set; } = string.Empty; + public string Username { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + public string ConfirmPassword { get; set; } = string.Empty; + } +} diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index 4458552..410c0b8 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -34,14 +34,14 @@
- + diff --git a/Views/Registrasi/RegisterNasabah.cshtml b/Views/Registrasi/RegisterNasabah.cshtml new file mode 100644 index 0000000..625f250 --- /dev/null +++ b/Views/Registrasi/RegisterNasabah.cshtml @@ -0,0 +1,222 @@ +@{ + ViewData["Title"] = "Register Nasabah"; +} + +
+
+ +
+
+ +
+
Register Nasabah
+
+ + +
+

+ Selamat Datang di e-Bank Sampah Jakarta +

+

+ Dinas Lingkungan Hidup Provinsi Jakarta +

+
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+
+
+ + +
+ + +
+ + +
+ +
+ + +
+
+ + +
+ +
+ + +
+
+ + + +
+ + +
+ +
+ Sudah punya akun? + Login +
+ + +
+ + +
+ Kembali ke + Beranda +
+
+
+
+ + + +
+
+ +@section Scripts { + +} diff --git a/Views/Shared/_FooterLanding.cshtml b/Views/Shared/_FooterLanding.cshtml index b7071ee..e791953 100644 --- a/Views/Shared/_FooterLanding.cshtml +++ b/Views/Shared/_FooterLanding.cshtml @@ -27,7 +27,7 @@

Layanan

    -
  • Pendaftaran Nasabah
  • +
  • Pendaftaran Nasabah
  • Pendaftaran Bank Sampah
  • Lokasi Bank Sampah
  • Login
  • diff --git a/Views/Shared/_LayoutRegistrasi.cshtml b/Views/Shared/_LayoutRegistrasi.cshtml new file mode 100644 index 0000000..9e31391 --- /dev/null +++ b/Views/Shared/_LayoutRegistrasi.cshtml @@ -0,0 +1,50 @@ + + + + + + + @ViewData["Title"] - E-Bank Sampah + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + @RenderBody() +
    + + + + @await RenderSectionAsync("Scripts", required: false) + + + diff --git a/Views/_ViewStart.cshtml b/Views/_ViewStart.cshtml index 7b41b5a..5d8c531 100644 --- a/Views/_ViewStart.cshtml +++ b/Views/_ViewStart.cshtml @@ -2,11 +2,16 @@ // Tentukan layout berdasarkan controller var controller = ViewContext.RouteData.Values["controller"]?.ToString(); - // Landing page menggunakan layout yang berbeda + // Landing page menggunakan layout dengan navbar dan footer if (controller == "Home") { Layout = "_Layout"; } + // Halaman registrasi menggunakan layout tanpa navbar dan footer + else if (controller == "Registrasi") + { + Layout = "_LayoutRegistrasi"; + } else { // Semua halaman aplikasi menggunakan layout dengan sidebar