query avatar placement

This commit is contained in:
DESKTOP-2S5P7D1\Windows 10 2023-09-06 13:52:32 +07:00
parent 3d0fbdceb8
commit d0c157ce90
12 changed files with 157 additions and 6 deletions

View file

@ -156,6 +156,7 @@ namespace BMA.EHR.Placement.Service.Controllers
p.OrganizationPositionOld,
p.PositionDate,
PlacementAppointmentDocs = p.PlacementAppointmentDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
Avatar = p.Profile.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Profile.Avatar.Id,
})
.FirstOrDefaultAsync();
if (data == null)
@ -207,6 +208,7 @@ namespace BMA.EHR.Placement.Service.Controllers
data.PositionNumberOld,
data.OrganizationPositionOld,
data.PositionDate,
Avatar = data.Avatar == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(data.Avatar),
Docs = placementAppointmentDocs,
};