Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
e8cb7a2845
@ -173,17 +173,17 @@ class ClientController extends AdminController
|
||||
{
|
||||
$message = '<style>body{font-family:Arial,sans-serif;color:#333;line-height:1.6;margin:0;padding:0}.email-container{width:100%;max-width:600px;margin:0 auto;padding:20px;border:1px solid #e0e0e0;background-color:#f9f9f9}.header{background-color:#4a90e2;color:#fff;padding:15px;text-align:center}.header h1{margin:0;font-size:24px}.content{padding:20px;background-color:#fff}.content h2{color:#4a90e2;font-size:20px;margin-top:0}.content p{margin:10px 0}.details-table{width:100%;border-collapse:collapse;margin-top:20px}.details-table td,.details-table th{border:1px solid #ddd;padding:10px;text-align:left}.details-table th{background-color:#f2f2f2}.footer{margin-top:20px;font-size:12px;color:#777;text-align:center}.attachment-note{margin-top:20px;padding:10px;background-color:#f7f7f7;border-left:4px solid #4a90e2;font-style:italic}</style><div class=email-container><div class=header><h1>Request for Quotation (RFQ)</h1></div><div class=content><h2>Dear {{RECIPIENT_NAME}},</h2><p>We are reaching out to request a quotation for the following insurance coverage. Please review the details below and provide your quote at your earliest convenience.<h2>RFQ Details</h2><table class=details-table><tr><th>Client name<td>{{CLIENT_NAME}}<tr><th>Coverage Type<td>{{POLICY_LONG_NAME}}<tr><th>Policy Start Date<td>{{POLICY_START_DATE}}<tr><th>Policy Duration<td>{{DURATION}}</table><div class=attachment-note>Please note: Additional terms and details are included in the attachment for your reference.</div><p>Please feel free to reach out if you require any further information to prepare the quote. We look forward to receiving your proposal.<p>Best regards,<p><strong>Nhance India Pvt Ltd</strong><br></div><div class=footer><p>© Nhance India Pvt Ltd. All rights reserved.</div></div>';
|
||||
|
||||
$attachments = [
|
||||
["filePath" => ROOTPATH."public/sample_excel/sample_addition.xls","fileName" => "sample_addition.xls"],
|
||||
["filePath" => ROOTPATH."public/sample_excel/sample_inception.xls","fileName" => "sample_inception.xls"],
|
||||
["filePath" => ROOTPATH."public/assets/images/login_bg.jpg","fileName" => "login_bg.jpg"]
|
||||
];
|
||||
|
||||
// $attachments = [
|
||||
// ["filePath" => ROOTPATH."public/sample_excel/sample_addition.xls","fileName" => "sample_addition.xls"],
|
||||
// ["filePath" => ROOTPATH."public/sample_excel/sample_inception.xls","fileName" => "sample_inception.xls"],
|
||||
// ["filePath" => ROOTPATH."public/assets/images/login_bg.jpg","fileName" => "login_bg.jpg"]
|
||||
// ];
|
||||
$attachments = [];
|
||||
$res = MailHelper::send_email(['mail' => $email, 'subject' => 'Mail Via Attachment Testing URL', 'message' => $message,'attachments' => $attachments]);
|
||||
|
||||
print_rr($res);
|
||||
echo '------------------------------------------------------------------------------------------';
|
||||
print_rr($attachments);
|
||||
// print_rr($attachments);
|
||||
}
|
||||
|
||||
//Function for Testing Member Review and Summery Confirmation Mail
|
||||
|
||||
@ -124,10 +124,10 @@ class TicketController extends BaseController
|
||||
}
|
||||
|
||||
public function ticketList()
|
||||
{
|
||||
{
|
||||
$data['ticket_type'] = $this->ticketType;
|
||||
if ($this->request->is('get')) {
|
||||
$data['page_name'] = "Claims";
|
||||
$data['ticket_type'] = $this->ticketType;
|
||||
$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['ticket_data'] = $this->ticketSearch(1);
|
||||
@ -182,6 +182,9 @@ class TicketController extends BaseController
|
||||
$query = $db->table('ticket_master tm')
|
||||
->select([
|
||||
'tm.id',
|
||||
'tm.ticket_type_id',
|
||||
'tm.claim_status_id',
|
||||
'tm.is_head_approved',
|
||||
'tcs.claim_status AS status',
|
||||
'tm.claim_number AS claim_no',
|
||||
'tm.tpa_id',
|
||||
@ -219,8 +222,11 @@ class TicketController extends BaseController
|
||||
$query = $db->table('ticket_master tm')
|
||||
->select([
|
||||
'tm.id',
|
||||
'tm.ticket_type_id',
|
||||
'tcs.claim_status AS status',
|
||||
'tm.claim_number AS claim_no',
|
||||
'tm.claim_status_id',
|
||||
'tm.is_head_approved',
|
||||
'tm.tpa_id',
|
||||
'tm.emp_name',
|
||||
'i.name AS insurer_name',
|
||||
@ -324,6 +330,7 @@ class TicketController extends BaseController
|
||||
$data['view_ticket_page'] = [];
|
||||
$data['member_data'] = $this->employeeModel->getEmployeeByEmployeeCode($ticket_data['emp_code']);
|
||||
$data['ticket_history'] = $this->ticketHistory($ticket_id);
|
||||
$data['ticket_check_list'] = db_connect()->table('ticket_check_list')->where('is_active', 1)->where('ticket_type_id', $ticket_data['ticket_type_id'])->get()->getResultArray();
|
||||
// dd($data);
|
||||
|
||||
return $this->loadLayout('ticket_edit_onbording', $data);
|
||||
@ -418,6 +425,11 @@ class TicketController extends BaseController
|
||||
//mail trigger part
|
||||
$mail_responce = $this->sendAutoMailTrigger($ticket_id);
|
||||
|
||||
//send mail to the head for rejected ticket approvel
|
||||
if($ticket_data['claim_status_id'] == 8){
|
||||
$this->sendMailToTheHead($ticket_data);
|
||||
}
|
||||
|
||||
return $this->respond(['status' => true, 'code' => 200, 'data' => $ticket_data, "message" => "Claim updated successfully", 'mail_responce' => $mail_responce], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to update claim'], 200);
|
||||
@ -640,7 +652,7 @@ class TicketController extends BaseController
|
||||
} else if ($value == "policy_type") {
|
||||
$replaceData = str_replace("Claim-", "", $this->ticketType[$ticket_data['ticket_type_id']] ?? "");
|
||||
} else {
|
||||
$replaceData = strtoupper($ticket_data[$value]) ?? '';
|
||||
$replaceData = isset($ticket_data[$value]) ? strtoupper($ticket_data[$value]) : '';
|
||||
}
|
||||
|
||||
$content = str_replace($key, $replaceData, $content);
|
||||
@ -657,6 +669,7 @@ class TicketController extends BaseController
|
||||
{
|
||||
$this->myLogger->logme('error', "Sending email with content");
|
||||
if (!empty($mail_content)) {
|
||||
$mail_content['from_mail'] = "claims@nhanceindia.in";
|
||||
$response = MailHelper::send_email($mail_content);
|
||||
} else {
|
||||
$response = ['status' => false, 'code' => 404, 'message' => "Mail not sent, mail data empty"];
|
||||
@ -1135,4 +1148,58 @@ class TicketController extends BaseController
|
||||
// return $result;
|
||||
// }
|
||||
|
||||
|
||||
// function for Reject ticket Head Approvel mail sent function
|
||||
public function sendMailToTheHead($ticket_data)
|
||||
{
|
||||
$this->myLogger->logme('error', "sendMailToTheHead Function Called");
|
||||
if(!empty($ticket_data)){
|
||||
|
||||
// print_r($ticket_data); die;
|
||||
|
||||
$head_mail = $this->employeeModel
|
||||
->select('user_profiles.email')
|
||||
->join('clients', 'employees.client_id = clients.id')
|
||||
->join('client_rm', 'clients.id = client_rm.client_id')
|
||||
->join('user_profiles', 'client_rm.user_id = user_profiles.id')
|
||||
->where('employees.is_active', 1)
|
||||
->where('client_rm.is_active', 1)
|
||||
->where('client_rm.level', 1)
|
||||
->where('employees.id', $ticket_data['emp_id'])
|
||||
->first();
|
||||
|
||||
if(!empty($head_mail)){
|
||||
|
||||
$template_data = $this->ticketMailTemplateModel
|
||||
->where('ticket_mail_template.ticket_type', 0)
|
||||
->where('ticket_mail_template.trigger_type', 0)
|
||||
->first();
|
||||
|
||||
if(!empty($template_data)){
|
||||
|
||||
$subject = $this->replacePlaceholders($template_data['subject'], $ticket_data);
|
||||
$message = $this->replacePlaceholders($template_data['mail_content'], $ticket_data);
|
||||
|
||||
$emailData = [
|
||||
'mail' => $head_mail['email'],
|
||||
'subject' => $subject,
|
||||
'message' => $message,
|
||||
'common' => [],
|
||||
];
|
||||
|
||||
$this->sendTrigger($emailData);
|
||||
|
||||
}else{
|
||||
$this->myLogger->logme('error', "Head Mail can't be sent because Template data is empty");
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
$this->myLogger->logme('error', "Head Mail can't be sent because head mail is empty");
|
||||
}
|
||||
|
||||
}else{
|
||||
$this->myLogger->logme('error', "Head Mail can't be sent because ticket data is empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,7 +304,8 @@ class MailHelper
|
||||
$bcc = isset($params['bcc']) ? $params['bcc'] : '';
|
||||
$cc = isset($params['cc']) ? $params['cc'] : '';
|
||||
|
||||
$from_address = getenv('email.fromEmail');
|
||||
$from_address = isset($params['from_mail']) && !empty($params['from_mail']) ? $params['from_mail'] : getenv('email.fromEmail');
|
||||
// $from_address = "claims@nhanceindia.in";
|
||||
try {
|
||||
$curl = curl_init();
|
||||
|
||||
|
||||
@ -51,6 +51,19 @@ class TicketMasterModel extends Model
|
||||
'claim_number',
|
||||
'emp_id',
|
||||
'insured_emp_id',
|
||||
|
||||
'raised_date',
|
||||
'registration_date',
|
||||
'query_received_date',
|
||||
'denial_date',
|
||||
'approved_date',
|
||||
'settled_date',
|
||||
'denial_reason',
|
||||
'approved_letter',
|
||||
'approved_amount',
|
||||
'utr_details',
|
||||
'settle_letter',
|
||||
'is_head_approved',
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -275,9 +275,11 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
var dob = flatpickr("#dob", {
|
||||
dateFormat: "d/M/Y",
|
||||
allowInput: false
|
||||
dateFormat: "d/m/Y",
|
||||
allowInput: false, // Allows manual input
|
||||
yearSelector: true, // Ensures year can be selected manually
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$(document).ready(function() {
|
||||
@ -436,7 +438,8 @@
|
||||
$('#email_corporate').val('');
|
||||
$('#mobile').val('');
|
||||
|
||||
window.location.reload();
|
||||
// window.location.reload();
|
||||
fetchEmpolyeeList();
|
||||
|
||||
}else{
|
||||
toastr.error(response.message, 'ERROR');
|
||||
@ -534,4 +537,11 @@
|
||||
|
||||
}
|
||||
|
||||
function onlyNumbers(event) {
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
if (charcode >= 48 && charcode <= 57 || charcode == 46) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -142,25 +142,98 @@ table.dataTable tbody td {
|
||||
<!-- end row -->
|
||||
<div id="loader" class="loader" style="display:none;">SPINNER</div>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const table = document.getElementById("tickets-table");
|
||||
// document.addEventListener("DOMContentLoaded", function () {
|
||||
// const table = document.getElementById("tickets-table");
|
||||
|
||||
// Create custom dropdown
|
||||
function createCustomDropdown(row) {
|
||||
// Get the original dropdown items
|
||||
const originalDropdown = row.querySelector('.dropdown-menu');
|
||||
if (!originalDropdown) return null;
|
||||
// // Create custom dropdown
|
||||
// function createCustomDropdown(row) {
|
||||
// // Get the original dropdown items
|
||||
// const originalDropdown = row.querySelector('.dropdown-menu');
|
||||
// if (!originalDropdown) return null;
|
||||
|
||||
// Create new dropdown with proper background and spacing
|
||||
const customDropdown = document.createElement('div');
|
||||
customDropdown.className = 'custom-dropdown-menu';
|
||||
// // Create new dropdown with proper background and spacing
|
||||
// const customDropdown = document.createElement('div');
|
||||
// customDropdown.className = 'custom-dropdown-menu';
|
||||
|
||||
// Copy inner content while maintaining icon alignment
|
||||
customDropdown.innerHTML = originalDropdown.innerHTML;
|
||||
// // Copy inner content while maintaining icon alignment
|
||||
// customDropdown.innerHTML = originalDropdown.innerHTML;
|
||||
|
||||
return customDropdown;
|
||||
}
|
||||
// return customDropdown;
|
||||
// }
|
||||
|
||||
// let activeDropdown = null;
|
||||
|
||||
// // Add click event listener to rows
|
||||
// table.querySelectorAll("tbody tr").forEach(row => {
|
||||
// const customDropdown = createCustomDropdown(row);
|
||||
// if (!customDropdown) return;
|
||||
|
||||
// document.body.appendChild(customDropdown);
|
||||
|
||||
// row.addEventListener("click", function(event) {
|
||||
// // Ignore clicks on the action column
|
||||
// if (event.target.closest('td:last-child')) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Hide any active dropdown
|
||||
// if (activeDropdown) {
|
||||
// activeDropdown.style.display = 'none';
|
||||
// }
|
||||
|
||||
// // Get click position
|
||||
// const rect = event.target.getBoundingClientRect();
|
||||
|
||||
// // Position the dropdown with some offset
|
||||
// customDropdown.style.display = 'block';
|
||||
// customDropdown.style.position = 'fixed';
|
||||
// customDropdown.style.left = `${rect.left}px`;
|
||||
// customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap
|
||||
|
||||
// // Set as active dropdown
|
||||
// activeDropdown = customDropdown;
|
||||
|
||||
// event.stopPropagation();
|
||||
// });
|
||||
|
||||
// // Preserve click handlers and add auto-close
|
||||
// customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
|
||||
// item.addEventListener('click', function(e) {
|
||||
// const onclickAttr = this.getAttribute('onclick');
|
||||
// if (onclickAttr) {
|
||||
// eval(onclickAttr);
|
||||
// }
|
||||
|
||||
// const href = this.getAttribute('href');
|
||||
// if (href && href !== '#') {
|
||||
// window.location.href = href;
|
||||
// }
|
||||
|
||||
// // Close the dropdown after handling the click
|
||||
// if (activeDropdown) {
|
||||
// activeDropdown.style.display = 'none';
|
||||
// activeDropdown = null;
|
||||
// }
|
||||
|
||||
// e.stopPropagation();
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
|
||||
// // Close dropdown when clicking outside
|
||||
// document.addEventListener("click", function() {
|
||||
// if (activeDropdown) {
|
||||
// activeDropdown.style.display = 'none';
|
||||
// activeDropdown = null;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
document.addEventListener("DOMContentLoaded", init);
|
||||
|
||||
function init() {
|
||||
|
||||
const table = document.getElementById("tickets-table");
|
||||
let activeDropdown = null;
|
||||
|
||||
// Add click event listener to rows
|
||||
@ -171,63 +244,75 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
document.body.appendChild(customDropdown);
|
||||
|
||||
row.addEventListener("click", function(event) {
|
||||
// Ignore clicks on the action column
|
||||
if (event.target.closest('td:last-child')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide any active dropdown
|
||||
if (activeDropdown) {
|
||||
activeDropdown.style.display = 'none';
|
||||
}
|
||||
|
||||
// Get click position
|
||||
const rect = event.target.getBoundingClientRect();
|
||||
|
||||
// Position the dropdown with some offset
|
||||
customDropdown.style.display = 'block';
|
||||
customDropdown.style.position = 'fixed';
|
||||
customDropdown.style.left = `${rect.left}px`;
|
||||
customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap
|
||||
|
||||
// Set as active dropdown
|
||||
activeDropdown = customDropdown;
|
||||
|
||||
event.stopPropagation();
|
||||
handleRowClick(event, customDropdown);
|
||||
});
|
||||
|
||||
// Preserve click handlers and add auto-close
|
||||
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
|
||||
item.addEventListener('click', function(e) {
|
||||
const onclickAttr = this.getAttribute('onclick');
|
||||
if (onclickAttr) {
|
||||
eval(onclickAttr);
|
||||
}
|
||||
|
||||
const href = this.getAttribute('href');
|
||||
if (href && href !== '#') {
|
||||
window.location.href = href;
|
||||
}
|
||||
|
||||
// Close the dropdown after handling the click
|
||||
if (activeDropdown) {
|
||||
activeDropdown.style.display = 'none';
|
||||
activeDropdown = null;
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
handleItemClick(e, item);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Close dropdown when clicking outside
|
||||
document.addEventListener("click", function() {
|
||||
document.addEventListener("click", handleDocumentClick);
|
||||
|
||||
function createCustomDropdown(row) {
|
||||
const originalDropdown = row.querySelector('.dropdown-menu');
|
||||
if (!originalDropdown) return null;
|
||||
|
||||
const customDropdown = document.createElement('div');
|
||||
customDropdown.className = 'custom-dropdown-menu';
|
||||
customDropdown.innerHTML = originalDropdown.innerHTML;
|
||||
|
||||
return customDropdown;
|
||||
}
|
||||
|
||||
function handleRowClick(event, customDropdown) {
|
||||
if (event.target.closest('td:last-child')) return;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
function handleItemClick(e, item) {
|
||||
const onclickAttr = item.getAttribute('onclick');
|
||||
if (onclickAttr) {
|
||||
eval(onclickAttr);
|
||||
}
|
||||
|
||||
const href = item.getAttribute('href');
|
||||
if (href && href !== '#') {
|
||||
window.location.href = href;
|
||||
}
|
||||
|
||||
if (activeDropdown) {
|
||||
activeDropdown.style.display = 'none';
|
||||
activeDropdown = null;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
function handleDocumentClick() {
|
||||
if (activeDropdown) {
|
||||
activeDropdown.style.display = 'none';
|
||||
activeDropdown = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
@ -469,8 +554,11 @@ function objectToQueryString(obj) {
|
||||
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
|
||||
}
|
||||
|
||||
function fetchEmpolyeeList(event) {
|
||||
event.preventDefault(); // Prevent default action
|
||||
function fetchEmpolyeeList(event = null) {
|
||||
|
||||
if(event){
|
||||
event.preventDefault(); // Prevent default action
|
||||
}
|
||||
|
||||
var client_id = $('#clients').val();
|
||||
var policy_id = $('#policies').val();
|
||||
@ -505,6 +593,9 @@ function fetchEmpolyeeList(event) {
|
||||
// console.log(apiURL);
|
||||
// window.location.href = apiURL;
|
||||
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
|
||||
// var apiURL2 = $('#get-emp-list').attr('href'); // Get href attribute value
|
||||
console.log(apiURL);
|
||||
@ -514,16 +605,19 @@ function fetchEmpolyeeList(event) {
|
||||
data: queryParams,
|
||||
success: function(response) {
|
||||
if(response.status == true){
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
$('#employee_table_list').html(response.html);
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
setTimeout(function(){
|
||||
init()
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error:', error);
|
||||
toastr.error('Failed to fetch Data','Error');
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -7,36 +7,49 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<!-- <label for="ticket_auto_query_note">Add Notes</label> -->
|
||||
<div class="form-row" id="rac_rate_dropdown">
|
||||
<div class="form-group col-md-12">
|
||||
<select id="ticket_mail_auto_query_customButton" class="form-control"
|
||||
style="border:none;right: 13px;width: auto;position: absolute;z-index: 1;top: -19px;height: 32px;float: right;">
|
||||
<option value="">Documents</option>
|
||||
<?php foreach ($ticket_check_list as $value): ?>
|
||||
<option value="<?= $value['document']; ?>"><?= $value['document']; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<textarea class="form-control" id="ticket_auto_query_note" name="note" rows="3"
|
||||
placeholder="Enter Text"><?= isset($ticket_note['note']) ? $ticket_note['note'] : '' ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div><input type="hidden" id="query_note_id"><input type="hidden"
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="submit" class="btn btn-primary" id="ticket_auto_query_submit">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div><input type="hidden" id="query_note_id"><input type="hidden" <div
|
||||
class="form-group text-right m-b-0">
|
||||
<button type="submit" class="btn btn-primary" id="ticket_auto_query_submit">Submit</button>
|
||||
</div>
|
||||
</div> <!-- end col-->
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- end col-->
|
||||
</div>
|
||||
<!-- end -->
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
url = '<?= base_url('ticket/note/1')?>';
|
||||
data = { id : $('#ticket_master_id').val() , is_auto_query : 1};
|
||||
url = '<?= base_url('ticket/note/1') ?>';
|
||||
data = {
|
||||
id: $('#ticket_master_id').val(),
|
||||
is_auto_query: 1
|
||||
};
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:data,
|
||||
url: url,
|
||||
data: data,
|
||||
type: 'POST',
|
||||
success: function(res) {
|
||||
if (res.status == true){
|
||||
if (res.status == true) {
|
||||
$('#ticket_auto_query_note').val(res.data.note);
|
||||
$('#query_note_id').val(res.data.id);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
@ -56,20 +69,29 @@ $(document).ready(function() {
|
||||
var url = '<?= base_url("/ticket/note/2"); ?>';
|
||||
var formData = $(this).serializeArray();
|
||||
var ticket_id = $('#ticket_master_id').val();
|
||||
if (ticket_id != null && ticket_id != ''){
|
||||
formData.push({ name: 'ticket_id', value: ticket_id});
|
||||
if (ticket_id != null && ticket_id != '') {
|
||||
formData.push({
|
||||
name: 'ticket_id',
|
||||
value: ticket_id
|
||||
});
|
||||
}
|
||||
var primary_key = $('#query_note_id').val();
|
||||
if (primary_key != null && primary_key != ''){
|
||||
formData.push({ name: 'id', value: primary_key});
|
||||
if (primary_key != null && primary_key != '') {
|
||||
formData.push({
|
||||
name: 'id',
|
||||
value: primary_key
|
||||
});
|
||||
}
|
||||
formData.push({name: 'is_auto_query',value:1})
|
||||
formData.push({
|
||||
name: 'is_auto_query',
|
||||
value: 1
|
||||
})
|
||||
console.log(formData);
|
||||
sendAjaxRequestForGlobal(url, 'POST', formData, function(response) {
|
||||
if (response.status == true) {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.success('Note Added Successfully','Success');
|
||||
toastr.success('Note Added Successfully', 'Success');
|
||||
// console.log("Respone id is ")
|
||||
// console.log(response.id);
|
||||
$('#query_note_id').val(response.id);
|
||||
@ -95,4 +117,47 @@ $(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
let lastActiveField = null;
|
||||
|
||||
$("#ticket_auto_query_note").on("focus", function() {
|
||||
lastActiveField = this;
|
||||
});
|
||||
|
||||
document.addEventListener('change', function(event) {
|
||||
|
||||
var target = event.target;
|
||||
|
||||
if (target.matches('#ticket_mail_auto_query_customButton')) {
|
||||
|
||||
let placeholderValue = $(target).val();
|
||||
if (!placeholderValue) return;
|
||||
|
||||
if (lastActiveField) {
|
||||
if (lastActiveField.id === "ticket_auto_query_note") {
|
||||
insertAtCursor(lastActiveField, placeholderValue);
|
||||
}
|
||||
}
|
||||
|
||||
$(target).val('');
|
||||
}
|
||||
});
|
||||
|
||||
function insertAtCursor(input, textToInsert) {
|
||||
|
||||
textToInsert += '\n';
|
||||
|
||||
if (document.selection) {
|
||||
input.focus();
|
||||
var sel = document.selection.createRange();
|
||||
sel.text = textToInsert;
|
||||
} else if (input.selectionStart || input.selectionStart === 0) {
|
||||
let startPos = input.selectionStart;
|
||||
let endPos = input.selectionEnd;
|
||||
input.value = input.value.substring(0, startPos) + textToInsert + input.value.substring(endPos, input.value
|
||||
.length);
|
||||
input.selectionStart = input.selectionEnd = startPos + textToInsert.length;
|
||||
} else {
|
||||
input.value += textToInsert;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -186,7 +186,7 @@ function openFetchEmpDataodal() {
|
||||
myModal.show();
|
||||
}
|
||||
|
||||
function setMemberData(input) {
|
||||
function setMemberData(input) {is_head_approved
|
||||
|
||||
var selectedOption = $(input).find(':selected');
|
||||
|
||||
@ -209,4 +209,33 @@ function setMemberData(input) {
|
||||
});
|
||||
}
|
||||
|
||||
function showConfirmationModal(event) {
|
||||
Swal.fire({
|
||||
title: "Approve or Reject the rejected claim",
|
||||
text: "Do you want to save this?",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
showDenyButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
denyButtonColor: "#6c757d",
|
||||
confirmButtonText: "Approve",
|
||||
denyButtonText: "Reject",
|
||||
cancelButtonText: "Cancel"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$('#is_head_approved').val(1);
|
||||
console.log($('#ticket_form_data')[0])
|
||||
submitClaimForm(event, $('#ticket_form_data')[0]); // Fixed selector
|
||||
} else if (result.isDenied) {
|
||||
$('#is_head_approved').val(2);
|
||||
console.log($('#ticket_form_data')[0])
|
||||
submitClaimForm(event, $('#ticket_form_data')[0]); // Fixed selector
|
||||
} else {
|
||||
$('#is_head_approved').val(0);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -15,10 +15,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_gmc" onsubmit="submitClaimForm(event, this)" enctype="multipart/form-data">
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" id="ticket_type_id" name="ticket_type_id" value="1">
|
||||
<input type="hidden" id="ticket_master_id" name="ticket_master_id" value="<?= isset($ticket_data['id']) ? $ticket_data['id'] : '' ?>">
|
||||
<input type="hidden" id="is_head_approved" name="is_head_approved" value="<?= isset($ticket_data['is_head_approved']) ? $ticket_data['is_head_approved'] : '' ?>">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
@ -219,17 +220,86 @@
|
||||
name="pod_no">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<div class="form-group col-md-3 up_cnu" style="display: none;">
|
||||
<label for="claim_number">Claim Number<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="claim_number" placeholder="Enter Claim NO"
|
||||
value="<?= isset($ticket_data['claim_number']) ? $ticket_data['claim_number'] : '' ?>"
|
||||
name="claim_number">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 up_cnu" style="display: none;">
|
||||
<label for="registration_date">Registration Date</label>
|
||||
<input type="text" class="form-control datepicker" id="registration_date" placeholder="Select Registration Date"
|
||||
value="<?= isset($ticket_data['registration_date']) ? $ticket_data['registration_date'] : '' ?>" name="registration_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 cda_ir" style="display: none;">
|
||||
<label for="raised_date">Raised Date</label>
|
||||
<input type="text" class="form-control datepicker" id="raised_date" placeholder="Select Raised Date"
|
||||
value="<?= isset($ticket_data['raised_date']) ? $ticket_data['raised_date'] : '' ?>" name="raised_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 up_qdr" style="display: none;">
|
||||
<label for="query_received_date">Query Received Date</label>
|
||||
<input type="text" class="form-control datepicker" id="query_received_date" placeholder="Select Query Received Date"
|
||||
value="<?= isset($ticket_data['query_received_date']) ? $ticket_data['query_received_date'] : '' ?>" name="query_received_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 rejected" style="display: none;">
|
||||
<label for="denial_reason">Denial Reason</label>
|
||||
<input type="text" class="form-control" id="denial_reason" placeholder="Enter Denial Reason"
|
||||
value="<?= isset($ticket_data['denial_reason']) ? $ticket_data['denial_reason'] : '' ?>" name="denial_reason">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 rejected" style="display: none;">
|
||||
<label for="denial_date">Denial Date</label>
|
||||
<input type="text" class="form-control datepicker" id="denial_date" placeholder="Select Denial Date"
|
||||
value="<?= isset($ticket_data['denial_date']) ? $ticket_data['denial_date'] : '' ?>" name="denial_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 approved" style="display: none;">
|
||||
<label for="approved_amount">Approved Amount</label>
|
||||
<input type="text" class="form-control" id="approved_amount" placeholder="Enter Approved Amount"
|
||||
value="<?= isset($ticket_data['approved_amount']) ? $ticket_data['approved_amount'] : '' ?>" name="approved_amount">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 approved" style="display: none;">
|
||||
<label for="approved_date">Approved Date</label>
|
||||
<input type="text" class="form-control datepicker" id="approved_date" placeholder="Select Approved Date"
|
||||
value="<?= isset($ticket_data['approved_date']) ? $ticket_data['approved_date'] : '' ?>" name="approved_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 approved" style="display: none;">
|
||||
<label for="approved_letter">Approved Letter</label>
|
||||
<input type="text" class="form-control" id="approved_letter" placeholder="Enter Approved Letter"
|
||||
value="<?= isset($ticket_data['approved_letter']) ? $ticket_data['approved_letter'] : '' ?>" name="approved_letter">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="utr_details">UTR Details</label>
|
||||
<input type="text" class="form-control" id="utr_details" placeholder="Enter UTR Details"
|
||||
value="<?= isset($ticket_data['utr_details']) ? $ticket_data['utr_details'] : '' ?>" name="utr_details">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="settled_date">Settled Date</label>
|
||||
<input type="text" class="form-control datepicker" id="settled_date" placeholder="Select Settled Date"
|
||||
value="<?= isset($ticket_data['settled_date']) ? $ticket_data['settled_date'] : '' ?>" name="settled_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="settle_letter">Settle Letter</label>
|
||||
<input type="text" class="form-control" id="settle_letter" placeholder="Enter Settle Letter"
|
||||
value="<?= isset($ticket_data['settle_letter']) ? $ticket_data['settle_letter'] : '' ?>" name="settle_letter">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit" >Submit</button>
|
||||
<?php if(get_role_id() == 5 && isset($ticket_data) && $ticket_data['claim_status_id'] == 8) { ?>
|
||||
<a class="btn btn-secondary waves-effect waves-light mr-1" onclick="showConfirmationModal(event)">Rejected Approve</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -239,6 +309,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var doa = flatpickr("#doa", {
|
||||
@ -251,5 +322,39 @@ $(document).ready(function() {
|
||||
allowInput: false
|
||||
});
|
||||
|
||||
flatpickr("#raised_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#registration_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#query_received_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#denial_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#approved_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#settled_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
|
||||
updateClaimStatusDisplay("<?= isset($ticket_data['claim_status_id']) ? $ticket_data['claim_status_id'] : 0 ?>")
|
||||
|
||||
})
|
||||
|
||||
function updateClaimStatusDisplay(value) {
|
||||
// Hide all sections first
|
||||
$('.cda_ir, .settled, .approved, .rejected, .up_qdr, .up_cnu').hide();
|
||||
|
||||
// Show relevant section based on value
|
||||
if (value == 3 || value == 4) { // CDA / INFORMATION REQUIRED
|
||||
$('.cda_ir').show();
|
||||
} else if (value == 5) { // UNDER PROCESS - CLAIM NO. UPDATION
|
||||
$('.up_cnu').show();
|
||||
} else if (value == 7) { // UNDER PROCESS - QUERY DOCUMENT RECEIVED
|
||||
$('.up_qdr').show();
|
||||
} else if (value == 8) { // REJECTED
|
||||
$('.rejected').show();
|
||||
} else if (value == 9) { // APPROVED
|
||||
$('.approved').show();
|
||||
} else if (value == 11) { // SETTLED
|
||||
$('.settled').show();
|
||||
}
|
||||
}
|
||||
|
||||
$('#claim_status_id').on('change', function() {
|
||||
updateClaimStatusDisplay($(this).val());
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_gmc" onsubmit="submitClaimForm(event, this)"
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)"
|
||||
enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
@ -195,11 +195,34 @@
|
||||
name="si_amt">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_number">Claim Number<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="claim_number" placeholder="Enter Claim NO"
|
||||
value="<?= isset($ticket_data['claim_number']) ? $ticket_data['claim_number'] : '' ?>"
|
||||
name="claim_number">
|
||||
<div class="form-group col-md-3 approved" style="display: none;">
|
||||
<label for="approved_date">Approved Date</label>
|
||||
<input type="text" class="form-control datepicker" id="approved_date" placeholder="Select Approved Date"
|
||||
value="<?= isset($ticket_data['approved_date']) ? $ticket_data['approved_date'] : '' ?>" name="approved_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 approved" style="display: none;">
|
||||
<label for="approved_letter">Approved Letter</label>
|
||||
<input type="text" class="form-control" id="approved_letter" placeholder="Enter Approved Letter"
|
||||
value="<?= isset($ticket_data['approved_letter']) ? $ticket_data['approved_letter'] : '' ?>" name="approved_letter">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="utr_details">UTR Details</label>
|
||||
<input type="text" class="form-control" id="utr_details" placeholder="Enter UTR Details"
|
||||
value="<?= isset($ticket_data['utr_details']) ? $ticket_data['utr_details'] : '' ?>" name="utr_details">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="settled_date">Settled Date</label>
|
||||
<input type="text" class="form-control datepicker" id="settled_date" placeholder="Select Settled Date"
|
||||
value="<?= isset($ticket_data['settled_date']) ? $ticket_data['settled_date'] : '' ?>" name="settled_date">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 settled" style="display: none;">
|
||||
<label for="settle_letter">Settle Letter</label>
|
||||
<input type="text" class="form-control" id="settle_letter" placeholder="Enter Settle Letter"
|
||||
value="<?= isset($ticket_data['settle_letter']) ? $ticket_data['settle_letter'] : '' ?>" name="settle_letter">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -215,6 +238,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var date_of_join = flatpickr("#date_of_join", {
|
||||
@ -246,5 +270,31 @@ $(document).ready(function() {
|
||||
dateFormat: "d/m/Y",
|
||||
allowInput: false
|
||||
});
|
||||
|
||||
flatpickr("#approved_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
flatpickr("#settled_date", { dateFormat: "d/m/Y", allowInput: false });
|
||||
|
||||
updateClaimStatusDisplay("<?= isset($ticket_data['claim_status_id']) ? $ticket_data['claim_status_id'] : 0 ?>")
|
||||
|
||||
})
|
||||
|
||||
function updateClaimStatusDisplay(value) {
|
||||
|
||||
console.log('value', value);
|
||||
|
||||
// Hide all sections first
|
||||
$('.settled, .approved').hide();
|
||||
|
||||
// Show relevant section based on value
|
||||
if (value == 20) { // APPROVED
|
||||
$('.approved').show();
|
||||
} else if (value == 24) { // SETTLED
|
||||
$('.settled').show();
|
||||
}
|
||||
}
|
||||
|
||||
$('#claim_status_id').on('change', function() {
|
||||
updateClaimStatusDisplay($(this).val());
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -571,7 +571,7 @@ function appendEmployee(data, attrId) {
|
||||
console.log(item)
|
||||
var option = $('<option>', {
|
||||
value: item.emp_code,
|
||||
text: item.emp_name,
|
||||
text: item.emp_name + ' - ' + item.emp_code,
|
||||
});
|
||||
|
||||
$('#' + attrId).append(option).select2();
|
||||
|
||||
@ -54,6 +54,7 @@ table.dataTable tbody td {
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>Policy Type</th>
|
||||
<th>Claim number</th>
|
||||
<th>TPA ID</th>
|
||||
<th>Emp name</th>
|
||||
@ -65,10 +66,29 @@ table.dataTable tbody td {
|
||||
<tbody>
|
||||
<?php if (isset($ticket_data)) { ?>
|
||||
<?php foreach($ticket_data as $index => $row){ ?>
|
||||
<tr onclick="viewTicket(<?php echo $row['id']; ?>)">
|
||||
<td data-toggle="tooltip" data-placement="top" title="<?php echo $row['status']; ?>">
|
||||
<span class="status-tooltip"><?php echo $row['status']; ?></span>
|
||||
</td>
|
||||
<tr onclick="viewTicket(<?php echo $row['id']; ?>)">
|
||||
|
||||
<td data-toggle="tooltip" data-placement="top" title="<?php echo $row['status']; ?>">
|
||||
<span class="status-tooltip">
|
||||
<?php
|
||||
if ($row['claim_status_id'] == 8) {
|
||||
if ($row['is_head_approved'] == 0) {
|
||||
echo $row['status'] . ' <i class="fa fa-exclamation-triangle" style="color:red;" aria-hidden="true"></i>';
|
||||
} elseif ($row['is_head_approved'] == 1) {
|
||||
echo $row['status'] . ' <i class="fa fa-check-circle" style="color:green;" aria-hidden="true"></i>';
|
||||
} elseif ($row['is_head_approved'] == 2) {
|
||||
echo $row['status'] . ' <i class="fa fa-times-circle" style="color:red;" aria-hidden="true"></i>';
|
||||
} else {
|
||||
echo $row['status'];
|
||||
}
|
||||
} else {
|
||||
echo $row['status'];
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td><?php echo str_replace("Claim-", "", $ticket_type[$row['ticket_type_id']] ?? ""); ?></td>
|
||||
<td><?php echo $row['claim_no']; ?></td>
|
||||
<td><?php echo $row['tpa_id']; ?></td>
|
||||
<td><?php echo $row['emp_name']; ?></td>
|
||||
|
||||
@ -77,9 +77,9 @@ table.dataTable tbody td {
|
||||
<?php if (isset($ticket_data)) { ?>
|
||||
<?php foreach($ticket_data as $index => $row){ ?>
|
||||
<tr>
|
||||
<td><?php echo $row['template_name']; ?></td>
|
||||
<td><?php echo $ticket_type[$row['ticket_type']]; ?></td>
|
||||
<td><?php echo $trigger_type[$row['trigger_type']]; ?></td>
|
||||
<td><?php echo $row['template_name'] ?? ""; ?></td>
|
||||
<td><?php echo $ticket_type[$row['ticket_type']] ?? ""; ?></td>
|
||||
<td><?php echo $trigger_type[$row['trigger_type']] ?? ""; ?></td>
|
||||
<td><?=$row['is_auto_mail'] == 1?'Auto':"Manual" ?></td>
|
||||
<td>
|
||||
<div class="btn-group dropdown">
|
||||
|
||||
59
phpqueue.sh
59
phpqueue.sh
@ -1,56 +1,7 @@
|
||||
!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
echo "Running job at $(date)"
|
||||
/usr/bin/php /opt/lampp/htdocs/nhance/public/index.php cli/processjob
|
||||
!/bin/bash
|
||||
!/bin/bash
|
||||
|
||||
# Read the Job_Queue variable from the temporary file
|
||||
#!/bin/bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# Define the root directory for the project and PID file path
|
||||
#!/bin/bash
|
||||
|
||||
# Define paths
|
||||
# ROOT_DIR=$(dirname "$(realpath "$0")")
|
||||
# JOB_QUEUE_FILE="$ROOT_DIR/job_queue"
|
||||
# PID_FILE="$ROOT_DIR/phpqueue.pid"
|
||||
|
||||
|
||||
# # Check if the script is already running
|
||||
# if [[ -f "$PID_FILE" ]] && kill -0 "$(cat $PID_FILE)" 2>/dev/null; then
|
||||
# echo "phpqueue.sh is already running. Exiting."
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
# # Write the current process ID (PID) to the PID file
|
||||
# echo $$ > "$PID_FILE"
|
||||
|
||||
# # Ensure the PID file is removed on script exit
|
||||
# trap "rm -f $PID_FILE" EXIT
|
||||
|
||||
# # Main loop
|
||||
# while true; do
|
||||
# # Check if the Job_Queue file exists
|
||||
# if [[ ! -f "$JOB_QUEUE_FILE" ]]; then
|
||||
# echo "Job Queue file not found."
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
# # Read the value of Job_Queue from the file
|
||||
# Job_Queue=$(cat "$JOB_QUEUE_FILE")
|
||||
|
||||
# if [[ "$Job_Queue" -eq 1 ]]; then
|
||||
# /usr/bin/php /opt/lampp/htdocs/nhance/public/index.php cli/processjob
|
||||
# else
|
||||
# echo "No job to process."
|
||||
# fi
|
||||
|
||||
# # Sleep for 1 second before the next iteration
|
||||
# sleep 1
|
||||
# done
|
||||
|
||||
/usr/bin/php /var/www/nhance/zenith/public/index.php cli/processjob
|
||||
sleep 1 # Optional: Add a sleep to avoid CPU overload
|
||||
done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user