nhance/app/Views/batch_list.php

111 lines
6.2 KiB
PHP

<style>
.table-responsive {
overflow-x: auto;
}
</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 class="header-title" style="position: relative;">Batch List</h4>
</div>
</div>
<div class="table-responsive">
<table id="datatable-buttons" class="table table-hover m-0 table-centered dt-responsive nowrap w-100">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">Batch Code</th>
<th class="font-weight-medium">File Name</th>
<th class="font-weight-medium">Client</th>
<th class="font-weight-medium">Client Policy</th>
<th class="font-weight-medium">Event Type</th>
<th class="font-weight-medium">Insurer/TPA</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">Count</th>
<th class="font-weight-medium">Amount</th>
<th class="font-weight-medium">status</th>
</tr>
</thead>
<tbody class="font-12">
<?php
if (isset($batch_list)) {
foreach ($batch_list as $key => $file) {
?>
<tr>
<td><b><?php echo ($key + 1) ?></b></td>
<td><?php echo $file['batch_code'] ?></td>
<td data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>"><?php echo strlen($file['file_name']) > 5 ? substr($file['file_name'], 0, 10) . "..." : $file['file_name'] ?></td>
<td><?php echo $file['client_short_name'] ?></td>
<td><?php echo $file['policy_name'] ?></td>
<td><?php echo $file['event_type'] ?></td>
<td><?php echo $file['insurer_or_tpa'] ?></td>
<td><?php echo $file['actions'] ?></td>
<td><?php echo $file['count'] ?></td>
<td><?php echo intval($file['amount']) ?></td>
<td>
<?php if ($file['status'] == 'failed') { ?>
<?php echo $file['status']; ?> <a href="<?= base_url('/util/export-import-error-list/') . $file['id'] ?>" class="fe-alert-circle" style="color: #000;" aria-hidden="true" target="_blank" data-toggle="tooltip" data-placement="top" title="Click to show the error"></a>
<?php } else if ($file['status'] == 'partially success') { ?>
<?php echo $file['status']; ?>
<?php if ($file['error_data'] != 0) { ?>
<a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip" data-placement="top" title="<?= $file['error_data'] ?>"></a>
<?php } ?>
<?php } else if ($file['status'] == 'failed-1') { ?>
failed <a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip" data-placement="top" title="The list of employees provided has already been updated with the TPA ID."></a>
<?php } else if ($file['status'] == 'failed-2') { ?>
failed <a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip" data-placement="top" title="The list of employees provided has already been updated with the UHID."></a>
<?php } else if ($file['status'] == 'failed-3') { ?>
failed <a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip" data-placement="top" title="The Excel record count exceeds the DB record count."></a>
<?php } else if ($file['status'] == 'failed-4') { ?>
failed <a class="fe-alert-circle" style="color: #000;" data-toggle="tooltip" data-placement="top" title="Physical File Not Found."></a>
<?php } else { ?>
<?php echo $file['status']; ?>
<?php } ?>
</td>
</tr>
<?php }
} ?>
</tbody>
</table>
<div>
</div>
</div>
</div><!-- end col -->
<script>
$(document).ready(function() {
$('#datatable-buttons').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'Batch List',
className: 'my_class',
}],
initComplete: function(settings, json) {
$('.my_class').css({
position: "relative",
left: "50px"
});
},
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true
});
});
</script>