148 lines
3.9 KiB
PHP
148 lines
3.9 KiB
PHP
<style>
|
|
.table th,
|
|
.table td {
|
|
padding: 8px;
|
|
}
|
|
|
|
table.dataTable tbody td {
|
|
padding: 4px 4px !important;
|
|
}
|
|
|
|
.col-12 {
|
|
|
|
max-width: 98% !important;
|
|
}
|
|
|
|
.dataTables_filter {
|
|
position: absolute;
|
|
}
|
|
|
|
.right-align-input {
|
|
text-align: right;
|
|
}
|
|
|
|
.addbtnStyle {
|
|
margin-left: 20px !important;
|
|
}
|
|
</style>
|
|
<style>
|
|
.table th:nth-child(1),
|
|
.table td:nth-child(1) {
|
|
max-width: 200px !important;
|
|
min-width: 100px !important;
|
|
overflow: hidden !important;
|
|
text-overflow: ellipsis !important;
|
|
white-space: nowrap !important;
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row" style="padding-bottom: 10px;">
|
|
<div class="col-6" style="align-self: center;">
|
|
<h4 style="position: relative;">Claim Feedback List </h4>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
|
<thead class="bg-light">
|
|
<tr>
|
|
<th>Claim Number</th>
|
|
<th>Emp Code</th>
|
|
<th>Emp name</th>
|
|
<th>Corporate name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (isset($feedback_data)) { ?>
|
|
<?php foreach($feedback_data as $data){ ?>
|
|
<tr onclick="viewFeedbackForm(<?php echo $data['id']; ?>)">
|
|
<td><?php echo $data['claim_number']; ?></td>
|
|
<td><?php echo $data['emp_code']; ?></td>
|
|
<td><?php echo $data['emp_name']; ?></td>
|
|
<td><?php echo $data['client_name']; ?></td>
|
|
</tr>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div>
|
|
</div>
|
|
</div>
|
|
</div><!-- end col -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-------------------------------------------------------------------------------------------------->
|
|
|
|
<script>
|
|
|
|
// Datatable document ready
|
|
$(document).ready(function() {
|
|
|
|
var ticketsTable = $('#scroll-horizontal-datatable');
|
|
|
|
if (ticketsTable.length) {
|
|
|
|
ticketsTable.DataTable({
|
|
scrollX: true,
|
|
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
|
"<'row'<'col-sm-12'tr>>" +
|
|
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
|
buttons: [{
|
|
extend: 'csv',
|
|
text: 'CSV',
|
|
title: 'Claim-List',
|
|
},
|
|
{
|
|
extend: 'excel',
|
|
text: 'Excel',
|
|
title: 'claim-List',
|
|
exportOptions: {
|
|
orthogonal: 'sort'
|
|
},
|
|
},
|
|
],
|
|
language: {
|
|
search: "_INPUT_",
|
|
searchPlaceholder: "Search..."
|
|
},
|
|
paging: true, // Enable pagination
|
|
pageLength: 25, // Set default number of rows per page (optional)
|
|
ordering: false,
|
|
});
|
|
} else {
|
|
console.error("Table atet found.");
|
|
}
|
|
});
|
|
|
|
|
|
function viewFeedbackForm(ticket_id){
|
|
|
|
console.log("Ticket ID : ",ticket_id);
|
|
var md5Hash_ticket_id = md5(ticket_id);
|
|
console.log("MD5 Ticket ID : ",md5Hash_ticket_id);
|
|
|
|
// alert(md5Hash);
|
|
|
|
feedbackPage = `<?= base_url("claims-feedback-form/") ?>${md5Hash_ticket_id}/1`
|
|
|
|
// window.location.href = feedbackPage;
|
|
window.open(feedbackPage, "_blank");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|