Role related changes : GWm
This commit is contained in:
parent
67407c10a9
commit
be20a35bdb
@ -48,8 +48,7 @@ class User_model extends Model
|
|||||||
function getUserRoles()
|
function getUserRoles()
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('tbl_roles')
|
$builder = $this->db->table('tbl_roles')
|
||||||
->select('roleId, role')
|
->select('roleId, role');
|
||||||
->where("roleid <", 4);
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
|
|||||||
@ -211,7 +211,7 @@
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<?php if(session()->get('roleText') != 'Auditor'){ ?>
|
<?php if(session()->get('roleText') == 'System Administrator'){ ?>
|
||||||
<a data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"
|
<a data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"
|
||||||
href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType. '&CapitalRange=' . $record->CapitalRange; ?>">
|
href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType. '&CapitalRange=' . $record->CapitalRange; ?>">
|
||||||
<i class="fa fa-pencil-alt" data-toggle="tooltip"> </i>
|
<i class="fa fa-pencil-alt" data-toggle="tooltip"> </i>
|
||||||
|
|||||||
@ -67,14 +67,9 @@
|
|||||||
<select class="form-control required" id="role" name="role" required>
|
<select class="form-control required" id="role" name="role" required>
|
||||||
<option value="0">Select Role</option>
|
<option value="0">Select Role</option>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($roles)) {
|
if (!empty($roles)) {foreach ($roles as $rl) { ?>
|
||||||
foreach ($roles as $rl) {
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $rl->roleId ?>"><?php echo $rl->role ?></option>
|
<option value="<?php echo $rl->roleId ?>"><?php echo $rl->role ?></option>
|
||||||
<?php
|
<?php } }?>
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -608,9 +608,15 @@
|
|||||||
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>sales_dashboard" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>sales_dashboard" role="button"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<i class="ri-dashboard-line mr-1"></i>Dashboard</a>
|
<i class="ri-dashboard-line mr-1"></i>Dashboard</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Auditor'){?>
|
||||||
<!-- Sales module -->
|
<!-- Sales module -->
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
||||||
@ -625,7 +631,13 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Auditor' || session()->get('roleText') == 'Security'){?>
|
||||||
<!-- purchase module -->
|
<!-- purchase module -->
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-purchase" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-purchase" role="button"
|
||||||
@ -634,7 +646,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
|
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
|
||||||
|
|
||||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
<?php if(session()->get('roleText') == 'System Administrator'){ ?>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-requisition"
|
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-requisition"
|
||||||
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
@ -655,7 +667,7 @@
|
|||||||
<div class="dropdown-menu" aria-labelledby="topnav-po">
|
<div class="dropdown-menu" aria-labelledby="topnav-po">
|
||||||
<a href="<?php echo base_url(); ?>purchaseorderListing" class="dropdown-item">Purchase Order List</a>
|
<a href="<?php echo base_url(); ?>purchaseorderListing" class="dropdown-item">Purchase Order List</a>
|
||||||
<a href="<?php echo base_url(); ?>PORelease" class="dropdown-item">Approve Purchase Order</a>
|
<a href="<?php echo base_url(); ?>PORelease" class="dropdown-item">Approve Purchase Order</a>
|
||||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
<?php if(session()->get('roleText') == 'System Administrator'){ ?>
|
||||||
<a href="<?php echo base_url(); ?>EmergencyPO" class="dropdown-item">Emergency Purchase Order </a>
|
<a href="<?php echo base_url(); ?>EmergencyPO" class="dropdown-item">Emergency Purchase Order </a>
|
||||||
<a href="<?php echo base_url(); ?>Report_pending_purchase" class="dropdown-item">Pending Purchase Order </a>
|
<a href="<?php echo base_url(); ?>Report_pending_purchase" class="dropdown-item">Pending Purchase Order </a>
|
||||||
<a href="<?php echo base_url(); ?>amendmentpurchaseorder" class="dropdown-item">Amendment Purchase Order</a>
|
<a href="<?php echo base_url(); ?>amendmentpurchaseorder" class="dropdown-item">Amendment Purchase Order</a>
|
||||||
@ -663,11 +675,16 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Auditor' || session()->get('roleText') == 'Security' || session()->get('roleText') == 'Stock Handler'){?>
|
||||||
<!-- Inward Module -->
|
<!-- Inward Module -->
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-purchase" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-purchase" role="button"
|
||||||
@ -677,7 +694,7 @@
|
|||||||
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
|
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
|
||||||
|
|
||||||
|
|
||||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Security'){?>
|
||||||
<div class="">
|
<div class="">
|
||||||
<a href="<?php echo base_url(); ?>AddIGR" class="dropdown-item"><i class="ri-task-line align-middle mr-1"></i>
|
<a href="<?php echo base_url(); ?>AddIGR" class="dropdown-item"><i class="ri-task-line align-middle mr-1"></i>
|
||||||
Inward Gate Register Entry</a>
|
Inward Gate Register Entry</a>
|
||||||
@ -688,16 +705,23 @@
|
|||||||
<a href="<?php echo base_url(); ?>ViewIGR" class="dropdown-item"><i class="ri-eye-fill mr-1"></i>
|
<a href="<?php echo base_url(); ?>ViewIGR" class="dropdown-item"><i class="ri-eye-fill mr-1"></i>
|
||||||
View Inward Gate Register</a>
|
View Inward Gate Register</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Security'){?>
|
||||||
<div class="">
|
<div class="">
|
||||||
<a href="<?php echo base_url(); ?>ListIGR" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>
|
<a href="<?php echo base_url(); ?>ListIGR" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>
|
||||||
Non IGR / Expense</a>
|
Non IGR / Expense</a>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(session()->get('roleText') == 'System Administrator'){ ?>
|
||||||
<!-- HR module -->
|
<!-- HR module -->
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
||||||
@ -736,9 +760,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
|
||||||
<!-- supplier module -->
|
<!-- supplier module -->
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>supplierlisting" role="button" aria-expanded="false">
|
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>supplierlisting" role="button" aria-expanded="false">
|
||||||
@ -774,7 +795,12 @@
|
|||||||
<a href="<?php echo base_url(); ?>readFactoryMachineMasterDetails" class="dropdown-item"><i class="ri-file-settings-line align-middle mr-1"></i>Factory Machines Details</a>
|
<a href="<?php echo base_url(); ?>readFactoryMachineMasterDetails" class="dropdown-item"><i class="ri-file-settings-line align-middle mr-1"></i>Factory Machines Details</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Stock Handler'){?>
|
||||||
<!-- Stock module -->
|
<!-- Stock module -->
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-stock" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-stock" role="button"
|
||||||
|
|||||||
@ -118,7 +118,7 @@ if (empty($Status)) {
|
|||||||
<th>Total Order Value</th>
|
<th>Total Order Value</th>
|
||||||
<th>Approved By</th>
|
<th>Approved By</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
<?php if(session()->get('roleText') == 'System Administrator'){?>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<th>Remarks</th>
|
<th>Remarks</th>
|
||||||
@ -180,7 +180,7 @@ if (empty($Status)) {
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
<?php if(session()->get('roleText') == 'System Administrator'){?>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { ?>
|
<?php if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { ?>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user