Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
e845c19f35
@ -189,13 +189,23 @@ class TicketController extends BaseController
|
|||||||
|
|
||||||
$isFromDashboard = $this->request->getPost("is_dashboard");
|
$isFromDashboard = $this->request->getPost("is_dashboard");
|
||||||
|
|
||||||
if (isset($isFromDashboard) && !empty($isFromDashboard) && $isFromDashboard == 1) {
|
if (isset($isFromDashboard) && !empty($isFromDashboard)){
|
||||||
$data['page_name'] = "Claims";
|
$data['page_name'] = "Claims";
|
||||||
$data['ticket_data'] = $this->ticketSearch(3);
|
if ($isFromDashboard == 1) {
|
||||||
|
|
||||||
|
$data['ticket_data'] = $this->ticketSearch(3);
|
||||||
|
|
||||||
|
}else if ($isFromDashboard == 2){
|
||||||
|
$data['ticket_data'] = $this->ticketSearch(4);
|
||||||
|
|
||||||
|
}
|
||||||
$data['claim_status'] = $this->claimStatus->select('id,ticket_type,claim_status')->where('is_active', 1)->findAll();
|
$data['claim_status'] = $this->claimStatus->select('id,ticket_type,claim_status')->where('is_active', 1)->findAll();
|
||||||
$data['client_list'] = $this->clientModel->select('id,client_name')->where('is_active', 1)->findAll();
|
$data['client_list'] = $this->clientModel->select('id,client_name')->where('is_active', 1)->findAll();
|
||||||
|
// dd($data);
|
||||||
return $this->loadLayout('ticket_search', $data);
|
return $this->loadLayout('ticket_search', $data);
|
||||||
}else{
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
$data['ticket_data'] = $this->ticketSearch();
|
$data['ticket_data'] = $this->ticketSearch();
|
||||||
$html = view('ticket_list', $data);
|
$html = view('ticket_list', $data);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html], 200);
|
||||||
@ -239,7 +249,7 @@ class TicketController extends BaseController
|
|||||||
->groupBy('tm.id, tm.created_at, latest_history.created_at');
|
->groupBy('tm.id, tm.created_at, latest_history.created_at');
|
||||||
|
|
||||||
|
|
||||||
//action 1 get last 100 rows, action 2 filter and get all rows related to that and action 3 gets according to dashboard
|
//action 1 get last 100 rows, action 2 filter and get all rows related to that, action 3 gets according to dashboard, action 4 gets according to ACM
|
||||||
if ($action == 1) {
|
if ($action == 1) {
|
||||||
|
|
||||||
$query = $db->table('ticket_master tm')
|
$query = $db->table('ticket_master tm')
|
||||||
@ -336,6 +346,16 @@ class TicketController extends BaseController
|
|||||||
}
|
}
|
||||||
// dd($where);
|
// dd($where);
|
||||||
|
|
||||||
|
} else if ($action == 4){
|
||||||
|
$acm_id = $this->request->getPost('ids');
|
||||||
|
|
||||||
|
// dd($acm_id);
|
||||||
|
if (!empty($acm_id)) {
|
||||||
|
$where = "tm.acm_id = $acm_id";
|
||||||
|
} else {
|
||||||
|
$where = '1 = 0'; // No valid IDs, return empty result
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$search_data = $this->request->getPost();
|
$search_data = $this->request->getPost();
|
||||||
// print_r($search_data); die()
|
// print_r($search_data); die()
|
||||||
@ -1364,7 +1384,8 @@ class TicketController extends BaseController
|
|||||||
if ($received_data['report_type'] == "acc_manager_wise_status"){
|
if ($received_data['report_type'] == "acc_manager_wise_status"){
|
||||||
$viewData['policy_type'] = $received_data['policy_type'];
|
$viewData['policy_type'] = $received_data['policy_type'];
|
||||||
$viewData['account_manager_wise_data'] = $this->ticketMasterModel->accountManagerWiseReport($policy_type,$fromDate,$toDate);
|
$viewData['account_manager_wise_data'] = $this->ticketMasterModel->accountManagerWiseReport($policy_type,$fromDate,$toDate);
|
||||||
// print_rr($viewData);
|
|
||||||
|
// print_rr($viewData);die();
|
||||||
if ($policy_type == 1){
|
if ($policy_type == 1){
|
||||||
$viewData['column_order'] = [
|
$viewData['column_order'] = [
|
||||||
'ACM_NAME', 'ID NOT GENERATED', 'NON ID', 'CDA', 'INFORMATION REQUIRED',
|
'ACM_NAME', 'ID NOT GENERATED', 'NON ID', 'CDA', 'INFORMATION REQUIRED',
|
||||||
@ -1382,6 +1403,7 @@ class TicketController extends BaseController
|
|||||||
$ordered_data[] = $temp;
|
$ordered_data[] = $temp;
|
||||||
}
|
}
|
||||||
$viewData['tpa_wise_data'] = $ordered_data;
|
$viewData['tpa_wise_data'] = $ordered_data;
|
||||||
|
// print_rr($viewData);die();
|
||||||
$html = view('claims_report_acc_manager_wise', $viewData);
|
$html = view('claims_report_acc_manager_wise', $viewData);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html], 200);
|
||||||
}else{
|
}else{
|
||||||
@ -1400,6 +1422,7 @@ class TicketController extends BaseController
|
|||||||
$ordered_data[] = $temp;
|
$ordered_data[] = $temp;
|
||||||
}
|
}
|
||||||
$viewData['tpa_wise_data'] = $ordered_data;
|
$viewData['tpa_wise_data'] = $ordered_data;
|
||||||
|
// print_rr($viewData);die();
|
||||||
$html = view('claims_report_acc_manager_wise', $viewData);
|
$html = view('claims_report_acc_manager_wise', $viewData);
|
||||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
return $this->respond(['status' => true, 'html' => $html], 200);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -607,6 +607,7 @@ class TicketMasterModel extends Model
|
|||||||
// Construct the final SQL query
|
// Construct the final SQL query
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT
|
SELECT
|
||||||
|
user_profiles.id as ACM_ID,
|
||||||
user_profiles.first_name AS ACM_NAME,
|
user_profiles.first_name AS ACM_NAME,
|
||||||
$dynamicSelect,
|
$dynamicSelect,
|
||||||
($dynamicTotal) AS TOTAL
|
($dynamicTotal) AS TOTAL
|
||||||
@ -623,7 +624,6 @@ class TicketMasterModel extends Model
|
|||||||
";
|
";
|
||||||
|
|
||||||
$result = $this->db->query($sql)->getResultArray();
|
$result = $this->db->query($sql)->getResultArray();
|
||||||
// dd($result);
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
@ -677,6 +677,7 @@ class TicketMasterModel extends Model
|
|||||||
// Construct the final SQL query
|
// Construct the final SQL query
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT
|
SELECT
|
||||||
|
user_profiles.id as ACM_ID,
|
||||||
user_profiles.first_name AS ACM_NAME,
|
user_profiles.first_name AS ACM_NAME,
|
||||||
$dynamicSelect,
|
$dynamicSelect,
|
||||||
($dynamicTotal) AS TOTAL,
|
($dynamicTotal) AS TOTAL,
|
||||||
@ -696,8 +697,9 @@ class TicketMasterModel extends Model
|
|||||||
// Execute the query
|
// Execute the query
|
||||||
$result = $this->db->query($sql)->getResultArray();
|
$result = $this->db->query($sql)->getResultArray();
|
||||||
|
|
||||||
// print_rr($result);die();
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,10 @@
|
|||||||
.right-align-input {
|
.right-align-input {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scroll-horizontal-datatable tbody tr:hover {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -47,7 +51,7 @@
|
|||||||
<?php foreach ($account_manager_wise_data as $row): ?>
|
<?php foreach ($account_manager_wise_data as $row): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<?php foreach ($column_order as $col_name): ?>
|
<?php foreach ($column_order as $col_name): ?>
|
||||||
<td><?= $row[$col_name] ?></td>
|
<td onclick = "redirectToClaimList(<?=$row['ACM_ID'] ?>)"><?= $row[$col_name] ?></td>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -101,3 +105,37 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function redirectToClaimList(id) {
|
||||||
|
// alert("Redirecting to claim list..."+id);
|
||||||
|
|
||||||
|
data = {
|
||||||
|
is_dashboard: 2,
|
||||||
|
ids : id
|
||||||
|
}
|
||||||
|
|
||||||
|
redirectWithPost("<?= base_url("ticket/list") ?>", data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectWithPost(url, data = {}) {
|
||||||
|
const form = document.createElement('form');
|
||||||
|
form.method = 'POST';
|
||||||
|
form.action = url;
|
||||||
|
|
||||||
|
for (const key in data) {
|
||||||
|
if (data.hasOwnProperty(key)) {
|
||||||
|
const input = document.createElement('input');
|
||||||
|
input.type = 'hidden';
|
||||||
|
input.name = key;
|
||||||
|
input.value = data[key];
|
||||||
|
form.appendChild(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.body.appendChild(form);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user