revert code task #1693
Some checks failed
release-dev / release-dev (push) Failing after 12s

This commit is contained in:
AdisakKanthawilang 2025-08-04 15:33:20 +07:00
parent 0c9ec3dd43
commit 14b15a9816

View file

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