Fix #2319
All checks were successful
Build & Deploy Placement Service / build (push) Successful in 1m50s
All checks were successful
Build & Deploy Placement Service / build (push) Successful in 1m50s
This commit is contained in:
parent
ecca345407
commit
ddb35f525a
1 changed files with 9 additions and 2 deletions
|
|
@ -692,6 +692,13 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
public async Task<ActionResult<ResponseObject>> GetDashboardByPlacement(Guid examId)
|
public async Task<ActionResult<ResponseObject>> GetDashboardByPlacement(Guid examId)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var role = string.Empty;
|
||||||
|
var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_PLACEMENT_PASS");
|
||||||
|
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||||
|
if (jsonData["status"]?.ToString() == "200")
|
||||||
|
{
|
||||||
|
role = jsonData["result"]?.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
var rootId = "";
|
var rootId = "";
|
||||||
var child1Id = "";
|
var child1Id = "";
|
||||||
|
|
@ -711,7 +718,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
if (_res.IsSuccessStatusCode)
|
if (_res.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
var org = JsonConvert.DeserializeObject<OrgRequestAct>(_result);
|
var org = JsonConvert.DeserializeObject<OrgRequestAct>(_result);
|
||||||
if (org.result.isOfficer == false)
|
if (org.result.isOfficer == false && role?.Trim().ToUpper() != "OWNER")
|
||||||
{
|
{
|
||||||
rootId = org.result.rootId == null ? "" : org.result.rootId;
|
rootId = org.result.rootId == null ? "" : org.result.rootId;
|
||||||
// child1Id = org.result.child1Id == null ? "" : org.result.child1Id;
|
// child1Id = org.result.child1Id == null ? "" : org.result.child1Id;
|
||||||
|
|
@ -735,7 +742,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
|
|
||||||
return Success(placement);
|
return Success(placement);
|
||||||
}
|
}
|
||||||
if (org.result.isOfficer == true)
|
if (org.result.isOfficer == true || role?.Trim().ToUpper() == "OWNER")
|
||||||
{
|
{
|
||||||
var placement = await _context.Placements
|
var placement = await _context.Placements
|
||||||
.Where(x => x.Id == examId)
|
.Where(x => x.Id == examId)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue