FIX_ISSUE
This commit is contained in:
parent
745a6b6049
commit
49ca11bdfb
@ -1316,4 +1316,24 @@ if (!function_exists('map_relationship')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!function_exists('add_google_calender_event')){
|
||||||
|
function add_google_calender_event($data){
|
||||||
|
|
||||||
|
$calendar = new \App\Libraries\GoogleCalendarService();
|
||||||
|
|
||||||
|
// Check if user is authenticated without passing tokens manually
|
||||||
|
if (!$calendar->isReady()) {
|
||||||
|
return ['status' => 'failed', 'code' => '404' , 'message' => 'Google Access Token Expired'];
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$response = $calendar->createEvent($data);
|
||||||
|
return ['status' => 'success', 'code' => '200' , 'message' => 'Follow-up Saved', 'response' => $response];
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return ['status' => 'failed', 'code' => '500' , 'message' => 'Error: ' . $e->getMessage()];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -621,7 +621,7 @@
|
|||||||
console.log('Business Team Logged in.');
|
console.log('Business Team Logged in.');
|
||||||
}
|
}
|
||||||
|
|
||||||
getURLParamsForReport()
|
// getURLParamsForReport()
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
@ -1086,10 +1086,10 @@
|
|||||||
|
|
||||||
if(res.data.client_type == 2){
|
if(res.data.client_type == 2){
|
||||||
let data1 = policyListByClient[res.data.client_id];
|
let data1 = policyListByClient[res.data.client_id];
|
||||||
appendPolicies(data1, res.pt_id);
|
appendPolicies(data1, res.data.client_policy_id);
|
||||||
}else{
|
}else{
|
||||||
let data2 = policy_list[res.data.client_branch_id];
|
let data2 = policy_list[res.data.client_branch_id];
|
||||||
appendPolicies(data2, res.pt_id);
|
appendPolicies(data2, res.data.client_policy_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
@ -2957,9 +2957,9 @@
|
|||||||
|
|
||||||
if (pt_id != 0) {
|
if (pt_id != 0) {
|
||||||
hide_list_show_add();
|
hide_list_show_add();
|
||||||
setTimeout(() =>
|
// setTimeout(() =>
|
||||||
getPolicyTransactionDataForEndorsementEdit(pt_id),
|
getPolicyTransactionDataForEndorsementEdit(pt_id)
|
||||||
1500); // Reduced timeout
|
// 1500); // Reduced timeout
|
||||||
} else {
|
} else {
|
||||||
show_list_hide_add();
|
show_list_hide_add();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -460,7 +460,11 @@ table.dataTable thead th {
|
|||||||
// select2 document ready
|
// select2 document ready
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
getClientAndBranchAndPolicy()
|
// getClientAndBranchAndPolicy()
|
||||||
|
getClientAndBranchAndPolicy(function() {
|
||||||
|
getURLParamsForReport();
|
||||||
|
});
|
||||||
|
|
||||||
addHTMLInput();
|
addHTMLInput();
|
||||||
|
|
||||||
<?php if (session()->has('create_failed')) : ?>
|
<?php if (session()->has('create_failed')) : ?>
|
||||||
@ -632,7 +636,7 @@ table.dataTable thead th {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getClientAndBranchAndPolicy() {
|
function getClientAndBranchAndPolicy(callback) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
|
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
|
||||||
type: "GET",
|
type: "GET",
|
||||||
@ -652,6 +656,11 @@ table.dataTable thead th {
|
|||||||
console.log('No data found');
|
console.log('No data found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ✅ Data ellam set aanadhuku aparam callback call panrom
|
||||||
|
if (typeof callback === "function") {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user