From 95db83ab3e7a1cd10cd8c9cf3dc23b82e9ab60ac Mon Sep 17 00:00:00 2001 From: Naz <2022755409@student.uitm.edu.my> Date: Tue, 8 Apr 2025 17:21:11 +0800 Subject: [PATCH] edit --- .../Controllers/HodDashboardController.cs | 22 +++++ .../Controllers/HrDashboardController.cs | 4 +- .../Controllers/OvertimeController.cs | 4 +- Areas/OTcalculate/Models/OtRecordsModel.cs | 7 ++ Areas/OTcalculate/Models/OtRegisterModel.cs | 1 + .../Views/HodDashboard/HodApproval.cshtml | 17 ++++ .../Views/Overtime/OtRegister.cshtml | 94 ++++++++++++------- Views/Shared/_Layout.cshtml | 15 +++ 8 files changed, 128 insertions(+), 36 deletions(-) create mode 100644 Areas/OTcalculate/Controllers/HodDashboardController.cs create mode 100644 Areas/OTcalculate/Models/OtRecordsModel.cs create mode 100644 Areas/OTcalculate/Views/HodDashboard/HodApproval.cshtml diff --git a/Areas/OTcalculate/Controllers/HodDashboardController.cs b/Areas/OTcalculate/Controllers/HodDashboardController.cs new file mode 100644 index 0000000..7491183 --- /dev/null +++ b/Areas/OTcalculate/Controllers/HodDashboardController.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using PSTW_CentralSystem.Areas.OTcalculate.Models; +using PSTW_CentralSystem.DBContext; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace PSTW_CentralSystem.Areas.OTcalculate.Controllers +{ + [Area("OTcalculate")] + [Authorize] + public class HodDashboardController : Controller + { + public IActionResult HodApproval() + { + return View(); + } + } +} diff --git a/Areas/OTcalculate/Controllers/HrDashboardController.cs b/Areas/OTcalculate/Controllers/HrDashboardController.cs index d8a0829..ddcc809 100644 --- a/Areas/OTcalculate/Controllers/HrDashboardController.cs +++ b/Areas/OTcalculate/Controllers/HrDashboardController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using PSTW_CentralSystem.Areas.OTcalculate.Models; using PSTW_CentralSystem.DBContext; @@ -10,6 +11,7 @@ using System.Threading.Tasks; namespace PSTW_CentralSystem.Areas.OTcalculate.Controllers { [Area("OTcalculate")] + [Authorize] public class HrDashboardController : Controller { diff --git a/Areas/OTcalculate/Controllers/OvertimeController.cs b/Areas/OTcalculate/Controllers/OvertimeController.cs index 2bb66a7..93a2757 100644 --- a/Areas/OTcalculate/Controllers/OvertimeController.cs +++ b/Areas/OTcalculate/Controllers/OvertimeController.cs @@ -1,8 +1,10 @@ -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; namespace PSTW_CentralSystem.Areas.OTcalculate.Controllers { [Area("OTcalculate")] + [Authorize] public class OvertimeController : Controller { public IActionResult OtRegister() diff --git a/Areas/OTcalculate/Models/OtRecordsModel.cs b/Areas/OTcalculate/Models/OtRecordsModel.cs new file mode 100644 index 0000000..46eb9e6 --- /dev/null +++ b/Areas/OTcalculate/Models/OtRecordsModel.cs @@ -0,0 +1,7 @@ +namespace PSTW_CentralSystem.Areas.OTcalculate.Models +{ + public class OtRecordsModel + { + + } +} diff --git a/Areas/OTcalculate/Models/OtRegisterModel.cs b/Areas/OTcalculate/Models/OtRegisterModel.cs index 89054d6..cd74523 100644 --- a/Areas/OTcalculate/Models/OtRegisterModel.cs +++ b/Areas/OTcalculate/Models/OtRegisterModel.cs @@ -28,6 +28,7 @@ namespace PSTW_CentralSystem.Areas.OTcalculate.Models public string OtDescription { get; set; } public string OtDays { get; set; } public required string PDFBase64 { get; set; } + public required string IvBase64 { get; set; } [Required] public int UserId { get; set; } diff --git a/Areas/OTcalculate/Views/HodDashboard/HodApproval.cshtml b/Areas/OTcalculate/Views/HodDashboard/HodApproval.cshtml new file mode 100644 index 0000000..db6acb4 --- /dev/null +++ b/Areas/OTcalculate/Views/HodDashboard/HodApproval.cshtml @@ -0,0 +1,17 @@ +@{ + ViewData["Title"] = "Overtime Approval"; + Layout = "~/Views/Shared/_Layout.cshtml"; +} +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +