Merge branch 'develop' of github.com:Frappet/hrms-api-backend into develop

This commit is contained in:
kittapath 2025-08-04 21:22:42 +07:00
commit 7af3618287

View file

@ -336,8 +336,14 @@ namespace BMA.EHR.Insignia.Service.Controllers
//}
if (role.Trim().ToLower() == "officer")
{
resend.Items = (await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type))
.Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList();
/* resend.Items = (await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type))
.Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList();*/
var items = await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type);
resend.Items = (items ?? new List<InsigniaRequestItem>())
.Where(x => x != null && !string.IsNullOrEmpty(x.ProfileType) && x.ProfileType.ToLower() == type.ToLower())
.ToList();
return Success(resend);
}
else
@ -2468,11 +2474,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
receiveDate = profile.DateReceive!.Value,
dateAnnounce = profile.Date!.Value,
insigniaId = profile.RequestInsignia!.Id,
issue = "",
issue = profile!.Issue ?? "",
note = "",
refCommandDate = null,
refCommandNo = "",
volume = "",
volume = profile!.VolumeNo ?? "",
};
await _userProfileRepository.PostProfileInsigniaAsync(profileInsigniaBody, AccessToken);
@ -2490,11 +2496,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
receiveDate = profile.DateReceive!.Value,
dateAnnounce = profile.Date!.Value,
insigniaId = profile.RequestInsignia!.Id,
issue = "",
issue = profile!.Issue ?? "",
note = "",
refCommandDate = null,
refCommandNo = "",
volume = "",
volume = profile!.VolumeNo ?? "",
};
await _userProfileRepository.PostProfileEmpInsigniaAsync(profileInsigniaBody, AccessToken);