From 1d02b87c1d874af7dea3ef3f7243438e0a458e83 Mon Sep 17 00:00:00 2001 From: Naz <2022755409@student.uitm.edu.my> Date: Tue, 18 Mar 2025 16:18:45 +0800 Subject: [PATCH] - --- .../Controllers/HrDashboardController.cs | 5 + Areas/OTcalculate/Models/RateModel.cs | 11 + .../Views/HrDashboard/Calendar.cshtml | 12 + .../OTcalculate/Views/HrDashboard/Rate.cshtml | 327 +++++++++++++++++- .../Views/HrDashboard/Settings.cshtml | 51 ++- Controllers/API/CentralDbContext.cs | 7 + Controllers/API/OvertimeAPI.cs | 44 +++ .../API/{Reporting => }/ReportingAPI.cs | 2 +- PSTW_CentralSystem.csproj | 2 +- 9 files changed, 453 insertions(+), 8 deletions(-) create mode 100644 Areas/OTcalculate/Models/RateModel.cs create mode 100644 Areas/OTcalculate/Views/HrDashboard/Calendar.cshtml create mode 100644 Controllers/API/CentralDbContext.cs create mode 100644 Controllers/API/OvertimeAPI.cs rename Controllers/API/{Reporting => }/ReportingAPI.cs (98%) diff --git a/Areas/OTcalculate/Controllers/HrDashboardController.cs b/Areas/OTcalculate/Controllers/HrDashboardController.cs index 92160f0..5e515d1 100644 --- a/Areas/OTcalculate/Controllers/HrDashboardController.cs +++ b/Areas/OTcalculate/Controllers/HrDashboardController.cs @@ -19,5 +19,10 @@ namespace PSTW_CentralSystem.Areas.OTcalculate.Controllers { return View(); } + + public IActionResult Calendar() + { + return View(); + } } } diff --git a/Areas/OTcalculate/Models/RateModel.cs b/Areas/OTcalculate/Models/RateModel.cs new file mode 100644 index 0000000..bde8851 --- /dev/null +++ b/Areas/OTcalculate/Models/RateModel.cs @@ -0,0 +1,11 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using PSTW_CentralSystem.Models; + +namespace PSTW_CentralSystem.Areas.OTcalculate.Models +{ + public class RateModel + { + + } +} diff --git a/Areas/OTcalculate/Views/HrDashboard/Calendar.cshtml b/Areas/OTcalculate/Views/HrDashboard/Calendar.cshtml new file mode 100644 index 0000000..c61132d --- /dev/null +++ b/Areas/OTcalculate/Views/HrDashboard/Calendar.cshtml @@ -0,0 +1,12 @@ +@{ + ViewData["Title"] = "Calendar Update"; + Layout = "~/Views/Shared/_Layout.cshtml"; +} + +
+
+
+

Name:

+
+
+
\ No newline at end of file diff --git a/Areas/OTcalculate/Views/HrDashboard/Rate.cshtml b/Areas/OTcalculate/Views/HrDashboard/Rate.cshtml index 0fc82ea..68cd433 100644 --- a/Areas/OTcalculate/Views/HrDashboard/Rate.cshtml +++ b/Areas/OTcalculate/Views/HrDashboard/Rate.cshtml @@ -1,4 +1,329 @@ @{ - ViewData["Title"] = "Rate"; + ViewData["Title"] = "Rate Update"; Layout = "~/Views/Shared/_Layout.cshtml"; } + +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +
+
+ +
+

+ +

+
Rate
+
+
+
+
+ +
+
+ +
+

+ +

+
Calendar
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+

UPDATE RATE

+
+
+
+ + @* Enter Rate *@ +
+ +
+ +
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+@section Scripts { + @{ + await Html.RenderPartialAsync("_ValidationScriptsPartial"); + } + +} + + diff --git a/Areas/OTcalculate/Views/HrDashboard/Settings.cshtml b/Areas/OTcalculate/Views/HrDashboard/Settings.cshtml index ff0824c..40acac7 100644 --- a/Areas/OTcalculate/Views/HrDashboard/Settings.cshtml +++ b/Areas/OTcalculate/Views/HrDashboard/Settings.cshtml @@ -7,9 +7,9 @@
-
+

- +

Rate
@@ -20,12 +20,53 @@
\ No newline at end of file +
+ +
+
+
+
+
+
+
+
+
+
+

UPDATE DATE

+
+
+
+
+
+
+
+
+
+
+ Rate Latest Update: +
+
+
+
+
+
+
+
+ Calendar Latest Update: +
+
+
+
+
+
+
+
+ diff --git a/Controllers/API/CentralDbContext.cs b/Controllers/API/CentralDbContext.cs new file mode 100644 index 0000000..8a22eaa --- /dev/null +++ b/Controllers/API/CentralDbContext.cs @@ -0,0 +1,7 @@ +namespace PSTW_CentralSystem.Controllers.API +{ + public class CentralDbContext + { + public object Users { get; internal set; } + } +} \ No newline at end of file diff --git a/Controllers/API/OvertimeAPI.cs b/Controllers/API/OvertimeAPI.cs new file mode 100644 index 0000000..9ff4ed1 --- /dev/null +++ b/Controllers/API/OvertimeAPI.cs @@ -0,0 +1,44 @@ +using Azure.Core; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Mono.TextTemplating; +using Newtonsoft.Json; +using PSTW_CentralSystem.Areas.OTcalculate.Models; +using PSTW_CentralSystem.Controllers.API; +using PSTW_CentralSystem.DBContext; +using PSTW_CentralSystem.Models; +using System.ComponentModel.Design; +using System.Data; +using System.Diagnostics; +using System.Reflection; +using static System.Collections.Specialized.BitVector32; + +namespace PSTW_CentralSystem.Controllers.API +{ + [ApiController] + [Route("[controller]")] + public class OvertimeAPI : Controller + { + private readonly ILogger _logger; + private readonly CentralSystemContext _centralDbContext; + private readonly UserManager _userManager; + + public OvertimeAPI(ILogger logger, CentralSystemContext centralDbContext, UserManager userManager) + { + _logger = logger; + _centralDbContext = centralDbContext; + _userManager = userManager; + } + + public class UserDetails + { + public required string FullName { get; set; } + public int DepartmentId { get; set; } + + + + } + } +} diff --git a/Controllers/API/Reporting/ReportingAPI.cs b/Controllers/API/ReportingAPI.cs similarity index 98% rename from Controllers/API/Reporting/ReportingAPI.cs rename to Controllers/API/ReportingAPI.cs index bcd6291..dea8cd6 100644 --- a/Controllers/API/Reporting/ReportingAPI.cs +++ b/Controllers/API/ReportingAPI.cs @@ -6,7 +6,7 @@ using PSTW_CentralSystem.Areas.Inventory.Models; using PSTW_CentralSystem.DBContext; using PSTW_CentralSystem.Models; -namespace PSTW_CentralSystem.Controllers.API.Reporting +namespace PSTW_CentralSystem.Controllers.API { [ApiController] [Route("[controller]")] diff --git a/PSTW_CentralSystem.csproj b/PSTW_CentralSystem.csproj index bf76018..322365c 100644 --- a/PSTW_CentralSystem.csproj +++ b/PSTW_CentralSystem.csproj @@ -34,8 +34,8 @@ - +