FEAT_CHAT_BOT,FIX_MINOR_ISSUES
This commit is contained in:
parent
96f0996919
commit
602eabb54a
@ -6,6 +6,9 @@ use CodeIgniter\Router\RouteCollection;
|
|||||||
/**
|
/**
|
||||||
* @var RouteCollection $routes
|
* @var RouteCollection $routes
|
||||||
*/
|
*/
|
||||||
|
$routes->post('/chat', 'ChatbotControllerNew::index');
|
||||||
|
$routes->get('/widget', 'ChatbotControllerNew::widget');
|
||||||
|
$routes->get('/chatbot', 'ChatbotControllerNew::chatbot');
|
||||||
|
|
||||||
$routes->get('/swagger', 'SwaggerController::index', ['filter' => 'authMVC']);
|
$routes->get('/swagger', 'SwaggerController::index', ['filter' => 'authMVC']);
|
||||||
|
|
||||||
|
|||||||
@ -1658,7 +1658,7 @@ class MasterController extends AdminController
|
|||||||
$email_id = CLI::getOption('to') ? CLI::getOption('to') : $email_id;
|
$email_id = CLI::getOption('to') ? CLI::getOption('to') : $email_id;
|
||||||
$res = MailHelper::send_email(['mail' => $email_id, 'subject' => 'Mail Via CLI', 'message' => $message,'attachments' => $attachments,'common'=>$common]);
|
$res = MailHelper::send_email(['mail' => $email_id, 'subject' => 'Mail Via CLI', 'message' => $message,'attachments' => $attachments,'common'=>$common]);
|
||||||
echo "Inside the master controller";
|
echo "Inside the master controller";
|
||||||
print_r($res['data']['zepto_api']);
|
print_r($res);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -235,7 +235,7 @@ if (!function_exists('get_username')) {
|
|||||||
if (!function_exists('get_role_id')) {
|
if (!function_exists('get_role_id')) {
|
||||||
function get_role_id() {
|
function get_role_id() {
|
||||||
|
|
||||||
$role_id = get_session_userdata()->role;
|
$role_id = isset(get_session_userdata()->role) ? get_session_userdata()->role : null;
|
||||||
return $role_id;
|
return $role_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class EmployeeModel extends Model
|
|||||||
|
|
||||||
public function getEmpFamilybyEmpCode(string $client_policy_id = null,string $emp_code = null,string $client_id = null,array $emp_status = [],array $policy_status = [],array $relationship = [],array $client_branch_id = [])
|
public function getEmpFamilybyEmpCode(string $client_policy_id = null,string $emp_code = null,string $client_id = null,array $emp_status = [],array $policy_status = [],array $relationship = [],array $client_branch_id = [])
|
||||||
{
|
{
|
||||||
$result = $this->select(['employees.id as emp_id', 'employees.client_id','employees.client_branch_id', 'employees.relationship', 'employees.relationship_code', 'employees.change_event', 'employees.emp_code', 'employees.name', 'employees.email_personal', 'employees.email_corporate', 'employees.mobile', 'employees.gender', 'employees.dob', 'employees.doj', 'employees.basic_pay', 'employees.band', 'employees.designation', 'employees.emp_status','employees.unit','employees.file_id','employee_polices.id as emp_policy_id', 'employee_polices.employee_id', 'employee_polices.client_policy_id', 'employee_polices.tpa_id', 'employee_polices.uhid', 'employee_polices.batch_code', 'employee_polices.status', 'employee_polices.pre_existing_alignments', 'employee_polices.basic_cover_si', 'employee_polices.date_coverage', 'employee_polices.policy_end_date', 'employee_polices.days', 'employee_polices.premium', 'employee_polices.rata_premimum', 'employee_polices.gst', 'employee_polices.date_of_exit', 'employee_polices.reason_for_exit','policy_type.long_name as policy_name','client_policy.is_addon', 'employee_polices.payable_employee'])
|
$result = $this->select(['employees.id as emp_id', 'employees.client_id','employees.client_branch_id', 'employees.relationship', 'employees.relationship_code', 'employees.change_event', 'employees.emp_code', 'employees.name', 'employees.email_personal', 'employees.email_corporate', 'employees.mobile', 'employees.gender', 'employees.dob', 'employees.doj', 'employees.basic_pay', 'employees.band', 'employees.designation', 'employees.emp_status','employees.unit','employees.file_id','employee_polices.id as emp_policy_id', 'employee_polices.employee_id', 'employee_polices.client_policy_id', 'employee_polices.tpa_id', 'employee_polices.uhid', 'employee_polices.batch_code', 'employee_polices.status', 'employee_polices.pre_existing_alignments', 'employee_polices.basic_cover_si', 'employee_polices.date_coverage', 'employee_polices.policy_end_date', 'employee_polices.days', 'employee_polices.premium', 'employee_polices.rata_premimum', 'employee_polices.gst', 'employee_polices.date_of_exit', 'employee_polices.reason_for_exit','policy_type.long_name as policy_name','client_policy.is_addon', 'employee_polices.payable_employee','employee_polices.rand_string'])
|
||||||
->join('employee_polices', 'employee_polices.employee_id = employees.id')
|
->join('employee_polices', 'employee_polices.employee_id = employees.id')
|
||||||
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
|
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
|
||||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id','left')
|
->join('policy_type', 'policy_type.id = client_policy.policy_type_id','left')
|
||||||
|
|||||||
@ -494,7 +494,7 @@ class PolicyTransactionModel extends Model
|
|||||||
|
|
||||||
")
|
")
|
||||||
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
|
->join('pt_co_share_details', 'policy_transaction.id = pt_co_share_details.pt_id', 'left')
|
||||||
->join('insurer_statements', 'pt_co_share_details.statement_id = insurer_statements.id', 'left')
|
// ->join('insurer_statements', 'pt_co_share_details.statement_id = insurer_statements.id', 'left')
|
||||||
->join('clients', 'clients.id = policy_transaction.client_id')
|
->join('clients', 'clients.id = policy_transaction.client_id')
|
||||||
->join('client_branch', 'policy_transaction.client_branch_id = client_branch.id', 'left')
|
->join('client_branch', 'policy_transaction.client_branch_id = client_branch.id', 'left')
|
||||||
->join('client_policy', 'policy_transaction.client_policy_id = client_policy.id', 'left')
|
->join('client_policy', 'policy_transaction.client_policy_id = client_policy.id', 'left')
|
||||||
@ -519,19 +519,27 @@ class PolicyTransactionModel extends Model
|
|||||||
$builder->where('policy_transaction.'.$date_type.'>=', $startDate)
|
$builder->where('policy_transaction.'.$date_type.'>=', $startDate)
|
||||||
->where('policy_transaction.'.$date_type.'<=', $endDate);
|
->where('policy_transaction.'.$date_type.'<=', $endDate);
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
// $fromDate = date('Y-m-d', strtotime('-30 days'));
|
|
||||||
// $toDate = date('Y-m-d 23:59:59');
|
|
||||||
|
|
||||||
// $builder->where('policy_transaction.created_at >=', $fromDate)
|
|
||||||
// ->where('policy_transaction.created_at <=', $toDate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($date_type == 'statement_month' && $start_date != 0 && $end_date != 0){
|
// if($date_type == 'statement_month' && $start_date != 0 && $end_date != 0){
|
||||||
|
|
||||||
$builder->where('policy_transaction.month >=', $startDate)
|
// $startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
||||||
->where('policy_transaction.month <=', $endDate);
|
// $endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
||||||
|
// $builder->where('policy_transaction.month >=', $startDate)
|
||||||
|
// ->where('policy_transaction.month <=', $endDate);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Conditionally join insurer_statements if $date_type == 'statement_month'
|
||||||
|
if ($date_type == 'statement_month' && $start_date != 0 && $end_date != 0) {
|
||||||
|
$startDate = date('Y-m-d', strtotime($start_date));
|
||||||
|
$endDate = date('Y-m-d', strtotime($end_date));
|
||||||
|
|
||||||
|
$builder->join('co_share_stmt_details', 'pt_co_share_details.id = co_share_stmt_details.co_share_id', 'left')
|
||||||
|
->join('insurer_statements', 'co_share_stmt_details.statement_id = insurer_statements.id','left')
|
||||||
|
->where('insurer_statements.is_active', 1)
|
||||||
|
->where('insurer_statements.month >=', $startDate)
|
||||||
|
->where('insurer_statements.month <=', $endDate)
|
||||||
|
->groupBy('co_share_stmt_details.co_share_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($client_id != 0) {
|
if ($client_id != 0) {
|
||||||
|
|||||||
@ -230,7 +230,7 @@ $(document).ready(function() {
|
|||||||
paging: true, // Enable pagination
|
paging: true, // Enable pagination
|
||||||
pageLength: 25, // Set default number of rows per page (optional)
|
pageLength: 25, // Set default number of rows per page (optional)
|
||||||
ordering: false,
|
ordering: false,
|
||||||
"footerCallback": function(row, data, start, end, display) {
|
"footerCallback": function(row, data, start, end, display) {
|
||||||
var api = this.api();
|
var api = this.api();
|
||||||
|
|
||||||
// Calculate column totals
|
// Calculate column totals
|
||||||
@ -238,9 +238,11 @@ $(document).ready(function() {
|
|||||||
return parseFloat(a) + parseFloat(b) || 0;
|
return parseFloat(a) + parseFloat(b) || 0;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
var total_rewards = api.column(26).data().reduce(function(a,b){
|
var total_rewards = api.column(26).data().reduce(function(a, b) {
|
||||||
return parseFloat(a) + parseFloat(b) || 0;
|
return parseFloat(a) + parseFloat(b) || 0;
|
||||||
})
|
}, 0); // Add initial value 0 here
|
||||||
|
|
||||||
|
console.log('total_rewards - ' + total_rewards);
|
||||||
|
|
||||||
var totalIrda = api.column(27).data().reduce(function(a, b) {
|
var totalIrda = api.column(27).data().reduce(function(a, b) {
|
||||||
return parseFloat(a) + parseFloat(b) || 0;
|
return parseFloat(a) + parseFloat(b) || 0;
|
||||||
@ -256,7 +258,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// Update the totals in the div above the table
|
// Update the totals in the div above the table
|
||||||
$('#total_premium').text(totalPremium.toFixed(2));
|
$('#total_premium').text(totalPremium.toFixed(2));
|
||||||
$('#total_rewards').text(total_rewards.toFixed(2))
|
$('#total_rewards').text(total_rewards.toFixed(2));
|
||||||
$('#total_irda').text(totalIrda.toFixed(2));
|
$('#total_irda').text(totalIrda.toFixed(2));
|
||||||
$('#total_billed').text(totalBilled.toFixed(2));
|
$('#total_billed').text(totalBilled.toFixed(2));
|
||||||
$('#total_unbilled').text(totalUnbilled.toFixed(2));
|
$('#total_unbilled').text(totalUnbilled.toFixed(2));
|
||||||
|
|||||||
@ -14,6 +14,8 @@
|
|||||||
"ext-intl": "*",
|
"ext-intl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
|
"botman/botman": "^2.8",
|
||||||
|
"botman/driver-web": "^1.5",
|
||||||
"dompdf/dompdf": "^2.0",
|
"dompdf/dompdf": "^2.0",
|
||||||
"firebase/php-jwt": "^6.10",
|
"firebase/php-jwt": "^6.10",
|
||||||
"google/apiclient": "^2.15.0",
|
"google/apiclient": "^2.15.0",
|
||||||
@ -25,6 +27,7 @@
|
|||||||
"psr/http-message": "^1.0",
|
"psr/http-message": "^1.0",
|
||||||
"psr/log": "^1.1",
|
"psr/log": "^1.1",
|
||||||
"slim/slim": "^4.13",
|
"slim/slim": "^4.13",
|
||||||
|
"symfony/cache": "^7.2",
|
||||||
"zircote/swagger-php": "^4.8"
|
"zircote/swagger-php": "^4.8"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user