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; } }