nhance/app/Views/ticket_mail_template.php

174 lines
6.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>
<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;">Mail Template List </h4>
</div>
</div>
<div class="table-responsive">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>Template Name</th>
<th>Status</th>
<th>Policy Type</th>
</tr>
</thead>
<tbody>
<?php if (isset($ticket_data)) { ?>
<?php foreach($ticket_data as $index => $row){ ?>
<tr>
<td><?php echo $row['status']; ?></td>
<td><?php echo $row['claim_no']; ?></td>
<td><?php echo $row['tpa_id']; ?></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
<div>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<div class="modal fade" id="new_mail_template" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
aria-hidden="true" aria-modal="true" data-backdrop="static">
<div class="modal-dialog modal-full-width">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">Add New Template<span id="nameOfThePolicy"></span></h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<div class="text-center" id="no_data"></div>
<form role="form" class="parsley-examples" method="post" id="account_maneger_summary_mail_form"
enctype="multipart/form-data">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-6">
<label for="emp_code">Template Name</label>
<input type="text" id="template_name" name="template_name" value="Trigger 1" class="form-control" placeholder="Template Name">
</div>
<div class="form-group col-md-3">
<label for="emp_code">Policy Type</label>
<select class="form-control" id="policy_type" name="policy_type">
<option value="0">Select Policy Type</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="emp_code">Claim Status</label>
<select class="form-control" id="claim_status" name="claim_status">
<option value="0">Select status</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
</div>
<hr>
<!-- Unlayer editor -->
<div class="form-row">
<div class="form-group col-md-12">
<textarea class="form-control" rows="5" placeholder="Enter Mail Content"></textarea>
</div>
</div>
<div class="form-group text-right m-b-0">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGridSubmit_2">Submit</button>
</div>
</div>
</form>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-------------------------------------------------------------------------------------------------->
<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: [{
text: 'Add Template',
className: 'buttons-html5 addbtnStyle',
action: function(e, dt, node, config) {
openModal()
}
}],
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 openModal() {
var myModal = new bootstrap.Modal(document.getElementById('new_mail_template'));
myModal.show();
}
</script>