From dfa87f98bb8849b7c3b8035c7db3a6ade6341dee Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Wed, 10 Jul 2024 21:37:03 +0700 Subject: [PATCH] optimize preview insignia recv --- .../Controllers/InsigniaRequestController.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs index b8e7c8fb..05a9ef09 100644 --- a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs @@ -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,