Merge branch 'develop' into adiDev
Some checks failed
release-dev / release-dev (push) Failing after 13s
Some checks failed
release-dev / release-dev (push) Failing after 13s
This commit is contained in:
commit
fdae099855
7 changed files with 177 additions and 57 deletions
|
|
@ -1,8 +1,6 @@
|
|||
using Amazon.S3.Model;
|
||||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Application.Messaging;
|
||||
using BMA.EHR.Application.Responses.Leaves;
|
||||
using BMA.EHR.Domain.Models.HR;
|
||||
using BMA.EHR.Domain.Models.Leave.Commons;
|
||||
using BMA.EHR.Domain.Models.Leave.Requests;
|
||||
using BMA.EHR.Domain.Models.Notifications;
|
||||
|
|
@ -10,8 +8,6 @@ using BMA.EHR.Domain.Shared;
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Nest;
|
||||
using System.Drawing;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http.Json;
|
||||
|
||||
|
|
@ -415,7 +411,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.Type.Id == leaveType.Id)
|
||||
//.Where(x => x.LeaveStartDate.Year == year)
|
||||
.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.Sum(x => x.LeaveTotal);
|
||||
|
||||
return data;
|
||||
|
|
@ -444,7 +440,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
//.Where(x => x.LeaveStartDate.Year == year)
|
||||
.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
//.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE")
|
||||
.ToListAsync();
|
||||
|
||||
|
|
@ -470,7 +466,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Include(x => x.Type)
|
||||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
//.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE")
|
||||
.OrderByDescending(x => x.LeaveStartDate.Date)
|
||||
.Select(x => x.LeaveStartDate.Date)
|
||||
|
|
@ -486,7 +482,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.LeaveStartDate.Date < beforeDate.Date)
|
||||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
//.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE")
|
||||
.OrderByDescending(x => x.LeaveStartDate.Date)
|
||||
.FirstOrDefaultAsync();
|
||||
|
|
@ -637,11 +633,11 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
throw new Exception("ไม่สามารถอัพเดตการยกเลิกรายการลาไปยังระบบทะเบียนประวัติ");
|
||||
//var _result = await _res.Content.ReadAsStringAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: remove วันลา
|
||||
|
||||
// Send Noti
|
||||
// Send Noti หาเจ้าของใบลา
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอยกเลิกใบลาของคุณได้รับการอนุมัติ",
|
||||
|
|
@ -650,6 +646,25 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
Payload = "",
|
||||
};
|
||||
_appDbContext.Set<Notification>().Add(noti);
|
||||
|
||||
var commanders = rawData.Approvers
|
||||
.Where(x => x.ApproveType!.ToUpper() == "COMMANDER")
|
||||
.OrderBy(x => x.Seq)
|
||||
.ToList();
|
||||
|
||||
foreach(var commander in commanders)
|
||||
{
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอยกเลิกใบลาของ {rawData.FirstName} {rawData.LastName} ได้รับการอนุมัติแล้ว",
|
||||
ReceiverUserId = commander.ProfileId,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
};
|
||||
_appDbContext.Set<Notification>().Add(noti1);
|
||||
}
|
||||
|
||||
|
||||
await _appDbContext.SaveChangesAsync();
|
||||
|
||||
|
||||
|
|
@ -712,6 +727,25 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
Payload = "",
|
||||
};
|
||||
_appDbContext.Set<Notification>().Add(noti);
|
||||
|
||||
var commanders = rawData.Approvers
|
||||
.Where(x => x.ApproveType!.ToUpper() == "COMMANDER")
|
||||
.OrderBy(x => x.Seq)
|
||||
.ToList();
|
||||
|
||||
foreach (var commander in commanders)
|
||||
{
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอยกเลิกใบลาของ {rawData.FirstName} {rawData.LastName} ไม่ได้รับการอนุมัติ \r\nเนืองจาก {Reason}",
|
||||
ReceiverUserId = commander.ProfileId,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
};
|
||||
_appDbContext.Set<Notification>().Add(noti1);
|
||||
}
|
||||
|
||||
|
||||
await _appDbContext.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
|
@ -1366,7 +1400,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
.Where(x => x.LeaveStartDate.Year == year)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.ToListAsync();
|
||||
|
||||
if (data.Count > 0)
|
||||
|
|
@ -1382,7 +1416,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.ToListAsync();
|
||||
|
||||
if (data.Count > 0)
|
||||
|
|
@ -1397,7 +1431,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Include(x => x.Type)
|
||||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.ToListAsync();
|
||||
|
||||
if (data.Count > 0)
|
||||
|
|
@ -1411,7 +1445,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => x.LeaveStatus == "APPROVE").ToListAsync();
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING").ToListAsync();
|
||||
|
||||
var res = (from d in data
|
||||
group d by new { d.KeycloakUserId, LeaveTypeId = d.Type.Id, LeaveTypeCode = d.Type.Code } into grp
|
||||
|
|
@ -1438,7 +1472,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => node == 4 ? x.Child4Id == Guid.Parse(nodeId) : (node == 3 ? x.Child3Id == Guid.Parse(nodeId) : (node == 2 ? x.Child2Id == Guid.Parse(nodeId) : (node == 1 ? x.Child1Id == Guid.Parse(nodeId) : (node == 0 ? x.RootId == Guid.Parse(nodeId) : (node == null ? true : true))))))
|
||||
.Where(x => x.LeaveStatus == "APPROVE").ToListAsync();
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING").ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1448,7 +1482,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => node == 4 ? x.Child4Id == Guid.Parse(nodeId) : (node == 3 ? x.Child3Id == Guid.Parse(nodeId) : (node == 2 ? x.Child2Id == Guid.Parse(nodeId) : (node == 1 ? x.Child1Id == Guid.Parse(nodeId) : (node == 0 ? x.RootId == Guid.Parse(nodeId) : (node == null ? true : true))))))
|
||||
.Where(x => node == 0 ? x.Child1Id == null : (node == 1 ? x.Child2Id == null : (node == 2 ? x.Child3Id == null : (node == 3 ? x.Child4Id == null : true))))
|
||||
.Where(x => x.LeaveStatus == "APPROVE").ToListAsync();
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING").ToListAsync();
|
||||
}
|
||||
|
||||
var res = (from d in data
|
||||
|
|
@ -1504,7 +1538,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => x.LeaveStatus == "APPROVE").ToListAsync();
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.ToListAsync();
|
||||
|
||||
var res = (from d in data
|
||||
group d by new { d.KeycloakUserId, LeaveTypeId = d.Type.Id, LeaveTypeCode = d.Type.Code } into grp
|
||||
|
|
@ -1527,7 +1562,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.ToListAsync();
|
||||
|
||||
if (data.Count > 0)
|
||||
|
|
@ -1543,7 +1578,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.ToListAsync();
|
||||
|
||||
return data.Count;
|
||||
|
|
@ -1628,7 +1663,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable().AsNoTracking()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||
.Where(x => x.LeaveStartDate.Date <= date.Date && x.LeaveEndDate >= date.Date)
|
||||
.FirstOrDefaultAsync();
|
||||
return data;
|
||||
|
|
|
|||
|
|
@ -170,6 +170,20 @@ namespace BMA.EHR.Application.Repositories
|
|||
else if (rawData.ApproveStep == "st3")
|
||||
{
|
||||
rawData.ApproveStep = "st4";
|
||||
// TODO: Send notification to 1st Approver
|
||||
var _firstCommander = rawData.Approvers
|
||||
.Where(x => x.ApproveType!.ToUpper() == "APPROVER")
|
||||
.OrderBy(x => x.Seq)
|
||||
.FirstOrDefault();
|
||||
// Send Notification
|
||||
var _noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = _firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(_noti1);
|
||||
}
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -573,6 +587,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
var data = await _dbContext.Set<RetirementResignEmployeeCancel>().AsQueryable()
|
||||
.Include(x => x.Approvers)
|
||||
.Include(x => x.RetirementResignEmployee)
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
return data;
|
||||
|
|
@ -599,6 +614,20 @@ namespace BMA.EHR.Application.Repositories
|
|||
else if (rawData.ApproveStep == "st3")
|
||||
{
|
||||
rawData.ApproveStep = "st4";
|
||||
// TODO: Send notification to 1st Approver
|
||||
var _firstCommander = rawData.Approvers
|
||||
.Where(x => x.ApproveType!.ToUpper() == "APPROVER")
|
||||
.OrderBy(x => x.Seq)
|
||||
.FirstOrDefault();
|
||||
// Send Notification
|
||||
var _noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = _firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{rawData.RetirementResignEmployee.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(_noti1);
|
||||
}
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -611,10 +640,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Notification
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{rawData.RetirementResignEmployee.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -699,10 +728,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{rawData.RetirementResignEmployee.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -726,10 +755,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Notification
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{rawData.RetirementResignEmployee.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -788,10 +817,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{rawData.RetirementResignEmployee.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
|
||||
|
|
@ -816,10 +845,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Notification
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-employee-detail/{rawData.RetirementResignEmployee.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -876,7 +905,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
@ -900,7 +929,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณได้รับการอนุมัติ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณได้รับการอนุมัติ",
|
||||
ReceiverUserId = Guid.Parse(rawData.profileId),
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
@ -960,7 +989,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
@ -984,7 +1013,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}",
|
||||
Body = $"การขอยกเลิกลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}",
|
||||
ReceiverUserId = Guid.Parse(rawData.profileId),
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
|
|||
|
|
@ -547,10 +547,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Notification
|
||||
var _noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = _firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-detail/{rawData.RetirementResign.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(_noti1);
|
||||
}
|
||||
|
|
@ -563,10 +563,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Notification
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-detail/{rawData.RetirementResign.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -623,10 +623,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-detail/{rawData.RetirementResign.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -647,10 +647,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Notification
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-detail/{rawData.RetirementResign.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
}
|
||||
|
|
@ -710,10 +710,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-detail/{rawData.RetirementResign.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
|
||||
|
|
@ -739,10 +739,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Notification
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = firstCommander!.ProfileId,
|
||||
Type = "",
|
||||
Payload = $"{URL}/retirement/resign-detail/{id}",
|
||||
Payload = $"{URL}/retirement/resign-detail/{rawData.RetirementResign.Id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
}
|
||||
|
|
@ -800,7 +800,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
@ -826,7 +826,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณได้รับการอนุมัติ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณได้รับการอนุมัติ",
|
||||
ReceiverUserId = Guid.Parse(rawData.profileId),
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
@ -887,7 +887,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti1 = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ",
|
||||
ReceiverUserId = nextApprover!.ProfileId,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
@ -910,7 +910,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
Body = $"การขอลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}",
|
||||
Body = $"การขอยกเลิกลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}",
|
||||
ReceiverUserId = Guid.Parse(rawData.profileId),
|
||||
Type = "",
|
||||
Payload = "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue