This commit is contained in:
parent
37bd6cf6ee
commit
95513f0e10
3 changed files with 3 additions and 23 deletions
|
|
@ -31,7 +31,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
_httpContextAccessor = httpContextAccessor;
|
||||
_repositoryNoti = repositoryNoti;
|
||||
_configuration = configuration;
|
||||
URL = _configuration["MAIN_PAGE"];
|
||||
URL = _configuration["VITE_URL_MGT"];
|
||||
}
|
||||
|
||||
#region " Properties "
|
||||
|
|
@ -266,7 +266,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
if (approver.Seq != maxSeq)
|
||||
{
|
||||
rawData.Status = "PENDING";
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1);
|
||||
|
||||
|
|
@ -287,7 +286,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
// rawData.LeaveComment = reason;
|
||||
rawData.ApproveStep = "st3";
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
var firstCommander = rawData.Approvers
|
||||
|
|
@ -365,7 +363,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
Payload = $"{URL}/retirement/resign-employee-detail/{id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
rawData.Status = "PENDING";
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -376,7 +373,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
// rawData.LeaveComment = reason;
|
||||
rawData.ApproveStep = "st3";
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
var firstCommander = rawData.Approvers
|
||||
|
|
@ -452,8 +448,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -461,8 +455,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
// rawData.LeaveDirectorComment = reason;
|
||||
rawData.ApproveStep = "st4";
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
// Send Noti
|
||||
var noti = new Notification
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
_httpContextAccessor = httpContextAccessor;
|
||||
_repositoryNoti = repositoryNoti;
|
||||
_configuration = configuration;
|
||||
URL = _configuration["MAIN_PAGE"];
|
||||
URL = _configuration["VITE_URL_MGT"];
|
||||
}
|
||||
|
||||
#region " Properties "
|
||||
|
|
@ -175,8 +175,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
rawData.Status = "PENDING";
|
||||
rawData.ApproveStep = "st2";
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
// TODO: Send notification to 1st Commander
|
||||
var firstCommander = rawData.Approvers
|
||||
.Where(x => x.ApproveType!.ToUpper() == "COMMANDER")
|
||||
|
|
@ -266,7 +264,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
if (approver.Seq != maxSeq)
|
||||
{
|
||||
rawData.Status = "PENDING";
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1);
|
||||
|
||||
|
|
@ -287,8 +284,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
// rawData.LeaveComment = reason;
|
||||
rawData.ApproveStep = "st3";
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
var firstCommander = rawData.Approvers
|
||||
.Where(x => x.ApproveType!.ToUpper() == "APPROVER")
|
||||
|
|
@ -365,7 +360,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
Payload = $"{URL}/retirement/resign-detail/{id}",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
rawData.Status = "PENDING";
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -376,8 +370,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
// rawData.LeaveComment = reason;
|
||||
rawData.ApproveStep = "st3";
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
var firstCommander = rawData.Approvers
|
||||
.Where(x => x.ApproveType!.ToUpper() == "APPROVER")
|
||||
|
|
@ -452,8 +444,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
};
|
||||
_dbContext.Set<Notification>().Add(noti1);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -461,8 +451,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
// rawData.LeaveDirectorComment = reason;
|
||||
rawData.ApproveStep = "st4";
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
if (rawData.profileId != null)
|
||||
{
|
||||
// Send Noti
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
"BucketName": "bma-recruit"
|
||||
},
|
||||
"Protocol": "HTTPS",
|
||||
"MAIN_PAGE": "https://bma-ehr.frappet.synology.me",
|
||||
"VITE_URL_MGT": "https://bma-ehr.frappet.synology.me",
|
||||
"API": "https://bma-ehr.frappet.synology.me/api/v1",
|
||||
"APIV2": "https://bma-ehr.frappet.synology.me/api/v2",
|
||||
"API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue