optimize preview insignia recv

This commit is contained in:
Suphonchai Phoonsawat 2024-07-10 21:37:03 +07:00
parent 00186924fb
commit dfa87f98bb

View file

@ -2152,11 +2152,12 @@ namespace BMA.EHR.Insignia.Service.Controllers
new
{
profile.Id,
Prefix = _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix,
Position = _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Position,
_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).CitizenId,
_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).ProfileType,
FullName = $"{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix}{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).FirstName} {_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).LastName}",
Prefix = _profile.Prefix,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix,
Position = _profile.Position,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Position,
CitizenId = _profile.CitizenId,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).CitizenId,
ProfileType = _profile.ProfileType,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).ProfileType,
FullName = $"{_profile.Prefix}{_profile.FirstName} {_profile.LastName}",
//FullName = $"{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix}{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).FirstName} {_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).LastName}",
RequestInsignia = profile.RequestInsignia == null ? null : profile.RequestInsignia.Name,
RequestInsigniaId = profile.RequestInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : profile.RequestInsignia.Id,
RequestInsigniaShortName = profile.RequestInsignia == null ? null : profile.RequestInsignia.ShortName,