Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
65394d7aea
@ -163,17 +163,21 @@ class EmployeeController extends AdminController
|
||||
|
||||
public function getClientWithPolicies()
|
||||
{
|
||||
//echo $this->request->isAJAX();die();
|
||||
$result = $this->clientModel->clientsWithPolicies();
|
||||
try {
|
||||
//echo $this->request->isAJAX();die();
|
||||
$result = $this->clientModel->clientsWithPolicies();
|
||||
|
||||
// dd($result);
|
||||
// dd($result);
|
||||
|
||||
// print_r($result);die();
|
||||
if (!count($result)) {
|
||||
return $this->respond(['dataStatus' => false, 'code' => 404, 'message' => 'no data found'], 200);
|
||||
} else {
|
||||
|
||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $result], 200);
|
||||
// print_r($result);die();
|
||||
if (!count($result)) {
|
||||
return $this->respond(['dataStatus' => false, 'code' => 404, 'message' => 'no data found'], 200);
|
||||
} else {
|
||||
|
||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $result], 200);
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
return $this->respond(['dataStatus' => false, 'code' => 500, 'message' => $th->getMessage()], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4615,6 +4615,8 @@ class LeadsController extends BaseController
|
||||
'selected_lead_type' => $type,
|
||||
'actual_lead_id' => $actual_lead_id,
|
||||
];
|
||||
$data['tab_name'] = 'Opportunities';
|
||||
$data['page_name'] = 'Opportunities';
|
||||
|
||||
if ($actual_lead_id > 0) {
|
||||
|
||||
|
||||
@ -1027,7 +1027,8 @@ class TicketController extends BaseController
|
||||
$data['claim_status'] = $this->transFormClaimStatus($claim_status_id, $ticket_type);
|
||||
$data['client_for_motor'] = $this->clientModel->select('id,client_name,phone')->where('client_type', 2)->where('is_active', 1)->findAll();
|
||||
}
|
||||
|
||||
$data['tab_name'] = "Claims";
|
||||
$data['page_name'] = "Claims";
|
||||
return $this->loadLayout('ticket_edit_onbording', $data);
|
||||
}
|
||||
|
||||
|
||||
@ -185,7 +185,8 @@
|
||||
|
||||
<?php if(in_array(get_role_id(), [1,2,3,4,5]) || (in_array(ENROLLMENT_TEAM_ID, user_team()) || in_array(CLAIMS_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
|
||||
|
||||
<div class="row" id="client_add" >
|
||||
<!-- <div class="row" id="client_add"> -->
|
||||
<div class="row" id="client_add" style="margin-top:12px!important">
|
||||
<div class="col-12">
|
||||
<!-- <div class="card"> -->
|
||||
<div class="card-body">
|
||||
|
||||
@ -355,7 +355,7 @@ table.dataTable tbody td {
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Users</h4>
|
||||
|
||||
@ -59,7 +59,7 @@ table.dataTable thead th {
|
||||
<div class="row" id="client_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">CD Master</h4>
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
<script>
|
||||
var pageSubTitle = 'Client Deposit - <?= $clientName[0]["client_name"]; ?>';
|
||||
|
||||
var pageBackButton = '<a href="<?= base_url("client/list"); ?>" data-toggle="tooltip" data-placement="top" title="Back to Client List"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
<div class="row" id="client_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
|
||||
<h4 style="position: relative;">Client Deposit -
|
||||
@ -12,53 +17,53 @@
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("client/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>
|
||||
</div>
|
||||
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<!- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div> -->
|
||||
</div>
|
||||
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="font-weight-medium">Insurer Name </th>
|
||||
<th class="font-weight-medium">Insurer Branch Name </th>
|
||||
<th class="font-weight-medium">CD Account Number </th>
|
||||
<th class="font-weight-medium">Current Balance </th>
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</div> ->
|
||||
</div> -->
|
||||
<div class="table-responsive">
|
||||
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="font-weight-medium">Insurer Name </th>
|
||||
<th class="font-weight-medium">Insurer Branch Name </th>
|
||||
<th class="font-weight-medium">CD Account Number </th>
|
||||
<th class="font-weight-medium">Current Balance </th>
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<tbody>
|
||||
<?php foreach ($clientData as $value): ?>
|
||||
<tr>
|
||||
<td><?php echo $value->insurer_name;?></td>
|
||||
<td><?php echo $value->insurer_branch_name;?></td>
|
||||
<td><?php echo $value->cd_master_account_no;?></td>
|
||||
|
||||
<td><?php echo $value->insurer_name;?></td>
|
||||
<td><?php echo $value->insurer_branch_name;?></td>
|
||||
<td><?php echo $value->cd_master_account_no;?></td>
|
||||
|
||||
<td>₹
|
||||
<?php
|
||||
$insurerId = $value->insurer_id;
|
||||
$cd_ac_pk = $value->cd_ac_pk;
|
||||
// Check if the balance information exists for the insurer
|
||||
if (isset($balances[$insurerId . '-'. $cd_ac_pk])) {
|
||||
$balance = $balances[$insurerId . '-'. $cd_ac_pk]->balance;
|
||||
echo $balance;
|
||||
} else {
|
||||
echo "N/A"; // Display "Not Available" if balance information is not present
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="dropdown-item"
|
||||
href="<?= base_url("client/view_deposit/{$value->insurer_id}?client_id={$value->client_id}&cd_ac_pk={$value->cd_ac_pk}"); ?>">
|
||||
<i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View Deposit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<td>₹
|
||||
<?php
|
||||
$insurerId = $value->insurer_id;
|
||||
$cd_ac_pk = $value->cd_ac_pk;
|
||||
// Check if the balance information exists for the insurer
|
||||
if (isset($balances[$insurerId . '-'. $cd_ac_pk])) {
|
||||
$balance = $balances[$insurerId . '-'. $cd_ac_pk]->balance;
|
||||
echo $balance;
|
||||
} else {
|
||||
echo "N/A"; // Display "Not Available" if balance information is not present
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="dropdown-item"
|
||||
href="<?= base_url("client/view_deposit/{$value->insurer_id}?client_id={$value->client_id}&cd_ac_pk={$value->cd_ac_pk}"); ?>">
|
||||
<i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View Deposit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
@ -70,7 +75,7 @@ $(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
|
||||
@ -271,14 +271,18 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<script>
|
||||
var pageSubTitle = 'Client Onboarding <span id="client_heading"><?php if (isset($client)) { echo ' - ' . addslashes($client['client_name']); } ?></span>';
|
||||
var pageBackButton = '<a href="<?= base_url("ticket/list"); ?>" aria-label="Back to list"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Client Onboarding <span id="client_heading"><?php if (isset($client)) { echo ' - ' . $client['client_name']; } ?></span> </h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("client/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
@ -25,83 +25,102 @@
|
||||
|
||||
.dataTables_length label {height: 21px !important;}
|
||||
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body" style="margin-top: 0px;">
|
||||
<div class="form-group">
|
||||
<form method="post" action="<?= base_url("/dmsSearch"); ?>" id='dms_search_form'>
|
||||
<div class="form-row">
|
||||
<div id="filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<form method="post" action="<?= base_url("/dmsSearch"); ?>" id='dms_search_form'>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Customer</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" class="form-control" id="customer" placeholder="Enter customer name">
|
||||
<input type="hidden" name="customer_id" class="form-control" id="customer_id" placeholder="Enter customer name">
|
||||
<div id="customer_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Customer document name</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" name="cus_doc_name" class="form-control" id="cus_doc_name" placeholder="Enter customer doc name ">
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="form-group col-md-4"></div>
|
||||
|
||||
<div class="form-group col-md-8" style="text-align: center; font-size: small;">
|
||||
OR
|
||||
</div>
|
||||
<div class="form-group col-md-4"></div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Policy</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" class="form-control" id="policy" placeholder="Enter policy no">
|
||||
<input type="hidden" name="policy_id" class="form-control" id="policy_id" placeholder="Enter policy no">
|
||||
<div id="policy_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Policy document name</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" name="policy_doc_name" class="form-control" id="policy_doc_name" placeholder="Enter policy doc name ">
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4 d-flex justify-content-end align-items-end">
|
||||
<button type="button" class="btn app-btn-outline-secondary mr-2" id="clear-filters">Clear</button>
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="get-emp-list" onclick="fetchFileList(event);">Submit</button>
|
||||
<!-- <input type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="get-emp-list" onclick="fetchFileList(event);" value="submit"> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="customer">Customer</label>
|
||||
<input type="text" class="form-control" id="customer" placeholder="Enter customer name">
|
||||
<input type="hidden" name="customer_id" class="form-control" id="customer_id" placeholder="Enter customer name">
|
||||
<div id="customer_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="customer">Customer document name</label>
|
||||
<input type="text" name="cus_doc_name" class="form-control" id="cus_doc_name" placeholder="Enter customer doc name ">
|
||||
</div>
|
||||
<div class="form-group col-md-12" style="text-align: center; font-size: small;">
|
||||
OR
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="customer">Policy</label>
|
||||
<input type="text" class="form-control" id="policy" placeholder="Enter policy no">
|
||||
<input type="hidden" name="policy_id" class="form-control" id="policy_id" placeholder="Enter policy no">
|
||||
<div id="policy_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="customer">Policy document name</label>
|
||||
<input type="text" name="policy_doc_name" class="form-control" id="policy_doc_name" placeholder="Enter policy doc name ">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
|
||||
<button type="submit" class="btn btn-primary" id="get-emp-list" onclick="fetchFileList(event);closeFilterNav();">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- end page title -->
|
||||
<div class="col-12" id="second_page">
|
||||
<div class="card">
|
||||
@ -109,9 +128,7 @@
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Files</h4>
|
||||
<!-- <h4 style="position: relative;">File search result</h4> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100">
|
||||
@ -131,18 +148,15 @@
|
||||
<td><?php echo $row['doc_name']; ?></td>
|
||||
<td><?php echo $row['file_name']; ?></td>
|
||||
<td>
|
||||
<a id="download_1"
|
||||
data-id="1"
|
||||
class="mdi mdi-download"
|
||||
style="font-size: 18px;"
|
||||
<a id="download_1"
|
||||
data-id="1"
|
||||
class="mdi mdi-download"
|
||||
style="font-size: 18px;"
|
||||
target="_blank"
|
||||
href="<?= base_url("/downloadGdriveFile?client_id=" . $row['client_id'] . "&file_type=" . $row['file_type'] . "&file_name=" . $row['file_name']."&client_policy_id=".$row['client_policy_id']); ?>">
|
||||
href="<?= base_url("/downloadGdriveFile?client_id=" . $row['client_id'] . "&file_type=" . $row['file_type'] . "&file_name=" . $row['file_name']."&client_policy_id=".$row['client_policy_id']); ?>">
|
||||
</a>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
@ -157,10 +171,15 @@
|
||||
|
||||
|
||||
<script>
|
||||
function openDMSFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
function closeFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// $('#client_id').select2();
|
||||
// $('#insurer_id').select2();
|
||||
// $('#policy_type_id').select2();
|
||||
const customer_suggestions = <?php echo json_encode($customers); ?>;
|
||||
const policy_suggestions = <?php echo json_encode($policies); ?>;
|
||||
showSuggestions('customer', 'customer_suggestions', 'customer_id', customer_suggestions);
|
||||
@ -176,31 +195,39 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
className: 'app-btn-primary ',
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter"></i><span class="btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function (e, dt, node, config) {
|
||||
openDMSFilterNav();
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
exportOptions: {
|
||||
orthogonal: 'sort'
|
||||
},
|
||||
className: 'app-btn-primary ',
|
||||
attr: {
|
||||
id: 'openDMSFilterNav'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
className: 'app-btn-primary ',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
exportOptions: {
|
||||
orthogonal: 'sort'
|
||||
},
|
||||
className: 'app-btn-primary ',
|
||||
}
|
||||
]
|
||||
}],
|
||||
paging: true,
|
||||
pageLength: 10,
|
||||
@ -208,10 +235,10 @@
|
||||
search: `
|
||||
<div class="datatable-search-wrapper" style="position:relative; display:inline-block; width:100%;">
|
||||
_INPUT_
|
||||
<i class="mdi mdi-magnify datatable-search-icon"
|
||||
<i class="mdi mdi-magnify datatable-search-icon"
|
||||
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>
|
||||
|
||||
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||
<i class="mdi mdi-close-circle datatable-clear-icon"
|
||||
style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666; display:none; cursor:pointer;"></i>
|
||||
</div>
|
||||
`,
|
||||
@ -228,9 +255,6 @@
|
||||
});
|
||||
|
||||
function showSuggestions(inputID, suggestionBoxID, hiddenInputID, suggestions) {
|
||||
|
||||
// console.log('showSuggestions');
|
||||
// console.log(suggestions);return;
|
||||
const input = document.getElementById(inputID);
|
||||
const suggestionBox = document.getElementById(suggestionBoxID);
|
||||
const hiddenInput = document.getElementById(hiddenInputID);
|
||||
@ -243,7 +267,6 @@
|
||||
const filteredSuggestions = suggestions.filter(item =>
|
||||
item.display_value.toLowerCase().includes(value)
|
||||
);
|
||||
// console.log(filteredSuggestions);
|
||||
filteredSuggestions.forEach(suggestion => {
|
||||
const suggestionItem = document.createElement('div');
|
||||
suggestionItem.textContent = suggestion.display_value;
|
||||
@ -288,11 +311,15 @@
|
||||
alert('choose policy');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
console.log('called');
|
||||
let customEvent = new CustomEvent('fetchFileListCustomEvent');
|
||||
$('#dms_search_form').submit();
|
||||
|
||||
}
|
||||
|
||||
document.getElementById('clear-filters').addEventListener('click', function() {
|
||||
document.getElementById('customer').value = '';
|
||||
document.getElementById('customer_id').value = '';
|
||||
document.getElementById('cus_doc_name').value = '';
|
||||
document.getElementById('policy').value = '';
|
||||
document.getElementById('policy_id').value = '';
|
||||
document.getElementById('policy_doc_name').value = '';
|
||||
});
|
||||
</script>
|
||||
@ -13,50 +13,88 @@
|
||||
left: 79px;
|
||||
}
|
||||
.dataTables_length label {height: 21px !important;}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<!-- <div class="text-center"> -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label>Client</label> <br />
|
||||
<select class="form-control" id="clients">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Client</label>
|
||||
<select class="form-control" id="clients">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label>Branch</label>
|
||||
<select name="branch_id" class="form-control" id="branch_id">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label>Branch</label> <br />
|
||||
<select name="branch_id" class="form-control" id="branch_id">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label>Policy</label>
|
||||
<select class="form-control" id="policies">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label>Policy</label> <br />
|
||||
<select class="form-control" id="policies">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label>Status</label> <br />
|
||||
<div class="form-group col-md-12">
|
||||
<label>Status</label> <br />
|
||||
<select class="form-control" id="status1">
|
||||
<option value="0">Select</option>
|
||||
<?php foreach ($status as $key => $value) { ?>
|
||||
@ -65,21 +103,14 @@
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: right;">
|
||||
<a href="<?= base_url("employee/endorsement-list"); ?>" class="btn btn-primary waves-effect waves-light" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("/employee/endorsement-list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);closeFilterNav();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -87,12 +118,12 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Endorsements</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
@ -212,11 +243,9 @@
|
||||
|
||||
|
||||
function fetchClientPolicies() {
|
||||
|
||||
$('#loader').show();
|
||||
var apiURL = '<?php echo base_url(); ?>' + 'util/clients-with-policies';
|
||||
console.log('fetchClientPolicies');
|
||||
// console.log(apiURL);
|
||||
$.ajax({
|
||||
url: apiURL,
|
||||
method: 'GET',
|
||||
@ -225,9 +254,7 @@
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
},
|
||||
success: function(response) {
|
||||
// console.log(response.code);
|
||||
// console.log(response.dataStatus);
|
||||
// console.log(response.data);
|
||||
$('#loader').hide(); // ✅ hide AFTER data received
|
||||
if (response.code === 200 && response.dataStatus === true && response.data !== "") {
|
||||
try {
|
||||
clientPolicies = (response.data);
|
||||
@ -280,13 +307,20 @@
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
$('#loader').hide(); // ✅ hide on error too
|
||||
console.error('Error fetching data from API:', error);
|
||||
}
|
||||
});
|
||||
|
||||
$('#loader').hide();
|
||||
}
|
||||
/* Modified by Gemini Code Assist */
|
||||
function openEndorsementListFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
/* Modified by Gemini Code Assist */
|
||||
function closeFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
function appendClients(data) {
|
||||
|
||||
@ -432,11 +466,7 @@
|
||||
|
||||
}
|
||||
|
||||
document.getElementById('toggleIcon').addEventListener('click', function() {
|
||||
var icon = document.getElementById('icon');
|
||||
icon.classList.toggle('mdi-chevron-down');
|
||||
icon.classList.toggle('mdi-chevron-up');
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.emp_data_model').click(function() {
|
||||
@ -611,6 +641,13 @@
|
||||
// openTicket();
|
||||
// }
|
||||
// },
|
||||
{
|
||||
text: '<i class="mdi mdi-filter" ></i><span class=" btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openEndorsementListFilterNav();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
@ -632,24 +669,6 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
// title: 'Endorsement-List',
|
||||
// className: 'my_class',
|
||||
// exportOptions: {
|
||||
// columns: ':not(:last-child)',
|
||||
// format: {
|
||||
// body: function (data, row, column, node) {
|
||||
// // Convert data to string to avoid scientific notation in CSV
|
||||
// if (!isNaN(data) && parseFloat(data) > 1e20) {
|
||||
// return `'${data}`;
|
||||
// }
|
||||
// return data.toString();// Ensures all data is treated as strings
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }],
|
||||
initComplete: function(settings, json) {
|
||||
$('.my_class').css({
|
||||
"position": "relative",
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<table data-custom-table-css="table" class="table table-sm m-0 table-centered dt-responsive nowrap w-100" cellspacing="a" id="user-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<table data-custom-table-css="table" class="table table-sm m-0 table-centered dt-responsive nowrap w-100" cellspacing="a" id="user-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="row" id="client_add" style="position: relative; bottom: 25px;">
|
||||
<div class="row" id="client_add">
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card-body">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<div class="row" id="insurer_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Insurers</h4>
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
<script>
|
||||
var pageSubTitle = 'Insurer';
|
||||
var pageBackButton = '<a href="#" onclick="history.back(); return false;" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
<div class="row" id="insurer_add">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Insurer</h4>
|
||||
@ -12,14 +16,14 @@
|
||||
</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row" style="padding-bottom: 10px;padding-left: 5px;">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;padding-left: 5px;">
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<span onclick="history.back()" style="cursor: pointer;">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</span>
|
||||
<span class="title-text ">Insurer</span>
|
||||
</h4>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="tab-wrapper position-relative">
|
||||
<ul class="nav nav-pills navtab-bg" id="myTab">
|
||||
|
||||
@ -8,15 +8,7 @@
|
||||
padding: 4px 4px !important;
|
||||
}
|
||||
|
||||
/* table.dataTable thead th {
|
||||
padding: 4px 4px !important;
|
||||
} */
|
||||
|
||||
|
||||
|
||||
.dataTables_filter {
|
||||
position: absolute;
|
||||
}
|
||||
/* table.dataTable thead th { padding: 4px 4px !important;} */
|
||||
|
||||
.highlight {
|
||||
border: 2px solid red;
|
||||
@ -193,41 +185,6 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-8" style="align-self: center;">
|
||||
<h4 style="position: relative;">Insurer Statements</h4>
|
||||
<!-- <div id="statusSwitchWrapper" class="dt-switch-wrapper">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="statusSwitch">
|
||||
<label class="custom-control-label" for="statusSwitch">Failed Status</label>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <div class="col-4">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="failedSwitch">
|
||||
<label class="custom-control-label" for="failedSwitch">Failed</label>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-4" style="text-align: right;">
|
||||
<div class="row align-items-center">
|
||||
<div class="offset-3 col-5">
|
||||
<div id="statusSwitchWrapper" class="dt-switch-wrapper">
|
||||
<div class="custom-control custom-switch" style="text-align: left;">
|
||||
<input type="checkbox" class="custom-control-input" id="statusSwitch">
|
||||
<label class="custom-control-label" for="statusSwitch">Failed Status</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="button" id="btnAdd" onclick="showFileUploadModal()" class="btn btn-primary waves-effect waves-light">Upload <i class="mdi mdi-upload"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dataTables_length d-flex align-items-center">
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
|
||||
@ -1815,15 +1772,23 @@
|
||||
});
|
||||
|
||||
// Initialize DataTable
|
||||
// Change Comment: Added dom and buttons properties to arrange search, switch, and upload button on a single line, similar to client_list.php.
|
||||
const table = $('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
buttons: [
|
||||
{
|
||||
text: 'Upload <i class="mdi mdi-upload"></i>',
|
||||
className: 'btn btn-primary waves-effect waves-light',
|
||||
action: function(e, dt, node, config) {
|
||||
showFileUploadModal();
|
||||
}
|
||||
}
|
||||
],
|
||||
// Your existing DataTable options here
|
||||
"order": [], // Disable initial sorting if needed
|
||||
"pageLength": 10,
|
||||
// "dom": '<"top"lf>rt<"bottom"ip><"clear">', // This places length and filter controls at top
|
||||
// "language": {
|
||||
// "lengthMenu": "Show _MENU_ entries",
|
||||
// "search": "Search:"
|
||||
// }
|
||||
language: {
|
||||
lengthMenu: "Show _MENU_ entries",
|
||||
search: `
|
||||
@ -1840,6 +1805,16 @@
|
||||
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
||||
}
|
||||
});
|
||||
|
||||
// Change Comment: Prepending the 'Failed Status' switch to the DataTable's button container to group it with other controls.
|
||||
$(".datatable-buttons").prepend(`
|
||||
<span id="statusSwitchWrapper" class="dt-switch-wrapper mr-2">
|
||||
<span class="custom-switch" style="text-align: left;">
|
||||
<input type="checkbox" class="custom-control-input" id="statusSwitch">
|
||||
<label class="custom-control-label" for="statusSwitch" style="vertical-align: middle !important;">Failed Status</label>
|
||||
</span>
|
||||
</span>
|
||||
`);
|
||||
|
||||
// Add event listener for switch changes
|
||||
$('#statusSwitch').on('change', function() {
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<div class="row" id="kyc_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">KYC</h4>
|
||||
|
||||
@ -28,19 +28,22 @@
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var pageSubTitle = 'KYC Entity Type';
|
||||
var pageBackButton = '<a href="#" onclick="history.back(); return false;" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
<div class="row" id="insurer_add">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<span onclick="history.back()" style="cursor: pointer;">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</span>
|
||||
<span class="title-text ">KYC Entity Type</span>
|
||||
</h4>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">KYC Entity Type</h4>
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
<!-- ============================================================== -->
|
||||
|
||||
<!-- Footer Start -->
|
||||
<div style="background-color: white !important;">
|
||||
<div style="background-color: white !important;" >
|
||||
<footer class="footer" style="background-color: white !important;">
|
||||
<div class="">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="">
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script> © NHANCE
|
||||
@ -155,23 +155,68 @@
|
||||
"closeButton": true,
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
// ── setNavSubtitle: OUTSIDE ready so any page script can call it ──
|
||||
window.setNavSubtitle = function(subtitle, backUrl) {
|
||||
$('#nav-sub-text').html(subtitle);
|
||||
$('#nav-back-btn').attr('href', backUrl);
|
||||
$('#nav-sub-row').removeClass('hidden');
|
||||
};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
var pageName = "<?= esc($page_name ?? '') ?>";
|
||||
var userName = "<?= esc(get_session_userdata()->first_name ?? 'NOT SET') ?>";
|
||||
|
||||
// These are set by individual view files BEFORE footer loads
|
||||
var subTitle = (typeof pageSubTitle !== 'undefined') ? pageSubTitle : false;
|
||||
var backButton = (typeof pageBackButton !== 'undefined') ? pageBackButton : false;
|
||||
var titleHtml = "";
|
||||
var $titleEl = $(".top-navbar-title");
|
||||
var $navDiv = $(".top-navbar-div");
|
||||
|
||||
var titleHtml = (pageName && pageName !== "Dashboard") ?
|
||||
`<h3 style="margin-right:5px !important;">${pageName}</h3>` :
|
||||
" ";
|
||||
if (pageName && pageName == "Dashboard") {
|
||||
titleHtml = `<h6 style="margin-right:5px !important;">Welcome ${userName}</h6>
|
||||
<h3>Dashboard</h3>`;
|
||||
$titleEl.css({ display: "block", bottom: "12px" });
|
||||
$navDiv.css({ marginTop: "20px" }); // single title → default 20px
|
||||
|
||||
if (pageName && pageName == "Dashboard") {
|
||||
titleHtml = `<h6 style="margin-right:5px !important;">Welcome <?= esc(get_session_userdata()->first_name ?? 'NOT SET') ?></h6>
|
||||
<h3>Dashboard</h3>`;
|
||||
}
|
||||
} else if (pageName && backButton && subTitle) {
|
||||
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||
titleHtml += `<h6>${backButton} ${subTitle}</h6>`;
|
||||
$titleEl.css({ display: "block", bottom: "12px" });
|
||||
$navDiv.css({ marginTop: "0px" }); // double title → 0
|
||||
|
||||
} else if (pageName && subTitle) {
|
||||
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||
titleHtml += `<h6>${subTitle}</h6>`;
|
||||
$titleEl.css({ display: "block", bottom: "12px" });
|
||||
$navDiv.css({ marginTop: "0px" }); // double title → 0
|
||||
|
||||
} else {
|
||||
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||
$titleEl.css({ display: "flex", bottom: "0px" });
|
||||
$navDiv.css({ marginTop: "20px" }); // single title → default 20px
|
||||
}
|
||||
|
||||
$titleEl.html(titleHtml);
|
||||
|
||||
|
||||
// var pageName = "<?= esc($page_name ?? '') ?>";
|
||||
|
||||
// var titleHtml = (pageName && pageName !== "Dashboard") ?
|
||||
// `<h3 style="margin-right:5px !important;">${pageName}</h3>` :
|
||||
// " ";
|
||||
|
||||
// if (pageName && pageName == "Dashboard") {
|
||||
// titleHtml = `<h6 style="margin-right:5px !important;">Welcome <?= esc(get_session_userdata()->first_name ?? 'NOT SET') ?></h6>
|
||||
// <h3>Dashboard</h3>`;
|
||||
// }
|
||||
|
||||
|
||||
$(".top-navbar-title").html(titleHtml);
|
||||
// $(".top-navbar-title").html(titleHtml);
|
||||
|
||||
|
||||
$('#collapseOne').on('show.bs.collapse', function() {
|
||||
@ -1016,19 +1061,27 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
const activeItem = localStorage.getItem("activeLi");
|
||||
|
||||
if (activeItem) {
|
||||
$('.li-seperate a').removeClass('img-active').addClass('img-inactive');
|
||||
// Use .children('a') to only target the main icon links
|
||||
$('.li-seperate').children('a').removeClass('img-active').addClass('img-inactive');
|
||||
|
||||
// Set the active class only on the top-level anchor of the saved ID
|
||||
$('#' + activeItem).children('a').first().removeClass('img-inactive').addClass('img-active');
|
||||
}
|
||||
|
||||
$('.li-seperate').on('click', function() {
|
||||
// reset all anchors
|
||||
$('.li-seperate a').removeClass('img-active').addClass('img-inactive');
|
||||
// 1. Reset ONLY the top-level anchors of all menu items
|
||||
$('.li-seperate').children('a').removeClass('img-active').addClass('img-inactive');
|
||||
|
||||
// only the immediate <a> inside this <li>
|
||||
// 2. Add active class ONLY to the immediate <a> of the clicked <li>
|
||||
$(this).children('a').first().removeClass('img-inactive').addClass('img-active');
|
||||
|
||||
localStorage.setItem("activeLi", $(this).attr("id"));
|
||||
// 3. Store the ID
|
||||
const id = $(this).attr("id");
|
||||
if(id) {
|
||||
localStorage.setItem("activeLi", id);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -118,7 +118,9 @@
|
||||
* {
|
||||
font-family: 'Poppins' !important;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #ffffff !important; /* ← ADD THIS */
|
||||
}
|
||||
.content {
|
||||
min-height: 70vh;
|
||||
}
|
||||
@ -142,8 +144,17 @@
|
||||
min-height: 100vh !important;
|
||||
}
|
||||
|
||||
/* REPLACE WITH THIS */
|
||||
body,
|
||||
html,
|
||||
#wrapper,
|
||||
.content-page,
|
||||
body .content-page {
|
||||
margin-top: 90px !important;
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
body .content-page {
|
||||
margin-top: 50px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -154,7 +165,8 @@
|
||||
z-index: 4;
|
||||
width: 90%;
|
||||
margin-left: 120px !important;
|
||||
background: #fff;
|
||||
background: #ffffff !important;
|
||||
box-shadow: 0 2px 0 #ffffff !important; /* seals bottom edge */
|
||||
}
|
||||
|
||||
.top-navbar-div {
|
||||
@ -164,6 +176,8 @@
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
margin-left: 15px;
|
||||
/* height: 100%;
|
||||
width: 100%; */
|
||||
}
|
||||
|
||||
|
||||
@ -1657,10 +1671,12 @@
|
||||
|
||||
.left-btn {
|
||||
left: 0;
|
||||
border-radius : 10px !important;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
right: 0;
|
||||
border-radius : 10px !important;
|
||||
}
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button {
|
||||
@ -1669,9 +1685,166 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
/** Newly Implemented */
|
||||
/* ── Right Actions ─────────────────────────────── */
|
||||
:root {
|
||||
--primary: #02a8b5;
|
||||
--primary-light: #d4f5f6;
|
||||
--trans: 0.2s ease;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Circle Icon Buttons (Bell & Logout) ────────── */
|
||||
.topbar-icon-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 50%;
|
||||
background: var(--primary-light);
|
||||
color: #333;
|
||||
font-size: 17px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: background var(--trans), color var(--trans);
|
||||
}
|
||||
|
||||
.topbar-icon-btn:hover {
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* ── Notification Red Dot ───────────────────────── */
|
||||
.notif-dot {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #e53e3e;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #fff;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ── Profile Image ──────────────────────────────── */
|
||||
.topbar-actions .rounded-circle {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
object-fit: cover;
|
||||
border-radius: 50% !important;
|
||||
border: 2px solid var(--primary-light);
|
||||
cursor: pointer;
|
||||
transition: border-color var(--trans), box-shadow var(--trans);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.topbar-actions .rounded-circle:hover {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 3px var(--primary-light);
|
||||
}
|
||||
|
||||
/* ── Fallback Initial Avatar ────────────────────── */
|
||||
.avatar-btn {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, var(--primary), #02c5cc);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
border: 2px solid var(--primary-light);
|
||||
flex-shrink: 0;
|
||||
user-select: none;
|
||||
transition: box-shadow var(--trans), border-color var(--trans);
|
||||
}
|
||||
|
||||
.avatar-btn:hover {
|
||||
box-shadow: 0 0 0 3px var(--primary-light);
|
||||
border-color: var(--primary);
|
||||
}
|
||||
|
||||
|
||||
#policyTransactions,
|
||||
#policyTransactionsSub {
|
||||
min-width: 240px !important;
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
#policyTransactions ul,
|
||||
#policyTransactionsSub ul {
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
#policyTransactions ul li a,
|
||||
#policyTransactionsSub ul li a {
|
||||
white-space: nowrap !important;
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
body[data-sidebar-size="condensed"] .footer {
|
||||
left: 0px !important; }
|
||||
|
||||
|
||||
/* ── Navbar title system ── */
|
||||
.top-navbar-title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
line-height: 1;
|
||||
}
|
||||
.nav-main-title {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #101828;
|
||||
line-height: 1.2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.nav-welcome {
|
||||
font-size: 11px;
|
||||
color: #98a2b3;
|
||||
margin-top: 2px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.nav-sub-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.nav-sub-row.hidden { display: none; }
|
||||
.nav-sub-text {
|
||||
font-size: 12px;
|
||||
color: #5a6a7a;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 500px;
|
||||
}
|
||||
.btn-back { background: none; border: none; font-size: 22px; cursor: pointer; color: #888; width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
|
||||
.btn-back:hover { background: #f0f0f0; color: #333; }
|
||||
/** Newly Implemented */
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
@ -1686,7 +1859,7 @@
|
||||
|
||||
<!-- <img src="<?= base_url() . "public" ?>/assets/images/nhance-loader-fast.gif" height="40" width="40" alt="Loading..."> -->
|
||||
<!-- Begin page -->
|
||||
<div id="wrapper" style="background-color:white;">
|
||||
<div id="wrapper" style="background-color:white !important;">
|
||||
|
||||
|
||||
<!-- ========== Left Sidebar Start ========== -->
|
||||
@ -2117,7 +2290,7 @@
|
||||
</li> -->
|
||||
<?php if (in_array(get_role_id(), [1, 5])){ ?>
|
||||
<li>
|
||||
<a href="<?= base_url('sales/loadtargets') ?>"><i class="ri-group-2-fill"></i>Sales Team Targets </a>
|
||||
<a href="<?= base_url('sales/loadtargets') ?>"><i class="ri-group-2-fill"></i> Sales Team Targets </a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
@ -2180,44 +2353,52 @@
|
||||
<h5>Welcome <?= (isset(get_session_userdata()->first_name) ? get_session_userdata()->first_name : 'NOT SET') ?> </h5>
|
||||
</div>
|
||||
<div class="nav-flex">
|
||||
<!-- Right actions Starts Here-->
|
||||
<div class="topbar-actions">
|
||||
|
||||
<!-- user pic -->
|
||||
<div class="dropdown notification-list topbar-dropdown">
|
||||
<a class=" dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
|
||||
<!-- Avatar: show profile image if exists, else show initial avatar -->
|
||||
<?php
|
||||
$profile = get_userProfile();
|
||||
$default = base_url('public/assets/images/avatar_2x.png');
|
||||
$firstName = isset(get_session_userdata()->first_name) ? get_session_userdata()->first_name : 'A';
|
||||
$initial = strtoupper(substr($firstName, 0, 1));
|
||||
?>
|
||||
|
||||
<?php
|
||||
$profile = get_userProfile();
|
||||
$default = base_url('public/assets/images/avatar_2x.png');
|
||||
?>
|
||||
<?php if (!empty($profile)) : ?>
|
||||
<!-- Profile Image -->
|
||||
<img
|
||||
src="<?= $profile ?>"
|
||||
onerror="this.onerror=null; this.src='<?= $default ?>'; this.style.display='none'; document.getElementById('avatar-fallback').style.display='flex';"
|
||||
alt="user-image"
|
||||
height="38" width="38"
|
||||
class="rounded-circle"
|
||||
style="object-fit:cover; border: 2px solid var(--primary-light); cursor:pointer;"
|
||||
>
|
||||
<!-- Fallback avatar (hidden by default, shown if image fails) -->
|
||||
<div class="avatar-btn" id="avatar-fallback" title="<?= $firstName ?>" style="display:none;">
|
||||
<?= $initial ?>
|
||||
</div>
|
||||
|
||||
<img
|
||||
src="<?= (!empty($profile)) ? $profile : $default; ?>"
|
||||
onerror="this.onerror=null;this.src='<?= $default ?>';"
|
||||
alt="user-image"
|
||||
height="40" width="40"
|
||||
class="rounded-circle">
|
||||
</a>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<!-- No profile image — show initial avatar -->
|
||||
<div class="avatar-btn" title="<?= $firstName ?>">
|
||||
<?= $initial ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Notification -->
|
||||
<div class="dropdown notification-list topbar-dropdown">
|
||||
<a class="dropdown-toggle right-bar-toggle waves-effect waves-light"
|
||||
style="font-size: 14px; color:#000;background-color:#D4F5F6 !important;
|
||||
border-radius:25px!important;padding:7px; position: relative;">
|
||||
<button class="topbar-icon-btn right-bar-toggle" title="Notifications">
|
||||
<i class="ri-notification-3-line"></i>
|
||||
<span class="notif-dot"></span>
|
||||
</button>
|
||||
|
||||
<i class="fe-bell noti-icon"></i>
|
||||
|
||||
<span class="notification-dot"></span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Logout -->
|
||||
<div class="dropdown notification-list">
|
||||
<a href="<?= base_url('/logout'); ?>" style="font-size: 18px; color:#000;background-color:#D4F5F6 !important;border-radius:25px;padding:7px;margin-top:0px;">
|
||||
<i class="ri-logout-box-r-line" style=" color:#000;padding:0px;"></i>
|
||||
</a>
|
||||
<a href="<?= base_url('/logout'); ?>" class="topbar-icon-btn" title="Logout">
|
||||
<i class="ri-logout-box-r-line"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<!-- Right actions Ends Here-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,140 +2,177 @@
|
||||
.col-12 {
|
||||
max-width: 98% !important;
|
||||
}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="row" id="lead_filter_div">
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
|
||||
<div id="collapseOne" class="collapse hide" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="filter_issuer_type"> Issuer Type <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_issuer_type" name="filter_issuer_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="filter_lead_type"> Opportunity Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_lead_type" name="filter_lead_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($lead_type) && count($lead_type)) {
|
||||
foreach ($lead_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="filter_client_type"> Client Type <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_client_type" name="filter_client_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($client_type) && count($client_type)) {
|
||||
foreach ($client_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="filter_policy_type"> Policy Type <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_policy_type" name="filter_policy_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($policy_type) && count($policy_type)) {
|
||||
foreach ($policy_type as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="filter_client_id">Client<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_client_id" name="filter_client_id">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="filter_client_branch_id">Client Branch<span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_client_branch_id"
|
||||
name="filter_client_branch_id">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="filter_lead_status">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_lead_status" name="filter_lead_status">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($lead_status) && count($lead_status)) {
|
||||
foreach ($lead_status as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-bottom: -15px;">
|
||||
<a href="<?= base_url("/leads/list"); ?>" class="btn btn-secondary"
|
||||
id="clear-filters">Clear</a>
|
||||
<a class="btn btn-primary" id="get-emp-list"
|
||||
onclick="fetchTicketListData();">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="lead_filter_div"></div>
|
||||
<!-- end page title -->
|
||||
<div id="lead_list_div">
|
||||
<?php include('leads_list.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="opportunities-filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeOpportunitiesListFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="filter_issuer_type"> Issuer Type <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_issuer_type" name="filter_issuer_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="filter_lead_type"> Opportunity Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_lead_type" name="filter_lead_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($lead_type) && count($lead_type)) {
|
||||
foreach ($lead_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="filter_client_type"> Client Type <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_client_type" name="filter_client_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($client_type) && count($client_type)) {
|
||||
foreach ($client_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="filter_policy_type"> Policy Type <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_policy_type" name="filter_policy_type">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($policy_type) && count($policy_type)) {
|
||||
foreach ($policy_type as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="filter_client_id">Client<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_client_id" name="filter_client_id">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="filter_client_branch_id">Client Branch<span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_client_branch_id"
|
||||
name="filter_client_branch_id">
|
||||
<option value="0">Select</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="filter_lead_status">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="filter_lead_status" name="filter_lead_status">
|
||||
<option value="0">Select</option>
|
||||
<?php
|
||||
if (isset($lead_status) && count($lead_status)) {
|
||||
foreach ($lead_status as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("/leads/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a class="btn btn-primary" id="get-emp-list" onclick="fetchTicketListData();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function openOpportunitiesListFilterNav() {
|
||||
document.getElementById("opportunities-filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
function closeOpportunitiesListFilterNav() {
|
||||
document.getElementById("opportunities-filter-sidebar").style.width = "0";
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -167,7 +204,7 @@
|
||||
//----- AJAX FUNCTIONS --------------------------------------------------------------------------------
|
||||
|
||||
function fetchTicketListData() {
|
||||
|
||||
closeOpportunitiesListFilterNav();
|
||||
var issuer_type = $('#filter_issuer_type').val();
|
||||
var lead_type = $('#filter_lead_type').val();
|
||||
var policy_type = $('#filter_policy_type').val();
|
||||
|
||||
@ -102,6 +102,10 @@
|
||||
border-width: 1px !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var pageSubTitle = 'Add Opportunity';
|
||||
var pageBackButton = '<a href="<?= base_url('leads/list') ?>" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="row" id="leads_form">
|
||||
@ -120,12 +124,12 @@
|
||||
<a href="<?= base_url('leads/list') ?>" type="button" id="btnAdd"
|
||||
class="btn btn-primary waves-effect waves-light">Back</a>
|
||||
</div> -->
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<!-- <h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<a href="<?= base_url('leads/list') ?>" style="cursor: pointer;">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</a>
|
||||
<span class="title-text" id="page_title" style="position: relative;">Add Opportunity</span>
|
||||
</h4>
|
||||
</h4> -->
|
||||
</div>
|
||||
<form role="form" class="parsley-examples" method="post" id="leads_form_id"
|
||||
enctype="multipart/form-data">
|
||||
@ -773,6 +777,8 @@
|
||||
hide_list_show_add();
|
||||
|
||||
var page_title = 'Edit Opportunity';
|
||||
var pageSubTitle = 'Edit Opportunity';
|
||||
var pageBackButton = '<a href="<?= base_url('leads/list') ?>" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
|
||||
$('#page_title').text(page_title);
|
||||
$('#leads_primarykey').val(res.data.id);
|
||||
|
||||
@ -9,7 +9,7 @@ table.dataTable tbody td {
|
||||
}
|
||||
|
||||
.col-12 {
|
||||
max-width: 98% !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
@ -152,7 +152,9 @@ table.dataTable tbody td {
|
||||
}
|
||||
.dataTables_length label {height: 21px !important;}
|
||||
/* Modeal class */
|
||||
|
||||
.table-responsive {
|
||||
overflow-x: auto !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -160,10 +162,10 @@ table.dataTable tbody td {
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Opportunities List</h4>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<!-- <div class="col-sm-12">
|
||||
<h4 class="page-title">Opportunities List</h4>
|
||||
</div> -->
|
||||
|
||||
<div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;">
|
||||
<!-- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="openLeadTypeAskModal();">Add</button> -->
|
||||
@ -701,19 +703,28 @@ table.dataTable tbody td {
|
||||
|
||||
document.body.appendChild(customDropdown);
|
||||
|
||||
row.addEventListener("click", function(event) {
|
||||
row.addEventListener("click", function(event) {
|
||||
if (event.target.closest('.dropdown-toggle')) {
|
||||
event.stopPropagation();
|
||||
const originalDropdown = event.target.closest('.btn-group').querySelector('.dropdown-menu');
|
||||
if (originalDropdown) {
|
||||
if (activeDropdown) {
|
||||
activeDropdown.style.display = 'none';
|
||||
}
|
||||
const rect = event.target.getBoundingClientRect();
|
||||
customDropdown.style.display = 'block';
|
||||
customDropdown.style.position = 'fixed';
|
||||
customDropdown.style.left = `${rect.left}px`;
|
||||
customDropdown.style.top = `${rect.bottom + 5}px`;
|
||||
activeDropdown = customDropdown;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. CRITICAL CHECK: Stop propagation if the click came from the dropdown toggle itself.
|
||||
if (event.target.closest('.dropdown-toggle')) {
|
||||
event.stopPropagation();
|
||||
|
||||
// **IMPORTANT:** Since you're using a custom script, you need to
|
||||
// manually trigger the logic for your custom detached dropdown here.
|
||||
// The code below should run when the dropdown toggle is clicked:
|
||||
const originalDropdown = event.target.closest('.btn-group').querySelector('.dropdown-menu');
|
||||
if (originalDropdown) {
|
||||
|
||||
// This is the code that opens your custom dropdown
|
||||
if (event.target.closest('td:last-child')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (activeDropdown) {
|
||||
activeDropdown.style.display = 'none';
|
||||
}
|
||||
@ -726,34 +737,9 @@ table.dataTable tbody td {
|
||||
customDropdown.style.top = `${rect.bottom + 5}px`;
|
||||
|
||||
activeDropdown = customDropdown;
|
||||
}
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
return; // Exit the row listener early
|
||||
}
|
||||
|
||||
// 2. Ignore clicks on the entire action column (your existing, good check)
|
||||
if (event.target.closest('td:last-child')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ... rest of your row logic for general row clicks ...
|
||||
|
||||
if (activeDropdown) {
|
||||
activeDropdown.style.display = 'none';
|
||||
}
|
||||
|
||||
const rect = event.target.getBoundingClientRect();
|
||||
|
||||
customDropdown.style.display = 'block';
|
||||
customDropdown.style.position = 'fixed';
|
||||
customDropdown.style.left = `${rect.left}px`;
|
||||
customDropdown.style.top = `${rect.bottom + 5}px`;
|
||||
|
||||
activeDropdown = customDropdown;
|
||||
event.stopPropagation(); // Only needed if there is a parent handler
|
||||
});
|
||||
|
||||
// Handle clicks on dropdown items
|
||||
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
|
||||
item.addEventListener('click', function(e) {
|
||||
console.log("##############");
|
||||
@ -874,11 +860,18 @@ table.dataTable tbody td {
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openLeadTypeAskModal();
|
||||
}
|
||||
text: '<i class="mdi mdi-filter" ></i><span class=" btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openOpportunitiesListFilterNav();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openLeadTypeAskModal();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
@ -2103,5 +2096,11 @@ table.dataTable tbody td {
|
||||
this.closest('.radio-option').classList.add('selected');
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if (typeof openOpportunitiesListFilterNav !== 'function') {
|
||||
console.log('Developer Notice: The file lead_filter.php must be loaded by the controller for the filters to work, not leads_list.php.');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -47,7 +47,10 @@
|
||||
border-width: 1px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var pageSubTitle = 'Add Opportunity';
|
||||
var pageBackButton = '<a href="<?= base_url('leads/list') ?>" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
|
||||
<div class="row" id="leads_non_eb_form">
|
||||
<div class="col-12">
|
||||
@ -62,12 +65,12 @@
|
||||
<a href="<?= base_url('leads/list') ?>" type="button" id="btnAdd"
|
||||
class="btn btn-primary waves-effect waves-light">Back</a>
|
||||
</div> -->
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<!-- <h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<a href="<?= base_url('leads/list') ?>" style="cursor: pointer;" type="button" id="btnAdd">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</a>
|
||||
<span class="title-text" id="page_title" style="position: relative;">Add Opportunity</span>
|
||||
</h4>
|
||||
</h4> -->
|
||||
</div>
|
||||
<form role="form" class="parsley-examples" method="post" id="leads_non_eb_form_id"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<table data-custom-table-css="table" class="table table-sm m-0 table-centered dt-responsive nowrap w-100" cellspacing="a" id="user-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
|
||||
@ -34,79 +34,107 @@
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
.dataTables_length label {height: 21px !important;}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="col-12" id="outstanding_filter">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div id="filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="addon_policy"> Insurer <span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getInsurerBranch()">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
<?php if (isset($insurer) && count($insurer)) { ?>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="addon_policy"> Insurer Branch<span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="insurer_branch_id" name="insurer_branch_id">
|
||||
<option value="0" selected>Select Insurer Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4" style="display: true;" id="date_div">
|
||||
<label>Statement Month<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<!--
|
||||
codeword : ***1***
|
||||
if you cross check means also uncomment "star2star" (***2***)
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div> -->
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<a href="<?= base_url("/policy_tranction/report/report-outstanding-list"); ?>"
|
||||
class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/report-outstanding-list"); ?>"
|
||||
class="btn btn-primary" id="get-emp-list"
|
||||
onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="addon_policy"> Insurer <span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getInsurerBranch()">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
<?php if (isset($insurer) && count($insurer)) { ?>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="addon_policy"> Insurer Branch<span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="insurer_branch_id" name="insurer_branch_id">
|
||||
<option value="0" selected>Select Insurer Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12" style="display: true;" id="date_div">
|
||||
<label>Statement Month<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("/policy_tranction/report/report-outstanding-list"); ?>"
|
||||
class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/report-outstanding-list"); ?>"
|
||||
class="btn btn-primary" id="get-emp-list"
|
||||
onclick="fetchEmpolyeeList(event);closeFilterNav();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="outstanding_list">
|
||||
@ -172,6 +200,14 @@
|
||||
|
||||
|
||||
<script>
|
||||
function openOutstandingFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
function closeFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var ticketsTable = $('#scroll-horizontal-datatable');
|
||||
@ -186,7 +222,18 @@
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter"></i><span class="btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function (e, dt, node, config) {
|
||||
openOutstandingFilterNav();
|
||||
},
|
||||
attr: {
|
||||
id: 'openOutstandingFilterNav'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
|
||||
@ -313,6 +313,13 @@
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter" ></i><span class=" btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openPayoutFilterNav();
|
||||
}
|
||||
},
|
||||
// {
|
||||
// text: 'Add',
|
||||
// className: 'btn app-btn-primary mr-2',
|
||||
|
||||
@ -1,78 +1,105 @@
|
||||
<div class="container-fluid-min">
|
||||
<div class="col-12" id="bds_filter">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<!-- <div class="form-group col-md-3">
|
||||
<label for="client_branch">Agents<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="agent_id" name="agent_id">
|
||||
<option value="">Select Agent</option>
|
||||
<?php if (isset($agent_list) && !empty($agent_list)) : ?>
|
||||
<?php foreach ($agent_list as $agent) : ?>
|
||||
<option value="<?= $agent['id']; ?>"><?= $agent['name']; ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div> -->
|
||||
<div class="form-group col-md-3">
|
||||
<label for="pos_id">POS<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="pos_id" name="pos_id">
|
||||
<option value="">Select POS (Manager)</option>
|
||||
<?php if (isset($pos_list) && !empty($pos_list)) : ?>
|
||||
<?php foreach ($pos_list as $pos) : ?>
|
||||
<option value="<?= $pos['id']; ?>"><?= htmlspecialchars($pos['name'] . ' (' . $pos['manager_name'] . ')'); ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<style>
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_branch_id">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="status_id" name="status_id">
|
||||
<option value="">Select status</option>
|
||||
<?php if (isset($payout_status) && !empty($payout_status)) : ?>
|
||||
<?php foreach ($payout_status as $id => $status) : ?>
|
||||
<option value="<?= $id; ?>"><?= $status; ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
<div class="form-group col-md-3" style="display: true;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
<div class="form-group col-md-3 text-right" style="margin-top: 29px;">
|
||||
<a class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a class="btn btn-primary" id="get-emp-list" onclick="fetchPayoutList(this);">Submit</a>
|
||||
</div>
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
</div>
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="payout-filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closePayoutFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="pos_id">POS<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="pos_id" name="pos_id">
|
||||
<option value="">Select POS (Manager)</option>
|
||||
<?php if (isset($pos_list) && !empty($pos_list)) : ?>
|
||||
<?php foreach ($pos_list as $pos) : ?>
|
||||
<option value="<?= $pos['id']; ?>"><?= htmlspecialchars($pos['name'] . ' (' . $pos['manager_name'] . ')'); ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch_id">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="status_id" name="status_id">
|
||||
<option value="">Select status</option>
|
||||
<?php if (isset($payout_status) && !empty($payout_status)) : ?>
|
||||
<?php foreach ($payout_status as $id => $status) : ?>
|
||||
<option value="<?= $id; ?>"><?= $status; ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12" style="display: true;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="#" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a class="btn btn-primary" id="get-emp-list" onclick="fetchPayoutList(this); closePayoutFilterNav();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<!-- end page title -->
|
||||
<div id="payout_list">
|
||||
<?php if(isset($payout_list) && !empty($payout_list)) { echo $payout_list; }else{ } ?>
|
||||
@ -80,6 +107,14 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function openPayoutFilterNav() {
|
||||
document.getElementById("payout-filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
function closePayoutFilterNav() {
|
||||
document.getElementById("payout-filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
let utrHasBeenChanged = false;
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="row">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Add Endorsement</h4>
|
||||
</div>
|
||||
|
||||
@ -8,20 +8,12 @@
|
||||
padding: 4px 4px !important;
|
||||
}
|
||||
|
||||
/*
|
||||
table.dataTable thead th {
|
||||
padding: 4px 4px !important;
|
||||
} */
|
||||
|
||||
|
||||
|
||||
.dataTables_filter {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.column-header {
|
||||
margin-right: 10px;
|
||||
/* Adjust this value as needed */
|
||||
}
|
||||
|
||||
.form-section {
|
||||
@ -78,7 +70,6 @@ table.dataTable thead th {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Ensure the dropdown menu has a solid background */
|
||||
.custom-dropdown-menu::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@ -90,7 +81,6 @@ table.dataTable thead th {
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* Add a subtle backdrop effect */
|
||||
.custom-dropdown-menu::after {
|
||||
content: '';
|
||||
position: fixed;
|
||||
@ -102,6 +92,54 @@ table.dataTable thead th {
|
||||
z-index: -2;
|
||||
pointer-events: none;
|
||||
}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
@ -168,142 +206,115 @@ table.dataTable thead th {
|
||||
</style>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="col-12" id="endorsement_filter">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div id="filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch">Client<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_id_for_search" name="client_id">
|
||||
<option value="0">Select Client</option>
|
||||
<?php
|
||||
if (isset($client) && count($client)) {
|
||||
foreach ($client as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<option value="0">Select Client</option>
|
||||
<?php
|
||||
if (isset($client) && count($client)) {
|
||||
foreach ($client as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<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">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email"> Policy Type <span class="text-danger"></span></label>
|
||||
<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)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</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">
|
||||
<option value="0">Select Policy Type</option>
|
||||
<?php
|
||||
if (isset($policy_types) && count($policy_types)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="issuer_for_search" name="issuer" required>
|
||||
<option value="0">Select Issure</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="issuer_for_search" name="issuer" required>
|
||||
<option value="0">Select Issure</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email"> Status <span class="text-danger"></span></label>
|
||||
<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)) {
|
||||
foreach ($policy_status as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<option value="0">Select Status</option>
|
||||
<?php
|
||||
if (isset($policy_status) && count($policy_status)) {
|
||||
foreach ($policy_status as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<a href="<?= base_url("/policy_tranction/endorsement/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/endorsement/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-12" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("/policy_tranction/endorsement/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/endorsement/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);closeFilterNav();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="endorsement_list">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Endorsement List</h4>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add()">Add</button>
|
||||
</div>
|
||||
</div> -->
|
||||
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
@ -367,6 +378,16 @@ table.dataTable thead th {
|
||||
<?php include('pt_endorsement_form_file_upload_tab.php'); ?>
|
||||
|
||||
<script>
|
||||
/* Modified by Gemini Code Assist */
|
||||
function openEndorsementFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
/* Modified by Gemini Code Assist */
|
||||
function closeFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const table = document.getElementById("tickets-table");
|
||||
|
||||
@ -497,15 +518,18 @@ table.dataTable thead th {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, buttons right
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter"></i><span class="btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function (e, dt, node, config) {
|
||||
openEndorsementFilterNav();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
@ -909,19 +933,6 @@ table.dataTable thead th {
|
||||
|
||||
hideDateField(date_type)
|
||||
|
||||
// console.log('startDate', startDate)
|
||||
// console.log('endDate', endDate)
|
||||
// console.log('client_id', client_id)
|
||||
// console.log('insurer_id', insurer_id)
|
||||
// console.log('policy_type_id', policy_type_id)
|
||||
// console.log('date_type', date_type)
|
||||
// console.log('issuer', issuer)
|
||||
// console.log('status', status)
|
||||
|
||||
// Log the values or use them as needed
|
||||
// console.log('Start Date:', startDate);
|
||||
// console.log('End Date:', endDate);
|
||||
|
||||
if (startDate != 0 && endDate != 0) {
|
||||
setTimeout(function() {
|
||||
$('#start_date').val(startDate)
|
||||
@ -951,9 +962,6 @@ table.dataTable thead th {
|
||||
var start = moment(startDateParam, 'DD/MM/YYYY');
|
||||
var end = moment(endDateParam, 'DD/MM/YYYY');
|
||||
|
||||
// var start = moment().subtract(29, 'days');
|
||||
// var end = moment();
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D/MM/YYYY') + ' - ' + end.format('D/MM/YYYY'));
|
||||
$('#startDate').val(start.format('DD/MM/YYYY'));
|
||||
@ -1107,12 +1115,6 @@ table.dataTable thead th {
|
||||
row.append($('<td>').text(item.doc_name));
|
||||
row.append($('<td>').text(item.file_name));
|
||||
|
||||
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
// "?client_id=" + item.client_id +
|
||||
// "&file_type=policy" +
|
||||
// "&file_name=" + item.file_name +
|
||||
// "&client_policy_id=" + item.client_policy_id;
|
||||
|
||||
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
|
||||
|
||||
|
||||
@ -71,6 +71,54 @@ table.dataTable tbody td {
|
||||
color: #16181b !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
@ -139,156 +187,117 @@ table.dataTable tbody td {
|
||||
margin-left:30px !important;
|
||||
}
|
||||
|
||||
#inception_list{
|
||||
margin-left:20px !important;
|
||||
}
|
||||
.dataTables_length label {height: 21px !important;}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="row" id="inception_filter">
|
||||
<div class="col-12">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div id="filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
|
||||
<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" >
|
||||
<option value="0">Select Client</option>
|
||||
<?php
|
||||
if (isset($client) && count($client)) {
|
||||
foreach ($client as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
|
||||
<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" >
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
<option value="<?= $value['id']?>"><?= $value['name']?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch">Client<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_id_for_search" name="client_id" >
|
||||
<option value="0">Select Client</option>
|
||||
<?php
|
||||
if (isset($client) && count($client)) {
|
||||
foreach ($client as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</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" >
|
||||
<option value="0">Select Policy Type</option>
|
||||
<?php
|
||||
if (isset($policy_types) && count($policy_types)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<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" >
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
<option value="<?= $value['id']?>"><?= $value['name']?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group col-md-3" style="display: none;">
|
||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="issuer_for_search" name="issuer">
|
||||
<option value="0">Select Issuer</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div> -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email"> Policy Type <span class="text-danger"></span></label>
|
||||
<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)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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" >
|
||||
<option value="0">Select Status</option>
|
||||
<?php
|
||||
if (isset($policy_status) && count($policy_status)) {
|
||||
foreach ($policy_status as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email"> Status <span class="text-danger"></span></label>
|
||||
<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)) {
|
||||
foreach ($policy_status as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-12 text-right m-b-0">
|
||||
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event); closeFilterNav();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="inception_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<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;">
|
||||
<!-- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add();">Add</button> -->
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add();">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div>
|
||||
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
@ -387,6 +396,15 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
/* Modified by Gemini Code Assist */
|
||||
function openPolicyFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
/* Modified by Gemini Code Assist */
|
||||
function closeFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const table = document.getElementById("tickets-table");
|
||||
@ -571,11 +589,18 @@ $(document).ready(function() {
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter" ></i><span class=" btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openPolicyFilterNav();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
@ -1523,6 +1548,7 @@ $('#cd_ac_no_data').change(function(){
|
||||
|
||||
// if(policy_type_id == 3 || policy_type_id == 4 || policy_type_id == 5) {
|
||||
// $('#base_policy_id').show();
|
||||
.
|
||||
// }else{
|
||||
// $('#base_policy_id').hide();
|
||||
// }
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
<div class="row" id="policy_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Policy Type List</h4>
|
||||
|
||||
@ -28,11 +28,14 @@
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var pageSubTitle = 'Policy Type';
|
||||
var pageBackButton = '<a href="#" onclick="history.back(); return false;" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
<div id="policy_add">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Policy Type</h4>
|
||||
@ -41,14 +44,14 @@
|
||||
<a href="<?= base_url("master/policy/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<span onclick="history.back()" style="cursor: pointer;">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</span>
|
||||
<span class="title-text ">Policy Type</span>
|
||||
</h4>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="tab-wrapper position-relative">
|
||||
<ul class="nav nav-pills navtab-bg" id="myTab">
|
||||
<li class="nav-item d-flex justify-content-center align-items-center">
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<table data-custom-table-css="table" class="table table-sm m-0 table-centered dt-responsive nowrap w-100" cellspacing="a" id="user-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
@ -244,8 +244,8 @@
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
text: '<i class="mdi mdi-plus"></i><span class="btn-custom"> Add </span>',
|
||||
action: function(e, dt, node, config) {
|
||||
resetValues();openModal();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="row" id="pt_onboarding" style="position: relative; bottom: 25px; display:none;">
|
||||
<div class="row" id="pt_onboarding" style="bottom: 25px; display:none;">
|
||||
<div class="col-xl-12">
|
||||
<div class="card-body">
|
||||
<div class="tab-wrapper position-relative">
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="row" id="pt_onboarding" style="position: relative; bottom: 25px; display:none;">
|
||||
<div class="row" id="pt_onboarding"> <!-- style="position: relative; bottom: 25px; display:none;" -->
|
||||
<div class="col-xl-12">
|
||||
<div class="card-body">
|
||||
<div class="tab-wrapper position-relative">
|
||||
|
||||
@ -394,6 +394,13 @@ $(document).ready(function() {
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter" ></i><span class=" btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openBDSFilterNav();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -1,150 +1,175 @@
|
||||
<style>
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="col-12" id="bds_filter">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<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" name="client_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_branch_id">Client Branch<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_branch_id" name="client_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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()">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insurer_branch_id"> Insurer Branch <span id="base_danger" class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_branch_id" name="insurer_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0" selected>Select Insurer Branch</option>
|
||||
</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_id" name="policy_type_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Policy Type</option>
|
||||
<?php
|
||||
if (isset($policy_types) && count($policy_types)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<option value="0" selected>Select client policy</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="issuer" name="issuer" required>
|
||||
<option value="0">Select Issure</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<option value="0">Select user</option>
|
||||
<?php
|
||||
if (isset($users) && count($users)) {
|
||||
foreach ($users as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['first_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField(); changeTitle();">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
||||
<a href="<?= base_url("/policy_tranction/report/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group text-right m-b-0">
|
||||
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
|
||||
<a href="<?= base_url("/policy_tranction/report/list"); ?>"
|
||||
class="btn btn-primary waves-effect waves-light" id="get-emp-list"
|
||||
onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="bds-filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeBDSFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch">Client<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_id" name="client_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch_id">Client Branch<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_branch_id" name="client_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<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()">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="insurer_branch_id"> Insurer Branch <span id="base_danger" class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_branch_id" name="insurer_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0" selected>Select Insurer Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email"> Policy Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="policy_type_id" name="policy_type_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Policy Type</option>
|
||||
<?php
|
||||
if (isset($policy_types) && count($policy_types)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<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">
|
||||
<option value="0" selected>Select client policy</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="issuer" name="issuer" required>
|
||||
<option value="0">Select Issure</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="user_id">Users<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="user_id" name="user_id">
|
||||
<option value="0">Select user</option>
|
||||
<?php
|
||||
if (isset($users) && count($users)) {
|
||||
foreach ($users as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['first_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField(); changeTitle();">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("/policy_tranction/report/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<!-- end page title -->
|
||||
<div id="file_list">
|
||||
<?php
|
||||
@ -160,6 +185,14 @@
|
||||
|
||||
|
||||
<script>
|
||||
function openBDSFilterNav() {
|
||||
document.getElementById("bds-filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
function closeBDSFilterNav() {
|
||||
document.getElementById("bds-filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
let client_list = [];
|
||||
let branch_list = [];
|
||||
let policy_list = [];
|
||||
@ -183,6 +216,7 @@
|
||||
|
||||
function fetchEmpolyeeList(event) {
|
||||
event.preventDefault(); // Prevent default action
|
||||
closeBDSFilterNav();
|
||||
|
||||
var start_date = $('#startDate').val();
|
||||
var end_date = $('#endDate').val();
|
||||
|
||||
@ -29,86 +29,115 @@
|
||||
transform: scale(1.5);
|
||||
}
|
||||
.dataTables_length label {height: 21px !important;}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<!-- <div class="text-center"> -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label>Client</label> <br />
|
||||
<select class="form-control" id="clients">
|
||||
<option value="0">Select</option>
|
||||
<?php foreach ($client as $key => $value) { ?>
|
||||
<option value="<?= $value['id'] ?>" <?= (($getData['client_id'] ?? '') == $value['id']) ? 'selected' : '' ?>>
|
||||
<?= $value['client_name'] . (!empty($value['short_name']) ? ' ( ' . $value['short_name'] . ' )' : '') ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div id="filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Client</label> <br />
|
||||
<select class="form-control" id="clients">
|
||||
<option value="0">Select</option>
|
||||
<?php foreach ($client as $key => $value) { ?>
|
||||
<option value="<?= $value['id'] ?>" <?= (($getData['client_id'] ?? '') == $value['id']) ? 'selected' : '' ?>>
|
||||
<?= $value['client_name'] . (!empty($value['short_name']) ? ' ( ' . $value['short_name'] . ' )' : '') ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label>Insurer</label> <br />
|
||||
<select class="form-control" id="insurer">
|
||||
<option value="0">Select</option>
|
||||
<?php foreach ($insurer as $key => $value) { ?>
|
||||
<option value="<?= $value['id'] ?>" <?= (($getData['insurer_id'] ?? '') == $value['id']) ? 'selected' : '' ?>>
|
||||
<?= $value['name'] . (!empty($value['short_name']) ? ' ( ' . $value['short_name'] . ' )' : '') ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label>Insurer</label> <br />
|
||||
<select class="form-control" id="insurer">
|
||||
<option value="0">Select</option>
|
||||
<?php foreach ($insurer as $key => $value) { ?>
|
||||
<option value="<?= $value['id'] ?>" <?= (($getData['insurer_id'] ?? '') == $value['id']) ? 'selected' : '' ?>>
|
||||
<?= $value['name'] . (!empty($value['short_name']) ? ' ( ' . $value['short_name'] . ' )' : '') ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label>Status</label> <br />
|
||||
<select class="form-control" id="status1">
|
||||
<option value="0">Select</option>
|
||||
<?php foreach ($status as $key => $value) { ?>
|
||||
<option value="<?= $key ?>" <?= (($getData['status'] ?? '') == $key) ? 'selected' : '' ?>>
|
||||
<?= $value ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: right;">
|
||||
<a href="<?= base_url("employee/retail-endorsement-list"); ?>" class="btn btn-primary waves-effect waves-light" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label>Status</label> <br />
|
||||
<select class="form-control" id="status1">
|
||||
<option value="0">Select</option>
|
||||
<?php foreach ($status as $key => $value) { ?>
|
||||
<option value="<?= $key ?>" <?= (($getData['status'] ?? '') == $key) ? 'selected' : '' ?>>
|
||||
<?= $value ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("employee/retail-endorsement-list"); ?>" class="btn btn-secondary" >Clear</a>
|
||||
<a href="<?= base_url("employee/retail-endorsement-list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);closeFilterNav();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="client_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Endorsement</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
@ -168,10 +197,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal fade font-color-black " id="centermodal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
@ -217,6 +242,14 @@
|
||||
|
||||
|
||||
<script>
|
||||
function openRetailEndrosementFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
function closeFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "0";
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// Initialize select2
|
||||
$("#clients").select2();
|
||||
@ -257,13 +290,6 @@
|
||||
|
||||
}
|
||||
|
||||
document.getElementById('toggleIcon').addEventListener('click', function() {
|
||||
var icon = document.getElementById('icon');
|
||||
icon.classList.toggle('mdi-chevron-down');
|
||||
icon.classList.toggle('mdi-chevron-up');
|
||||
});
|
||||
|
||||
|
||||
$('.emp_data_model').click(function() {
|
||||
var id = $(this).data('id');
|
||||
var eno = $(this).data('eno');
|
||||
@ -373,32 +399,22 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
// title: 'Retail-Endorsement-List',
|
||||
// className: 'my_class',
|
||||
// exportOptions: {
|
||||
// columns: ':not(:last-child)',
|
||||
// format: {
|
||||
// body: function (data, row, column, node) {
|
||||
// // Convert data to string to avoid scientific notation in CSV
|
||||
// if (!isNaN(data) && parseFloat(data) > 1e20) {
|
||||
// return `'${data}`;
|
||||
// }
|
||||
// return data.toString();// Ensures all data is treated as strings
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }],
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter"></i><span class="btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function (e, dt, node, config) {
|
||||
openRetailEndrosementFilterNav();
|
||||
},
|
||||
attr: {
|
||||
id: 'openRetailEndrosementFilterNav'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<table data-custom-table-css="table" class="table table-sm m-0 table-centered dt-responsive nowrap w-100" cellspacing="a" id="user-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
@ -125,8 +125,8 @@
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
text: '<i class="mdi mdi-plus"></i><span class="btn-custom"> Add </span>',
|
||||
action: function(e, dt, node, config) {
|
||||
openModal()
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@
|
||||
$colors = ['#ff6b35','#667eea','#48bb78','#ed8936','#9f7aea'];
|
||||
foreach ($team as $member):
|
||||
$firstLetter = strtoupper(substr($member['first_name'], 0, 1));
|
||||
$fullName = $member['first_name'] . ' ' . $member['last_name'];
|
||||
$fullName = $member['first_name'];
|
||||
$color = $colors[abs(crc32($member['first_name'])) % count($colors)];
|
||||
?>
|
||||
<div class="team-member">
|
||||
@ -567,7 +567,7 @@ function renderList() {
|
||||
+ '<div class="member-cell">'
|
||||
+ '<div style="font-size:14px;font-weight:800;color:#cbd5e1;min-width:26px;">#' + (i+1) + '</div>'
|
||||
+ '<div class="m-avatar" style="background:' + grad + ';">' + (m.first_name||'?')[0] + '</div>'
|
||||
+ '<div><div class="m-name">' + m.first_name + ' ' + m.last_name + '</div></div>'
|
||||
+ '<div><div class="m-name">' + m.first_name + '</div></div>'
|
||||
+ '</div>'
|
||||
+ '<div style="padding-right:20px;">'
|
||||
+ '<div class="prog-row"><span class="prog-pct" style="color:' + color + ';">' + p + '%</span><span class="prog-amts">' + fmt(m.achieved_amt) + ' / ' + fmt(m.target_amt) + '</span></div>'
|
||||
@ -599,7 +599,7 @@ function openModal(id) {
|
||||
|
||||
document.getElementById('modalAva').style.background = grad;
|
||||
document.getElementById('modalAva').textContent = (m.first_name || '?')[0];
|
||||
document.getElementById('modalName').textContent = m.first_name + ' ' + m.last_name;
|
||||
document.getElementById('modalName').textContent = m.first_name;
|
||||
document.getElementById('modalFyBadge').textContent = fyLabel;
|
||||
|
||||
document.getElementById('modalSummary').innerHTML =
|
||||
|
||||
526
app/Views/sales/branch_level_dashboard_view_2mar.php
Normal file
526
app/Views/sales/branch_level_dashboard_view_2mar.php
Normal file
@ -0,0 +1,526 @@
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
|
||||
|
||||
.dash-container {
|
||||
padding: 28px;
|
||||
background: #f4f6fb;
|
||||
font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* ── Stat Cards ── */
|
||||
.stat-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 18px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.card-hero {
|
||||
background: white;
|
||||
padding: 22px 24px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #e8edf5;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
.card-hero::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 4px;
|
||||
}
|
||||
.card-hero:nth-child(1)::before { background: linear-gradient(90deg, #667eea, #764ba2); }
|
||||
.card-hero:nth-child(2)::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
|
||||
.card-hero:nth-child(3)::before { background: linear-gradient(90deg, #fda085, #f6d365); }
|
||||
.card-hero:nth-child(4)::before { background: linear-gradient(90deg, #43e97b, #38f9d7); }
|
||||
.card-hero:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.09); }
|
||||
|
||||
.stat-icon {
|
||||
width: 42px; height: 42px;
|
||||
border-radius: 10px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 18px; margin-bottom: 14px;
|
||||
}
|
||||
.stat-val { font-size: 30px; font-weight: 800; color: #1a202c; line-height: 1; }
|
||||
.stat-label { color: #8896aa; font-size: 13px; margin-top: 6px; font-weight: 600; }
|
||||
|
||||
/* ── Shared Card ── */
|
||||
.card {
|
||||
background: white;
|
||||
padding: 24px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #e8edf5;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
}
|
||||
|
||||
/* ── Main Grid ── */
|
||||
.main-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 20px;
|
||||
margin-bottom: 24px;
|
||||
align-items: start;
|
||||
}
|
||||
.main-grid > .card {
|
||||
height: 520px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.table-scroll-area { flex: 1; overflow-y: auto; }
|
||||
.table-scroll-area thead th { position: sticky; top: 0; background: white; z-index: 1; }
|
||||
|
||||
/* ── Right Panel ── */
|
||||
.right-panel {
|
||||
height: 520px;
|
||||
background: white;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #e8edf5;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
padding: 22px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.team-members-scroll { flex: 1; overflow-y: auto; margin-top: 10px; }
|
||||
.team-member {
|
||||
display: flex; align-items: center;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #f4f6fb;
|
||||
}
|
||||
.team-member:last-child { border-bottom: none; }
|
||||
.member-img {
|
||||
width: 38px; height: 38px; border-radius: 50%;
|
||||
color: white; margin-right: 12px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-weight: 700; font-size: 15px; flex-shrink: 0;
|
||||
}
|
||||
.act-stats { text-align: right; }
|
||||
.act-stats .total { font-weight: 700; font-size: 13px; color: #1a202c; }
|
||||
.act-stats .done { font-size: 11px; color: #38a169; font-weight: 600; margin-top: 2px; }
|
||||
|
||||
/* ── Activity Breakdown ── */
|
||||
.breakdown-section {
|
||||
flex-shrink: 0;
|
||||
margin-top: 12px;
|
||||
border: 1px solid #f0f4fa;
|
||||
border-radius: 12px;
|
||||
padding: 14px;
|
||||
background: #fafbfd;
|
||||
}
|
||||
.breakdown-item {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
margin-bottom: 9px; font-size: 13px;
|
||||
}
|
||||
.breakdown-item:last-child { margin-bottom: 0; }
|
||||
.breakdown-bar-wrap {
|
||||
flex: 1; height: 5px; background: #eef0f5;
|
||||
border-radius: 99px; margin: 0 10px; overflow: hidden;
|
||||
}
|
||||
.breakdown-bar { height: 100%; border-radius: 99px; }
|
||||
|
||||
/* ── Table ── */
|
||||
.table-header {
|
||||
display: flex; justify-content: space-between;
|
||||
align-items: center; margin-bottom: 16px;
|
||||
}
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th {
|
||||
text-align: left; padding: 10px 12px;
|
||||
color: #8896aa; font-size: 11px;
|
||||
text-transform: uppercase; letter-spacing: 0.07em;
|
||||
border-bottom: 1px solid #edf2f7; background: white; font-weight: 700;
|
||||
}
|
||||
td { padding: 13px 12px; border-bottom: 1px solid #f4f6fb; font-size: 14px; vertical-align: middle; }
|
||||
tbody tr:hover { background: #fafbfe; }
|
||||
|
||||
/* ── Status Pills ── */
|
||||
.status-pill { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
|
||||
.status-completed { background: #f0fff4; color: #38a169; }
|
||||
.status-pending { background: #fffaf0; color: #dd6b20; }
|
||||
.status-new { background: #e3f2fd; color: #1976d2; }
|
||||
.status-potential { background: #fff3e0; color: #f57c00; }
|
||||
.status-prospects { background: #e8f5e9; color: #388e3c; }
|
||||
.status-not-a-prospects { background: #ffebee; color: #d32f2f; }
|
||||
|
||||
.leads-table-wrap { max-height: 480px; overflow-y: auto; }
|
||||
.leads-table-wrap thead th { position: sticky; top: 0; background: white; z-index: 1; }
|
||||
|
||||
.empty-state { text-align: center; padding: 50px 20px; color: #aaa; }
|
||||
.empty-icon { width: 70px; height: 70px; margin: 0 auto 16px; background: #f5f5f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; }
|
||||
|
||||
/* ══════════════════════════════════════════
|
||||
TEAM ACHIEVEMENT SECTION (NEW)
|
||||
══════════════════════════════════════════ */
|
||||
.achievement-section { margin-bottom: 24px; }
|
||||
|
||||
.achievement-header {
|
||||
display: flex; justify-content: space-between; align-items: flex-start;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.achievement-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.achieve-card {
|
||||
background: white;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #e8edf5;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
padding: 20px;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.achieve-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
|
||||
|
||||
.achieve-card-top {
|
||||
display: flex; align-items: center; gap: 12px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.achieve-avatar {
|
||||
width: 44px; height: 44px; border-radius: 12px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-weight: 800; font-size: 17px; color: white; flex-shrink: 0;
|
||||
}
|
||||
.achieve-name { font-weight: 700; font-size: 15px; color: #1a202c; }
|
||||
.achieve-role { font-size: 11px; color: #8896aa; font-weight: 600; margin-top: 2px; }
|
||||
|
||||
.achieve-pct { font-size: 22px; font-weight: 800; position: absolute; top: 18px; right: 20px; }
|
||||
|
||||
.achieve-progress-wrap {
|
||||
background: #f0f4fa; height: 8px;
|
||||
border-radius: 99px; overflow: hidden; margin-bottom: 10px;
|
||||
}
|
||||
.achieve-progress-bar { height: 100%; border-radius: 99px; }
|
||||
|
||||
.achieve-stats-row {
|
||||
display: grid; grid-template-columns: repeat(3, 1fr);
|
||||
gap: 8px; margin-top: 12px;
|
||||
}
|
||||
.achieve-stat-box { background: #f8fafd; border-radius: 8px; padding: 8px 10px; text-align: center; }
|
||||
.achieve-stat-num { font-size: 16px; font-weight: 800; color: #1a202c; }
|
||||
.achieve-stat-lbl { font-size: 10px; color: #8896aa; font-weight: 600; margin-top: 2px; }
|
||||
|
||||
.achieve-badge {
|
||||
display: inline-block; padding: 3px 10px;
|
||||
border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
|
||||
}
|
||||
.badge-achieved { background: #f0fff4; color: #38a169; }
|
||||
.badge-on-track { background: #e3f2fd; color: #1976d2; }
|
||||
.badge-behind { background: #fff3e0; color: #dd6b20; }
|
||||
.badge-at-risk { background: #ffebee; color: #d32f2f; }
|
||||
|
||||
/* ── Responsive ── */
|
||||
@media (max-width: 1200px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (max-width: 992px) {
|
||||
.main-grid { grid-template-columns: 1fr; }
|
||||
.main-grid > .card, .right-panel { height: 450px; }
|
||||
.stat-cards { grid-template-columns: repeat(2, 1fr); }
|
||||
.achievement-cards { grid-template-columns: 1fr 1fr; }
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.dash-container { padding: 14px; }
|
||||
.stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||
.stat-val { font-size: 24px; }
|
||||
.main-grid > .card, .right-panel { height: 400px; }
|
||||
table th, table td { padding: 10px 8px; font-size: 12px; }
|
||||
.achievement-cards { grid-template-columns: 1fr; }
|
||||
.achievement-header { flex-direction: column; gap: 14px; }
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="dash-container">
|
||||
|
||||
<!-- ── Stat Cards ── -->
|
||||
<div class="stat-cards">
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#ede9fe;">👥</div>
|
||||
<div class="stat-val"><?php echo $total_leads; ?></div>
|
||||
<div class="stat-label">Total Leads</div>
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#fce7f3;">⚡</div>
|
||||
<div class="stat-val"><?php echo $total_acts ?></div>
|
||||
<div class="stat-label">Total Activities</div>
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#fef3c7;">⏳</div>
|
||||
<div class="stat-val"><?php echo $total_pending_acts ?></div>
|
||||
<div class="stat-label">Pending Activities</div>
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#d1fae5;">✅</div>
|
||||
<div class="stat-val"><?php echo $total_completed_acts ?></div>
|
||||
<div class="stat-label">Completed Activities</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ══════════════════════════════════════════
|
||||
🏆 TEAM ACHIEVEMENT SECTION (NEW)
|
||||
══════════════════════════════════════════ -->
|
||||
<div class="achievement-section">
|
||||
<div class="achievement-header">
|
||||
<div>
|
||||
<h3 style="font-size:17px; font-weight:700; color:#1a202c; margin:0;">🏆 Team Achievement Overview</h3>
|
||||
<div style="font-size:12px; color:#8896aa; font-weight:600; margin-top:4px;">Individual target vs. actual performance this period</div>
|
||||
</div>
|
||||
<?php
|
||||
$branch_total_target = array_sum(array_column($team, 'target_amt'));
|
||||
$branch_total_achiev = array_sum(array_column($team, 'achieved_amt'));
|
||||
$branch_pct = $branch_total_target > 0
|
||||
? min(100, round($branch_total_achiev / $branch_total_target * 100)) : 0;
|
||||
?>
|
||||
<div style="text-align:right;">
|
||||
<div style="font-size:12px; color:#8896aa; font-weight:600;">Branch Total</div>
|
||||
<div style="font-size:22px; font-weight:800; color:#1a202c;">
|
||||
₹<?= number_format($branch_total_achiev / 100000, 1) ?>L
|
||||
<span style="font-size:13px; color:#8896aa; font-weight:600;">/ ₹<?= number_format($branch_total_target / 100000, 1) ?>L</span>
|
||||
</div>
|
||||
<div style="margin-top:6px;">
|
||||
<div style="background:#f0f4fa; height:6px; border-radius:99px; overflow:hidden; width:200px; margin-left:auto;">
|
||||
<div style="background:linear-gradient(90deg,#667eea,#764ba2); height:100%; width:<?= $branch_pct ?>%; border-radius:99px;"></div>
|
||||
</div>
|
||||
<div style="font-size:12px; color:#667eea; font-weight:700; margin-top:4px;"><?= $branch_pct ?>% of branch target</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="achievement-cards">
|
||||
<?php
|
||||
if (!empty($team)):
|
||||
$gradients = [
|
||||
'linear-gradient(135deg,#667eea,#764ba2)',
|
||||
'linear-gradient(135deg,#f093fb,#f5576c)',
|
||||
'linear-gradient(135deg,#43e97b,#38f9d7)',
|
||||
'linear-gradient(135deg,#fda085,#f6d365)',
|
||||
'linear-gradient(135deg,#4facfe,#00f2fe)',
|
||||
'linear-gradient(135deg,#ff6b35,#fda085)',
|
||||
'linear-gradient(135deg,#a18cd1,#fbc2eb)',
|
||||
];
|
||||
$accent_colors = ['#667eea','#f5576c','#43e97b','#fda085','#4facfe','#ff6b35','#a18cd1'];
|
||||
|
||||
foreach ($team as $member):
|
||||
$firstLetter = strtoupper(substr($member['first_name'], 0, 1));
|
||||
$fullName = $member['first_name'] . ' ' . $member['last_name'];
|
||||
$totalActs = $member['total_acts'];
|
||||
$doneActs = $member['done_acts'];
|
||||
$pendingActs = $totalActs - $doneActs;
|
||||
$role = $member['role'];
|
||||
$idx = abs(crc32($member['first_name'])) % count($gradients);
|
||||
$grad = $gradients[$idx];
|
||||
$color = $accent_colors[$idx];
|
||||
|
||||
/* These fields must be added to your $team query */
|
||||
$target_amt = $member['target_amt'] ?? 0;
|
||||
$achieved_amt = $member['achieved_amt'] ?? 0;
|
||||
$remaining = max(0, $target_amt - $achieved_amt);
|
||||
$pct = $target_amt > 0 ? min(100, round($achieved_amt / $target_amt * 100)) : 0;
|
||||
|
||||
if ($pct >= 100) { $badge_class = 'badge-achieved'; $badge_text = '🏆 Achieved'; }
|
||||
elseif ($pct >= 75) { $badge_class = 'badge-on-track'; $badge_text = '🎯 On Track'; }
|
||||
elseif ($pct >= 50) { $badge_class = 'badge-behind'; $badge_text = '⚡ Behind'; }
|
||||
else { $badge_class = 'badge-at-risk'; $badge_text = '⚠️ At Risk'; }
|
||||
?>
|
||||
<div class="achieve-card">
|
||||
<!-- % overlay -->
|
||||
<div class="achieve-pct" style="color:<?= $color ?>;"><?= $pct ?>%</div>
|
||||
|
||||
<div class="achieve-card-top">
|
||||
<div class="achieve-avatar" style="background:<?= $grad ?>;"><?= $firstLetter ?></div>
|
||||
<div style="flex:1; min-width:0; padding-right:50px;">
|
||||
<div class="achieve-name"><?= esc($fullName) ?></div>
|
||||
<div class="achieve-role"><?= esc($role) ?></div>
|
||||
<span class="achieve-badge <?= $badge_class ?>" style="margin-top:4px; display:inline-block;"><?= $badge_text ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex; justify-content:space-between; font-size:12px; color:#8896aa; font-weight:600; margin-bottom:6px;">
|
||||
<span>Achieved <strong style="color:#1a202c;">₹<?= number_format($achieved_amt / 100000, 1) ?>L</strong></span>
|
||||
<span>Target <strong style="color:#1a202c;">₹<?= number_format($target_amt / 100000, 1) ?>L</strong></span>
|
||||
</div>
|
||||
|
||||
<div class="achieve-progress-wrap">
|
||||
<div class="achieve-progress-bar" style="width:<?= $pct ?>%; background:<?= $grad ?>;"></div>
|
||||
</div>
|
||||
|
||||
<div style="font-size:11px; color:#8896aa; font-weight:600; margin-bottom:10px;">
|
||||
Remaining: <strong style="color:#dd6b20;">₹<?= number_format($remaining / 100000, 1) ?>L</strong>
|
||||
</div>
|
||||
|
||||
<div class="achieve-stats-row">
|
||||
<div class="achieve-stat-box">
|
||||
<div class="achieve-stat-num"><?= $totalActs ?></div>
|
||||
<div class="achieve-stat-lbl">Activities</div>
|
||||
</div>
|
||||
<div class="achieve-stat-box">
|
||||
<div class="achieve-stat-num" style="color:#38a169;"><?= $doneActs ?></div>
|
||||
<div class="achieve-stat-lbl">Completed</div>
|
||||
</div>
|
||||
<div class="achieve-stat-box">
|
||||
<div class="achieve-stat-num" style="color:#dd6b20;"><?= $pendingActs ?></div>
|
||||
<div class="achieve-stat-lbl">Pending</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; else: ?>
|
||||
<div class="card" style="grid-column:1/-1;">
|
||||
<div class="empty-state"><div class="empty-icon">🏆</div>No team data available</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ── Main Grid ── -->
|
||||
<div class="main-grid">
|
||||
|
||||
<!-- LEFT: Pending Activities -->
|
||||
<div class="card">
|
||||
<div class="table-header">
|
||||
<h3 style="font-size:15px; font-weight:700; margin:0;">Pending Activities — All Team</h3>
|
||||
<span style="color:#8896aa; font-size:12px; font-weight:600;">
|
||||
<?= count($pending_acts) . ' ' . (count($pending_acts) == 1 ? 'activity' : 'activities') ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="table-scroll-area">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<th>Activity & Assigned</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($pending_acts)): ?>
|
||||
<?php foreach ($pending_acts as $a): ?>
|
||||
<?php
|
||||
$activityIcons = ['Call'=>'📞','Email'=>'✉️','Meeting'=>'📅','Visit'=>'🚗','Demo'=>'🖥️','Share Docs'=>'📄','To Do'=>'✓'];
|
||||
$icon = $activityIcons[$a['activity_type']] ?? '📌';
|
||||
$statusClass = strtolower(str_replace(' ', '-', $a['status']));
|
||||
$formattedscheduledDate = date('M d, Y, h:i A', strtotime($a['scheduled_date']));
|
||||
?>
|
||||
<tr>
|
||||
<td><strong><?= esc($a['company_name']) ?></strong></td>
|
||||
<td>
|
||||
<div style="color:#ff6b35; font-weight:700; font-size:11px;"><?= $icon ?> <?= strtoupper(esc($a['activity_type'])) ?></div>
|
||||
<div style="font-size:12px; color:#8896aa;"><?= esc($a['assigned_to_name'] ?? 'ID: ' . $a['assigned_to']) ?></div>
|
||||
</td>
|
||||
<td style="color:#4a5568; font-weight:500; font-size:13px;"><?= $formattedscheduledDate ?></td>
|
||||
<td><span class="status-pill status-<?= $statusClass ?>"><?= ucfirst(esc($a['status'])) ?></span></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr><td colspan="4"><div class="empty-state"><div class="empty-icon">✓</div>No pending activities</div></td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RIGHT: Sales Team Performance + Activity Breakdown -->
|
||||
<div class="right-panel">
|
||||
<div style="font-size:15px; font-weight:700; padding-bottom:10px; border-bottom:1px solid #f0f4fa; flex-shrink:0;">
|
||||
Sales Team Performance
|
||||
</div>
|
||||
|
||||
<div class="team-members-scroll">
|
||||
<?php
|
||||
if (!empty($team)):
|
||||
$colors = ['#ff6b35','#667eea','#48bb78','#ed8936','#9f7aea'];
|
||||
foreach ($team as $member):
|
||||
$firstLetter = strtoupper(substr($member['first_name'], 0, 1));
|
||||
$fullName = $member['first_name'] . ' ' . $member['last_name'];
|
||||
$color = $colors[abs(crc32($member['first_name'])) % count($colors)];
|
||||
?>
|
||||
<div class="team-member">
|
||||
<div class="member-img" style="background:<?= $color ?>;"><?= $firstLetter ?></div>
|
||||
<div style="flex:1;">
|
||||
<div style="font-weight:700; font-size:14px;"><?= esc($fullName) ?></div>
|
||||
<div style="font-size:11px; color:#8896aa;"><?= esc($member['role']) ?></div>
|
||||
</div>
|
||||
<div class="act-stats">
|
||||
<div class="total"><?= $member['total_acts'] ?> acts</div>
|
||||
<div class="done"><?= $member['done_acts'] ?> done</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; else: ?>
|
||||
<div class="empty-state">No team data found</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="breakdown-section">
|
||||
<h3 style="font-size:13px; font-weight:700; margin:0 0 12px 0; color:#1a202c;">Activity Breakdown</h3>
|
||||
<?php
|
||||
$activityConfig = [
|
||||
'Call' => ['color'=>'#667eea','icon'=>'📞'],
|
||||
'Email' => ['color'=>'#48bb78','icon'=>'✉️'],
|
||||
'Meeting' => ['color'=>'#4299e1','icon'=>'📅'],
|
||||
'Visit' => ['color'=>'#ecc94b','icon'=>'🚗'],
|
||||
'Demo' => ['color'=>'#9f7aea','icon'=>'🖥️'],
|
||||
'Share Docs' => ['color'=>'#ed8936','icon'=>'📄'],
|
||||
'To Do' => ['color'=>'#718096','icon'=>'✓'],
|
||||
];
|
||||
?>
|
||||
<?php if (!empty($activity_breakdown)): ?>
|
||||
<?php foreach ($activity_breakdown as $item): ?>
|
||||
<?php $cfg = $activityConfig[$item['activity_type']] ?? ['color'=>'#718096','icon'=>'📌']; ?>
|
||||
<div class="breakdown-item">
|
||||
<span style="min-width:90px;"><?= $cfg['icon'] ?> <?= esc($item['activity_type']) ?></span>
|
||||
<div class="breakdown-bar-wrap">
|
||||
<div class="breakdown-bar" style="width:<?= $item['percentage'] ?>%; background:<?= $cfg['color'] ?>;"></div>
|
||||
</div>
|
||||
<strong style="min-width:34px; text-align:right; color:#1a202c;"><?= $item['percentage'] ?>%</strong>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div style="text-align:center; color:#aaa; font-size:13px;">No activities found</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- end .main-grid -->
|
||||
|
||||
<!-- ── All Leads Overview ── -->
|
||||
<div class="card" style="width:100%; box-sizing:border-box;">
|
||||
<div class="table-header">
|
||||
<h3 style="font-size:15px; font-weight:700; margin:0;">All Leads Overview</h3>
|
||||
</div>
|
||||
<div class="leads-table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<th>Status</th>
|
||||
<th>Assigned To</th>
|
||||
<th style="text-align:center;">Activities</th>
|
||||
<th style="text-align:center;">Opportunities</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($leads_overview)): ?>
|
||||
<?php foreach ($leads_overview as $lead): ?>
|
||||
<?php $statusClass = strtolower(str_replace(' ', '-', $lead['status'])); ?>
|
||||
<tr>
|
||||
<td><strong><?= esc($lead['company_name']) ?></strong></td>
|
||||
<td><span class="status-pill status-<?= $statusClass ?>"><?= esc($lead['status']) ?></span></td>
|
||||
<td><?= esc($lead['assigned_to'] ?? 'Unassigned') ?></td>
|
||||
<td><div style="text-align:center; font-weight:700;"><?= $lead['activities'] ?></div></td>
|
||||
<td><div style="text-align:center; font-weight:700;"><?= $lead['opportunities'] ?></div></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr><td colspan="5"><div class="empty-state"><div class="empty-icon">👤</div>No leads found</div></td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- end .dash-container -->
|
||||
592
app/Views/sales/branch_level_dashboard_view_3mar.php
Normal file
592
app/Views/sales/branch_level_dashboard_view_3mar.php
Normal file
@ -0,0 +1,592 @@
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
|
||||
|
||||
.dash-container {
|
||||
padding: 28px;
|
||||
background: #f4f6fb;
|
||||
font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* ── Stat Cards ── */
|
||||
.stat-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 18px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.card-hero {
|
||||
background: white;
|
||||
padding: 22px 24px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #e8edf5;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
.card-hero::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 4px;
|
||||
}
|
||||
.card-hero:nth-child(1)::before { background: linear-gradient(90deg, #667eea, #764ba2); }
|
||||
.card-hero:nth-child(2)::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
|
||||
.card-hero:nth-child(3)::before { background: linear-gradient(90deg, #fda085, #f6d365); }
|
||||
.card-hero:nth-child(4)::before { background: linear-gradient(90deg, #43e97b, #38f9d7); }
|
||||
.card-hero:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.09); }
|
||||
|
||||
.stat-icon {
|
||||
width: 42px; height: 42px;
|
||||
border-radius: 10px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 18px; margin-bottom: 14px;
|
||||
}
|
||||
.stat-val { font-size: 30px; font-weight: 800; color: #1a202c; line-height: 1; }
|
||||
.stat-label { color: #8896aa; font-size: 13px; margin-top: 6px; font-weight: 600; }
|
||||
|
||||
/* ── Shared Card ── */
|
||||
.card {
|
||||
background: white;
|
||||
padding: 24px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #e8edf5;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
}
|
||||
|
||||
/* ── Main Grid ── */
|
||||
.main-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 20px;
|
||||
margin-bottom: 24px;
|
||||
align-items: start;
|
||||
}
|
||||
.main-grid > .card {
|
||||
height: 520px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.table-scroll-area { flex: 1; overflow-y: auto; }
|
||||
.table-scroll-area thead th { position: sticky; top: 0; background: white; z-index: 1; }
|
||||
|
||||
/* ── Right Panel ── */
|
||||
.right-panel {
|
||||
height: 520px;
|
||||
background: white;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #e8edf5;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
padding: 22px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.team-members-scroll { flex: 1; overflow-y: auto; margin-top: 10px; }
|
||||
.team-member {
|
||||
display: flex; align-items: center;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #f4f6fb;
|
||||
}
|
||||
.team-member:last-child { border-bottom: none; }
|
||||
.member-img {
|
||||
width: 38px; height: 38px; border-radius: 50%;
|
||||
color: white; margin-right: 12px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-weight: 700; font-size: 15px; flex-shrink: 0;
|
||||
}
|
||||
.act-stats { text-align: right; }
|
||||
.act-stats .total { font-weight: 700; font-size: 13px; color: #1a202c; }
|
||||
.act-stats .done { font-size: 11px; color: #38a169; font-weight: 600; margin-top: 2px; }
|
||||
|
||||
/* ── Activity Breakdown ── */
|
||||
.breakdown-section {
|
||||
flex-shrink: 0;
|
||||
margin-top: 12px;
|
||||
border: 1px solid #f0f4fa;
|
||||
border-radius: 12px;
|
||||
padding: 14px;
|
||||
background: #fafbfd;
|
||||
}
|
||||
.breakdown-item {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
margin-bottom: 9px; font-size: 13px;
|
||||
}
|
||||
.breakdown-item:last-child { margin-bottom: 0; }
|
||||
.breakdown-bar-wrap {
|
||||
flex: 1; height: 5px; background: #eef0f5;
|
||||
border-radius: 99px; margin: 0 10px; overflow: hidden;
|
||||
}
|
||||
.breakdown-bar { height: 100%; border-radius: 99px; }
|
||||
|
||||
/* ── Table ── */
|
||||
.table-header {
|
||||
display: flex; justify-content: space-between;
|
||||
align-items: center; margin-bottom: 16px;
|
||||
}
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th {
|
||||
text-align: left; padding: 10px 12px;
|
||||
color: #8896aa; font-size: 11px;
|
||||
text-transform: uppercase; letter-spacing: 0.07em;
|
||||
border-bottom: 1px solid #edf2f7; background: white; font-weight: 700;
|
||||
}
|
||||
td { padding: 13px 12px; border-bottom: 1px solid #f4f6fb; font-size: 14px; vertical-align: middle; }
|
||||
tbody tr:hover { background: #fafbfe; }
|
||||
|
||||
/* ── Status Pills ── */
|
||||
.status-pill { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
|
||||
.status-completed { background: #f0fff4; color: #38a169; }
|
||||
.status-pending { background: #fffaf0; color: #dd6b20; }
|
||||
.status-new { background: #e3f2fd; color: #1976d2; }
|
||||
.status-potential { background: #fff3e0; color: #f57c00; }
|
||||
.status-prospects { background: #e8f5e9; color: #388e3c; }
|
||||
.status-not-a-prospects { background: #ffebee; color: #d32f2f; }
|
||||
|
||||
.leads-table-wrap { max-height: 480px; overflow-y: auto; }
|
||||
.leads-table-wrap thead th { position: sticky; top: 0; background: white; z-index: 1; }
|
||||
|
||||
.empty-state { text-align: center; padding: 50px 20px; color: #aaa; }
|
||||
.empty-icon { width: 70px; height: 70px; margin: 0 auto 16px; background: #f5f5f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; }
|
||||
|
||||
/* ── Responsive ── */
|
||||
@media (max-width: 1200px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (max-width: 992px) {
|
||||
.main-grid { grid-template-columns: 1fr; }
|
||||
.main-grid > .card, .right-panel { height: 450px; }
|
||||
.stat-cards { grid-template-columns: repeat(2, 1fr); }
|
||||
.achievement-cards { grid-template-columns: 1fr 1fr; }
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.dash-container { padding: 14px; }
|
||||
.stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||
.stat-val { font-size: 24px; }
|
||||
.main-grid > .card, .right-panel { height: 400px; }
|
||||
table th, table td { padding: 10px 8px; font-size: 12px; }
|
||||
.achievement-cards { grid-template-columns: 1fr; }
|
||||
.achievement-header { flex-direction: column; gap: 14px; }
|
||||
}
|
||||
|
||||
/* ══════════════════════════════════════════
|
||||
TEAM ACHIEVEMENT SECTION (NEW)
|
||||
══════════════════════════════════════════ */
|
||||
|
||||
.section-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:16px;}
|
||||
.section-title{font-size:16px;font-weight:800;color:#0f172a;}
|
||||
.section-sub{font-size:12px;color:#7c8db0;font-weight:600;margin-top:3px;}
|
||||
.page-title{font-size:16px;font-weight:800;color:#0f172a;}
|
||||
.branch-summary{text-align:right;}
|
||||
.branch-amt{font-size:20px;font-weight:800;color:#0f172a;}
|
||||
.branch-bar-wrap{width:180px;height:5px;background:#e4eaf5;border-radius:99px;overflow:hidden;margin:6px 0 4px auto;}
|
||||
.branch-bar-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#4f46e5,#818cf8);}
|
||||
.branch-pct-lbl{font-size:11px;color:#4f46e5;font-weight:700;}
|
||||
.achieve-list{background:#fff;border-radius:14px;border:1px solid #e4eaf5;box-shadow:0 2px 12px rgba(15,23,42,0.06);overflow:hidden;}
|
||||
.list-col-head{display:grid;grid-template-columns:260px 1fr 130px 130px 130px 110px 80px;padding:10px 22px;background:#f8fafd;border-bottom:1px solid #e4eaf5;}
|
||||
.col-lbl{font-size:10px;font-weight:700;color:#7c8db0;letter-spacing:.07em;text-transform:uppercase;font-family:'DM Mono',monospace;display:flex;align-items:center;}
|
||||
.col-lbl.right{justify-content:flex-end;}
|
||||
.col-lbl.center{justify-content:center;}
|
||||
.achieve-row{display:grid;grid-template-columns:260px 1fr 130px 130px 130px 110px 80px;padding:16px 22px;border-bottom:1px solid #f1f5f9;align-items:center;cursor:pointer;transition:background .15s;position:relative;}
|
||||
.achieve-row:last-child{border-bottom:none;}
|
||||
.achieve-row:hover{background:#f8fafd;}
|
||||
.achieve-row:hover .row-arrow{opacity:1;transform:translateY(-50%) translateX(0);}
|
||||
.member-cell{display:flex;align-items:center;gap:12px;}
|
||||
.m-avatar{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;color:#fff;flex-shrink:0;}
|
||||
.m-name{font-weight:700;font-size:14px;color:#0f172a;}
|
||||
.m-role{font-size:11px;color:#7c8db0;font-weight:600;margin-top:2px;}
|
||||
.prog-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px;}
|
||||
.prog-pct{font-size:13px;font-weight:800;}
|
||||
.prog-amts{font-size:11px;color:#7c8db0;font-weight:600;}
|
||||
.prog-bar-wrap{height:6px;background:#f0f3fa;border-radius:99px;overflow:hidden;}
|
||||
.prog-bar{height:100%;border-radius:99px;}
|
||||
.num-cell{text-align:right;}
|
||||
.num-val{font-size:15px;font-weight:800;}
|
||||
.num-lbl{font-size:10px;color:#7c8db0;font-weight:700;margin-top:2px;letter-spacing:.04em;}
|
||||
.num-cell.center-col{text-align:center;}
|
||||
.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border-radius:99px;font-size:11px;font-weight:700;white-space:nowrap;}
|
||||
.b-achieved{background:#ecfdf5;color:#059669;}
|
||||
.b-ontrack{background:#eff6ff;color:#2563eb;}
|
||||
.b-behind{background:#fff7ed;color:#c2410c;}
|
||||
.b-atrisk{background:#fef2f2;color:#b91c1c;}
|
||||
.row-arrow{position:absolute;right:18px;top:50%;transform:translateY(-50%) translateX(4px);color:#cbd5e1;font-size:16px;opacity:0;transition:opacity .15s,transform .15s;}
|
||||
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,15,30,0.55);backdrop-filter:blur(6px);z-index:1000;align-items:center;justify-content:center;padding:20px;}
|
||||
.modal-overlay.open{display:flex;animation:fadeIn .2s ease;}
|
||||
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
|
||||
.modal-box{background:#fff;border-radius:20px;width:100%;max-width:720px;max-height:90vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 32px 80px rgba(15,23,42,0.25);animation:slideUp .25s ease;}
|
||||
@keyframes slideUp{from{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}
|
||||
.modal-header{padding:20px 24px 16px;border-bottom:1px solid #e4eaf5;display:flex;align-items:center;gap:14px;flex-shrink:0;}
|
||||
.modal-ava{width:50px;height:50px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:21px;font-weight:800;color:#fff;flex-shrink:0;}
|
||||
.modal-name{font-size:17px;font-weight:800;}
|
||||
.modal-role{font-size:12px;color:#7c8db0;font-weight:600;margin-top:2px;}
|
||||
.modal-close{margin-left:auto;background:#f1f5f9;border:none;width:34px;height:34px;border-radius:50%;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;color:#7c8db0;transition:background .2s;}
|
||||
.modal-close:hover{background:#e2e8f0;color:#0f172a;}
|
||||
.modal-summary{display:grid;grid-template-columns:repeat(4,1fr);background:#f8fafd;border-bottom:1px solid #e4eaf5;flex-shrink:0;}
|
||||
.ms-box{padding:14px 18px;text-align:center;border-right:1px solid #e4eaf5;}
|
||||
.ms-box:last-child{border-right:none;}
|
||||
.ms-num{font-size:19px;font-weight:800;}
|
||||
.ms-lbl{font-size:10px;color:#7c8db0;font-weight:700;letter-spacing:.05em;margin-top:2px;}
|
||||
.modal-body{padding:22px 24px;overflow-y:auto;flex:1;}
|
||||
.overall-prog{background:linear-gradient(135deg,#0f172a,#1e293b);border-radius:14px;padding:18px 20px;color:#fff;margin-bottom:20px;}
|
||||
.op-label{font-size:10px;font-weight:700;letter-spacing:.08em;color:#94a3b8;}
|
||||
.op-row{display:flex;justify-content:space-between;align-items:flex-end;margin:6px 0 12px;}
|
||||
.op-achieved{font-size:24px;font-weight:800;}
|
||||
.op-target{font-size:12px;color:#94a3b8;font-weight:600;}
|
||||
.op-pct{font-size:26px;font-weight:800;color:#818cf8;}
|
||||
.op-bar-wrap{background:rgba(255,255,255,0.12);height:7px;border-radius:99px;overflow:hidden;}
|
||||
.op-bar-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#818cf8,#67e8f9);}
|
||||
.op-foot{display:flex;justify-content:space-between;font-size:11px;color:#94a3b8;font-weight:600;margin-top:7px;}
|
||||
.split-section-title{font-size:13px;font-weight:800;margin-bottom:12px;}
|
||||
.split-table{width:100%;border-collapse:collapse;font-size:13px;}
|
||||
.split-table thead th{background:#f8fafd;padding:9px 12px;text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:#7c8db0;font-family:'DM Mono',monospace;font-weight:500;border-bottom:2px solid #e4eaf5;}
|
||||
.split-table thead th:last-child{text-align:right;}
|
||||
.split-table tbody tr{border-bottom:1px solid #f1f5f9;}
|
||||
.split-table tbody tr:hover{background:#f8fafd;}
|
||||
.split-table td{padding:12px;vertical-align:middle;}
|
||||
.split-table td:last-child{text-align:right;}
|
||||
.split-name{font-weight:700;font-size:13px;}
|
||||
.split-dates{font-size:11px;color:#7c8db0;font-weight:600;margin-top:1px;}
|
||||
.mini-prog-wrap{width:80px;height:4px;background:#e4eaf5;border-radius:99px;overflow:hidden;margin-top:4px;}
|
||||
.mini-prog-bar{height:100%;border-radius:99px;}
|
||||
.split-pct-badge{display:inline-block;padding:3px 10px;border-radius:99px;font-size:11px;font-weight:700;}
|
||||
.act-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}
|
||||
.act-chip{display:flex;align-items:center;gap:6px;background:#f1f5f9;border-radius:99px;padding:5px 13px;font-size:12px;font-weight:700;}
|
||||
.act-dot{width:7px;height:7px;border-radius:50%;}
|
||||
@media(max-width:900px){.list-col-head,.achieve-row{grid-template-columns:220px 1fr 110px 110px 110px;}.col-lbl:nth-child(6),.col-lbl:nth-child(7),.achieve-row>*:nth-child(6),.achieve-row>*:nth-child(7){display:none;}}
|
||||
@media(max-width:640px){body{padding:14px;}.list-col-head{display:none;}.achieve-row{grid-template-columns:1fr auto;gap:12px;padding:14px 16px;}.achieve-row>*:not(:nth-child(1)):not(:nth-child(7)){display:none;}.section-head{flex-direction:column;align-items:flex-start;gap:12px;}.modal-summary{grid-template-columns:repeat(2,1fr);}}
|
||||
</style>
|
||||
|
||||
<div class="dash-container">
|
||||
|
||||
<div>
|
||||
<div class="page-title">Branch Dashboard </div>
|
||||
<div class="section-sub"><span>FY : {financial_year dropdown selected value here}</span></div>
|
||||
<div style="position: relative;">
|
||||
<select id="financial_year" name="financial_year" onchange="onFinancialYearChange(this)" style="background:#f5f5f5; padding:10px 20px; border-radius:8px; border:none; width: 250px; font-size: 13px; cursor: pointer;">
|
||||
<?php if(!empty($fin_years)): ?>
|
||||
<?php foreach($fin_years as $year): ?>
|
||||
<option value="<?= $year; ?>"><?= $year; ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ── Stat Cards ── -->
|
||||
<div class="stat-cards">
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#ede9fe;">👥</div>
|
||||
<div class="stat-val"><?php echo $total_leads; ?></div>
|
||||
<div class="stat-label">Total Leads</div>
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#fce7f3;">⚡</div>
|
||||
<div class="stat-val"><?php echo $total_acts ?></div>
|
||||
<div class="stat-label">Total Activities</div>
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#fef3c7;">⏳</div>
|
||||
<div class="stat-val"><?php echo $total_pending_acts ?></div>
|
||||
<div class="stat-label">Pending Activities</div>
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-icon" style="background:#d1fae5;">✅</div>
|
||||
<div class="stat-val"><?php echo $total_completed_acts ?></div>
|
||||
<div class="stat-label">Completed Activities</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ══════════════════════════════════════════
|
||||
🏆 TEAM ACHIEVEMENT SECTION (NEW)
|
||||
══════════════════════════════════════════ -->
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<div class="section-title">Team Achievement Overview</div>
|
||||
<div class="section-sub">Click any row to view split-wise achievement history</div>
|
||||
</div>
|
||||
<div class="branch-summary">
|
||||
<div style="font-size:11px;color:#7c8db0;font-weight:700;">Branch Total</div>
|
||||
<div class="branch-amt">₹62.5L <span style="font-size:13px;color:#7c8db0;font-weight:600;">/ ₹100L</span></div>
|
||||
<div class="branch-bar-wrap"><div class="branch-bar-fill" style="width:62.5%;"></div></div>
|
||||
<div class="branch-pct-lbl">62.5% of branch target</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="achieve-list">
|
||||
<div class="list-col-head">
|
||||
<div class="col-lbl">Member</div>
|
||||
<div class="col-lbl">Progress</div>
|
||||
<div class="col-lbl right">Achieved</div>
|
||||
<div class="col-lbl right">Target</div>
|
||||
<div class="col-lbl right">Remaining</div>
|
||||
<div class="col-lbl center">Status</div>
|
||||
<div class="col-lbl center">Acts</div>
|
||||
</div>
|
||||
<div id="achieveList"></div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<!-- ── Main Grid ── -->
|
||||
<div class="main-grid">
|
||||
|
||||
<!-- LEFT: Pending Activities -->
|
||||
<div class="card">
|
||||
<div class="table-header">
|
||||
<h3 style="font-size:15px; font-weight:700; margin:0;">Pending Activities — All Team</h3>
|
||||
<span style="color:#8896aa; font-size:12px; font-weight:600;">
|
||||
<?= count($pending_acts) . ' ' . (count($pending_acts) == 1 ? 'activity' : 'activities') ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="table-scroll-area">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<th>Activity & Assigned</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($pending_acts)): ?>
|
||||
<?php foreach ($pending_acts as $a): ?>
|
||||
<?php
|
||||
$activityIcons = ['Call'=>'📞','Email'=>'✉️','Meeting'=>'📅','Visit'=>'🚗','Demo'=>'🖥️','Share Docs'=>'📄','To Do'=>'✓'];
|
||||
$icon = $activityIcons[$a['activity_type']] ?? '📌';
|
||||
$statusClass = strtolower(str_replace(' ', '-', $a['status']));
|
||||
$formattedscheduledDate = date('M d, Y, h:i A', strtotime($a['scheduled_date']));
|
||||
?>
|
||||
<tr>
|
||||
<td><strong><?= esc($a['company_name']) ?></strong></td>
|
||||
<td>
|
||||
<div style="color:#ff6b35; font-weight:700; font-size:11px;"><?= $icon ?> <?= strtoupper(esc($a['activity_type'])) ?></div>
|
||||
<div style="font-size:12px; color:#8896aa;"><?= esc($a['assigned_to_name'] ?? 'ID: ' . $a['assigned_to']) ?></div>
|
||||
</td>
|
||||
<td style="color:#4a5568; font-weight:500; font-size:13px;"><?= $formattedscheduledDate ?></td>
|
||||
<td><span class="status-pill status-<?= $statusClass ?>"><?= ucfirst(esc($a['status'])) ?></span></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr><td colspan="4"><div class="empty-state"><div class="empty-icon">✓</div>No pending activities</div></td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RIGHT: Sales Team Performance + Activity Breakdown -->
|
||||
<div class="right-panel">
|
||||
<div style="font-size:15px; font-weight:700; padding-bottom:10px; border-bottom:1px solid #f0f4fa; flex-shrink:0;">
|
||||
Sales Team Performance
|
||||
</div>
|
||||
|
||||
<div class="team-members-scroll">
|
||||
<?php
|
||||
if (!empty($team)):
|
||||
$colors = ['#ff6b35','#667eea','#48bb78','#ed8936','#9f7aea'];
|
||||
foreach ($team as $member):
|
||||
$firstLetter = strtoupper(substr($member['first_name'], 0, 1));
|
||||
$fullName = $member['first_name'] . ' ' . $member['last_name'];
|
||||
$color = $colors[abs(crc32($member['first_name'])) % count($colors)];
|
||||
?>
|
||||
<div class="team-member">
|
||||
<div class="member-img" style="background:<?= $color ?>;"><?= $firstLetter ?></div>
|
||||
<div style="flex:1;">
|
||||
<div style="font-weight:700; font-size:14px;"><?= esc($fullName) ?></div>
|
||||
<div style="font-size:11px; color:#8896aa;"><?= esc($member['role']) ?></div>
|
||||
</div>
|
||||
<div class="act-stats">
|
||||
<div class="total"><?= $member['total_acts'] ?> acts</div>
|
||||
<div class="done"><?= $member['done_acts'] ?> done</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; else: ?>
|
||||
<div class="empty-state">No team data found</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="breakdown-section">
|
||||
<h3 style="font-size:13px; font-weight:700; margin:0 0 12px 0; color:#1a202c;">Activity Breakdown</h3>
|
||||
<?php
|
||||
$activityConfig = [
|
||||
'Call' => ['color'=>'#667eea','icon'=>'📞'],
|
||||
'Email' => ['color'=>'#48bb78','icon'=>'✉️'],
|
||||
'Meeting' => ['color'=>'#4299e1','icon'=>'📅'],
|
||||
'Visit' => ['color'=>'#ecc94b','icon'=>'🚗'],
|
||||
'Demo' => ['color'=>'#9f7aea','icon'=>'🖥️'],
|
||||
'Share Docs' => ['color'=>'#ed8936','icon'=>'📄'],
|
||||
'To Do' => ['color'=>'#718096','icon'=>'✓'],
|
||||
];
|
||||
?>
|
||||
<?php if (!empty($activity_breakdown)): ?>
|
||||
<?php foreach ($activity_breakdown as $item): ?>
|
||||
<?php $cfg = $activityConfig[$item['activity_type']] ?? ['color'=>'#718096','icon'=>'📌']; ?>
|
||||
<div class="breakdown-item">
|
||||
<span style="min-width:90px;"><?= $cfg['icon'] ?> <?= esc($item['activity_type']) ?></span>
|
||||
<div class="breakdown-bar-wrap">
|
||||
<div class="breakdown-bar" style="width:<?= $item['percentage'] ?>%; background:<?= $cfg['color'] ?>;"></div>
|
||||
</div>
|
||||
<strong style="min-width:34px; text-align:right; color:#1a202c;"><?= $item['percentage'] ?>%</strong>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div style="text-align:center; color:#aaa; font-size:13px;">No activities found</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- end .main-grid -->
|
||||
|
||||
<!-- ── All Leads Overview ── -->
|
||||
<div class="card" style="width:100%; box-sizing:border-box;">
|
||||
<div class="table-header">
|
||||
<h3 style="font-size:15px; font-weight:700; margin:0;">All Leads Overview</h3>
|
||||
</div>
|
||||
<div class="leads-table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<th>Status</th>
|
||||
<th>Assigned To</th>
|
||||
<th style="text-align:center;">Activities</th>
|
||||
<th style="text-align:center;">Opportunities</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($leads_overview)): ?>
|
||||
<?php foreach ($leads_overview as $lead): ?>
|
||||
<?php $statusClass = strtolower(str_replace(' ', '-', $lead['status'])); ?>
|
||||
<tr>
|
||||
<td><strong><?= esc($lead['company_name']) ?></strong></td>
|
||||
<td><span class="status-pill status-<?= $statusClass ?>"><?= esc($lead['status']) ?></span></td>
|
||||
<td><?= esc($lead['assigned_to'] ?? 'Unassigned') ?></td>
|
||||
<td><div style="text-align:center; font-weight:700;"><?= $lead['activities'] ?></div></td>
|
||||
<td><div style="text-align:center; font-weight:700;"><?= $lead['opportunities'] ?></div></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr><td colspan="5"><div class="empty-state"><div class="empty-icon">👤</div>No leads found</div></td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-overlay" id="modalOverlay">
|
||||
<div class="modal-box">
|
||||
<div class="modal-header">
|
||||
<div class="modal-ava" id="modalAva"></div>
|
||||
<div><div class="modal-name" id="modalName"></div><div class="modal-role" id="modalRole"></div></div>
|
||||
<button class="modal-close" onclick="closeModal()">✕</button>
|
||||
</div>
|
||||
<div class="modal-summary" id="modalSummary"></div>
|
||||
<div class="modal-body" id="modalBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- end .dash-container -->
|
||||
<script>
|
||||
const TEAM=[{id:1,first:'Divya',last:'Rao',role:'Senior Sales Executive',total_acts:88,done_acts:82,target_amt:2500000,achieved_amt:2510000,grad:'linear-gradient(135deg,#10b981,#34d399)',color:'#10b981',splits:[{name:'Q1 (Apr-Jun 2024)',start:'Apr 2024',end:'Jun 2024',target:625000,achieved:650000,acts:22,done:21,leads:16},{name:'Q2 (Jul-Sep 2024)',start:'Jul 2024',end:'Sep 2024',target:625000,achieved:610000,acts:22,done:20,leads:15},{name:'Q3 (Oct-Dec 2024)',start:'Oct 2024',end:'Dec 2024',target:625000,achieved:640000,acts:24,done:22,leads:17},{name:'Q4 (Jan-Mar 2025)',start:'Jan 2025',end:'Mar 2025',target:625000,achieved:610000,acts:20,done:19,leads:14}],activities:{Call:35,Email:20,Meeting:19,Visit:9,Demo:5}},{id:2,first:'Priya',last:'Nair',role:'Sales Executive',total_acts:74,done_acts:68,target_amt:2000000,achieved_amt:1940000,grad:'linear-gradient(135deg,#06b6d4,#67e8f9)',color:'#06b6d4',splits:[{name:'Q1 (Apr-Jun 2024)',start:'Apr 2024',end:'Jun 2024',target:500000,achieved:495000,acts:19,done:18,leads:12},{name:'Q2 (Jul-Sep 2024)',start:'Jul 2024',end:'Sep 2024',target:500000,achieved:510000,acts:18,done:17,leads:11},{name:'Q3 (Oct-Dec 2024)',start:'Oct 2024',end:'Dec 2024',target:500000,achieved:487000,acts:20,done:18,leads:13},{name:'Q4 (Jan-Mar 2025)',start:'Jan 2025',end:'Mar 2025',target:500000,achieved:448000,acts:17,done:15,leads:10}],activities:{Call:28,Email:22,Meeting:15,Visit:6,Demo:3}},{id:3,first:'Arjun',last:'Sharma',role:'Senior Sales Executive',total_acts:92,done_acts:78,target_amt:2500000,achieved_amt:1975000,grad:'linear-gradient(135deg,#4f46e5,#818cf8)',color:'#4f46e5',splits:[{name:'Q1 (Apr-Jun 2024)',start:'Apr 2024',end:'Jun 2024',target:625000,achieved:582000,acts:24,done:21,leads:18},{name:'Q2 (Jul-Sep 2024)',start:'Jul 2024',end:'Sep 2024',target:625000,achieved:510000,acts:23,done:20,leads:14},{name:'Q3 (Oct-Dec 2024)',start:'Oct 2024',end:'Dec 2024',target:625000,achieved:498000,acts:22,done:19,leads:16},{name:'Q4 (Jan-Mar 2025)',start:'Jan 2025',end:'Mar 2025',target:625000,achieved:385000,acts:23,done:18,leads:12}],activities:{Call:32,Email:18,Meeting:22,Visit:12,Demo:8}},{id:4,first:'Rahul',last:'Verma',role:'Sales Executive',total_acts:67,done_acts:56,target_amt:1500000,achieved_amt:1005000,grad:'linear-gradient(135deg,#ec4899,#f9a8d4)',color:'#ec4899',splits:[{name:'Q1 (Apr-Jun 2024)',start:'Apr 2024',end:'Jun 2024',target:375000,achieved:285000,acts:17,done:14,leads:10},{name:'Q2 (Jul-Sep 2024)',start:'Jul 2024',end:'Sep 2024',target:375000,achieved:262000,acts:17,done:15,leads:9},{name:'Q3 (Oct-Dec 2024)',start:'Oct 2024',end:'Dec 2024',target:375000,achieved:250000,acts:18,done:15,leads:11},{name:'Q4 (Jan-Mar 2025)',start:'Jan 2025',end:'Mar 2025',target:375000,achieved:208000,acts:15,done:12,leads:8}],activities:{Call:22,Email:16,Meeting:17,Visit:7,Demo:5}},{id:5,first:'Kiran',last:'Menon',role:'Junior Sales Executive',total_acts:65,done_acts:44,target_amt:1500000,achieved_amt:820000,grad:'linear-gradient(135deg,#f97316,#fbbf24)',color:'#f97316',splits:[{name:'Q1 (Apr-Jun 2024)',start:'Apr 2024',end:'Jun 2024',target:375000,achieved:240000,acts:17,done:11,leads:9},{name:'Q2 (Jul-Sep 2024)',start:'Jul 2024',end:'Sep 2024',target:375000,achieved:195000,acts:16,done:10,leads:8},{name:'Q3 (Oct-Dec 2024)',start:'Oct 2024',end:'Dec 2024',target:375000,achieved:210000,acts:18,done:13,leads:10},{name:'Q4 (Jan-Mar 2025)',start:'Jan 2025',end:'Mar 2025',target:375000,achieved:175000,acts:14,done:10,leads:7}],activities:{Call:20,Email:14,Meeting:18,Visit:8,Demo:5}}];
|
||||
const ACT_ICONS={Call:'📞',Email:'✉️',Meeting:'📅',Visit:'🚗',Demo:'🖥️','Share Docs':'📄','To Do':'✓'};
|
||||
const ACT_COLORS={Call:'#4f46e5',Email:'#10b981',Meeting:'#06b6d4',Visit:'#f59e0b',Demo:'#ec4899','Share Docs':'#f97316','To Do':'#64748b'};
|
||||
const fmt=v=>'₹'+(v/100000).toFixed(1)+'L';
|
||||
const pct=(a,t)=>t>0?Math.min(100,Math.round(a/t*100)):0;
|
||||
const badge=p=>p>=100?['b-achieved','🏆 Achieved']:p>=75?['b-ontrack','🎯 On Track']:p>=50?['b-behind','⚡ Behind']:['b-atrisk','⚠️ At Risk'];
|
||||
const progColor=p=>p>=100?'linear-gradient(90deg,#10b981,#34d399)':p>=75?'linear-gradient(90deg,#06b6d4,#67e8f9)':p>=50?'linear-gradient(90deg,#f97316,#fbbf24)':'linear-gradient(90deg,#ef4444,#fca5a5)';
|
||||
|
||||
function renderList(){
|
||||
const sorted=[...TEAM].sort((a,b)=>pct(b.achieved_amt,b.target_amt)-pct(a.achieved_amt,a.target_amt));
|
||||
document.getElementById('achieveList').innerHTML=sorted.map((m,i)=>{
|
||||
const p=pct(m.achieved_amt,m.target_amt);
|
||||
const rem=Math.max(0,m.target_amt-m.achieved_amt);
|
||||
const [bc,bt]=badge(p);
|
||||
// const rankLabel=i===0?'🥇':i===1?'🥈':i===2?'🥉':'#'+(i+1);
|
||||
const rankLabel = '#'+(i+1);
|
||||
return `<div class="achieve-row" onclick="openModal(${m.id})">
|
||||
<div class="member-cell">
|
||||
<div style="font-size:14px;font-weight:800;color:#cbd5e1;min-width:26px;font-family:'DM Mono',monospace;">${rankLabel}</div>
|
||||
<div class="m-avatar" style="background:${m.grad};">${m.first[0]}</div>
|
||||
<div><div class="m-name">${m.first} ${m.last}</div></div>
|
||||
</div>
|
||||
<div style="padding-right:20px;">
|
||||
<div class="prog-row"><span class="prog-pct" style="color:${m.color};">${p}%</span><span class="prog-amts">${fmt(m.achieved_amt)} / ${fmt(m.target_amt)}</span></div>
|
||||
<div class="prog-bar-wrap"><div class="prog-bar" style="width:${p}%;background:${m.grad};"></div></div>
|
||||
</div>
|
||||
<div class="num-cell"><div class="num-val" style="color:#0f172a;">${fmt(m.achieved_amt)}</div></div>
|
||||
<div class="num-cell"><div class="num-val" style="color:#7c8db0;">${fmt(m.target_amt)}</div></div>
|
||||
<div class="num-cell"><div class="num-val" style="color:${rem>0?'#f97316':'#10b981'};">${rem>0?fmt(rem):'—'}</div></div>
|
||||
<div style="display:flex;justify-content:center;"><span class="badge ${bc}">${bt}</span></div>
|
||||
<div class="num-cell center-col"><div class="num-val">${m.done_acts}<span style="color:#cbd5e1;font-size:12px;font-weight:600;">/${m.total_acts}</span></div><div class="num-lbl">DONE/TOTAL</div></div>
|
||||
<span class="row-arrow">›</span>
|
||||
</div>`;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function openModal(id){
|
||||
const m=TEAM.find(x=>x.id===id);if(!m)return;
|
||||
const p=pct(m.achieved_amt,m.target_amt);
|
||||
const rem=Math.max(0,m.target_amt-m.achieved_amt);
|
||||
const [bc,bt]=badge(p);
|
||||
document.getElementById('modalAva').style.background=m.grad;
|
||||
document.getElementById('modalAva').textContent=m.first[0];
|
||||
document.getElementById('modalName').textContent=m.first+' '+m.last
|
||||
document.getElementById('modalRole').textContent=m.role;
|
||||
document.getElementById('modalSummary').innerHTML=`
|
||||
<div class="ms-box"><div class="ms-num" style="color:#4f46e5;">${fmt(m.achieved_amt)}</div><div class="ms-lbl">ACHIEVED</div></div>
|
||||
<div class="ms-box"><div class="ms-num">${fmt(m.target_amt)}</div><div class="ms-lbl">TARGET</div></div>
|
||||
<div class="ms-box"><div class="ms-num" style="color:#f97316;">${fmt(rem)}</div><div class="ms-lbl">REMAINING</div></div>
|
||||
<div class="ms-box"><div class="ms-num" style="color:${p>=75?'#10b981':p>=50?'#f97316':'#ef4444'};">${p}%</div><div class="ms-lbl">ACHIEVED %</div></div>`;
|
||||
const splitRows=m.splits.map((s,i)=>{
|
||||
const sp=pct(s.achieved,s.target);
|
||||
const [sbc,sbt]=badge(sp);
|
||||
const srem=Math.max(0,s.target-s.achieved);
|
||||
return `<tr>
|
||||
<td><div class="split-name">Split ${i+1}: ${s.name}</div><div class="split-dates">📅 ${s.start} → ${s.end}</div></td>
|
||||
<td><div style="font-weight:800;">${fmt(s.achieved)}</div><div class="mini-prog-wrap"><div class="mini-prog-bar" style="width:${sp}%;background:${progColor(sp)};"></div></div></td>
|
||||
<td style="font-weight:700;color:#7c8db0;">${fmt(s.target)}</td>
|
||||
<td style="font-weight:700;color:#f97316;">${srem>0?fmt(srem):'—'}</td>
|
||||
<td><span class="split-pct-badge ${sbc}">${sp}% · ${sbt}</span></td>
|
||||
<td style="font-weight:700;">${s.done}<span style="color:#cbd5e1;">/${s.acts}</span></td>
|
||||
<td style="font-weight:700;">${s.leads}</td>
|
||||
</tr>`;
|
||||
}).join('');
|
||||
const actChips=Object.entries(m.activities).map(([k,v])=>`<div class="act-chip"><div class="act-dot" style="background:${ACT_COLORS[k]||'#64748b'};"></div>${ACT_ICONS[k]||'📌'} ${k}: <strong>${v}</strong></div>`).join('');
|
||||
document.getElementById('modalBody').innerHTML=`
|
||||
<div class="overall-prog">
|
||||
<div class="op-label">OVERALL TARGET ACHIEVEMENT</div>
|
||||
<div class="op-row"><div><div class="op-achieved">${fmt(m.achieved_amt)}</div><div class="op-target">of ${fmt(m.target_amt)} target</div></div><div class="op-pct">${p}%</div></div>
|
||||
<div class="op-bar-wrap"><div class="op-bar-fill" style="width:${p}%;"></div></div>
|
||||
<div class="op-foot"><span>Remaining: <strong style="color:#fbbf24;">${fmt(rem)}</strong></span><span class="badge ${bc}" style="background:rgba(255,255,255,.1);color:#e2e8f0;">${bt}</span></div>
|
||||
</div>
|
||||
<div class="split-section-title">📊 Split-wise Achievement Breakdown</div>
|
||||
<div style="overflow-x:auto;margin-bottom:20px;">
|
||||
<table class="split-table">
|
||||
<thead><tr><th>Split Period</th><th>Achieved</th><th>Target</th><th>Remaining</th><th>Status</th><th>Activities</th><th>Leads</th></tr></thead>
|
||||
<tbody>${splitRows}</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="split-section-title">⚡ Activity Breakdown</div>
|
||||
<div class="act-chips">${actChips}</div>`;
|
||||
document.getElementById('modalOverlay').classList.add('open');
|
||||
document.body.style.overflow='hidden';
|
||||
}
|
||||
function closeModal(){document.getElementById('modalOverlay').classList.remove('open');document.body.style.overflow='';}
|
||||
document.getElementById('modalOverlay').addEventListener('click',e=>{if(e.target===e.currentTarget)closeModal();});
|
||||
document.addEventListener('keydown',e=>{if(e.key==='Escape')closeModal();});
|
||||
renderList();
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const fy = params.get('fy');
|
||||
if (fy) {
|
||||
document.getElementById('financial_year').value = fy;
|
||||
}
|
||||
});
|
||||
|
||||
function onFinancialYearChange(select) {
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.set('fy', select.value);
|
||||
window.location.href = url.toString();
|
||||
}
|
||||
</script>
|
||||
294
app/Views/sales/branch_level_dashboard_view_mar.php
Normal file
294
app/Views/sales/branch_level_dashboard_view_mar.php
Normal file
@ -0,0 +1,294 @@
|
||||
<style>
|
||||
.dash-container { padding: 25px; background: #f8f9fa; font-family: 'Segoe UI', sans-serif; }
|
||||
.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
|
||||
|
||||
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
|
||||
.card { background: white; padding: 25px; border-radius: 12px; border: 1px solid #edf2f7; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
|
||||
.stat-val { font-size: 28px; font-weight: 700; color: #1a202c; }
|
||||
.stat-label { color: #718096; font-size: 14px; margin-top: 4px; font-weight: 500; }
|
||||
.stat-change { font-size: 11px; margin-top: 8px; font-weight: 600; }
|
||||
.text-success { color: #48bb78; }
|
||||
|
||||
.card-hero {
|
||||
background: white;
|
||||
padding: 25px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #edf2f7;
|
||||
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
/* The Gradient Overlay Effect */
|
||||
.card-hero::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 4px; /* Thin line at the top */
|
||||
background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
|
||||
}
|
||||
|
||||
.card-hero:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 15px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
/* Optional: Subtle Background Gradient */
|
||||
.card-hero.gradient-bg {
|
||||
background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
|
||||
}
|
||||
|
||||
.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 30px; }
|
||||
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
||||
|
||||
.team-member { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid #f1f5f9; }
|
||||
.member-img { width: 40px; height: 40px; border-radius: 50%; background: #ff6b35; color: white; margin-right: 12px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; }
|
||||
.act-stats { text-align: right; }
|
||||
.act-stats .total { font-weight: 700; font-size: 13px; color: #1a202c; }
|
||||
.act-stats .done { font-size: 11px; color: #38a169; font-weight: 600; margin-top: 2px; }
|
||||
|
||||
.breakdown-card { margin-top: 20px; }
|
||||
.breakdown-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px; }
|
||||
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
|
||||
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th { text-align: left; padding: 12px; color: #718096; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #edf2f7; }
|
||||
td { padding: 15px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; vertical-align: middle; }
|
||||
|
||||
.status-pill { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
|
||||
.status-completed { background: #f0fff4; color: #38a169; }
|
||||
.status-pending { background: #fffaf0; color: #dd6b20; }
|
||||
.status-new { background: #e3f2fd; color: #1976d2; }
|
||||
.status-potential { background: #fff3e0; color: #f57c00; }
|
||||
.status-prospects { background: #e8f5e9; color: #388e3c; }
|
||||
.status-not-a-prospects { background: #ffebee; color: #d32f2f; }
|
||||
|
||||
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
|
||||
.empty-icon { width: 80px; height: 80px; margin: 0 auto 20px; background: #f5f5f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; }
|
||||
|
||||
</style>
|
||||
|
||||
<div class="dash-container">
|
||||
<!-- <div class="top-header">
|
||||
<div>
|
||||
<h2 style="font-weight: 800; color: #1a202c; font-size: 24px;">Dashboard</h2>
|
||||
<p style="color: #718096; font-size: 14px; margin-top: 4px;">Overview of your branch</p>
|
||||
</div>
|
||||
<div style="position: relative;">
|
||||
<input type="text" placeholder="Search leads, activities....." style="background:white; padding:12px 20px; border-radius:10px; border:1px solid #e2e8f0; width: 350px; font-size: 13px;">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="stat-cards">
|
||||
<div class="card-hero">
|
||||
<div class="stat-val"><?php echo $total_leads; ?></div>
|
||||
<div class="stat-label">Total Leads</div>
|
||||
<!-- <div class="stat-change text-success">↑ 12% this month</div> -->
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-val"><?php echo $total_acts ?></div>
|
||||
<div class="stat-label">Total Activities</div>
|
||||
<!-- <div class="stat-change text-success">↑ 5% this month</div> -->
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-val"><?php echo $total_pending_acts ?></div>
|
||||
<div class="stat-label">Pending Activities</div>
|
||||
<!-- <div class="stat-change text-success">↑ 15% this month</div> -->
|
||||
</div>
|
||||
<div class="card-hero">
|
||||
<div class="stat-val"><?php echo $total_completed_acts ?></div>
|
||||
<div class="stat-label">Completed Activities</div>
|
||||
<!-- <div class="stat-change text-success">↑ 15% this month</div> -->
|
||||
</div>
|
||||
<!-- <div class="card">
|
||||
<div class="stat-val">₹15.0L</div>
|
||||
<div class="stat-label">Pipeline Value</div>
|
||||
<div class="stat-change text-success">↑ 18% this month</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="main-grid">
|
||||
<div class="card">
|
||||
<div class="table-header">
|
||||
<h3 style="font-size: 16px; font-weight: 700;">Pending Activities - All Team</h3>
|
||||
<span style="color: #718096; font-size: 12px; font-weight: 600;"><?= count($pending_acts) . ' ' . (count($pending_acts) == 1 ? 'activity' : 'activities') ?></span>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<th>Activity & Assigned</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($pending_acts)): ?>
|
||||
<?php foreach ($pending_acts as $a): ?>
|
||||
<?php
|
||||
$activityIcons = [
|
||||
'Call' => '📞',
|
||||
'Email' => '✉️',
|
||||
'Meeting' => '📅',
|
||||
'Visit' => '🚗',
|
||||
'Demo' => '🖥️',
|
||||
'Share Docs' => '📄',
|
||||
'To Do' => '✓'
|
||||
];
|
||||
$icon = $activityIcons[$a['activity_type']] ?? '📌';
|
||||
$statusClass = strtolower(str_replace(' ', '-', $a['status']));
|
||||
$formattedscheduledDate = date('M d, Y, h:i A', strtotime($a['scheduled_date']));
|
||||
?>
|
||||
<tr>
|
||||
<td><strong><?= esc($a['company_name']) ?></strong></td>
|
||||
<td>
|
||||
<div style="color: #ff6b35; font-weight: 700; font-size: 11px;">
|
||||
<?= $icon ?> <?= strtoupper(esc($a['activity_type'])) ?>
|
||||
</div>
|
||||
<div style="font-size: 12px; color: #718096;">
|
||||
<?= esc($a['assigned_to_name'] ?? 'ID: ' . $a['assigned_to']) ?>
|
||||
</div>
|
||||
<!-- <div style="font-size: 12px; color: #718096;">
|
||||
<?= esc($a['notes'] ?? 'ID: ' . $a['assigned_to']) ?>
|
||||
</div> -->
|
||||
</td>
|
||||
<td style="color: #4a5568; font-weight: 500;"><?= $formattedscheduledDate ?></td>
|
||||
<td><span class="status-pill status-<?= $statusClass ?>"><?= ucfirst(esc($a['status'])) ?></span></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="empty-state">
|
||||
<div class="empty-icon">✓</div> No activities found
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="card">
|
||||
|
||||
<h3 style="font-size: 16px; font-weight: 700; margin-bottom: 15px;">Sales Team Performance</h3>
|
||||
<?php foreach ($team as $member) {
|
||||
$firstLetter = strtoupper(substr($member['first_name'], 0, 1));
|
||||
$fullName = $member['first_name'] . ' ' . $member['last_name'];
|
||||
$totalActs = $member['total_acts'];
|
||||
$doneActs = $member['done_acts'];
|
||||
$role = $member['role']; // fix your DB first
|
||||
|
||||
// Random or consistent color based on name
|
||||
$colors = ['#ff6b35', '#667eea', '#48bb78', '#ed8936', '#9f7aea'];
|
||||
$colorIndex = abs(crc32($member['first_name'])) % count($colors);
|
||||
$color = $colors[$colorIndex];
|
||||
|
||||
echo "
|
||||
<div class='team-member'>
|
||||
<div class='member-img' style='background: {$color};'>{$firstLetter}</div>
|
||||
<div style='flex: 1;'>
|
||||
<div style='font-weight: 700; font-size: 14px;'>{$fullName}</div>
|
||||
<div style='font-size: 11px; color: #718096;'>{$role}</div>
|
||||
</div>
|
||||
<div class='act-stats'>
|
||||
<div class='total'>{$totalActs} acts</div>
|
||||
<div class='done'>{$doneActs} done</div>
|
||||
</div>
|
||||
</div>";
|
||||
} ?>
|
||||
|
||||
|
||||
<div class="card breakdown-card">
|
||||
<h3 style="font-size: 15px; font-weight: 700; margin-bottom: 20px;">Activity Breakdown</h3>
|
||||
<!-- <div class="breakdown-item"><span><span class="dot" style="background: #ff6b35;"></span> Call</span><strong>42%</strong></div>
|
||||
<div class="breakdown-item"><span><span class="dot" style="background: #48bb78;"></span> Email</span><strong>25%</strong></div>
|
||||
<div class="breakdown-item"><span><span class="dot" style="background: #4299e1;"></span> Meeting</span><strong>18%</strong></div>
|
||||
<div class="breakdown-item"><span><span class="dot" style="background: #ecc94b;"></span> Visit</span><strong>10%</strong></div>
|
||||
<div class="breakdown-item"><span><span class="dot" style="background: #9f7aea;"></span> Demo</span><strong>5%</strong></div> -->
|
||||
<?php
|
||||
$activityConfig = [
|
||||
'Call' => ['color' => '#ff6b35', 'icon' => '📞'],
|
||||
'Email' => ['color' => '#48bb78', 'icon' => '✉️'],
|
||||
'Meeting' => ['color' => '#4299e1', 'icon' => '📅'],
|
||||
'Visit' => ['color' => '#ecc94b', 'icon' => '🚗'],
|
||||
'Demo' => ['color' => '#9f7aea', 'icon' => '🖥️'],
|
||||
'Share Docs' => ['color' => '#ed8936', 'icon' => '📄'],
|
||||
'To Do' => ['color' => '#718096', 'icon' => '✓'],
|
||||
];
|
||||
?>
|
||||
|
||||
<?php if (!empty($activity_breakdown)): ?>
|
||||
<?php foreach ($activity_breakdown as $item): ?>
|
||||
<?php
|
||||
$type = $item['activity_type'];
|
||||
$color = $activityConfig[$type]['color'] ?? '#718096';
|
||||
$icon = $activityConfig[$type]['icon'] ?? '📌';
|
||||
?>
|
||||
<div class="breakdown-item">
|
||||
<span>
|
||||
<span style="background: <?= $color ?>;"></span>
|
||||
<?= $icon ?> <?= esc($type) ?>
|
||||
</span>
|
||||
<strong><?= $item['percentage'] ?>%</strong>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="empty-state">
|
||||
<div class="empty-icon">✓</div> No activities found
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="grid-column: 1 / -1; width: 100%; box-sizing: border-box;">
|
||||
<div class="table-header">
|
||||
<h3 style="font-size: 16px; font-weight: 700;">All Leads Overview </h3>
|
||||
<!-- <span style="color: #718096; font-size: 12px; font-weight: 600;">Click a lead to see details</span>
|
||||
<a href="<?= base_url('sales') ?>"
|
||||
style="color: #718096; font-size: 12px; font-weight: 600; text-decoration: none; padding: 4px 8px; transition: color 0.2s ease; display: inline-block; cursor: pointer;"
|
||||
onmouseover="this.style.color='#ff6b35';"
|
||||
onmouseout="this.style.color='#718096';">
|
||||
Click a lead to see details
|
||||
</a> -->
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<th>Status</th>
|
||||
<th>Assigned To</th>
|
||||
<th style="text-align: center !important;">Activities</th>
|
||||
<th style="text-align: center !important;">Opportunities</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($leads_overview)): ?>
|
||||
<?php foreach ($leads_overview as $lead): ?>
|
||||
<?php $statusClass = strtolower(str_replace(' ', '-', $lead['status'])); ?>
|
||||
<tr>
|
||||
<td><strong><?= esc($lead['company_name']) ?></strong></td>
|
||||
<td><span class="status-pill status-<?= $statusClass ?>"><?= esc($lead['status']) ?></span></td>
|
||||
<td><?= esc($lead['assigned_to'] ?? 'Unassigned') ?></td>
|
||||
<td><div style="text-align: center; font-weight: 700;"><?= $lead['activities'] ?></div></td>
|
||||
<td><div style="text-align: center; font-weight: 700;"><?= $lead['opportunities'] ?></div></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="empty-state">
|
||||
<div class="empty-icon">👤</div> No leads found
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -110,8 +110,8 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
|
||||
.table-wrap tbody tr:last-child td { border-bottom: none; }
|
||||
.table-wrap tbody tr:hover td { background: #fafafa; }
|
||||
/* Empty row fix for modal table */
|
||||
.table-wrap tbody tr.empty-row { display: table-row; }
|
||||
.table-wrap tbody tr.empty-row td { padding: 0 !important; border: none !important; text-align: center;}
|
||||
/* .table-wrap tbody tr.empty-row { display: table-row; }
|
||||
.table-wrap tbody tr.empty-row td { padding: 0 !important; border: none !important; text-align: center;} */
|
||||
|
||||
/* ═══════════════════════════════════════════
|
||||
BUTTONS
|
||||
@ -298,7 +298,14 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="detailTableBody">
|
||||
<tr class="empty-row"><td colspan="3">No targets added yet.</td></tr>
|
||||
<tr class="empty-row">
|
||||
<td colspan="3">
|
||||
<div class="empty-state">
|
||||
<div class="empty-icon">🎯</div>
|
||||
<p>No targets added yet.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -314,7 +321,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
|
||||
────────────────────────────────────────── */
|
||||
const teamMembers = sales_manager.map(user => ({
|
||||
id: user.id,
|
||||
name: user.first_name + ' ' + user.last_name
|
||||
name: user.first_name
|
||||
}));
|
||||
const API = '<?= base_url('sales') ?>';
|
||||
|
||||
@ -445,7 +452,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
|
||||
────────────────────────────────────────── */
|
||||
async function renderDetailTable(userId) {
|
||||
const tbody = document.getElementById('detailTableBody');
|
||||
tbody.innerHTML = '<tr><td colspan="3">Loading...</td></tr>';
|
||||
tbody.innerHTML = `<tr><td colspan="3" style="text-align:center; padding:20px;">⏳ Loading targets...</td></tr>`;
|
||||
|
||||
try {
|
||||
const res = await fetch(`${API}/targets/user/${userId}`);
|
||||
@ -453,7 +460,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
|
||||
const records = json.data || [];
|
||||
|
||||
if (records.length === 0) {
|
||||
tbody.innerHTML = '<tr class="empty-row"><td colspan="3">No targets added yet.</td></tr>';
|
||||
tbody.innerHTML = '<tr class="empty-row"><td colspan="3"><div class="empty-state"><div class="empty-icon">🎯</div><p>No targets added yet.</p></div></td></tr>';
|
||||
return;
|
||||
}
|
||||
// records.sort((a, b) => b.id - a.id);
|
||||
|
||||
@ -133,15 +133,18 @@ hr{
|
||||
background-color: #00999E !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var pageSubTitle = 'Ticket ID - <?= $master[0]["thz_id"]; ?>';
|
||||
var pageBackButton = '<a href="#" onclick="history.back(); return false;" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
<div class="row" id="notespage">
|
||||
|
||||
<h3 class="secondary-title">
|
||||
<!-- <h3 class="secondary-title">
|
||||
<a href="#" onclick="history.back(); return false;">
|
||||
<i class="mdi mdi-chevron-left" title="Back"></i>
|
||||
</a>
|
||||
<span>Ticket ID - <?= $master[0]['thz_id']; ?></span>
|
||||
</h3>
|
||||
</h3> -->
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
|
||||
@ -38,8 +38,13 @@
|
||||
<div class="col-12">
|
||||
<div class="card" style="margin-right: 23px;">
|
||||
<div class="card-body">
|
||||
|
||||
<script>
|
||||
var pageSubTitle = 'Claims<?php if(isset($ticket_data["tpa_claim_push_reference_no"]) && !empty($ticket_data["tpa_claim_push_reference_no"])) { echo " <a href=\"#\" class=\"btn btn-success mr-2\" onclick=\"fetchTpaClaimStatus()\">Fetch Claim Status</a>"; } ?>';
|
||||
var pageBackButton = '<a href="<?= base_url("ticket/list"); ?>" aria-label="Back to list"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
<!-- Header Section -->
|
||||
<div class="row mb-3 align-items-center justify-content-between">
|
||||
<!-- <div class="row mb-3 align-items-center justify-content-between">
|
||||
<div class="col-auto">
|
||||
<h4 class="mb-0">Claims</h4>
|
||||
</div>
|
||||
@ -68,7 +73,7 @@
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Navigation Tabs -->
|
||||
<div class="tab-wrapper position-relative">
|
||||
|
||||
@ -52,13 +52,13 @@ table.dataTable tbody td {
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding : 0 1.5rem 0 1.5rem !important">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Claim List </h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="table-responsive">
|
||||
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="scroll-horizontal-datatable">
|
||||
<thead class="bg-light">
|
||||
@ -310,6 +310,13 @@ $(document).ready(function() {
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter" ></i><span class=" btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openTicketFilterNav();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
@ -410,4 +417,11 @@ $(document).on('click', 'tbody tr', function (e) {
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if (typeof openTicketFilterNav !== 'function') {
|
||||
console.log('Developer Notice: The file ticket_search.php must be loaded by the controller for the filters to work, not ticket_list.php.');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -3,174 +3,196 @@
|
||||
|
||||
max-width: 98% !important;
|
||||
}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="row" style="margin-bottom: -12px;">
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="card-body" style="padding : 1.5rem 1.5rem 0 1.5rem !important">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse hide" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div id="ticket-filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="ticket_type"> Claim Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="ticket_type" name="ticket_type">
|
||||
<option value="0">Select claim Type</option>
|
||||
<?php
|
||||
if (isset($ticket_type) && count($ticket_type)) {
|
||||
foreach ($ticket_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_id" name="insurer_id">
|
||||
<option value="0">Select Insurer</option>
|
||||
<?php
|
||||
if (isset($insurer_list) && count($insurer_list)) {
|
||||
foreach ($insurer_list as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="tpa_id">TPA<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="tpa_id" name="tpa_id">
|
||||
<option value="0">Select TPA</option>
|
||||
<?php
|
||||
if (isset($tpa_list) && count($tpa_list)) {
|
||||
foreach ($tpa_list as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="ticket_type"> Claim Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="ticket_type" name="ticket_type">
|
||||
<option value="0">Select claim Type</option>
|
||||
<?php
|
||||
if (isset($ticket_type) && count($ticket_type)) {
|
||||
foreach ($ticket_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="claim_no">Claim No<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="claim_no" name="claim_no">
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group col-md-3">
|
||||
<label for="pod_no">POD No<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="pod_no" name="pod_no">
|
||||
</div> -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_id"> Corporate Name <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_id" name="client_id">
|
||||
<option value="0">Select Corporate</option>
|
||||
<?php
|
||||
if (isset($client_list) && count($client_list)) {
|
||||
foreach ($client_list as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="emp_code">Employee ID<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_code" name="emp_code">
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="emp_mobile_no">Employee Mobile No<span
|
||||
class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_mobile_no" name="emp_mobile_no">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_id" name="insurer_id">
|
||||
<option value="0">Select Insurer</option>
|
||||
<?php
|
||||
if (isset($insurer_list) && count($insurer_list)) {
|
||||
foreach ($insurer_list as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="claim_status">Status<span class="text-danger"></span></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 class="form-group col-md-3">
|
||||
<label for="tpa_id">TPA<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="tpa_id" name="tpa_id">
|
||||
<option value="0">Select TPA</option>
|
||||
<?php
|
||||
if (isset($tpa_list) && count($tpa_list)) {
|
||||
foreach ($tpa_list as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_no">Claim No<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="claim_no" name="claim_no">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_id"> Corporate Name <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_id" name="client_id">
|
||||
<option value="0">Select Corporate</option>
|
||||
<?php
|
||||
if (isset($client_list) && count($client_list)) {
|
||||
foreach ($client_list as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_code">Employee ID<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_code" name="emp_code">
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group col-md-3">
|
||||
<label for="tpa_id">TPA ID<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="tpa_id" name="tpa_id">
|
||||
</div> -->
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_mobile_no">Employee Mobile No<span
|
||||
class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_mobile_no" name="emp_mobile_no">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_status">Status<span class="text-danger"></span></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 class="form-group col-md-3">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type" onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-bottom: -15px;">
|
||||
<a href="#" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a class="btn btn-primary" id="get-emp-list" onclick="fetchTicketListData();">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="ticket_list_div">
|
||||
<?php include('ticket_list.php'); ?>
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="#" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a class="btn btn-primary" id="get-emp-list" onclick="fetchTicketListData();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="ticket_list_div">
|
||||
<?php include('ticket_list.php'); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<script>
|
||||
function openTicketFilterNav() {
|
||||
document.getElementById("ticket-filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
function closeFilterNav() {
|
||||
document.getElementById("ticket-filter-sidebar").style.width = "0";
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
@ -185,7 +207,7 @@
|
||||
|
||||
$('#ticket_type').on('change', function() {
|
||||
var ticket_type = $('#ticket_type').val();
|
||||
var claim_status = <?= json_encode($claim_status) ?>;
|
||||
var claim_status = <?= isset($claim_status) ? json_encode($claim_status) : '[]' ?>;
|
||||
$('#claim_status').empty();
|
||||
$('#claim_status').append($('<option>', {
|
||||
value: '',
|
||||
@ -204,7 +226,7 @@
|
||||
})
|
||||
|
||||
function fetchTicketListData() {
|
||||
|
||||
closeFilterNav();
|
||||
var ticket_type = $('#ticket_type').val();
|
||||
var pod_no = $('#pod_no').val();
|
||||
var claim_no = $('#claim_no').val();
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<div class="row" id="tpa_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">TPA</h4>
|
||||
|
||||
@ -28,18 +28,22 @@
|
||||
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var pageSubTitle = 'TPA';
|
||||
var pageBackButton = '<a href="#" onclick="history.back(); return false;" data-toggle="tooltip" data-placement="top" title="Back"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
||||
</script>
|
||||
|
||||
<div class="row" id="tpa_add">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;"> -->
|
||||
<!-- <h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<span onclick="history.back()" style="cursor: pointer;">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</span>
|
||||
<span class="title-text ">TPA</span>
|
||||
</h4>
|
||||
</h4> -->
|
||||
|
||||
<!-- <div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">TPA</h4>
|
||||
@ -47,7 +51,7 @@
|
||||
<div class="col-6" style="text-align: right;">
|
||||
<a href="<?= base_url("master/tpa/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i> </a>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<div class="tab-wrapper position-relative">
|
||||
<ul class="nav nav-pills navtab-bg" id="myTab">
|
||||
<li class="nav-item d-flex justify-content-center align-items-center">
|
||||
|
||||
@ -8,6 +8,150 @@
|
||||
padding: 4px 4px !important;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.column-header {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.row-box {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.custom-dropdown-menu {
|
||||
display: none;
|
||||
position: fixed;
|
||||
background-color: #ffffff !important;
|
||||
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);
|
||||
}
|
||||
|
||||
.custom-dropdown-menu .dropdown-item {
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
padding: 0.5rem 1rem !important;
|
||||
clear: both !important;
|
||||
font-weight: 400 !important;
|
||||
color: #212529 !important;
|
||||
text-align: inherit !important;
|
||||
white-space: nowrap !important;
|
||||
background-color: transparent !important;
|
||||
border: 0 !important;
|
||||
text-decoration: none !important;
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
.custom-dropdown-menu .dropdown-item:hover {
|
||||
background-color: #f8f9fa !important;
|
||||
color: #16181b !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.custom-dropdown-menu .dropdown-item i {
|
||||
margin-right: 8px !important;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
.table tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.custom-dropdown-menu::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #ffffff;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.custom-dropdown-menu::after {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
z-index: -2;
|
||||
pointer-events: none;
|
||||
}
|
||||
.filter-sidebar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #f8f9fa;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-sidebar-header {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-sidebar-header .closebtn {
|
||||
font-size: 28px;
|
||||
text-decoration: none;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.filter-sidebar .closebtn:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-sidebar-content {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.filter-sidebar-footer {
|
||||
padding: 15px 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #dee2e6;
|
||||
flex-shrink: 0;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
table.dataTable tbody td {
|
||||
padding: 4px 4px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.dataTables_filter {
|
||||
@ -25,127 +169,110 @@
|
||||
</style>
|
||||
|
||||
<div class="container-fluid-min">
|
||||
<div class="col-12" id="varience_filter">
|
||||
<div class="card-body">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-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>
|
||||
</h4>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div id="filter-sidebar" class="filter-sidebar">
|
||||
<div class="filter-sidebar-header">
|
||||
<h4 class="m-0">Filter</h4>
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeFilterNav()">×</a>
|
||||
</div>
|
||||
<div class="filter-sidebar-content">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
|
||||
<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" name="client_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_branch_id">Client Branch<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_branch_id" name="client_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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()">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insurer_branch_id"> Insurer Branch <span id="base_danger" class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_branch_id" name="insurer_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0" selected>Select Insurer Branch</option>
|
||||
</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_id" name="policy_type_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Policy Type</option>
|
||||
<?php
|
||||
if (isset($policy_types) && count($policy_types)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<option value="0" selected>Select client policy</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="issuer" name="issuer" required>
|
||||
<option value="0">Select Issure</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type"
|
||||
onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<a href="<?= base_url("/policy_tranction/report/report-varience-list"); ?>"
|
||||
class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/report-varience-list"); ?>"
|
||||
class="btn btn-primary" id="get-emp-list"
|
||||
onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch">Client<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_id" name="client_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch_id">Client Branch<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="client_branch_id" name="client_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Client Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<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()">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="insurer_branch_id"> Insurer Branch <span id="base_danger" class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_branch_id" name="insurer_branch_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0" selected>Select Insurer Branch</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email"> Policy Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="policy_type_id" name="policy_type_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
|
||||
<option value="0">Select Policy Type</option>
|
||||
<?php
|
||||
if (isset($policy_types) && count($policy_types)) {
|
||||
foreach ($policy_types as $key => $value) {
|
||||
echo "<option value='" . $value['id'] . "'>" . $value['policy_type'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<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">
|
||||
<option value="0" selected>Select client policy</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="issuer" name="issuer" required>
|
||||
<option value="0">Select Issure</option>
|
||||
<?php
|
||||
if (isset($issuer) && count($issuer)) {
|
||||
foreach ($issuer as $key => $value) {
|
||||
echo "<option value=" . $key . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label>Date Type<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="date_type" name="date_type"
|
||||
onchange="hideDateField()">
|
||||
<option value="0">Select Date Type</option>
|
||||
<?php
|
||||
if (isset($date_type) && count($date_type)) {
|
||||
foreach ($date_type as $key => $value) {
|
||||
echo "<option value='" . $key . "'>" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-sidebar-footer">
|
||||
<a href="<?= base_url("/policy_tranction/report/report-varience-list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/report-varience-list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);closeFilterNav();">Submit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="varience_list">
|
||||
@ -207,6 +334,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
/* Modified by Gemini Code Assist */
|
||||
function openFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "350px";
|
||||
}
|
||||
|
||||
/* Modified by Gemini Code Assist */
|
||||
function closeFilterNav() {
|
||||
document.getElementById("filter-sidebar").style.width = "0";
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
let client_list = [];
|
||||
@ -228,7 +368,14 @@
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-filter"></i><span class="btn-custom"> Filter </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function (e, dt, node, config) {
|
||||
openFilterNav();
|
||||
}
|
||||
}, {
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
|
||||
@ -67,7 +67,7 @@ table.dataTable tbody td {
|
||||
<div class="row" id="client_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Vehicle Master</h4>
|
||||
|
||||
@ -310,7 +310,7 @@
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<!-- <div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Users</h4>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body maincard">
|
||||
<div class="card-body">
|
||||
<table data-custom-table-css="table" class="table table-sm m-0 table-centered dt-responsive nowrap w-100" cellspacing="a" id="user-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user