Change Selection Field

This commit is contained in:
Suphonchai Phoonsawat 2024-10-16 09:51:23 +07:00
parent 2a3d9d004f
commit 3bac0e2e88

View file

@ -1447,7 +1447,13 @@ namespace BMA.EHR.Insignia.Service.Controllers
.Select(x => new
{
Id = x.Id,
Profile = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken),
x.Prefix,
x.FirstName,
x.LastName,
x.Position,
x.CitizenId,
x.ProfileType,
//Profile = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken),
OcId = Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3"), // TODO: ต้องมาแก้ไข
RequestInsignia = x.RequestInsignia.Name,
RequestInsigniaId = x.RequestInsignia.Id,
@ -1480,12 +1486,15 @@ namespace BMA.EHR.Insignia.Service.Controllers
.Select(x => new
{
Id = x.Id,
Prefix = x.Profile == null ? "" : x.Profile.Prefix,
Position = x.Profile == null ? "" : x.Profile.Position,
ProfileType = x.Profile == null ? "" : x.Profile.ProfileType,
//Prefix = x.Profile == null ? "" : x.Profile.Prefix,
//Position = x.Profile == null ? "" : x.Profile.Position,
//ProfileType = x.Profile == null ? "" : x.Profile.ProfileType,
Prefix = x.Prefix ?? "",
Position = x.Position ?? "",
ProfileType = x.ProfileType ?? "",
x.OcId,
CitizenId = x.Profile == null ? "" : x.Profile.CitizenId,
FullName = x.Profile == null ? "" : $"{x.Profile.Prefix}{x.Profile.FirstName} {x.Profile.LastName}",
CitizenId = x.CitizenId ?? "",
FullName = $"{x.Prefix ?? ""}{x.FirstName ?? ""} {x.LastName ?? ""}".Trim(),
RequestInsignia = x.RequestInsignia,
RequestInsigniaId = x.RequestInsigniaId,
RequestInsigniaShortName = x.RequestInsigniaShortName,
@ -1628,7 +1637,13 @@ namespace BMA.EHR.Insignia.Service.Controllers
.Select(x => new
{
Id = x.Id,
Profile = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken),
//Profile = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken),
x.CitizenId,
x.Prefix,
x.FirstName,
x.LastName,
x.ProfileType,
x.Position,
OcId = Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3"), // TODO: ต้องมาแก้ไข
RequestInsignia = x.RequestInsignia.Name,
RequestInsigniaId = x.RequestInsignia.Id,
@ -1661,12 +1676,12 @@ namespace BMA.EHR.Insignia.Service.Controllers
.Select(x => new
{
Id = x.Id,
Prefix = x.Profile == null ? "" : x.Profile.Prefix,
Position = x.Profile == null ? "" : x.Profile.Position,
ProfileType = x.Profile == null ? "" : x.Profile.ProfileType,
Prefix = x.Prefix ?? "",
Position = x.Position ?? "",
ProfileType = x.ProfileType ?? "",
x.OcId,
CitizenId = x.Profile == null ? "" : x.Profile.CitizenId,
FullName = x.Profile == null ? "" : $"{x.Profile.Prefix}{x.Profile.FirstName} {x.Profile.LastName}",
CitizenId = x.CitizenId ?? "",
FullName = $"{x.Prefix ?? ""}{x.FirstName ?? ""} {x.LastName ?? ""}".Trim(),
RequestInsignia = x.RequestInsignia,
RequestInsigniaId = x.RequestInsigniaId,
RequestInsigniaShortName = x.RequestInsigniaShortName,