noti probation

This commit is contained in:
Kittapath 2023-09-08 15:23:41 +07:00
parent ffac27ef76
commit 3a334387bd
20 changed files with 33093 additions and 91 deletions

View file

@ -373,7 +373,7 @@ namespace BMA.EHR.Placement.Service.Controllers
}
}
await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"),
Guid.Parse("08db721d-add6-47b0-8a13-5f45d106e8d1"),
$"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำขอโอน",
$"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {req.Organization}"
);
@ -427,6 +427,8 @@ namespace BMA.EHR.Placement.Service.Controllers
public async Task<ActionResult<ResponseObject>> AdminConfirm(Guid id)
{
var uppdated = await _context.PlacementTransfers
.Include(x => x.Profile)
.ThenInclude(x => x.Prefix)
.FirstOrDefaultAsync(x => x.Id == id);
if (uppdated == null)
return Error(GlobalMessages.PlacementTransferNotFound, 404);
@ -435,6 +437,16 @@ namespace BMA.EHR.Placement.Service.Controllers
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
uppdated.LastUpdateUserId = UserId ?? "";
uppdated.LastUpdatedAt = DateTime.Now;
await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"),
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนได้รับการอนุมัติ",
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {uppdated.Organization}ได้รับการอนุมัติ"
);
await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ada0-4e64-89d3-7584a893d8b8"),
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอน",
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {uppdated.Organization}ได้รับการอนุมัติ"
);
await _context.SaveChangesAsync();
return Success();