130 lines
4.5 KiB
PHP
130 lines
4.5 KiB
PHP
|
|
<head>
|
|
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css'>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
|
|
|
|
<style>
|
|
|
|
.alert-success {
|
|
background-color: #dff0d8;
|
|
color: #3c763d;
|
|
border-color: #d6e9c6;
|
|
}
|
|
|
|
.flash-message {
|
|
padding: 15px 15px;
|
|
margin-bottom: 10px;
|
|
border-radius: 5px;
|
|
margin-left: 600px;
|
|
}
|
|
|
|
div.dataTables_wrapper div.dataTables_filter{
|
|
margin-top: -30px !important;
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</head>
|
|
<div class="col-md-12 col-sm-12 ">
|
|
<div class="x_panel">
|
|
<div class="x_title">
|
|
|
|
<?php if ($this->session->userdata('Success')): ?>
|
|
|
|
<div class="alert-success flash-message" id="customPrompt" style="text-align: right;">
|
|
<h2><?php echo $this->session->userdata('Success'); ?></h2>
|
|
<span onclick="$('#customPrompt').hide()" style="text-align: right;" ><i class="fa fa-times" aria-hidden="true"></i></span>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php $this->session->unset_userdata('Success');?>
|
|
|
|
<ul class="nav navbar-right panel_toolbox">
|
|
|
|
<a href="<?php echo base_url();?>Delegation/Delegation_form" class="btn btn-sm btn-primary" style="margin-top: 20px;">Assign Delegation</a>
|
|
</ul>
|
|
<h1>Delegation List</h1>
|
|
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
<div class="x_content">
|
|
<div class="row">
|
|
<div class="col-sm-12" style="overflow: auto;">
|
|
<table id="datatables" class="table table-striped table-bordered" width="100%">
|
|
<thead>
|
|
<tr class="headings">
|
|
<th style=" text-align: center;" hidden class="column-title">id</th>
|
|
<th style=" text-align: center;" class="column-title">Delegate Duration</th>
|
|
<th style=" text-align: center;" class="column-title">Delegated To </th>
|
|
<th style=" text-align: center;" class="column-title"> Delegation Date</th>
|
|
<th style=" text-align: center;" class="column-title" >Action </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($tableData as $key => $value) { ?>
|
|
|
|
<?php if(user()->id == $value->emp_id) { ?>
|
|
|
|
<tr class="even pointer">
|
|
<td style=" text-align: center;" hidden > <?php echo $value->id;?> </td>
|
|
<td style=" text-align: center;" class=""><?php echo date('d-m-Y', strtotime($value->from_date));?> to <?php echo date('d-m-Y', strtotime($value->to_date));?> </td>
|
|
<td style=" text-align: center;" class=""><?php echo $value->name; ?></td>
|
|
<td style=" text-align: center;" class=""> <?php echo date('d-m-Y', strtotime($value->delegated_at));?> </td>
|
|
<td style=" text-align: center; font-size: 16px;">
|
|
|
|
<a href="<?php echo base_url('Delegation/Edit_Delegation')?>?id=<?php echo md5($value->id);?> "><i class="fa fa-edit" aria-hidden="true"title="Edit"></i></a>
|
|
|
|
</td>
|
|
</tr>
|
|
<?php } } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="customPrompt" class="modal">
|
|
<div class="modal-content ">
|
|
<span onclick="$('#customPrompt').hide()" style="text-align: right;"><i class="fa fa-times fa-2x" aria-hidden="true"></i></span>
|
|
<h3>Decline Reason</h3>
|
|
<input list="browsers" style="padding:20px; margin:6px;" id="decline_reason" required name="myBrowser" />
|
|
<datalist id="browsers" >
|
|
<?php foreach ($dropdown as $key => $value) { ?>
|
|
<option value="<?php echo $value->enum_value; ?>"><?php echo $value->enum_value; ?></option>
|
|
<?php } ?>
|
|
</datalist>
|
|
|
|
<button onclick="submitCustomPrompt()" type="button" class="btn btn-primary">Submit</button>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="modal fade bs-example-modal-lg" id="ItemModal" tabindex="-1" role="dialog" aria-hidden="true"></div>
|
|
<div class="modal bs-example-modal-sm" tabindex="-1" role="dialog" aria-hidden="true" id="popup"> </div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#datatables').DataTable({
|
|
"order": [[0, 'desc']], // Set initial sorting to descending on the first column
|
|
"dom": 'Bfrtip', // Show export buttons
|
|
"buttons": [ 'excel', 'pdf'], // Enable export options
|
|
"language": {
|
|
"search": "Search: " // Customize search label
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|