This commit is contained in:
parent
0a58075428
commit
ec04665f39
21 changed files with 546 additions and 491 deletions
|
|
@ -1227,7 +1227,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
var data = await _leaveRequestRepository.GetLeaveRequestByYearAsync(req.Year, userId);
|
||||
|
||||
var resultData = (from d in data
|
||||
//join p in profileList on d.KeycloakUserId equals p.Keycloak
|
||||
//join p in profileList on d.KeycloakUserId equals p.Keycloak
|
||||
select new GetLeaveRequestCalendarResultDto
|
||||
{
|
||||
Id = d.Id,
|
||||
|
|
@ -1286,6 +1286,18 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "BROTHER")
|
||||
{
|
||||
nodeId = profileAdmin?.Node == 4
|
||||
? profileAdmin?.Child3DnaId
|
||||
: profileAdmin?.Node == 3
|
||||
? profileAdmin?.Child2DnaId
|
||||
: profileAdmin?.Node == 2
|
||||
? profileAdmin?.Child1DnaId
|
||||
: profileAdmin?.Node == 1 || profileAdmin?.Node == 0
|
||||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT" || role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
|
|
@ -1665,6 +1677,18 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "BROTHER")
|
||||
{
|
||||
nodeId = profileAdmin?.Node == 4
|
||||
? profileAdmin?.Child3DnaId
|
||||
: profileAdmin?.Node == 3
|
||||
? profileAdmin?.Child2DnaId
|
||||
: profileAdmin?.Node == 2
|
||||
? profileAdmin?.Child1DnaId
|
||||
: profileAdmin?.Node == 1 || profileAdmin?.Node == 0
|
||||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT" || role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
|
|
@ -1850,6 +1874,18 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "BROTHER")
|
||||
{
|
||||
nodeId = profileAdmin?.Node == 4
|
||||
? profileAdmin?.Child3DnaId
|
||||
: profileAdmin?.Node == 3
|
||||
? profileAdmin?.Child2DnaId
|
||||
: profileAdmin?.Node == 2
|
||||
? profileAdmin?.Child1DnaId
|
||||
: profileAdmin?.Node == 1 || profileAdmin?.Node == 0
|
||||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT" || role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
|
|
@ -2008,7 +2044,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue