From 8b7bfb5ea08b41ed7a70fb004416b7ea873cba1f Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Mon, 27 Jan 2025 14:18:22 +0700 Subject: [PATCH] =?UTF-8?q?fix=20issue=20:=20=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A=E0=B8=A5=E0=B8=B2=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B8=A5?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2>>=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=87?= =?UTF-8?q?=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2=E0=B8=9B=E0=B8=8F=E0=B8=B4?= =?UTF-8?q?=E0=B8=9A=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=87=E0=B8=B2=E0=B8=99?= =?UTF-8?q?=20(=E0=B8=AA=E0=B8=AD=E0=B8=9A=E0=B8=96=E0=B8=B2=E0=B8=A1)=20#?= =?UTF-8?q?1074?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BMA.EHR.Leave/Controllers/LeaveController.cs | 22 +++++++++++++++++++ .../DTOs/CheckIn/CheckInDetailForAdminDto.cs | 2 ++ .../DTOs/CheckIn/CheckInHistoryForAdminDto.cs | 2 ++ .../CheckInProcessHistoryForAdminDto.cs | 2 ++ 4 files changed, 28 insertions(+) diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index 9f915104..7a8c1a1c 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -1234,6 +1234,7 @@ namespace BMA.EHR.Leave.Service.Controllers Id = d.Id, //FullName = _userProfileRepository.GetUserFullName(d.KeycloakUserId, AccessToken), FullName = $"{d.Prefix ?? ""}{d.FirstName ?? ""} {d.LastName ?? ""}", + ProfileType = d.ProfileType ?? "", CheckInDate = d.CheckIn.Date, CheckInTime = d.CheckIn.ToString("HH:mm:ss"), @@ -1331,6 +1332,8 @@ namespace BMA.EHR.Leave.Service.Controllers Id = d.Id, FullName = $"{d.Prefix}{d.FirstName} {d.LastName}", + ProfileType = (d.ProfileType != "" || d.ProfileType != null) ? d.ProfileType : (profile.ProfileType ?? ""), + //FullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}", // _userProfileRepository.GetUserFullName(d.KeycloakUserId, AccessToken), CheckInDate = d.CheckIn.Date, @@ -1458,6 +1461,8 @@ namespace BMA.EHR.Leave.Service.Controllers { Id = d.Id, FullName = $"{d.Prefix ?? ""}{d.FirstName ?? ""} {d.LastName ?? ""}", + ProfileType = d.ProfileType ?? "", + CheckInDate = d.CheckIn.Date, CheckInTime = d.CheckIn.ToString("HH:mm"), CheckInLocation = d.CheckInPOI, @@ -1941,6 +1946,23 @@ namespace BMA.EHR.Leave.Service.Controllers FirstName = profile.FirstName, LastName = profile.LastName, + // Add ข้อมูลจาก profile + CitizenId = profile.CitizenId, + ProfileType = profile.ProfileType, + Root = profile.Root, + RootId = profile.RootId, + Child1 = profile.Child1, + Child1Id = profile.Child1Id, + Child2 = profile.Child2, + Child2Id = profile.Child2Id, + Child3 = profile.Child3, + Child3Id = profile.Child3Id, + Child4 = profile.Child4, + Child4Id = profile.Child4Id, + Gender = profile.Gender, + ProfileId = profile.Id, + + }; processTimeStamp.EditStatus = "APPROVE"; diff --git a/BMA.EHR.Leave/DTOs/CheckIn/CheckInDetailForAdminDto.cs b/BMA.EHR.Leave/DTOs/CheckIn/CheckInDetailForAdminDto.cs index a31d6f1c..a7c31ecb 100644 --- a/BMA.EHR.Leave/DTOs/CheckIn/CheckInDetailForAdminDto.cs +++ b/BMA.EHR.Leave/DTOs/CheckIn/CheckInDetailForAdminDto.cs @@ -45,5 +45,7 @@ public bool IsLocationCheckOut { get; set; } = true; public string? CheckOutLocationName { get; set; } = string.Empty; + + public string ProfileType { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs b/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs index 2e441558..ac4e0e9b 100644 --- a/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs +++ b/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs @@ -37,5 +37,7 @@ public bool IsLocationCheckOut { get; set; } = true; public string? CheckOutLocationName { get; set; } = string.Empty; + + public string ProfileType { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs b/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs index b284f587..be150bdc 100644 --- a/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs +++ b/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs @@ -37,5 +37,7 @@ public bool CheckOutIsLocation { get; set; } = false; public string? CheckOutLocationName { get; set; } = string.Empty; + + public string ProfileType { get; set; } = string.Empty; } }