CHANGE_UI_Issues - VADIVEL J 2025-09-24

This commit is contained in:
vadivelJ96 2025-09-24 10:08:30 +05:30
parent 81a58c5495
commit 5a707d9722
38 changed files with 4883 additions and 4911 deletions

View File

@ -1124,6 +1124,9 @@ class TicketController extends BaseController
// dd($data['ticket_data']);
$data['ticket_type'] = $this->ticketType;
$data['trigger_type'] = $this->triggerType;
$data['page_name'] = "Claims";
return $this->loadLayout('ticket_mail_template', $data);
}
@ -2190,6 +2193,8 @@ class TicketController extends BaseController
$data['viewer'] = !empty($empView) ? $empView : 0;
// dd($data);
return view('ticket_feedback_form', $data);
}else{
@ -2220,7 +2225,7 @@ class TicketController extends BaseController
public function feedbackList(){
$data['feedback_data'] = $this->ticketMasterModel->select("ticket_master.*,clients.client_name")->join("clients","clients.id = ticket_master.client_id")->where("ticket_master.is_active",1)->where("ticket_master.feedback_json IS NOT NULL", null, false)->where("ticket_master.feedback_json !=", "")->findAll();
$data['page_name'] = "Claims";
// dd($data);
$this->loadLayout("ticket_feedback_list",$data);
}

View File

@ -210,7 +210,7 @@
$(document).ready(function() {
$('#datatable-buttons').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{

View File

@ -64,7 +64,7 @@
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h2 style="position: relative;">Claim Dump Upload</h2>
<h4 style="position: relative;">Claim Dump Upload</h4>
</div>
</div>

View File

@ -7,10 +7,6 @@
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
}

View File

@ -7,9 +7,6 @@
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
@ -33,7 +30,8 @@
<thead class="bg-light">
<tr>
<th style="text-align: center;" colspan="8">OPEN</th>
<th style="text-align: center;" colspan="5" >CLEARED</th>
&nbsp;
<th style="text-align: center;" colspan="7" >CLEARED</th>
</tr>
<tr>
<?php foreach ($column_order as $col_name): ?>

View File

@ -70,7 +70,7 @@
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>",
buttons: [{
extend: 'csv',
text: 'CSV',

View File

@ -166,7 +166,8 @@ table.dataTable thead th {
</div>
</div><!-- /.modal-content -->
</div>
</div><!-- /.modal -->
</div>
<!-- /.modal -->
<script>
document.addEventListener("DOMContentLoaded", function () {
@ -296,9 +297,10 @@ table.dataTable thead th {
$(document).ready(function()
{
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{

View File

@ -47,10 +47,6 @@ body {
font-size: 14px;
}
.container-fluid {
padding: 12px;
}
.user-card {
background: white;
border-radius: 8px;

View File

@ -11,12 +11,13 @@ option:disabled {
<div class="col-xl-12">
<div id="accordion1" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filters</span>
<a id="toggleIcon1" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
aria-expanded="true">
<i id="icon1" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion1">
<div class="card-body">
<!-- <div class="text-center"> -->

View File

@ -14,7 +14,7 @@
}
</style>
<div class="container-fluid">
<div class="container-fluid-min">
<h2>Endorsement</h2>
<div class="row">
<div class="col-xl-12">
@ -590,7 +590,7 @@
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{

View File

@ -98,7 +98,7 @@
</style>
<div class="container-fluid">
<div class="container-fluid-min">
<h2>Enrollment</h2>
<div class="row visa_status_count_view">
<div class="col-12">

View File

@ -461,7 +461,7 @@ $('body').on('click', '.reload', function() {
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
"buttons": [{

View File

@ -61,7 +61,7 @@
</style>
<div class="container-fluid">
<div class="container-fluid-min">
<div class="row">
<div class="col-12">

View File

@ -10,11 +10,12 @@
<div class="col-xl-12">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -341,7 +342,7 @@
// for datatable
$(document).ready(function() {
$('#hr_tickets_table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
"buttons": [{

View File

@ -58,8 +58,6 @@
<div class="col-12">
<div class="card-body">
<h3>Inception</h3>
<br>
<ul class="nav nav-pills navtab-bg">
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-1 active-tab" id="general_tab">

View File

@ -1,6 +1,5 @@
<style>
.custom-dropdown-menu {
.custom-dropdown-menu {
display: none;
position: absolute;
background-color: #ffffff !important;
@ -10,37 +9,38 @@
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
color: #212529 !important;
text-decoration: none !important;
background-color: transparent !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
.btn-color{
.btn-color {
background-color: rgba(52, 174, 178, 1);
color: white;
border:1px solid rgba(52, 174, 178, 1);
}
border: 1px solid rgba(52, 174, 178, 1);
}
.btn-color:hover{
.btn-color:hover {
background-color: rgba(41, 139, 142, 1);
color: white;
border:1px solid rgba(41, 139, 142, 1);
}
border: 1px solid rgba(41, 139, 142, 1);
}
</style>
<div class="row" id="insurer_list">
<div class="container-fluid-min">
<div class="row" id="insurer_list">
<div class="col-12">
<div class="card">
<div class="card-body maincard">
@ -60,33 +60,36 @@
</thead>
<tbody>
<?php if(is_array($insurerList)) {foreach($insurerList as $row){ ?>
<?php if (is_array($insurerList)) {
foreach ($insurerList as $row) { ?>
<tr>
<td><?php echo $row['name']; ?> ( <?php echo $row['short_name']; ?> ) </td>
<td><?php echo $row['type']; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="<?= base_url("master/insurer/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeInsurer(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
<a class="dropdown-item" href="<?= base_url("master/insurer/list/"); ?><?= $row['id']; ?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id']; ?>" onclick="removeInsurer(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
</div>
</div>
</td>
</tr>
<?php }}?>
<?php }
} ?>
</tbody>
</table>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<!-- end row -->
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("tickets-table");
// Create custom dropdown
@ -172,20 +175,17 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
$(document).ready(function(){
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'InsurerList',
@ -196,7 +196,7 @@ document.addEventListener("DOMContentLoaded", function () {
{
text: 'ADD',
className: 'btn btn-color',
action: function () {
action: function() {
window.location.href = "<?= base_url("master/insurer/create"); ?>";
}
}
@ -207,18 +207,20 @@ document.addEventListener("DOMContentLoaded", function () {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true ,
paging: true,
});
})
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
btnExport.addEventListener("click", () => {
btnExport.addEventListener("click", () => {
const obj = new csvExport(tableElement);
const csvData = obj.exportCsv();
const blob = new Blob([csvData], { type: "text/csv" });
const blob = new Blob([csvData], {
type: "text/csv"
});
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
@ -228,10 +230,10 @@ btnExport.addEventListener("click", () => {
setTimeout(() => {
URL.revokeObjectURL(url);
}, 500);
});
});
class csvExport {
class csvExport {
constructor(table, header = true) {
this.table = table;
this.rows = Array.from(table.querySelectorAll("tr"));
@ -268,7 +270,7 @@ class csvExport {
data = /[",\n"]/.test(data) ? `"${data}"` : data;
return data;
}
}
}
function removeInsurer(element) {
@ -293,7 +295,7 @@ class csvExport {
contentType: false,
success: function(res) {
// console.log(res.status == true);
if(res){
if (res) {
if (res.status == true) {
toastr.success('Insurer removed successfully', 'success');
location.reload();
@ -302,7 +304,7 @@ class csvExport {
}
}
},
error: function (xhr, status, error) {
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
$('.loader').fadeOut();
@ -315,6 +317,4 @@ class csvExport {
});
}
</script>

View File

@ -10,11 +10,12 @@
<div class="col-xl-12">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,11 @@
<h4 class="ml-1 mb-3"> <span class="font-color-black">IRBA</span> </h4>
</div>
<div class="col-xl-12" id="outstanding_filter">
<div class="container-fluid-min">
<div class="col-xl-12" id="outstanding_filter">
<div id="accordion" class="mb-3">
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<h4>Filters</h4>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
@ -63,6 +64,10 @@
</div>
</div>
<div id="report"></div>
</div>
<script>
$(function() {
@ -81,7 +86,9 @@
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -97,11 +104,11 @@
});
</script>
<script>
$('#category').on('click', function(){
$('#category').on('click', function() {
var choosed_option = $('#category').val();
$("#report_type").val('0');
if (choosed_option == 'life' ){
if (choosed_option == 'life') {
$("#report_type option[value='insurer']").show();
$("#report_type option[value='bap']").hide();
$("#report_type option[value='bapClient']").hide();
@ -139,11 +146,11 @@
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
}else{
} else {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
let message = response.message;
toastr.error(message,'ERROR');
toastr.error(message, 'ERROR');
}

View File

@ -175,7 +175,7 @@
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [

View File

@ -129,6 +129,10 @@
}
.container-fluid {
padding: 0px 20px 0px 20px !important;
}
.container-fluid-top {
padding: 0px 40px 0px 40px !important;
}
@ -1544,6 +1548,13 @@
pointer-events: none; /* prevents blocking typing */
}
.datatable-search {
margin-right: auto;
}
.datatable-buttons {
margin-left: auto;
}
</style>
@ -1992,4 +2003,4 @@
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<div class="container-fluid-top">

View File

@ -1,18 +1,18 @@
<style>
.col-12 {
.col-12 {
max-width: 98% !important;
}
}
</style>
<div class="row" id="lead_filter_div">
<div class="container-fluid-min">
<div class="row" id="lead_filter_div">
<div class="col-12" style="margin-top: -12px;">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<div class="row">
<div class="col-md-6" style="position: relative;left: 17px;">
<h4 style="text-align: left; margin-left:10px;">Filter</h4>
<h4 style="text-align: left;">Filter</h4>
</div>
<div class="col-md-6">
<a style="text-align: right;" id="toggleIcon" class="text-dark float-right"
@ -132,27 +132,29 @@
</div>
</div>
</div>
<!-- end page title -->
<div id="lead_list_div">
<?php include('leads_list.php'); ?>
</div>
</div>
<!-- end page title -->
<div id="lead_list_div">
<?php include('leads_list.php'); ?>
</div>
<script>
var filter_client_list = [];
var filter_branch_list = [];
var filter_client_list = [];
var filter_branch_list = [];
$(document).ready(function() {
$(document).ready(function() {
$('#filter_client_id').select2();
$('#filter_client_branch_id').select2();
$('#filter_policy_type').select2();
getfilterClientAndBranch()
});
});
$(document).ready(function() {
$(document).ready(function() {
$('#filter_client_id').change(function() {
let client_id = $(this).val();
@ -163,11 +165,11 @@ $(document).ready(function() {
}
})
});
});
//----- AJAX FUNCTIONS --------------------------------------------------------------------------------
//----- AJAX FUNCTIONS --------------------------------------------------------------------------------
function fetchTicketListData() {
function fetchTicketListData() {
var issuer_type = $('#filter_issuer_type').val();
var lead_type = $('#filter_lead_type').val();
@ -205,7 +207,7 @@ function fetchTicketListData() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
setTimeout(function(){
setTimeout(function() {
additionalDropdown();
}, 1000);
@ -225,10 +227,10 @@ function fetchTicketListData() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
}
}
//function for fetch client, branch
function getfilterClientAndBranch() {
//function for fetch client, branch
function getfilterClientAndBranch() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -250,12 +252,12 @@ function getfilterClientAndBranch() {
console.error(status, error);
}
});
}
}
//----- END AJAX FUNCTIONS --------------------------------------------------------------------------------
//----- END AJAX FUNCTIONS --------------------------------------------------------------------------------
function appendfilterClients(data) {
function appendfilterClients(data) {
$('#filter_client_id').empty();
@ -273,9 +275,9 @@ function appendfilterClients(data) {
$('#filter_client_id').append(option);
});
}
}
function appendfilterBranch(data) {
function appendfilterBranch(data) {
$('#filter_client_branch_id').empty();
@ -292,11 +294,11 @@ function appendfilterBranch(data) {
});
$('#filter_client_branch_id').append(option);
});
}
}
// -----------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------
function additionalDropdown() {
function additionalDropdown() {
const table = document.getElementById("tickets-table");
if (!table) return; // Prevent errors if the table is not found
let activeDropdown = null;
@ -321,7 +323,7 @@ function additionalDropdown() {
// Preserve click handlers and add auto-close
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
item.addEventListener('click', function (e) {
item.addEventListener('click', function(e) {
const onclickAttr = this.getAttribute('onclick');
if (onclickAttr) eval(onclickAttr);
@ -351,7 +353,7 @@ function additionalDropdown() {
// Add click event listener to rows
table.querySelectorAll("tbody tr").forEach(row => {
row.addEventListener("click", function (event) {
row.addEventListener("click", function(event) {
if (!event.target.closest('td:last-child')) {
handleDropdownClick(row, event);
}
@ -359,12 +361,11 @@ function additionalDropdown() {
});
// Close dropdown when clicking outside
document.addEventListener("click", function () {
document.addEventListener("click", function() {
if (activeDropdown) {
activeDropdown.style.display = 'none';
activeDropdown = null;
}
});
}
}
</script>

View File

@ -62,7 +62,8 @@
border-radius: 6px;
position: absolute;
z-index: 999;
bottom: 125%; /* Show above icon */
bottom: 125%;
/* Show above icon */
left: 50%;
transform: translateX(-50%);
font-size: 12px;
@ -73,7 +74,8 @@
.info-tooltip::after {
content: "";
position: absolute;
top: 100%; /* Arrow below tooltip */
top: 100%;
/* Arrow below tooltip */
left: 50%;
margin-left: -5px;
border-width: 5px;
@ -86,19 +88,23 @@
opacity: 1;
}
/* dont forgot it keep it safe card and card body space remover */ /* bcoz in design */
.card-body{ margin-top: 0px !important; }
/* dont forgot it keep it safe card and card body space remover */
/* bcoz in design */
.card-body {
margin-top: 0px !important;
}
/* this css as per design so not declare in golbal */ /* bcoz in design */
#collapseOne{
/* this css as per design so not declare in golbal */
/* bcoz in design */
#collapseOne {
border: 1px solid #BFF3F5 !important;
border-radius: 10px !important;
border-width: 1px !important;
}
</style>
<div class="row" id="leads_form">
<div class="container-fluid-min">
<div class="row" id="leads_form">
<div class="col-12">
<div class="card">
<div class="card-body">
@ -404,16 +410,19 @@
<div class="form-group text-right m-b-0" id="submitButton">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
id="lead_form_submit_btn" >Submit</button>
id="lead_form_submit_btn">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div><!-- end form row -->
</div><!-- end form row -->
<?php include("newClientModal.php") ?>
</div>
<?php include("newClientModal.php") ?>
<script>
@ -499,7 +508,7 @@
// }
}
});
}else if (lead_type == 3) {
} else if (lead_type == 3) {
if ($('#client_id option[value="add_client"]').length === 0) {
$('#client_id').prepend($('<option>', {
@ -508,24 +517,24 @@
}));
}
$("#source_policy_id").removeAttr("required");
$("#source_policy_id").closest("div") .find("label .text-danger").remove();
$("#source_policy_id").closest("div").find("label .text-danger").remove();
$("#source_policy_id").hide();
$('#source_policy_id').closest('.form-group').hide();
$("#source_policy_start_date").removeAttr("required");
$("#source_policy_start_date").closest("div") .find("label .text-danger").remove();
$("#source_policy_start_date").closest("div").find("label .text-danger").remove();
$("#source_policy_start_date").hide();
$('#source_policy_start_date').closest('.form-group').hide();
$("#source_policy_end_date").removeAttr("required");
$("#source_policy_end_date").closest("div") .find("label .text-danger").remove();
$("#source_policy_end_date").closest("div").find("label .text-danger").remove();
$("#source_policy_end_date").hide();
$('#source_policy_end_date').closest('.form-group').hide();
} else if (lead_type != 3) {
$("#source_policy_id").prop("required",true);
$("#source_policy_id").prop("required", true);
$("#source_policy_start_date").prop("required", true);
$("#source_policy_end_date").prop("required", true);
@ -538,13 +547,13 @@
$('#source_policy_end_date').closest('.form-group').find('label').show();
// Check if the asterisk doesn't already exist, then add it
let $label = $("#source_policy_id").closest("div") .find("label");
let $label = $("#source_policy_id").closest("div").find("label");
if ($label.find(".text-danger").length === 0) {
$label.append(' <span class="text-danger">*</span>');
}
let $label2 = $("#source_policy_start_date").closest("div") .find("label");
let $label2 = $("#source_policy_start_date").closest("div").find("label");
if ($label2.find(".text-danger").length === 0) {
$label2.append(' <span class="text-danger">*</span>');
@ -563,7 +572,7 @@
}
if(lead_type != 1){
if (lead_type != 1) {
dataIncrement = 1;
// updateRenewalFields(dataIncrement);
@ -700,7 +709,7 @@
let lead_type = $('#lead_type').val();
var policyStartDate = $("#source_policy_start_date");
if(lead_type == 3){
if (lead_type == 3) {
policyStartDate = $("#policy_start_date");
}
console.log('Selected Dates:', selectedDates);
@ -801,7 +810,7 @@
//client branch data
function getBranchData(input, inputType) {
if (inputType == 1 ) {
if (inputType == 1) {
var client_branch_id = $(input).val();
} else {
client_branch_id = input;
@ -1024,7 +1033,7 @@
console.log(response.message, 'SUCCESS');
$('#appendArea_' + dataIncrement).append(response.data);
console.log("Policy Type ID : ",policy_type_id);
console.log("Policy Type ID : ", policy_type_id);
if (policy_type_id == 1 || policy_type_id == 6 || policy_type_id == 7) {
let newId = 'appendAreaForClaim_' + dataIncrement;
@ -1052,7 +1061,7 @@
$('.lifeClaimFields').show();
} else {
if(lead_type == 1){
if (lead_type == 1) {
updateRenewalFields(dataIncrement);
}
@ -1070,7 +1079,7 @@
console.log('Extracted increment:', increment);
var policyStartDate = $("#source_policy_start_date");
if(lead_type == 3){
if (lead_type == 3) {
policyStartDate = $("#policy_start_date");
}
@ -1458,7 +1467,7 @@
console.log('Lead Type:', lead_type);
let increment = input.id.split('_').pop(); // Extract increment
if(lead_type == 1){
if (lead_type == 1) {
return;
}
@ -1476,9 +1485,9 @@
policyStartDateInput = $('#source_policy_start_date');
console.log('Using Source Policy Start Date:', sourcePolicyDateVal);
} else if (policyStartDateVal) {
if(input_id == "policy_start_date_1"){
if (input_id == "policy_start_date_1") {
policyStartDateInput = $('#policy_start_date_1');
}else{
} else {
policyStartDateInput = $('#policy_start_date');
}
console.log('Using Policy Start Date:', policyStartDateVal);
@ -1531,9 +1540,9 @@
let premium_as_on_date = Number($('#premium_date').val()) || 0;
console.log('Premium as on Date:', premium_as_on_date);
let incurred_claim_ratio = (incurred_claims > 0 && premium_as_on_date > 0)
? (incurred_claims / premium_as_on_date) * 100
: 0;
let incurred_claim_ratio = (incurred_claims > 0 && premium_as_on_date > 0) ?
(incurred_claims / premium_as_on_date) * 100 :
0;
let incurred_claim_ratio_roundoff = isFinite(incurred_claim_ratio) ? incurred_claim_ratio.toFixed(2) : 0;
console.log('Incurred Claim Ratio:', incurred_claim_ratio);
console.log('Incurred Claim Ratio (Rounded):', incurred_claim_ratio_roundoff);
@ -1768,7 +1777,7 @@
flatpickr("#" + incurred_claim_date_id, {
dateFormat: "d/m/Y",
allowInput: false,
onChange: function (selectedDates) {
onChange: function(selectedDates) {
try {
let increment = this.input.id.split('_').pop();
let policyStartDate = $("#source_policy_start_date");
@ -2053,7 +2062,7 @@
$('#source_policy_start_date').closest('.form-group').show();
$('#source_policy_end_date').closest('.form-group').show();
}else{
} else {
$('#source_policy_id').hide();
$('#source_policy_start_date').hide();
@ -2124,7 +2133,7 @@
});
}
$('#exixting_client').change(function () {
$('#exixting_client').change(function() {
$('#contact_person_summary').empty();
$('#contact_person_summary').append($('<option>', {
@ -2202,6 +2211,4 @@
//-----------------------------------------------------------------------------------------------------------
</script>

View File

@ -1,39 +1,33 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
.dataTables_filter {
position: absolute;
}
}
.right-align-input {
.right-align-input {
text-align: right;
}
}
.center-align-input {
.center-align-input {
text-align: center;
}
}
</style>
<div class="col-12">
<h4 class="ml-1 mb-3"> <span class="font-color-black">Outstanding</span> </h4>
</div>
<div class="col-12" id="outstanding_filter">
<div class="container-fluid-min">
<div class="col-12" id="outstanding_filter">
<div id="accordion" class="mb-3">
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<h4>Filters</h4>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
@ -64,9 +58,9 @@ table.dataTable tbody td {
class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id">
<option value="0" selected>Select Insurer</option>
<?php if(isset($insurer) && count($insurer)){ ?>
<?php if (isset($insurer) && count($insurer)) { ?>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
<?php } ?>
</select>
@ -77,9 +71,9 @@ table.dataTable tbody td {
class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id">
<option value="0" selected>Select Insurer Branch</option>
<?php if(isset($insurer) && count($insurer)){ ?>
<?php if (isset($insurer) && count($insurer)) { ?>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
<?php } ?>
</select>
@ -164,9 +158,9 @@ table.dataTable tbody td {
</div>
</div>
</div>
</div>
</div>
<div class="col-12" id="outstanding_list">
<div class="col-12" id="outstanding_list">
<div class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
@ -198,16 +192,16 @@ table.dataTable tbody td {
// dd($outstanting_list);
if (isset($outstanting_list)) { ?>
<?php foreach($outstanting_list as $index => $row){ ?>
<?php foreach ($outstanting_list as $index => $row) { ?>
<tr>
<td><?= $index + 1 ?></td>
<td><?php echo $row['short_name']; ?></td>
<td><?php echo $row['branch_name']; ?></td>
<td><?php echo change_date_format($row['month'],'Y-m-d','Y-m') ?></td>
<td><?php echo change_date_format($row['month'], 'Y-m-d', 'Y-m') ?></td>
<td><?php echo $row['stmt_sno']; ?></td>
<td><?php echo $row['invoice_no']; ?></td>
<td class="center-align-input"><?php echo isset($row['invoice_status']) ? $row['invoice_status'] : ' - '; ?></td>
<td><?php echo change_date_format($row['invoice_date'],'Y-m-d','d-M-Y'); ?></td>
<td><?php echo change_date_format($row['invoice_date'], 'Y-m-d', 'd-M-Y'); ?></td>
<td class="right-align-input"><?php echo isset($row['invoice_amount']) ? $row['invoice_amount'] : '0.00'; ?></td>
<td class="right-align-input"><?php echo isset($row['total_paid']) ? $row['total_paid'] : '0.00'; ?></td>
<td class="right-align-input"><?php echo isset($row['outstanding_amount']) ? $row['outstanding_amount'] : '0.00'; ?></td>
@ -222,17 +216,19 @@ table.dataTable tbody td {
</div>
</div><!-- end col -->
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('#collapseOne').on('show.bs.collapse', function () {
$(document).ready(function() {
$('#collapseOne').on('show.bs.collapse', function() {
// When open
$('#icon').removeClass('mdi-chevron-down').addClass('mdi-chevron-up');
$('#filterAccordion').removeAttr("style"); // remove custom bg/border when open
});
$('#collapseOne').on('hide.bs.collapse', function () {
$('#collapseOne').on('hide.bs.collapse', function() {
// When closed
$('#icon').removeClass('mdi-chevron-up').addClass('mdi-chevron-down');
// $('#filterAccordion').css({
@ -242,10 +238,10 @@ $(document).ready(function () {
// "box-shadow": "0px 4px 4px 0px #00000040"
// });
});
});
});
// Datatable document ready
$(document).ready(function() {
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
@ -255,8 +251,7 @@ $(document).ready(function() {
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: [
{
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
@ -298,8 +293,7 @@ $(document).ready(function() {
}
}
]
}
],
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
@ -310,16 +304,16 @@ $(document).ready(function() {
} else {
console.error("Table not found.");
}
});
});
$(document).ready(function() {
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
$('#insurer_id').select2();
$('#policy_type_id').select2();
})
})
function fetchEmpolyeeList(event) {
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
@ -346,13 +340,13 @@ function fetchEmpolyeeList(event) {
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
function objectToQueryString(obj) {
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function getURLParams() {
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -391,9 +385,9 @@ function getURLParams() {
}
}
}
$(function() {
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -448,9 +442,9 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null) {
function hideDateField(input = null) {
let val = $('#date_type').val();
if (input) {
@ -462,10 +456,10 @@ function hideDateField(input = null) {
} else {
$('#date_div').hide()
}
}
}
function sendPolicyTransactionID(event, pt_id) {
function sendPolicyTransactionID(event, pt_id) {
event.preventDefault(); // Prevent default action
console.log(pt_id);
@ -478,5 +472,5 @@ function sendPolicyTransactionID(event, pt_id) {
const apiURL = $('#get-policy-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
</script>

View File

@ -1,54 +1,54 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
/*
}
/*
table.dataTable thead th {
padding: 4px 4px !important;
} */
.col-12 {
max-width: 98% !important;
}
.dataTables_filter{
.dataTables_filter {
position: absolute;
}
}
.column-header {
margin-right: 10px; /* Adjust this value as needed */
}
.column-header {
margin-right: 10px;
/* Adjust this value as needed */
}
.form-section {
.form-section {
border: 1px solid #ccc;
padding: 15px;
margin-bottom: 20px;
}
}
.row-box {
.row-box {
border: 1px solid #ccc;
padding: 10px;
margin-bottom: 10px;
}
custom-dropdown-menu {
}
custom-dropdown-menu {
display: none;
position: fixed;
background-color: #ffffff !important;
border: 1px solid rgba(0,0,0,.15);
border: 1px solid rgba(0, 0, 0, .15);
border-radius: 0.25rem;
padding: 0.5rem 0;
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
@ -61,25 +61,25 @@ custom-dropdown-menu {
border: 0 !important;
text-decoration: none !important;
position: relative !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
.custom-dropdown-menu .dropdown-item i {
.custom-dropdown-menu .dropdown-item i {
margin-right: 8px !important;
vertical-align: middle !important;
}
}
.table tbody tr {
.table tbody tr {
cursor: pointer;
}
}
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
content: '';
position: absolute;
top: 0;
@ -88,21 +88,20 @@ custom-dropdown-menu {
bottom: 0;
background: #ffffff;
z-index: -1;
}
}
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.05);
background: rgba(0, 0, 0, 0.05);
z-index: -2;
pointer-events: none;
}
}
</style>
<style>
@ -143,15 +142,15 @@ custom-dropdown-menu {
transition: .4s;
}
input:checked + .slider {
input:checked+.slider {
background-color: #2196F3;
}
input:focus + .slider {
input:focus+.slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
input:checked+.slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
@ -167,7 +166,7 @@ custom-dropdown-menu {
}
</style>
<div class="container-fluid-min">
<div class="col-12" id="endorsement_filter">
<div id="accordion" class="mb-3">
@ -186,7 +185,7 @@ custom-dropdown-menu {
<div class="form-group col-md-3">
<label for="client_branch">Client<span class="text-danger"></span></label>
<select class="form-control" id="client_id_for_search" name="client_id" >
<select class="form-control" id="client_id_for_search" name="client_id">
<option value="0">Select Client</option>
<?php
if (isset($client) && count($client)) {
@ -200,17 +199,17 @@ custom-dropdown-menu {
<div class="form-group col-md-3">
<label for="addon_policy"> Insurer <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="insurer_id_for_search" name="insurer_id" >
<select class="form-control" id="insurer_id_for_search" name="insurer_id">
<option value="0" selected>Select Insurer</option>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-3">
<label for="email"> Policy Type <span class="text-danger"></span></label>
<select class="form-control" id="policy_type_for_search" name="policy_type_id" >
<select class="form-control" id="policy_type_for_search" name="policy_type_id">
<option value="0">Select Policy Type</option>
<?php
if (isset($policy_types) && count($policy_types)) {
@ -241,7 +240,7 @@ custom-dropdown-menu {
<div class="form-group col-md-3">
<label for="email"> Status <span class="text-danger"></span></label>
<select class="form-control" id="policy_status_for_search" name="policy_type_id" >
<select class="form-control" id="policy_status_for_search" name="policy_type_id">
<option value="0">Select Status</option>
<?php
if (isset($policy_status) && count($policy_status)) {
@ -323,9 +322,9 @@ custom-dropdown-menu {
</tr>
</thead>
<tbody>
<?php foreach($endorsement_data_list as $index => $row){ ?>
<?php foreach ($endorsement_data_list as $index => $row) { ?>
<tr>
<td><?php echo $index+1; ?></td>
<td><?php echo $index + 1; ?></td>
<td><?php echo $issuer[$row['issuer']] ?? ''; ?></td><!-- Issuer -->
<td><?php echo $row['client_short_name']; ?></td><!-- Client -->
<td><?php echo $row['client_branch_name']; ?></td><!-- Branch -->
@ -342,7 +341,7 @@ custom-dropdown-menu {
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" onclick="getPolicyTransactionDataForEndorsementEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
<a class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>" onclick="getPolicyTransactionDataForEndorsementEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
</a>
</div>
@ -355,12 +354,14 @@ custom-dropdown-menu {
</div><!-- card-body -->
</div><!-- card -->
</div><!-- end col -->
</div>
<!-- end table row -->
<?php include('policy_transaction_endorsement_form.php'); ?>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("tickets-table");
// Create custom dropdown
@ -438,11 +439,9 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
var client_list = '';
var branch_list = '';
var policy_list = <?= json_encode($endorsementPolicies) ?>;
@ -452,7 +451,7 @@ document.addEventListener("DOMContentLoaded", function () {
var unit_list = '';
// select2 document ready
$(document).ready(function(){
$(document).ready(function() {
getClientAndBranchAndPolicy()
@ -489,8 +488,7 @@ document.addEventListener("DOMContentLoaded", function () {
dom: "<'row'<'col-sm-6'f><'col-sm-5 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: [
{
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
@ -517,7 +515,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
// Date document ready
$(document).ready(function(){
$(document).ready(function() {
var today = new Date();
@ -577,8 +575,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
function hide_list_show_add()
{
function hide_list_show_add() {
removeAllColumnsExceptFirst('insurerTable');
$('.hideter').hide()
$('.hidetp').hide()
@ -592,16 +589,14 @@ document.addEventListener("DOMContentLoaded", function () {
$('#invoice_no').attr('required', false)
}
function show_list_hide_add()
{
function show_list_hide_add() {
$('#endorsement_form').hide()
$('#endorsement_list').show()
$('#endorsement_filter').show()
}
function getClientAndBranchAndPolicy()
{
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -610,14 +605,14 @@ document.addEventListener("DOMContentLoaded", function () {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
if (res.status == true) {
branch_list = res.branch_data;
// policy_list = res.policy_data;
// policyListByClient = res.policyListByClient;
client_list = res.client_data;
unit_list = res.unit_data;
appendClients(res.client_data);
}else{
} else {
console.log('No data found');
}
@ -629,8 +624,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
}
function appendClients(data)
{
function appendClients(data) {
$('#client_id').empty();
$('#client_id').append($('<option>', {
@ -645,7 +639,7 @@ document.addEventListener("DOMContentLoaded", function () {
$.each(data, function(index, item) {
if(item.client_policy_count > 0){
if (item.client_policy_count > 0) {
var option = $('<option>', {
value: item.id,
@ -657,8 +651,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
}
function appendBranch(data)
{
function appendBranch(data) {
$('#client_branch_id').empty();
@ -677,8 +670,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
}
function appendPolicies(data)
{
function appendPolicies(data) {
if (!data) {
toastr.warning("There are no policies in Inception for the selected client and branch.");
@ -696,25 +688,24 @@ document.addEventListener("DOMContentLoaded", function () {
var option = $('<option>', {
value: item.id,
text: item.policy_type + '-' + item.policy_no,
'data-sd' : item.policy_start_date,
'data-ed' : item.policy_end_date,
'data-insurer' : item.insurer_branch_id + '-' + item.insurer_id,
'data-policy' : item.policy_no,
'data-cd' : item.cd_ac_no,
'data-ebp' : item.ebp,
'data-etp' : item.etp,
'data-iep' : item.iep,
'data-itp' : item.itp,
'data-bap' : item.bap,
'data-tpa' : item.tpa_branch_id + '-' + item.tpa_id,
'data-ptid' : item.policy_type_id,
'data-sd': item.policy_start_date,
'data-ed': item.policy_end_date,
'data-insurer': item.insurer_branch_id + '-' + item.insurer_id,
'data-policy': item.policy_no,
'data-cd': item.cd_ac_no,
'data-ebp': item.ebp,
'data-etp': item.etp,
'data-iep': item.iep,
'data-itp': item.itp,
'data-bap': item.bap,
'data-tpa': item.tpa_branch_id + '-' + item.tpa_id,
'data-ptid': item.policy_type_id,
});
$('#client_policy_id').append(option);
});
}
function logSelectedIds()
{
function logSelectedIds() {
var selectedIds = [];
$('.row-select:checked').each(function() {
selectedIds.push($(this).data('id'));
@ -735,7 +726,7 @@ document.addEventListener("DOMContentLoaded", function () {
var isValid = $('#invoiceForm').parsley().validate();
if (!isValid) {
console.log('Form is Empty', 'Warning');
return ;
return;
}
form_action = '<?= base_url("util/updateInvoiceStatus"); ?>';
@ -750,7 +741,7 @@ document.addEventListener("DOMContentLoaded", function () {
formData.append('ids', JSON.stringify(ids));
$.ajax({
data:formData,
data: formData,
url: form_action,
type: "POST",
dataType: 'json',
@ -761,16 +752,16 @@ document.addEventListener("DOMContentLoaded", function () {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
if(res.status == true){
if (res.status == true) {
toastr.success(res.message, 'Success');
}else{
} else {
toastr.error(res.message, 'Error');
}
window.location.reload();
$('.close').click();
},
error: function (xhr, status, error) {
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
$('.loader').fadeOut();
@ -779,47 +770,44 @@ document.addEventListener("DOMContentLoaded", function () {
});
});
$('#invoice_status').change(function(){
$('#invoice_status').change(function() {
let value = $(this).val()
if(value == 'generated'){
if (value == 'generated') {
$('#invoice_no_div').show()
$('#invoice_no').attr('required', true)
}else{
} else {
$('#invoice_no_div').hide()
$('#invoice_no').attr('required', false)
}
})
$('#invoice_status_modal').change(function(){
$('#invoice_status_modal').change(function() {
let value = $(this).val()
if(value == 'generated'){
if (value == 'generated') {
$('#invoice_no_div_modal').show()
$('#invoice_no_modal').attr('required', true)
}else{
} else {
$('#invoice_no_div_modal').hide()
$('#invoice_no_modal').attr('required', false)
}
})
</script>
<script>
$(document).ready(function() {
$(document).ready(function() {
getURLParams()
$('#client_id_for_search').select2();
$('#insurer_id_for_search').select2();
$('#policy_type_for_search').select2();
})
})
function fetchEmpolyeeList(event)
{
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
@ -850,15 +838,13 @@ function fetchEmpolyeeList(event)
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
function objectToQueryString(obj)
{
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function getURLParams()
{
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -887,7 +873,7 @@ function getURLParams()
// console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function(){
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id_for_search').val(client_id).change()
@ -896,13 +882,13 @@ function getURLParams()
$('#date_type').val(date_type)
$('#issuer_for_search').val(issuer)
$('#policy_status_for_search').val(status)
},1000)
}, 1000)
}
}
}
$(function() {
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -927,7 +913,9 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -956,21 +944,19 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null)
{
function hideDateField(input = null) {
let val = $('#date_type').val();
if(input){
if (input) {
val = input;
}
if(val != 0){
if (val != 0) {
$('#date_div').show()
}else{
} else {
$('#date_div').hide()
}
}
}
</script>

View File

@ -144,9 +144,6 @@ table.dataTable tbody td {
}
</style>
<div class="col-12">
<h4 class="ml-1 mb-3"> <span class="font-color-black">Policy</span> </h4>
</div>
<div class="col-12" id="inception_filter">
<div id="accordion" class="mb-3">
@ -271,7 +268,7 @@ table.dataTable tbody td {
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Policy </h4>
<h4 style="position: relative;">Policy List </h4>
</div>
<div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;">

View File

@ -1,17 +1,17 @@
<style>
.custom-dropdown-menu {
.custom-dropdown-menu {
display: none;
position: fixed;
background-color: #ffffff !important;
border: 1px solid rgba(0,0,0,.15);
border: 1px solid rgba(0, 0, 0, .15);
border-radius: 0.25rem;
padding: 0.5rem 0;
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
@ -24,25 +24,25 @@
border: 0 !important;
text-decoration: none !important;
position: relative !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
.custom-dropdown-menu .dropdown-item i {
.custom-dropdown-menu .dropdown-item i {
margin-right: 8px !important;
vertical-align: middle !important;
}
}
.table tbody tr {
.table tbody tr {
cursor: pointer;
}
}
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
content: '';
position: absolute;
top: 0;
@ -51,22 +51,24 @@
bottom: 0;
background: #ffffff;
z-index: -1;
}
}
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.05);
background: rgba(0, 0, 0, 0.05);
z-index: -2;
pointer-events: none;
}
}
</style>
<div class="row" id="policy_list">
<div class="container-fluid-min">
<div class="row" id="policy_list">
<div class="col-12">
<div class="card">
<div class="card-body maincard">
@ -97,7 +99,8 @@
</thead>
<tbody>
<?php if(is_array($policyList)) {foreach($policyList as $row){ ?>
<?php if (is_array($policyList)) {
foreach ($policyList as $row) { ?>
<tr>
<td><?php echo $row['policy_type']; ?> </td>
<td><?php echo $row['long_name']; ?> </td>
@ -106,26 +109,29 @@
<td><?php echo $row['alloci']; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="<?= base_url("master/policy/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removePolciyType(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
<a class="dropdown-item" href="<?= base_url("master/policy/list/"); ?><?= $row['id']; ?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id']; ?>" onclick="removePolciyType(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
</div>
</div>
</td>
</tr>
<?php }}?>
<?php }
} ?>
</tbody>
</table>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<!-- end row -->
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("tickets-table");
// Create custom dropdown
@ -205,46 +211,45 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
$(document).ready(function(){
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'PolicyTypeList',
exportOptions: {
columns: ':not(:last-child)'
}
}
],
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true ,
paging: true,
});
})
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
btnExport.addEventListener("click", () => {
btnExport.addEventListener("click", () => {
const obj = new csvExport(tableElement);
const csvData = obj.exportCsv();
const blob = new Blob([csvData], { type: "text/csv" });
const blob = new Blob([csvData], {
type: "text/csv"
});
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
@ -254,10 +259,10 @@ btnExport.addEventListener("click", () => {
setTimeout(() => {
URL.revokeObjectURL(url);
}, 500);
});
});
class csvExport {
class csvExport {
constructor(table, header = true) {
this.table = table;
this.rows = Array.from(table.querySelectorAll("tr"));
@ -294,10 +299,10 @@ class csvExport {
data = /[",\n"]/.test(data) ? `"${data}"` : data;
return data;
}
}
}
function removePolciyType(element) {
function removePolciyType(element) {
Swal.fire({
title: "Are you sure?",
@ -319,7 +324,7 @@ function removePolciyType(element) {
contentType: false,
success: function(res) {
// console.log(res.status == true);
if(res){
if (res) {
if (res.status == true) {
toastr.success('Policy type removed successfully', 'success');
location.reload();
@ -328,7 +333,7 @@ function removePolciyType(element) {
}
}
},
error: function (xhr, status, error) {
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
$('.loader').fadeOut();
@ -340,8 +345,5 @@ function removePolciyType(element) {
});
}
}
</script>

View File

@ -1,11 +1,8 @@
<div class="col-12">
<h4 class="ml-1 mb-3"> <span class="font-color-black">Renewal Policy</span> </h4>
</div>
<div class="container-fluid-min">
<div class="col-xl-12">
<div id="accordion" class="mb-3">
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<h4>Filters</h4>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
@ -78,17 +75,19 @@
</div>
<div id="report"></div>
<div id="report"></div>
</div>
<script>
let client_list = [];
let client_list = [];
$(document).ready(function() {
$(document).ready(function() {
getClientAndBranchAndPolicy();
$('#client_id').select2();
})
})
$(function() {
$(function() {
var start = $('#startDate').val();
var end = $('#endDate').val();
@ -105,7 +104,9 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Next 7 Days': [moment(), moment().add(6, 'days')], // Next 7 Days
@ -120,11 +121,11 @@ $(function() {
}, cb);
cb(start, end);
});
});
// ----------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
function fetchReportPage() {
function fetchReportPage() {
var fromDate = $('#startDate').val();
var toDate = $('#endDate').val();
@ -164,12 +165,12 @@ function fetchReportPage() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
}
}
// ----------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
//get client , branch, policy data
function getClientAndBranchAndPolicy() {
//get client , branch, policy data
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -189,10 +190,10 @@ function getClientAndBranchAndPolicy() {
console.error(status, error);
}
});
}
}
//append the clients data
function appendClients(data) {
//append the clients data
function appendClients(data) {
$('#client_id').empty();
$('#client_id').append($('<option>', {
@ -210,9 +211,9 @@ function appendClients(data) {
$('#client_id').append(option).select2();
});
}
}
$('#client_type').on('change', function() {
$('#client_type').on('change', function() {
var selectedClientType = $(this).val();
@ -241,5 +242,5 @@ $('#client_type').on('change', function() {
// Initialize or refresh Select2 for both dropdowns
$('#client_id').select2();
});
});
</script>

View File

@ -1,13 +1,10 @@
<style>
.col-12 {
max-width: 98% !important;
}
</style>
<div class="col-12" id="bds_filter">
<div class="container-fluid-min">
<div class="col-12" id="bds_filter">
<div id="accordion" class="mb-3">
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filter</span>
@ -38,7 +35,7 @@
<div class="form-group col-md-3">
<label for="insurer_id"> Insurer <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()" >
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
<option value="0" selected>Select Insurer</option>
</select>
</div>
@ -66,7 +63,7 @@
<div class="form-group col-md-3">
<label for="client_policy_id"> Client Policy <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="client_policy_id" name="client_policy_id" >
<select class="form-control" id="client_policy_id" name="client_policy_id">
<option value="0" selected>Select client policy</option>
</select>
</div>
@ -87,7 +84,7 @@
<div class="form-group col-md-3">
<label for="user_id">Users<span class="text-danger"></span></label>
<select class="form-control" id="user_id" name="user_id" >
<select class="form-control" id="user_id" name="user_id">
<option value="0">Select user</option>
<?php
if (isset($users) && count($users)) {
@ -142,25 +139,26 @@
</div>
</div>
</div>
</div>
<!-- end page title -->
<div id="file_list">
<!-- end page title -->
<div id="file_list">
<?php include('report_bds.php'); ?>
</div>
</div>
<script>
let client_list = [];
let branch_list = [];
let policy_list = [];
let insurer_list = [];
let insurer_branch_list = [];
let client_list = [];
let branch_list = [];
let policy_list = [];
let insurer_list = [];
let insurer_branch_list = [];
$(document).ready(function() {
$(document).ready(function() {
getClientAndBranchAndPolicy()
getURLParams()
@ -172,10 +170,9 @@ $(document).ready(function() {
$('#client_policy_id').select2();
$('#user_id').select2();
})
})
function fetchEmpolyeeList(event)
{
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
@ -211,15 +208,13 @@ function fetchEmpolyeeList(event)
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
function objectToQueryString(obj)
{
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function getURLParams()
{
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -254,7 +249,7 @@ function getURLParams()
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function(){
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).select2()
@ -263,20 +258,20 @@ function getURLParams()
$('#policy_type_id').val(policy_type_id).select2()
$('#date_type').val(date_type).trigger('change');
$('#issuer').val(issuer)
setTimeout(function(){
setTimeout(function() {
$('#client_branch_id').val(client_branch_id).select2()
$('#insurer_branch_id').val(insurer_branch_id).select2()
setTimeout(function(){
setTimeout(function() {
$('#client_policy_id').val(client_policy_id).select2();
}, 1000);
}, 2000)
},1000)
}, 1000)
}
}
}
$(function() {
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -301,7 +296,9 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -329,28 +326,26 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null)
{
function hideDateField(input = null) {
let val = $('#date_type').val();
if(input){
if (input) {
val = input;
}
if(val != 0){
if (val != 0) {
$('#date_div').show()
}else{
} else {
$('#date_div').hide()
}
}
}
// -----------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------
//featch client, client branch, insurer, insurer branch and client policy list data
function getClientAndBranchAndPolicy()
{
//featch client, client branch, insurer, insurer branch and client policy list data
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -358,7 +353,7 @@ function getClientAndBranchAndPolicy()
success: function(res) {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
if (res.status == true) {
client_list = res.client_data;
branch_list = res.branch_data;
policy_list = res.policy_data;
@ -366,7 +361,7 @@ function getClientAndBranchAndPolicy()
insurer_branch_list = res.insurer_branch_data;
appendClients(res.client_data);
appendInsurer(res.insurer_data);
}else{
} else {
console.log('No data found');
}
@ -376,11 +371,10 @@ function getClientAndBranchAndPolicy()
console.error(status, error);
}
});
}
}
//append clients for filter
function appendClients(data)
{
//append clients for filter
function appendClients(data) {
$('#client_id').empty();
$('#client_id').append($('<option>', {
@ -400,11 +394,10 @@ function appendClients(data)
$('#client_id').append(option);
});
}
}
//append clients branch for filter
function appendBranch(data)
{
//append clients branch for filter
function appendBranch(data) {
$('#client_branch_id').empty();
@ -421,11 +414,10 @@ function appendBranch(data)
});
$('#client_branch_id').append(option);
});
}
}
//append insurer for filter
function appendInsurer(data)
{
//append insurer for filter
function appendInsurer(data) {
$('#insurer_id').empty();
$('#insurer_id').append($('<option>', {
@ -442,11 +434,10 @@ function appendInsurer(data)
$('#insurer_id').append(option);
});
}
}
//append insurer branch for filter
function appendInsurerBranch(data)
{
//append insurer branch for filter
function appendInsurerBranch(data) {
$('#insurer_branch_id').empty();
@ -463,11 +454,10 @@ function appendInsurerBranch(data)
});
$('#insurer_branch_id').append(option);
});
}
}
//append client policy for filter
function appendPolicies(data)
{
//append client policy for filter
function appendPolicies(data) {
// console.log('appendPolicies', data);
// console.log('appendPolicies', $('#client_policy_id'));
@ -484,19 +474,19 @@ function appendPolicies(data)
});
$('#client_policy_id').append(option);
});
}
}
// -------------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------
//client branch and insurer branch onchange document ready function
$(document).ready(function(){
//client branch and insurer branch onchange document ready function
$(document).ready(function() {
$('#client_id').change(function(){
$('#client_id').change(function() {
let client_id = $(this).val();
console.log('client_id', client_id);
if(branch_list != '') {
if (branch_list != '') {
// console.log(branch_list[client_id]);
let data = branch_list[client_id];
appendBranch(data);
@ -504,12 +494,12 @@ $(document).ready(function(){
})
$('#insurer_id').change(function(){
$('#insurer_id').change(function() {
let insurer_id = $(this).val();
console.log('insurer_id', insurer_id);
if(insurer_branch_list != '') {
if (insurer_branch_list != '') {
// console.log(insurer_branch_list[insurer_id]);
let data = insurer_branch_list[insurer_id];
appendInsurerBranch(data);
@ -517,10 +507,10 @@ $(document).ready(function(){
})
});
});
//get policy list based on the client, client_branch, insurer, insurer_branch and policy type
function getClientPolicyDataBasedOnClientAndInsuer(){
//get policy list based on the client, client_branch, insurer, insurer_branch and policy type
function getClientPolicyDataBasedOnClientAndInsuer() {
let client_id = $('#client_id').val() ?? 0;
let client_branch_id = $('#client_branch_id').val() ?? 0;
@ -553,18 +543,17 @@ function getClientPolicyDataBasedOnClientAndInsuer(){
console.error(xhr.responseText);
});
}
}
//for the change title
function changeTitle(input){
//for the change title
function changeTitle(input) {
let val = $(input).val();
if(val == 'statement_month'){
if (val == 'statement_month') {
$('#bds_title').text(' - Statement Month Wise List')
}else{
} else {
$('#bds_title').text(' - Policy Wise List')
}
}
}
</script>

View File

@ -26,7 +26,7 @@
}
</style>
<div class="container-fluid">
<div class="container-fluid-min">
<h2>Retail Endorsement</h2>
<div class="row">
<div class="col-xl-12">
@ -332,7 +332,7 @@
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{

View File

@ -8,10 +8,7 @@
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;

View File

@ -45,7 +45,7 @@ table.dataTable tbody td {
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h2 style="position: relative;">Claim Feedback List </h2>
<h4 style="position: relative;">Claim Feedback List </h4>
</div>
</div>

View File

@ -28,9 +28,11 @@
font-size: 0.875rem;
}
</style>
<div class="row">
<div class="container-fluid-min">
<div class="row">
<div class="col-12">
<div class="<?= !isset($ticket_data) ? "card" : "" ?>" style="margin-right: 23px;">
<div class="<?= !isset($ticket_data) ? "card" : "" ?>" >
<div class="card-body">
<?php if (!isset($ticket_data)) { ?>
<!-- Header Section -->
@ -465,8 +467,10 @@
</form>
</div>
</div>
</div>
</div>
<!-- Info Modal -->
<div class="modal fade" id="moreInfoModal" tabindex="-1" role="dialog" aria-labelledby="fullWidthModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document">
@ -1197,7 +1201,6 @@
$('#tpa_id').val(tap_id);
$('#tpa_name').val(tap_name);
}
</script>
<script>
$("#infoIcon").click(function() {

View File

@ -8,10 +8,7 @@
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;

View File

@ -1,14 +1,16 @@
<div class="row">
<div class="container-fluid-min">
<div class="row">
<!-- <h3 class="ml-3">Claim Reports</h3> -->
<div class="col-xl-12">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -59,11 +61,11 @@
</div>
</div>
</div>
</div>
<div class="row" id="report"></div>
</div>
<div class="card mb-1">
<div id="report"></div>
</div>
<script>
$(function() {
@ -98,8 +100,7 @@
});
</script>
<script>
function fetchReportPage() {
function fetchReportPage() {
var fromDate = $('#startDate').val();
var toDate = $('#endDate').val();
@ -121,11 +122,11 @@ function fetchReportPage() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
}else{
} else {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
let message = response.message;
toastr.error(message,'ERROR');
toastr.error(message, 'ERROR');
}
@ -137,5 +138,5 @@ function fetchReportPage() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
}
}
</script>

View File

@ -5,17 +5,18 @@
}
</style>
<div class="row">
<div class="container-fluid-min">
<div class="row">
<div class="col-12" style="margin-top: -12px;">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h2 class="m-3">
Claim Filter
<h4>
Filter
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h2>
</h4>
<div id="collapseOne" class="collapse hide" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
@ -133,17 +134,19 @@
</div>
</div>
</div>
<div class="row" id="ticket_list_div">
<?php include('ticket_list.php'); ?>
</div>
</div>
<!-- end page title -->
<div class="row" id="ticket_list_div">
<?php include('ticket_list.php'); ?>
</div>
<script>
$(document).ready(function() {
$(document).ready(function() {
// Initialize select2
$('#client_id').select2();
$('#claim_status').select2();
@ -153,7 +156,7 @@ $(document).ready(function() {
});
$('#ticket_type').on('change',function(){
$('#ticket_type').on('change', function() {
var ticket_type = $('#ticket_type').val();
var claim_status = <?= json_encode($claim_status) ?>;
$('#claim_status').empty();
@ -163,8 +166,8 @@ $(document).ready(function() {
}));
// console.log('Claim Status:', claim_status);
for (var i = 0;i<claim_status.length;i++){
if(claim_status[i]['ticket_type'] == ticket_type){
for (var i = 0; i < claim_status.length; i++) {
if (claim_status[i]['ticket_type'] == ticket_type) {
$('#claim_status').append($('<option>', {
value: claim_status[i]['id'], // Use 'id' as the value
text: claim_status[i]['claim_status'] // Use 'claim_status' as the text
@ -173,7 +176,7 @@ $(document).ready(function() {
}
})
function fetchTicketListData() {
function fetchTicketListData() {
var ticket_type = $('#ticket_type').val();
var pod_no = $('#pod_no').val();
@ -235,19 +238,18 @@ function fetchTicketListData() {
});
}
}
</script>
<script>
$(document).ready(function(){
$(document).ready(function() {
let filterData = localStorage.getItem('filterData');
filterData = filterData ? JSON.parse(filterData) : null;
console.log('Filter Data', filterData);
if(filterData){
if (filterData) {
var url = '<?= base_url('/ticket/list') ?>';
$('.loader').fadeIn();
@ -295,7 +297,7 @@ function fetchTicketListData() {
</script>
<script>
$(document).on('click', '#clear-filters', function (e) {
$(document).on('click', '#clear-filters', function(e) {
e.preventDefault(); // Stops the browser from following the link
@ -313,8 +315,6 @@ function fetchTicketListData() {
$('#client_id').val('0');
$('#insurer_id').val('0');
window.location.href = "<?= base_url("/ticket/list")?>";
});
window.location.href = "<?= base_url("/ticket/list") ?>";
});
</script>

View File

@ -1,6 +1,5 @@
<style>
.custom-dropdown-menu {
.custom-dropdown-menu {
display: none;
position: absolute;
background-color: #ffffff !important;
@ -10,37 +9,37 @@
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
color: #212529 !important;
text-decoration: none !important;
background-color: transparent !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
.btn-color{
.btn-color {
background-color: rgba(52, 174, 178, 1);
color: white;
border:1px solid rgba(52, 174, 178, 1);
}
border: 1px solid rgba(52, 174, 178, 1);
}
.btn-color:hover{
.btn-color:hover {
background-color: rgba(41, 139, 142, 1);
color: white;
border:1px solid rgba(41, 139, 142, 1);
}
border: 1px solid rgba(41, 139, 142, 1);
}
</style>
<div class="row" id="tpa_list">
<div class="container-fluid-min">
<div class="row" id="tpa_list">
<div class="col-12">
<div class="card">
<div class="card-body maincard">
@ -59,30 +58,34 @@
</thead>
<tbody>
<?php if(is_array($tpaList)) {foreach($tpaList as $row){ ?>
<?php if (is_array($tpaList)) {
foreach ($tpaList as $row) { ?>
<tr>
<td><?php echo $row['name']; ?> ( <?php echo $row['short_name']; ?> ) </td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="<?= base_url("master/tpa/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeTPA(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
<a class="dropdown-item" href="<?= base_url("master/tpa/list/"); ?><?= $row['id']; ?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id']; ?>" onclick="removeTPA(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
</div>
</div>
</td>
</tr>
<?php }}?>
<?php }
} ?>
</tbody>
</table>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<!-- end row -->
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("tickets-table");
// Create custom dropdown
@ -168,19 +171,17 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
$(document).ready(function(){
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'d-flex justify-content-between align-items-center'<'datatable-search'f><'datatable-buttons'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'TPAList',
@ -191,7 +192,7 @@ document.addEventListener("DOMContentLoaded", function () {
{
text: 'ADD',
className: 'btn btn-color',
action: function () {
action: function() {
window.location.href = "<?= base_url("master/tpa/create"); ?>";
}
}
@ -207,18 +208,20 @@ document.addEventListener("DOMContentLoaded", function () {
</div>`,
searchPlaceholder: "Search"
},
paging: true ,
paging: true,
});
})
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
btnExport.addEventListener("click", () => {
btnExport.addEventListener("click", () => {
const obj = new csvExport(tableElement);
const csvData = obj.exportCsv();
const blob = new Blob([csvData], { type: "text/csv" });
const blob = new Blob([csvData], {
type: "text/csv"
});
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
@ -228,10 +231,10 @@ btnExport.addEventListener("click", () => {
setTimeout(() => {
URL.revokeObjectURL(url);
}, 500);
});
});
class csvExport {
class csvExport {
constructor(table, header = true) {
this.table = table;
this.rows = Array.from(table.querySelectorAll("tr"));
@ -268,10 +271,10 @@ class csvExport {
data = /[",\n"]/.test(data) ? `"${data}"` : data;
return data;
}
}
}
function removeTPA(element) {
function removeTPA(element) {
Swal.fire({
title: "Are you sure?",
@ -293,7 +296,7 @@ function removeTPA(element) {
contentType: false,
success: function(res) {
// console.log(res.status == true);
if(res){
if (res) {
if (res.status == true) {
toastr.success('TPA removed successfully', 'success');
location.reload();
@ -302,7 +305,7 @@ function removeTPA(element) {
}
}
},
error: function (xhr, status, error) {
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
$('.loader').fadeOut();
@ -314,6 +317,4 @@ function removeTPA(element) {
});
}
</script>

View File

@ -1,39 +1,33 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
.dataTables_filter {
position: absolute;
}
}
.right-align-input {
.right-align-input {
text-align: right;
}
}
.center-align-input {
.center-align-input {
text-align: center;
}
}
</style>
<div class="col-12">
<h3 class="ml-1 mb-3"> <span class="font-color-black">Variance</span> </h3>
</div>
<div class="col-12" id="varience_filter">
<div class="container-fluid-min">
<div class="col-12" id="varience_filter">
<div id="accordion" class="mb-3">
<label class="m-1 d-flex justify-content-between align-items-center">
<span class="title-text font-color-black" style="margin-top: 8px;">Filters</span>
<h4>Filters</h4>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
@ -61,7 +55,7 @@ table.dataTable tbody td {
<div class="form-group col-md-3">
<label for="insurer_id"> Insurer <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()" >
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
<option value="0" selected>Select Insurer</option>
</select>
</div>
@ -89,7 +83,7 @@ table.dataTable tbody td {
<div class="form-group col-md-3">
<label for="client_policy_id"> Client Policy <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="client_policy_id" name="client_policy_id" >
<select class="form-control" id="client_policy_id" name="client_policy_id">
<option value="0" selected>Select client policy</option>
</select>
</div>
@ -148,9 +142,9 @@ table.dataTable tbody td {
</div>
</div>
</div>
</div>
</div>
<div class="col-12" id="varience_list">
<div class="col-12" id="varience_list">
<div class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
@ -180,14 +174,14 @@ table.dataTable tbody td {
</thead>
<tbody>
<?php if (isset($varience_list)) { ?>
<?php foreach($varience_list as $index => $row){ ?>
<?php foreach ($varience_list as $index => $row) { ?>
<tr>
<td><?= $index + 1 ?></td>
<td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['client_branch_name']; ?></td>
<td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['insurer_branch_name']; ?></td>
<td><?php echo $row['policy_type'] .' - '. $row['policy_no']; ?></td>
<td><?php echo $row['policy_type'] . ' - ' . $row['policy_no']; ?></td>
<td><?php echo $row['endorsement_no']; ?></td>
<td class="right-align-input"><?php echo $row['original_premium']; ?></td>
<td class="right-align-input"><?php echo isset($row['statement_premium']) ? $row['statement_premium'] : '0.00'; ?></td>
@ -206,18 +200,19 @@ table.dataTable tbody td {
</div>
</div><!-- end col -->
</div>
</div>
</div>
<script>
let client_list = [];
let branch_list = [];
let policy_list = [];
let insurer_list = [];
let insurer_branch_list = [];
let client_list = [];
let branch_list = [];
let policy_list = [];
let insurer_list = [];
let insurer_branch_list = [];
// Datatable document ready
$(document).ready(function() {
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
@ -227,8 +222,7 @@ $(document).ready(function() {
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: [
{
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
@ -270,8 +264,7 @@ $(document).ready(function() {
}
}
]
}
],
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
@ -282,9 +275,9 @@ $(document).ready(function() {
} else {
console.error("Table not found.");
}
});
});
$(document).ready(function() {
$(document).ready(function() {
getClientAndBranchAndPolicy()
getURLParams()
$('#client_id').select2();
@ -293,10 +286,9 @@ $(document).ready(function() {
$('#insurer_branch_id').select2();
$('#client_policy_id').select2();
$('#policy_type_id').select2();
})
})
function fetchEmpolyeeList(event)
{
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
@ -329,14 +321,13 @@ function fetchEmpolyeeList(event)
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
function objectToQueryString(obj) {
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function getURLParams()
{
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -369,7 +360,7 @@ function getURLParams()
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function(){
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).change()
@ -377,20 +368,20 @@ function getURLParams()
$('#policy_type_id').val(policy_type_id).change()
$('#date_type').val(date_type)
$('#issuer').val(issuer)
setTimeout(function(){
setTimeout(function() {
$('#client_branch_id').val(client_branch_id).change()
$('#insurer_branch_id').val(insurer_branch_id).change()
setTimeout(function(){
setTimeout(function() {
$('#client_policy_id').val(client_policy_id).change();
}, 1000);
}, 2000)
},2000)
}, 2000)
}
}
}
$(function() {
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -415,7 +406,9 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -445,9 +438,9 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null) {
function hideDateField(input = null) {
let val = $('#date_type').val();
if (input) {
@ -459,9 +452,9 @@ function hideDateField(input = null) {
} else {
$('#date_div').hide()
}
}
}
function sendPolicyTransactionID(event, pt_id) {
function sendPolicyTransactionID(event, pt_id) {
event.preventDefault(); // Prevent default action
console.log(pt_id);
@ -474,13 +467,12 @@ function sendPolicyTransactionID(event, pt_id) {
const apiURL = $('#get-policy-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
// -------------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------
//featch client, client branch, insurer, insurer branch and client policy list data
function getClientAndBranchAndPolicy()
{
//featch client, client branch, insurer, insurer branch and client policy list data
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -488,7 +480,7 @@ function getClientAndBranchAndPolicy()
success: function(res) {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
if (res.status == true) {
client_list = res.client_data;
branch_list = res.branch_data;
policy_list = res.policy_data;
@ -496,7 +488,7 @@ function getClientAndBranchAndPolicy()
insurer_branch_list = res.insurer_branch_data;
appendClients(res.client_data);
appendInsurer(res.insurer_data);
}else{
} else {
console.log('No data found');
}
@ -506,11 +498,10 @@ function getClientAndBranchAndPolicy()
console.error(status, error);
}
});
}
}
//append clients for filter
function appendClients(data)
{
//append clients for filter
function appendClients(data) {
$('#client_id').empty();
$('#client_id').append($('<option>', {
@ -530,11 +521,10 @@ function appendClients(data)
$('#client_id').append(option);
});
}
}
//append clients branch for filter
function appendBranch(data)
{
//append clients branch for filter
function appendBranch(data) {
$('#client_branch_id').empty();
@ -551,11 +541,10 @@ function appendBranch(data)
});
$('#client_branch_id').append(option);
});
}
}
//append insurer for filter
function appendInsurer(data)
{
//append insurer for filter
function appendInsurer(data) {
$('#insurer_id').empty();
$('#insurer_id').append($('<option>', {
@ -572,11 +561,10 @@ function appendInsurer(data)
$('#insurer_id').append(option);
});
}
}
//append insurer branch for filter
function appendInsurerBranch(data)
{
//append insurer branch for filter
function appendInsurerBranch(data) {
$('#insurer_branch_id').empty();
@ -593,11 +581,10 @@ function appendInsurerBranch(data)
});
$('#insurer_branch_id').append(option);
});
}
}
//append client policy for filter
function appendPolicies(data)
{
//append client policy for filter
function appendPolicies(data) {
// console.log('appendPolicies', data);
// console.log('appendPolicies', $('#client_policy_id'));
@ -614,19 +601,19 @@ function appendPolicies(data)
});
$('#client_policy_id').append(option);
});
}
}
// -------------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------
//client branch and insurer branch onchange document ready function
$(document).ready(function(){
//client branch and insurer branch onchange document ready function
$(document).ready(function() {
$('#client_id').change(function(){
$('#client_id').change(function() {
let client_id = $(this).val();
console.log('client_id', client_id);
if(branch_list != '') {
if (branch_list != '') {
// console.log(branch_list[client_id]);
let data = branch_list[client_id];
appendBranch(data);
@ -634,12 +621,12 @@ $(document).ready(function(){
})
$('#insurer_id').change(function(){
$('#insurer_id').change(function() {
let insurer_id = $(this).val();
console.log('insurer_id', insurer_id);
if(insurer_branch_list != '') {
if (insurer_branch_list != '') {
// console.log(insurer_branch_list[insurer_id]);
let data = insurer_branch_list[insurer_id];
appendInsurerBranch(data);
@ -647,10 +634,10 @@ $(document).ready(function(){
})
});
});
//get policy list based on the client, client_branch, insurer, insurer_branch and policy type
function getClientPolicyDataBasedOnClientAndInsuer(){
//get policy list based on the client, client_branch, insurer, insurer_branch and policy type
function getClientPolicyDataBasedOnClientAndInsuer() {
let client_id = $('#client_id').val() ?? 0;
let client_branch_id = $('#client_branch_id').val() ?? 0;
@ -683,6 +670,5 @@ function getClientPolicyDataBasedOnClientAndInsuer(){
console.error(xhr.responseText);
});
}
}
</script>