add parent
This commit is contained in:
parent
ddf899ce5d
commit
9e8fe1b30a
22 changed files with 289 additions and 122 deletions
22
.github/workflows/discord-notify.yml
vendored
Normal file
22
.github/workflows/discord-notify.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
name: Discord PR Notify
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
discord:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Send Discord
|
||||||
|
run: |
|
||||||
|
curl -X POST "${{ secrets.DISCORD_WEBHOOK_PULLREQUEST }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"embeds": [{
|
||||||
|
"title": "🔔 **Service:** ${{ github.repository }}",
|
||||||
|
"description": "👤 **Author:** ${{ github.event.pull_request.user.login }}\n🌿 **Branch:** ${{ github.event.pull_request.head.ref }} → ${{ github.event.pull_request.base.ref }}\n📦 **Pull Request:** [#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})",
|
||||||
|
"color": 5814783,
|
||||||
|
"timestamp": "${{ github.event.pull_request.created_at }}"
|
||||||
|
}]
|
||||||
|
}'
|
||||||
|
|
@ -358,6 +358,11 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
.Where(x => x.RootDnaId == Guid.Parse(nodeId!));
|
.Where(x => x.RootDnaId == Guid.Parse(nodeId!));
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
rawData = rawData
|
||||||
|
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!));
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
|
|
@ -479,7 +484,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<LeaveRequest?> GetLastLeaveRequestByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId,DateTime beforeDate)
|
public async Task<LeaveRequest?> GetLastLeaveRequestByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId, DateTime beforeDate)
|
||||||
{
|
{
|
||||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable().AsNoTracking()
|
var data = await _dbContext.Set<LeaveRequest>().AsQueryable().AsNoTracking()
|
||||||
.Include(x => x.Type)
|
.Include(x => x.Type)
|
||||||
|
|
@ -525,6 +530,11 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
.Where(x => x.RootDnaId == Guid.Parse(nodeId!));
|
.Where(x => x.RootDnaId == Guid.Parse(nodeId!));
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
rawData = rawData
|
||||||
|
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!));
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
|
|
@ -656,7 +666,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
.OrderBy(x => x.Seq)
|
.OrderBy(x => x.Seq)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
foreach(var commander in commanders)
|
foreach (var commander in commanders)
|
||||||
{
|
{
|
||||||
var noti1 = new Notification
|
var noti1 = new Notification
|
||||||
{
|
{
|
||||||
|
|
@ -1247,7 +1257,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
.Include(x => x.Type)
|
.Include(x => x.Type)
|
||||||
//.Where(x => x.LeaveStartDate.Year == year)
|
//.Where(x => x.LeaveStartDate.Year == year)
|
||||||
.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate)
|
.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate)
|
||||||
//.Where(x => x.LeaveStatus == "NEW") // fix issue : #729
|
//.Where(x => x.LeaveStatus == "NEW") // fix issue : #729
|
||||||
.Where(x => x.LeaveStatus != "DRAFT") // fix issue : #1524
|
.Where(x => x.LeaveStatus != "DRAFT") // fix issue : #1524
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
|
@ -1468,38 +1478,14 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
|
|
||||||
public async Task<List<GetSumApproveLeaveByRootDto>> GetSumApproveLeaveByRootAndRange(DateTime startDate, DateTime endDate, string type, string role, string? nodeId, int? node, string? nodeIdByReq, int? nodeByReq)
|
public async Task<List<GetSumApproveLeaveByRootDto>> GetSumApproveLeaveByRootAndRange(DateTime startDate, DateTime endDate, string type, string role, string? nodeId, int? node, string? nodeIdByReq, int? nodeByReq)
|
||||||
{
|
{
|
||||||
// var _nodeId = Guid.Parse(nodeId);
|
|
||||||
var data = new List<LeaveRequest>();
|
var data = new List<LeaveRequest>();
|
||||||
//if (role == "OWNER" || role == "CHILD")
|
|
||||||
//{
|
|
||||||
// data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
|
||||||
// .Include(x => x.Type)
|
|
||||||
// .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" || x.LeaveStatus == "DELETING").ToListAsync();
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
|
||||||
// .Include(x => x.Type)
|
|
||||||
// .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 => 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" || x.LeaveStatus == "DELETING").ToListAsync();
|
|
||||||
//}
|
|
||||||
data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||||
.Include(x => x.Type)
|
.Include(x => x.Type)
|
||||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING").ToListAsync();
|
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING").ToListAsync();
|
||||||
// กรองตามสิทธิ์ admin ก่อน
|
// กรองตามสิทธิ์ admin ก่อน
|
||||||
if (role == "OWNER")
|
if (role == "CHILD")
|
||||||
{
|
|
||||||
node = null;
|
|
||||||
}
|
|
||||||
if (role == "OWNER" || role == "CHILD")
|
|
||||||
{
|
{
|
||||||
data = data.Where(x =>
|
data = data.Where(x =>
|
||||||
node == 4 ? x.Child4DnaId == Guid.Parse(nodeId) :
|
node == 4 ? x.Child4DnaId == Guid.Parse(nodeId) :
|
||||||
|
|
@ -1514,6 +1500,10 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
{
|
{
|
||||||
data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId)).ToList();
|
data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId)).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data = data.Where(x => x.Child1DnaId == Guid.Parse(nodeId)).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data = data.Where(x =>
|
data = data.Where(x =>
|
||||||
|
|
@ -1525,7 +1515,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
).ToList();
|
).ToList();
|
||||||
}
|
}
|
||||||
// กรองตามที่ fe ส่งมา
|
// กรองตามที่ fe ส่งมา
|
||||||
if (role == "ROOT" || role == "OWNER" || role == "CHILD")
|
if (role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT")
|
||||||
{
|
{
|
||||||
data = data
|
data = data
|
||||||
.Where(x => nodeByReq == 4 ? x.Child4Id == Guid.Parse(nodeIdByReq) : nodeByReq == 3 ? x.Child3Id == Guid.Parse(nodeIdByReq) : nodeByReq == 2 ? x.Child2Id == Guid.Parse(nodeIdByReq) : nodeByReq == 1 ? x.Child1Id == Guid.Parse(nodeIdByReq) : nodeByReq == 0 ? x.RootId == Guid.Parse(nodeIdByReq) : true)
|
.Where(x => nodeByReq == 4 ? x.Child4Id == Guid.Parse(nodeIdByReq) : nodeByReq == 3 ? x.Child3Id == Guid.Parse(nodeIdByReq) : nodeByReq == 2 ? x.Child2Id == Guid.Parse(nodeIdByReq) : nodeByReq == 1 ? x.Child1Id == Guid.Parse(nodeIdByReq) : nodeByReq == 0 ? x.RootId == Guid.Parse(nodeIdByReq) : true)
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,11 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
||||||
data = data
|
data = data
|
||||||
.Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList();
|
.Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data = data
|
||||||
|
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!)).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data = data
|
data = data
|
||||||
|
|
|
||||||
|
|
@ -141,37 +141,13 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
||||||
|
|
||||||
public async Task<List<ProcessUserTimeStamp>> GetTimestampByDateLateAsync(string type, string role, string nodeId, int? node, string nodeIdByReq, int? nodeByReq, DateTime StartDate, DateTime EndDate)
|
public async Task<List<ProcessUserTimeStamp>> GetTimestampByDateLateAsync(string type, string role, string nodeId, int? node, string nodeIdByReq, int? nodeByReq, DateTime StartDate, DateTime EndDate)
|
||||||
{
|
{
|
||||||
var _nodeId = role != "OWNER" ? Guid.Parse(nodeId) : Guid.Parse("00000000-0000-0000-0000-000000000000");
|
|
||||||
var data = new List<ProcessUserTimeStamp>();
|
var data = new List<ProcessUserTimeStamp>();
|
||||||
//if (role == "OWNER" || role == "CHILD")
|
|
||||||
//{
|
|
||||||
// data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
|
||||||
// .Where(x => x.CheckInStatus == "LATE")
|
|
||||||
// .Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
|
||||||
// .Where(x => x.ProfileType == type.Trim().ToUpper())
|
|
||||||
// .Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
|
||||||
// .ToListAsync();
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
|
||||||
// .Where(x => x.CheckInStatus == "LATE")
|
|
||||||
// .Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
|
||||||
// .Where(x => x.ProfileType == type.Trim().ToUpper())
|
|
||||||
// .Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
|
||||||
// .Where(x => node == 0 ? x.Child1Id == null : (node == 1 ? x.Child2Id == null : (node == 2 ? x.Child3Id == null : (node == 3 ? x.Child4Id == null : true))))
|
|
||||||
// .ToListAsync();
|
|
||||||
//}
|
|
||||||
data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
||||||
.Where(x => x.CheckInStatus == "LATE")
|
.Where(x => x.CheckInStatus == "LATE")
|
||||||
.Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
.Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
||||||
.Where(x => x.ProfileType == type.Trim().ToUpper()).ToListAsync();
|
.Where(x => x.ProfileType == type.Trim().ToUpper()).ToListAsync();
|
||||||
// กรองตามสิทธิ์ admin ก่อน
|
// กรองตามสิทธิ์ admin ก่อน
|
||||||
if (role == "OWNER")
|
if (role == "CHILD")
|
||||||
{
|
|
||||||
node = null;
|
|
||||||
}
|
|
||||||
if (role == "OWNER" || role == "CHILD")
|
|
||||||
{
|
{
|
||||||
data = data.Where(x =>
|
data = data.Where(x =>
|
||||||
node == 4 ? x.Child4DnaId == Guid.Parse(nodeId) :
|
node == 4 ? x.Child4DnaId == Guid.Parse(nodeId) :
|
||||||
|
|
@ -186,6 +162,10 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
||||||
{
|
{
|
||||||
data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId)).ToList();
|
data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId)).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data = data.Where(x => x.Child1DnaId == Guid.Parse(nodeId)).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data = data.Where(x =>
|
data = data.Where(x =>
|
||||||
|
|
@ -197,7 +177,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
||||||
).ToList();
|
).ToList();
|
||||||
}
|
}
|
||||||
// กรองตามที่ fe ส่งมา
|
// กรองตามที่ fe ส่งมา
|
||||||
if (role == "ROOT" || role == "OWNER" || role == "CHILD")
|
if (role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT")
|
||||||
{
|
{
|
||||||
data = data.Where(x =>
|
data = data.Where(x =>
|
||||||
nodeByReq == 4 ? x.Child4Id == Guid.Parse(nodeIdByReq) :
|
nodeByReq == 4 ? x.Child4Id == Guid.Parse(nodeIdByReq) :
|
||||||
|
|
@ -288,6 +268,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
||||||
.Where(x => x.RootDnaId == Guid.Parse(nodeId!))
|
.Where(x => x.RootDnaId == Guid.Parse(nodeId!))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data = data
|
||||||
|
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!))
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data = data
|
data = data
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
||||||
.Where(x => x.RootDnaId == Guid.Parse(nodeId!))
|
.Where(x => x.RootDnaId == Guid.Parse(nodeId!))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data = data
|
||||||
|
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!))
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data = data
|
data = data
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
||||||
CreatedAt = x.CreatedAt
|
CreatedAt = x.CreatedAt
|
||||||
});
|
});
|
||||||
if (!string.IsNullOrEmpty(sortBy))
|
if (!string.IsNullOrEmpty(sortBy))
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
if (sortBy == "title")
|
if (sortBy == "title")
|
||||||
query = descending ? query.OrderByDescending(x => x.Title) : query.OrderBy(x => x.Title);
|
query = descending ? query.OrderByDescending(x => x.Title) : query.OrderBy(x => x.Title);
|
||||||
|
|
@ -172,9 +172,9 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
query = query.OrderByDescending(x => x.CreatedAt);
|
query = query.OrderByDescending(x => x.CreatedAt);
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = query
|
var data = query
|
||||||
.Skip((page - 1) * pageSize)
|
.Skip((page - 1) * pageSize)
|
||||||
|
|
@ -776,6 +776,10 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var data_search = (from x in _context.DisciplineComplaint_Appeals
|
var data_search = (from x in _context.DisciplineComplaint_Appeals
|
||||||
|
|
@ -807,6 +811,11 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
||||||
data_search = data_search
|
data_search = data_search
|
||||||
.Where(x => x.rootDnaId == nodeId).ToList();
|
.Where(x => x.rootDnaId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data_search = data_search
|
||||||
|
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data_search = data_search
|
data_search = data_search
|
||||||
|
|
|
||||||
|
|
@ -74,20 +74,6 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
||||||
{
|
{
|
||||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||||
}
|
}
|
||||||
//var profile = new List<GetProfileByKeycloakIdRootDto>();
|
|
||||||
//if (type.Trim().ToUpper() == "OFFICER")
|
|
||||||
//{
|
|
||||||
// profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (req.posLevel != null || req.posType != null)
|
|
||||||
//{
|
|
||||||
// profile = profile.Where(x => x.PositionType == req.posType || x.PositionLevel == req.posLevel).ToList();
|
|
||||||
//}
|
|
||||||
|
|
||||||
var data_search1 = await _context.DisciplineComplaints
|
var data_search1 = await _context.DisciplineComplaints
|
||||||
.Include(x => x.DisciplineComplaint_Profiles)
|
.Include(x => x.DisciplineComplaint_Profiles)
|
||||||
|
|
|
||||||
|
|
@ -627,6 +627,10 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
|
|
||||||
|
|
@ -703,6 +707,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
.Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList();
|
.Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
rawData = rawData
|
||||||
|
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!)).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
|
|
@ -903,6 +912,10 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
|
|
||||||
|
|
@ -977,6 +990,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
.Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList();
|
.Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
rawData = rawData
|
||||||
|
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!)).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
rawData = rawData
|
rawData = rawData
|
||||||
|
|
|
||||||
|
|
@ -1297,6 +1297,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
//var data = (await _userTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate))
|
//var data = (await _userTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate))
|
||||||
var data = (await _userTimeStampRepository.GetTimeStampHistoryForAdminRoleAsync(startDate, endDate, role, nodeId, profileAdmin?.Node))
|
var data = (await _userTimeStampRepository.GetTimeStampHistoryForAdminRoleAsync(startDate, endDate, role, nodeId, profileAdmin?.Node))
|
||||||
|
|
@ -1535,6 +1539,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
//var resultData = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate);
|
//var resultData = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate);
|
||||||
var resultData = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminRoleAsync(startDate, endDate, role, nodeId, profileAdmin?.Node);
|
var resultData = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminRoleAsync(startDate, endDate, role, nodeId, profileAdmin?.Node);
|
||||||
var data = new List<CheckInProcessHistoryForAdminDto>();
|
var data = new List<CheckInProcessHistoryForAdminDto>();
|
||||||
|
|
@ -2205,6 +2213,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
//var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequests(year, month);
|
//var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequests(year, month);
|
||||||
var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole(year, month, role, nodeId, profileAdmin?.Node);
|
var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole(year, month, role, nodeId, profileAdmin?.Node);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -972,29 +972,27 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
if (type.Trim().ToUpper() == "OFFICER")
|
if (type.Trim().ToUpper() == "OFFICER")
|
||||||
{
|
{
|
||||||
//profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
|
|
||||||
//profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllOfficerAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
|
|
||||||
profile = await _userProfileRepository.GetProfileByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
profile = await _userProfileRepository.GetProfileByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployeeAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
|
|
||||||
//profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllEmployeeAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
|
|
||||||
profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
||||||
}
|
}
|
||||||
// get leave day
|
// get leave day
|
||||||
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate);
|
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate);
|
||||||
var leaveTypes = await _leaveTypeRepository.GetAllAsync();
|
var leaveTypes = await _leaveTypeRepository.GetAllAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var count = 1;
|
var count = 1;
|
||||||
var employees = new List<dynamic>();
|
var employees = new List<dynamic>();
|
||||||
// กรองตามที่ fe ส่งมา
|
// กรองตามที่ fe ส่งมา
|
||||||
if (role == "CHILD" && req.node > profileAdmin?.Node)
|
if ((role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT") && req.node > profileAdmin?.Node)
|
||||||
{
|
{
|
||||||
profile = profile
|
profile = profile
|
||||||
.Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true)
|
.Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true)
|
||||||
|
|
@ -1595,16 +1593,17 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
if (type.Trim().ToUpper() == "OFFICER")
|
if (type.Trim().ToUpper() == "OFFICER")
|
||||||
{
|
{
|
||||||
//profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
|
||||||
//profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
|
||||||
profile = await _userProfileRepository.GetProfileByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
profile = await _userProfileRepository.GetProfileByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
|
||||||
//profile = await _userProfileRepository.GketProfileWithNoneValidateKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
|
|
||||||
profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
||||||
}
|
}
|
||||||
var date = req.StartDate.Date;
|
var date = req.StartDate.Date;
|
||||||
|
|
@ -1668,7 +1667,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
var workTotal = 0;
|
var workTotal = 0;
|
||||||
var seminarTotal = 0;
|
var seminarTotal = 0;
|
||||||
// กรองตามที่ fe ส่งมา
|
// กรองตามที่ fe ส่งมา
|
||||||
if (role == "CHILD" && req.node > profileAdmin?.Node)
|
if ((role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT") && req.node > profileAdmin?.Node)
|
||||||
{
|
{
|
||||||
profile = profile
|
profile = profile
|
||||||
.Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true)
|
.Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true)
|
||||||
|
|
@ -1924,6 +1923,11 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
if (type.Trim().ToUpper() == "OFFICER")
|
if (type.Trim().ToUpper() == "OFFICER")
|
||||||
{
|
{
|
||||||
profile = await _userProfileRepository.GetProfileByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
profile = await _userProfileRepository.GetProfileByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
||||||
|
|
@ -1933,7 +1937,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId);
|
||||||
}
|
}
|
||||||
// Child กรองตามที่ fe ส่งมาอีกชั้น
|
// Child กรองตามที่ fe ส่งมาอีกชั้น
|
||||||
if (role == "CHILD" && req.node > profileAdmin?.Node)
|
if ((role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT") && req.node > profileAdmin?.Node)
|
||||||
{
|
{
|
||||||
profile = profile
|
profile = profile
|
||||||
.Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true)
|
.Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true)
|
||||||
|
|
@ -2315,7 +2319,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
//var userTimeStamps = await _processUserTimeStampRepository.GetTimestampByDateLateAsync(type.Trim().ToUpper(), jsonData["result"]?.ToString(), req.nodeId, req.node, req.StartDate, req.EndDate);
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
var userTimeStamps = await _processUserTimeStampRepository.GetTimestampByDateLateAsync(type.Trim().ToUpper(), role, nodeId, profileAdmin.Node, req.nodeId, req.node, req.StartDate, req.EndDate);
|
var userTimeStamps = await _processUserTimeStampRepository.GetTimestampByDateLateAsync(type.Trim().ToUpper(), role, nodeId, profileAdmin.Node, req.nodeId, req.node, req.StartDate, req.EndDate);
|
||||||
foreach (var p in userTimeStamps)
|
foreach (var p in userTimeStamps)
|
||||||
{
|
{
|
||||||
|
|
@ -2424,6 +2431,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByRootAndRange(req.StartDate, req.EndDate, type, jsonData["result"]?.ToString(), nodeId, profileAdmin?.Node, req.nodeId, req.node);
|
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByRootAndRange(req.StartDate, req.EndDate, type, jsonData["result"]?.ToString(), nodeId, profileAdmin?.Node, req.nodeId, req.node);
|
||||||
var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}";
|
var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}";
|
||||||
var result = new
|
var result = new
|
||||||
|
|
|
||||||
|
|
@ -1007,8 +1007,8 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
var sumApproveLeave = await _leaveRequestRepository.GetSumApproveLeaveByTypeForUserAsync(userId, req.Type, req.StartLeaveDate.Year);
|
var sumApproveLeave = await _leaveRequestRepository.GetSumApproveLeaveByTypeForUserAsync(userId, req.Type, req.StartLeaveDate.Year);
|
||||||
|
|
||||||
// อ่านค่าจากตาราง beginning ทั้ง limit และ usage
|
// อ่านค่าจากตาราง beginning ทั้ง limit และ usage
|
||||||
var fiscalYear = req.StartLeaveDate.Year;
|
var fiscalYear = req.StartLeaveDate.Year;
|
||||||
if(req.StartLeaveDate.Date >= new DateTime(DateTime.Now.Year,10,1) && req.EndLeaveDate.Date <= new DateTime(DateTime.Now.Year,12,31))
|
if (req.StartLeaveDate.Date >= new DateTime(DateTime.Now.Year, 10, 1) && req.EndLeaveDate.Date <= new DateTime(DateTime.Now.Year, 12, 31))
|
||||||
fiscalYear = req.StartLeaveDate.Year + 1;
|
fiscalYear = req.StartLeaveDate.Year + 1;
|
||||||
|
|
||||||
var sumLeaveDay = await _leaveBeginningRepository.GetByYearAndTypeIdForUserAsync(fiscalYear, req.Type, userId);
|
var sumLeaveDay = await _leaveBeginningRepository.GetByYearAndTypeIdForUserAsync(fiscalYear, req.Type, userId);
|
||||||
|
|
@ -1661,28 +1661,6 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
//// เพิ่มเติมการดึงคนตามสิทธิ์แบบที่ bright ทำ #1462
|
|
||||||
//var profileList = new List<GetProfileByKeycloakIdRootDto>();
|
|
||||||
//if (req.ProfileType.Trim().ToUpper() == "OFFICER")
|
|
||||||
//{
|
|
||||||
|
|
||||||
// profileList = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllOfficerAndRevision(AccessToken, req.Node, req.NodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.RevisionId);
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
|
|
||||||
// profileList = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllEmployeeAndRevision(AccessToken, req.Node, req.NodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.RevisionId);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var keycloakList = new List<Guid>();
|
|
||||||
//if(profileList != null)
|
|
||||||
//{
|
|
||||||
// keycloakList = profileList.Where(x => x.Keycloak != null).Select(x => x.Keycloak!.Value).ToList();
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var rawData = await _leaveRequestRepository.GetLeaveRequestForAdminWithAuthAsync(req.Year, req.Type, req.Status, req.StartDate, req.EndDate, keycloakList);
|
|
||||||
//var rawData = await _leaveRequestRepository.GetLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, req.StartDate, req.EndDate);
|
|
||||||
|
|
||||||
string role = jsonData["result"]?.ToString();
|
string role = jsonData["result"]?.ToString();
|
||||||
var nodeId = string.Empty;
|
var nodeId = string.Empty;
|
||||||
var profileAdmin = new GetUserOCAllDto();
|
var profileAdmin = new GetUserOCAllDto();
|
||||||
|
|
@ -1705,6 +1683,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var rawData = await _leaveRequestRepository.GetListLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, req.StartDate, req.EndDate, role, nodeId, profileAdmin?.Node);
|
var rawData = await _leaveRequestRepository.GetListLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, req.StartDate, req.EndDate, role, nodeId, profileAdmin?.Node);
|
||||||
|
|
||||||
|
|
@ -1890,6 +1872,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var rawData =
|
var rawData =
|
||||||
await _leaveRequestRepository.GetCancelLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, role, nodeId, profileAdmin?.Node);
|
await _leaveRequestRepository.GetCancelLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, role, nodeId, profileAdmin?.Node);
|
||||||
|
|
@ -2599,7 +2585,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
var leaveTypes = await _leaveTypeRepository.GetAllAsync();
|
var leaveTypes = await _leaveTypeRepository.GetAllAsync();
|
||||||
var thisYear = DateTime.Now.Year;
|
var thisYear = DateTime.Now.Year;
|
||||||
var toDay = DateTime.Now.Date;
|
var toDay = DateTime.Now.Date;
|
||||||
if(toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31))
|
if (toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31))
|
||||||
thisYear = thisYear + 1;
|
thisYear = thisYear + 1;
|
||||||
|
|
||||||
var sendList = await _leaveRequestRepository.GetSumSendLeaveAsync(thisYear);
|
var sendList = await _leaveRequestRepository.GetSumSendLeaveAsync(thisYear);
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var placementAppointments = await _context.PlacementAppointments.AsQueryable()
|
var placementAppointments = await _context.PlacementAppointments.AsQueryable()
|
||||||
|
|
@ -221,6 +225,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
placementAppointments = placementAppointments
|
placementAppointments = placementAppointments
|
||||||
.Where(x => x.rootDnaId == nodeId).ToList();
|
.Where(x => x.rootDnaId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
placementAppointments = placementAppointments
|
||||||
|
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
placementAppointments = placementAppointments
|
placementAppointments = placementAppointments
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var placementAppointments = await _context.PlacementAppointments.AsQueryable()
|
var placementAppointments = await _context.PlacementAppointments.AsQueryable()
|
||||||
|
|
@ -215,6 +219,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
placementAppointments = placementAppointments
|
placementAppointments = placementAppointments
|
||||||
.Where(x => x.rootDnaId == nodeId).ToList();
|
.Where(x => x.rootDnaId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
placementAppointments = placementAppointments
|
||||||
|
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
placementAppointments = placementAppointments
|
placementAppointments = placementAppointments
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var placementOfficers = await _context.PlacementOfficers.AsQueryable()
|
var placementOfficers = await _context.PlacementOfficers.AsQueryable()
|
||||||
|
|
@ -176,6 +180,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
placementOfficers = placementOfficers
|
placementOfficers = placementOfficers
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
placementOfficers = placementOfficers
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
placementOfficers = placementOfficers
|
placementOfficers = placementOfficers
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var placementReceives = await _context.PlacementReceives.AsQueryable()
|
var placementReceives = await _context.PlacementReceives.AsQueryable()
|
||||||
|
|
@ -214,6 +218,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
placementReceives = placementReceives
|
placementReceives = placementReceives
|
||||||
.Where(x => (x.rootDnaId == nodeId) || (x.CreatedUserId == UserId)).ToList();
|
.Where(x => (x.rootDnaId == nodeId) || (x.CreatedUserId == UserId)).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
placementReceives = placementReceives
|
||||||
|
.Where(x => (x.child1DnaId == nodeId) || (x.CreatedUserId == UserId)).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
placementReceives = placementReceives
|
placementReceives = placementReceives
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var placementRepatriations = await _context.PlacementRepatriations.AsQueryable()
|
var placementRepatriations = await _context.PlacementRepatriations.AsQueryable()
|
||||||
|
|
@ -181,6 +185,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
placementRepatriations = placementRepatriations
|
placementRepatriations = placementRepatriations
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
placementRepatriations = placementRepatriations
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
placementRepatriations = placementRepatriations
|
placementRepatriations = placementRepatriations
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var placementTransfers = await _context.PlacementTransfers.AsQueryable()
|
var placementTransfers = await _context.PlacementTransfers.AsQueryable()
|
||||||
|
|
@ -267,6 +271,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
placementTransfers = placementTransfers
|
placementTransfers = placementTransfers
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
placementTransfers = placementTransfers
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
placementTransfers = placementTransfers
|
placementTransfers = placementTransfers
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var retirementDeceaseds = await _context.RetirementDeceaseds.AsQueryable()
|
var retirementDeceaseds = await _context.RetirementDeceaseds.AsQueryable()
|
||||||
|
|
@ -160,6 +164,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
retirementDeceaseds = retirementDeceaseds
|
retirementDeceaseds = retirementDeceaseds
|
||||||
.Where(x => x.rootDnaId == nodeId).ToList();
|
.Where(x => x.rootDnaId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
retirementDeceaseds = retirementDeceaseds
|
||||||
|
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
retirementDeceaseds = retirementDeceaseds
|
retirementDeceaseds = retirementDeceaseds
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var retirementOthers = await _context.RetirementOthers.AsQueryable()
|
var retirementOthers = await _context.RetirementOthers.AsQueryable()
|
||||||
|
|
@ -210,6 +214,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
retirementOthers = retirementOthers
|
retirementOthers = retirementOthers
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
retirementOthers = retirementOthers
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
retirementOthers = retirementOthers
|
retirementOthers = retirementOthers
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var retirementOuts = await _context.RetirementOuts.AsQueryable()
|
var retirementOuts = await _context.RetirementOuts.AsQueryable()
|
||||||
|
|
@ -191,6 +195,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
retirementOuts = retirementOuts
|
retirementOuts = retirementOuts
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
retirementOuts = retirementOuts
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
retirementOuts = retirementOuts
|
retirementOuts = retirementOuts
|
||||||
|
|
|
||||||
|
|
@ -261,6 +261,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var retirementResigns = await _context.RetirementResigns.AsQueryable()
|
var retirementResigns = await _context.RetirementResigns.AsQueryable()
|
||||||
|
|
@ -317,6 +321,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
retirementResigns = retirementResigns
|
retirementResigns = retirementResigns
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
retirementResigns = retirementResigns
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
retirementResigns = retirementResigns
|
retirementResigns = retirementResigns
|
||||||
|
|
@ -365,6 +374,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var retirementResigns = await _context.RetirementResignCancels.AsQueryable()
|
var retirementResigns = await _context.RetirementResignCancels.AsQueryable()
|
||||||
|
|
@ -420,6 +433,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
retirementResigns = retirementResigns
|
retirementResigns = retirementResigns
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
retirementResigns = retirementResigns
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
retirementResigns = retirementResigns
|
retirementResigns = retirementResigns
|
||||||
|
|
@ -2131,6 +2149,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var data = await _context.RetirementQuestions.AsQueryable()
|
var data = await _context.RetirementQuestions.AsQueryable()
|
||||||
|
|
@ -2180,6 +2202,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
data = data
|
data = data
|
||||||
.Where(x => x.rootDnaId == nodeId).ToList();
|
.Where(x => x.rootDnaId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data = data
|
||||||
|
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data = data
|
data = data
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var retirementResignEmployees = await _context.RetirementResignEmployees.AsQueryable()
|
var retirementResignEmployees = await _context.RetirementResignEmployees.AsQueryable()
|
||||||
|
|
@ -256,6 +260,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
retirementResignEmployees = retirementResignEmployees
|
retirementResignEmployees = retirementResignEmployees
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
retirementResignEmployees = retirementResignEmployees
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
retirementResignEmployees = retirementResignEmployees
|
retirementResignEmployees = retirementResignEmployees
|
||||||
|
|
@ -304,6 +313,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var retirementResignEmployees = await _context.RetirementResignEmployeeCancels.AsQueryable()
|
var retirementResignEmployees = await _context.RetirementResignEmployeeCancels.AsQueryable()
|
||||||
|
|
@ -358,6 +372,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
retirementResignEmployees = retirementResignEmployees
|
retirementResignEmployees = retirementResignEmployees
|
||||||
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
.Where(x => x.rootDnaOldId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
retirementResignEmployees = retirementResignEmployees
|
||||||
|
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
retirementResignEmployees = retirementResignEmployees
|
retirementResignEmployees = retirementResignEmployees
|
||||||
|
|
@ -2047,6 +2066,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
{
|
{
|
||||||
nodeId = profileAdmin?.RootDnaId;
|
nodeId = profileAdmin?.RootDnaId;
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
nodeId = profileAdmin?.Child1DnaId;
|
||||||
|
}
|
||||||
|
|
||||||
var node = profileAdmin?.Node;
|
var node = profileAdmin?.Node;
|
||||||
var data = await _context.RetirementEmployeeQuestions.AsQueryable()
|
var data = await _context.RetirementEmployeeQuestions.AsQueryable()
|
||||||
|
|
@ -2096,6 +2119,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
data = data
|
data = data
|
||||||
.Where(x => x.rootDnaId == nodeId).ToList();
|
.Where(x => x.rootDnaId == nodeId).ToList();
|
||||||
}
|
}
|
||||||
|
else if (role == "PARENT")
|
||||||
|
{
|
||||||
|
data = data
|
||||||
|
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||||
|
}
|
||||||
else if (role == "NORMAL")
|
else if (role == "NORMAL")
|
||||||
{
|
{
|
||||||
data = data
|
data = data
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue