CHANGE_User list head role based hide and show - VADIVEL J 2025-10-27 15:24
This commit is contained in:
parent
73a12f57a9
commit
47c4589283
@ -342,6 +342,13 @@ table.dataTable tbody td {
|
|||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$session = \Config\Services::session();
|
||||||
|
$currentLogInRole = $session->get()['userData']->role;
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<!-- End ADD and EDIT Page HTML -->
|
<!-- End ADD and EDIT Page HTML -->
|
||||||
<div class="row" id="List-page">
|
<div class="row" id="List-page">
|
||||||
@ -511,7 +518,16 @@ table.dataTable tbody td {
|
|||||||
</label>
|
</label>
|
||||||
<select class="form-control" id="role" name="role" required>
|
<select class="form-control" id="role" name="role" required>
|
||||||
<option value="">Select Role</option>
|
<option value="">Select Role</option>
|
||||||
<?php foreach($roleData as $value) { ?>
|
|
||||||
|
<?php foreach($roleData as $value) {
|
||||||
|
|
||||||
|
$headRoleValue = $value['id']??"";
|
||||||
|
|
||||||
|
// we are showing head role only to head's who logged in
|
||||||
|
if($headRoleValue == "5" && $currentLogInRole != "5" ){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<option value="<?= $value['id'] ?>"><?= $value['role'] ?></option>
|
<option value="<?= $value['id'] ?>"><?= $value['role'] ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
@ -522,7 +538,16 @@ table.dataTable tbody td {
|
|||||||
<span class="tooltip-trigger mdi mdi-information-outline" id="accessMatrixTrigger"></span>
|
<span class="tooltip-trigger mdi mdi-information-outline" id="accessMatrixTrigger"></span>
|
||||||
</label>
|
</label>
|
||||||
<select hidden class="form-control" id="team" name="team[]" multiple required>
|
<select hidden class="form-control" id="team" name="team[]" multiple required>
|
||||||
<?php foreach($teamData as $value) { ?>
|
<?php foreach($teamData as $value) {
|
||||||
|
|
||||||
|
$teamValue = $value['id']??"";
|
||||||
|
|
||||||
|
// we are showing head role only to head's who logged in
|
||||||
|
if( ($teamValue == "4" || $teamValue =="6" ) && $currentLogInRole != "5" ){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user