diff --git a/Areas/OTcalculate/Models/OtRegisterModel.cs b/Areas/OTcalculate/Models/OtRegisterModel.cs index 2eb1a55..28a852c 100644 --- a/Areas/OTcalculate/Models/OtRegisterModel.cs +++ b/Areas/OTcalculate/Models/OtRegisterModel.cs @@ -1,41 +1,47 @@ -using System.ComponentModel.DataAnnotations; +using Microsoft.AspNetCore.Http; +using System; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using PSTW_CentralSystem.Areas.Inventory.Models; using PSTW_CentralSystem.Models; namespace PSTW_CentralSystem.Areas.OTcalculate.Models { + [Table("otregisters")] + + public class OtRegisterModel { [Key] public int OvertimeId { get; set; } [Required] - public DateTime OtDate { get; set; } + public DateTime OtDate { get; set; } + + public TimeSpan? OfficeFrom { get; set; } - [Required] - public DateTime OfficeFrom { get; set; } - [Required] - public DateTime OfficeTo { get; set; } - public int OfficeBreak { get; set; } + public TimeSpan? OfficeTo { get; set; } - public DateTime OutsideFrom { get; set; } - public DateTime OutsideTo { get; set; } - public int OutsideBreak { get; set; } + public int? OfficeBreak { get; set; } - public int StationId { get; set; } + public TimeSpan? OutsideFrom { get; set; } + + public TimeSpan? OutsideTo { get; set; } + + public int? OutsideBreak { get; set; } + + public int? StationId { get; set; } [ForeignKey("StationId")] public virtual StationModel? Stations { get; set; } - public string? OtDescription { get; set; } - public string? OtDays { get; set; } + public string OtDescription { get; set; } - public byte[]? PDF { get; set; } + public string OtDays { get; set; } + public required string PDFBase64 { get; set; } + + [Required] public int UserId { get; set; } - - [ForeignKey("UserId")] - public virtual UserModel? Users { get; set; } } -} +} \ No newline at end of file diff --git a/Areas/OTcalculate/Views/Overtime/OtRegister.cshtml b/Areas/OTcalculate/Views/Overtime/OtRegister.cshtml index 9dedcd3..1821e22 100644 --- a/Areas/OTcalculate/Views/Overtime/OtRegister.cshtml +++ b/Areas/OTcalculate/Views/Overtime/OtRegister.cshtml @@ -9,90 +9,103 @@
- @* Left Section *@
- - + +
OFFICE HOURS
- - + +
- - + +
- - + +
OUTSIDE OFFICE HOURS
- - + +
- - + +
- - + +
- - + +
- @* Right Section *@
- + +
- - + +
+
- - + +
+
- - + +
- - + + *upload pdf file only
- - + +
- - + +
@@ -105,25 +118,201 @@
- @section Scripts { + @{ + await Html.RenderPartialAsync("_ValidationScriptsPartial"); + }