edit permission normal

This commit is contained in:
kittapath 2025-12-06 18:03:33 +07:00
parent 5451c49dbe
commit 436370312e
16 changed files with 174 additions and 57 deletions

View file

@ -217,8 +217,14 @@ namespace BMA.EHR.Retirement.Service.Controllers
}
else if (role == "NORMAL")
{
retirementOthers = retirementOthers
.Where(x => node == 0 ? x.child1DnaOldId == null : (node == 1 ? x.child2DnaOldId == null : (node == 2 ? x.child3DnaOldId == null : (node == 3 ? x.child4DnaOldId == null : true)))).ToList();
retirementOthers = retirementOthers.Where(x =>
node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null :
node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null :
node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null :
node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null :
node == 4 ? x.child4DnaOldId == nodeId :
true
).ToList();
}
return Success(retirementOthers);
}