fix : ต่อ API ระยยลา

This commit is contained in:
Suphonchai Phoonsawat 2024-05-30 09:32:34 +07:00
parent 66d491a2af
commit be1c390bb8
10 changed files with 142 additions and 54 deletions

View file

@ -72,7 +72,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
await base.AddAsync(entity);
var userId = UserId != null ? Guid.Parse(UserId) : Guid.Empty;
var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId);
var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken ?? "");
var profile_id = profile == null ? Guid.Empty : profile.Id;
var rootOc = _userProfileRepository.GetRootOcId(profile_id);
@ -88,7 +88,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
// send inbox and notification
var subject_str = $"มีการขออนุมัติลงเวลากรณีพิเศษ";
var body_str = $"โปรดพิจารณาคำร้องขอลงเวลาในกรณีพิเศษจาก {profile.Prefix.Name}{profile.FirstName} {profile.LastName} ในวันที่ {entity.CheckDate.Date.ToThaiShortDate2()}";
var body_str = $"โปรดพิจารณาคำร้องขอลงเวลาในกรณีพิเศษจาก {profile.Prefix}{profile.FirstName} {profile.LastName} ในวันที่ {entity.CheckDate.Date.ToThaiShortDate2()}";
var subject = subject_str;
var body = body_str;