Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
6c1ecac7a1
@ -426,14 +426,14 @@ $routes->group("policy_tranction", ["filter" => "authMVC"], function ($routes) {
|
|||||||
$routes->get("remove/(:any)", "PolicyTransactionController::removeCDMaster/$1");
|
$routes->get("remove/(:any)", "PolicyTransactionController::removeCDMaster/$1");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->group("report", ["filter" => "authMVC"], function ($routes) {
|
$routes->group("report", ["filter" => "authMVC"], function ($routes) {
|
||||||
$routes->match(['get', 'post'],"list", "PolicyTransactionController::reportBDSNew");
|
$routes->match(['get', 'post'],"list", "PolicyTransactionController::reportBDSNew");
|
||||||
$routes->match(['get', 'post'],"listNew", "PolicyTransactionController::reportBDSNew");
|
$routes->match(['get', 'post'],"list_old", "PolicyTransactionController::reportBDS");
|
||||||
$routes->get("report-varience-list", "PolicyTransactionController::reportVarience");
|
$routes->get("report-varience-list", "PolicyTransactionController::reportVarience");
|
||||||
$routes->get("report-business-list", "PolicyTransactionController::reportBusinessList");
|
$routes->get("report-business-list", "PolicyTransactionController::reportBusinessList");
|
||||||
$routes->get("report-finance-list", "PolicyTransactionController::reportFinanceList");
|
$routes->get("report-finance-list", "PolicyTransactionController::reportFinanceList");
|
||||||
$routes->get("report-outstanding-list", "PolicyTransactionController::reportOutstanding");
|
$routes->get("report-outstanding-list", "PolicyTransactionController::reportOutstanding");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->group("statement", ["filter" => "authMVC"], function ($routes) {
|
$routes->group("statement", ["filter" => "authMVC"], function ($routes) {
|
||||||
$routes->get("list", "PolicyTransactionController::statementList");
|
$routes->get("list", "PolicyTransactionController::statementList");
|
||||||
|
|||||||
@ -937,7 +937,13 @@ class BDSReportController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bdsTATReport()
|
/** New arugument Introduced Named as "$isInternalCalled"
|
||||||
|
* Functional Based called means $isInternalCalled is True.
|
||||||
|
* Output returning as Array
|
||||||
|
* Route Based called means $isInternalCalled is False. becoz this is External Call
|
||||||
|
* Output returning as Page
|
||||||
|
*/
|
||||||
|
public function bdsTATReport($isInternalCalled = false)
|
||||||
{
|
{
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT
|
SELECT
|
||||||
@ -1010,9 +1016,8 @@ class BDSReportController extends AdminController
|
|||||||
// dd(db_connect()->getLastQuery(),$result);
|
// dd(db_connect()->getLastQuery(),$result);
|
||||||
$data['data'] = $result;
|
$data['data'] = $result;
|
||||||
// dd($data, get_role_id(), ENROLLMENT_TEAM_ID, user_team());
|
// dd($data, get_role_id(), ENROLLMENT_TEAM_ID, user_team());
|
||||||
// return $this->loadLayout('bds_tat_wise_report', $data);
|
if ($isInternalCalled) { return $result; }
|
||||||
|
return $this->loadLayout('bds_tat_wise_report', $data);
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function accountMangerStatusBDSReport()
|
public function accountMangerStatusBDSReport()
|
||||||
@ -1141,7 +1146,7 @@ class BDSReportController extends AdminController
|
|||||||
if ($report_type == 1){
|
if ($report_type == 1){
|
||||||
|
|
||||||
$data['page_title'] = "BDS TAT Report";
|
$data['page_title'] = "BDS TAT Report";
|
||||||
$data['data'] = $this->bdsTATReport();
|
$data['data'] = $this->bdsTATReport(true); // Functional Based called means True
|
||||||
}else if ($report_type == 2){
|
}else if ($report_type == 2){
|
||||||
|
|
||||||
$data['page_title'] = "Account Manager Status Report";
|
$data['page_title'] = "Account Manager Status Report";
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -779,32 +779,63 @@ class UserController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function downloadIncentivesFile($file_id)
|
||||||
|
// {
|
||||||
|
// try {
|
||||||
|
// $result = $this->partnerManagerIncentiveFileModel->where('id', $file_id)->first();
|
||||||
|
|
||||||
|
// if (!$result || empty($result['incentive_file_name'])) {
|
||||||
|
// throw new \Exception("File Name Not Found");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $incentive_file_name = $result['incentive_file_name'];
|
||||||
|
// $file_name = basename($incentive_file_name);
|
||||||
|
// $filePath = WRITEPATH . 'uploads/incentives/' . $file_name;
|
||||||
|
|
||||||
|
// if (file_exists($filePath)) {
|
||||||
|
// return $this->response->download($filePath, null);
|
||||||
|
// } else {
|
||||||
|
// throw new \Exception("File Not Found");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// } catch (\Exception $e) {
|
||||||
|
|
||||||
|
// $this->myLogger->logme('error', $e->getMessage());
|
||||||
|
|
||||||
|
// // Show 404 error view
|
||||||
|
// $data['message'] = $e->getMessage();
|
||||||
|
// return view('errors/404', $data);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
public function downloadIncentivesFile($file_id)
|
public function downloadIncentivesFile($file_id)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$result = $this->partnerManagerIncentiveFileModel->where('id', $file_id)->first();
|
$result = $this->partnerManagerIncentiveFileModel->where('id', $file_id)->first();
|
||||||
|
|
||||||
if (!$result || empty($result['incentive_file_name'])) {
|
if (!$result || empty($result['incentive_file_name'])) {
|
||||||
throw new \Exception("File Name Not Found");
|
throw new \Exception("File Name Not Found for ID {$file_id}");
|
||||||
}
|
}
|
||||||
|
|
||||||
$incentive_file_name = $result['incentive_file_name'];
|
$incentive_file_name = $result['incentive_file_name'];
|
||||||
$file_name = basename($incentive_file_name);
|
$file_name = basename($incentive_file_name);
|
||||||
$filePath = WRITEPATH . 'uploads/incentives/' . $file_name;
|
$filePath = WRITEPATH . 'uploads/incentives/' . $file_name;
|
||||||
|
|
||||||
if (file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
return $this->response->download($filePath, null);
|
throw new \Exception("File Not Found: {$file_name}");
|
||||||
} else {
|
|
||||||
throw new \Exception("File Not Found");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
return $this->response->download($filePath, null);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
// Catch all kinds of exceptions
|
||||||
$this->myLogger->logme('error', $e->getMessage());
|
$this->myLogger->logme('error', $e->getMessage());
|
||||||
|
|
||||||
// Show 404 error view
|
// Return proper 404 for missing file, else 500 for unexpected error
|
||||||
$data['message'] = $e->getMessage();
|
if (str_contains($e->getMessage(), 'Not Found')) {
|
||||||
return view('errors/404', $data);
|
return $this->response->setStatusCode(404)->setBody($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setStatusCode(500)->setBody('Internal Server Error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1550,9 +1550,10 @@ table.dataTable tbody td {
|
|||||||
container.append(`<div class="no-files-message">No Files have been Uploaded</div>`);
|
container.append(`<div class="no-files-message">No Files have been Uploaded</div>`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr) {
|
error: function (xhr, status, errorThrown) {
|
||||||
container.html(`<div class="no-files-message">No Files have been Uploaded</div>`);
|
container.html(`<div class="no-files-message">No Files have been Uploaded</div>`);
|
||||||
toastr.error('Server error occurred.', 'Error');
|
console.log("Error: " + xhr.status + " - " + errorThrown);
|
||||||
|
if (xhr.status !== 404) toastr.error(errorThrown || xhr.responseText || 'Something went wrong', 'Error');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
|
||||||
|
|
||||||
<!-- <link rel="manifest" href="../manifest.json"> -->
|
<link rel="manifest" href="../manifest.json">
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
@ -71,15 +71,15 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
// window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
// navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
|
navigator.serviceWorker.register('../service-worker.js').then(function(registration) {
|
||||||
// // console.log('Service Worker registration successful with scope:', registration.scope);
|
// console.log('Service Worker registration successful with scope:', registration.scope);
|
||||||
// }, function(err) {
|
}, function(err) {
|
||||||
// // console.log('Service Worker registration failed:', err);
|
// console.log('Service Worker registration failed:', err);
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />
|
||||||
@ -1254,16 +1254,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Cancel Bootstrap's .form-control for file inputs */
|
/* Cancel Bootstrap's .form-control for file inputs */
|
||||||
input[type="file"].form-control {
|
/* input[type="file"].form-control { */
|
||||||
height: auto !important;
|
/* height: auto !important;*/
|
||||||
/* remove forced height */
|
/* remove forced height */
|
||||||
padding: initial !important;
|
/* padding: initial !important;*/
|
||||||
/* reset padding */
|
/* reset padding */
|
||||||
font-size: inherit !important;
|
/* font-size: inherit !important;*/
|
||||||
/* reset font size */
|
/* reset font size */
|
||||||
line-height: normal !important;
|
/* line-height: normal !important;*/
|
||||||
/* reset line height */
|
/* reset line height */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
|
|
||||||
/* Apply to Select2 (single select) */
|
/* Apply to Select2 (single select) */
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user