Changes
Specific Folder FTP Upload / ftp-deploy (push) Successful in 34s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 34s
Details
This commit is contained in:
parent
a8af1a13d7
commit
2c2b556c0d
|
|
@ -468,6 +468,13 @@
|
||||||
max-width: 220px;
|
max-width: 220px;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tgics-validate-wa-modal {
|
||||||
|
z-index: 1055;
|
||||||
|
}
|
||||||
|
.tgics-validate-backdrop {
|
||||||
|
z-index: 1050;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@include('layouts.shared/footer-script')
|
@include('layouts.shared/footer-script')
|
||||||
<script src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></script>
|
<script src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></script>
|
||||||
|
|
@ -825,6 +832,40 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hideTgicsValidateModal() {
|
||||||
|
stopTgicsWaPoll();
|
||||||
|
var $modal = $('#tgics-validate-wa-modal');
|
||||||
|
if ($.fn.modal && typeof $modal.modal === 'function') {
|
||||||
|
$modal.modal('hide');
|
||||||
|
} else if (window.bootstrap && bootstrap.Modal) {
|
||||||
|
var inst = bootstrap.Modal.getInstance($modal[0]);
|
||||||
|
if (inst) {
|
||||||
|
inst.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$modal.removeClass('show').css('display', 'none').attr('aria-hidden', 'true');
|
||||||
|
$('.tgics-validate-backdrop').remove();
|
||||||
|
$('body').removeClass('modal-open').css('overflow', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function showTgicsValidateModal() {
|
||||||
|
var $modal = $('#tgics-validate-wa-modal');
|
||||||
|
if ($.fn.modal && typeof $modal.modal === 'function') {
|
||||||
|
$modal.modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (window.bootstrap && bootstrap.Modal) {
|
||||||
|
bootstrap.Modal.getOrCreateInstance($modal[0]).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Manual fallback when Bootstrap modal JS is unavailable
|
||||||
|
$modal.addClass('show').css('display', 'block').attr('aria-hidden', 'false');
|
||||||
|
if (!$('.tgics-validate-backdrop').length) {
|
||||||
|
$('body').append('<div class="modal-backdrop fade show tgics-validate-backdrop"></div>');
|
||||||
|
}
|
||||||
|
$('body').addClass('modal-open');
|
||||||
|
}
|
||||||
|
|
||||||
function startTgicsWaPoll(contactId) {
|
function startTgicsWaPoll(contactId) {
|
||||||
stopTgicsWaPoll();
|
stopTgicsWaPoll();
|
||||||
tgicsWaPollStartedAt = Date.now();
|
tgicsWaPollStartedAt = Date.now();
|
||||||
|
|
@ -862,40 +903,57 @@
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '.tgics-validate-wa-btn', function() {
|
$(document).on('click', '.tgics-validate-wa-btn', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
var contactId = $(this).attr('data-contact-id') || '';
|
var contactId = $(this).attr('data-contact-id') || '';
|
||||||
var validateUrl = $(this).attr('data-validate-url') || '';
|
var validateUrl = $(this).attr('data-validate-url') || '';
|
||||||
var doctorName = $(this).attr('data-doctor-name') || 'Doctor';
|
var doctorName = $(this).attr('data-doctor-name') || 'Doctor';
|
||||||
if (!contactId || !validateUrl) {
|
if (!contactId || !validateUrl) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Validation unavailable',
|
||||||
|
text: 'Missing doctor contact link. Please re-enrol or contact support.'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#tgics-validate-wa-doctor').text(doctorName);
|
$('#tgics-validate-wa-doctor').text(doctorName);
|
||||||
$('#tgics-validate-wa-open').attr('href', validateUrl);
|
$('#tgics-validate-wa-open').attr('href', validateUrl);
|
||||||
$('#tgics-validate-wa-qr').empty();
|
$('#tgics-validate-wa-qr').empty();
|
||||||
if (typeof QRCode !== 'undefined') {
|
try {
|
||||||
new QRCode(document.getElementById('tgics-validate-wa-qr'), {
|
if (typeof QRCode !== 'undefined') {
|
||||||
text: validateUrl,
|
new QRCode(document.getElementById('tgics-validate-wa-qr'), {
|
||||||
width: 200,
|
text: validateUrl,
|
||||||
height: 200
|
width: 200,
|
||||||
});
|
height: 200
|
||||||
} else {
|
});
|
||||||
$('#tgics-validate-wa-qr').html('<p class="text-danger small">Unable to render QR. Use Open link instead.</p>');
|
} else {
|
||||||
|
$('#tgics-validate-wa-qr').html(
|
||||||
|
'<p class="text-muted small mb-2">QR library unavailable. Use the button below.</p>'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (qrErr) {
|
||||||
|
console.error(qrErr);
|
||||||
|
$('#tgics-validate-wa-qr').html(
|
||||||
|
'<p class="text-muted small mb-2">Unable to render QR. Use the button below.</p>'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
var $modal = $('#tgics-validate-wa-modal');
|
showTgicsValidateModal();
|
||||||
if (typeof bootstrap !== 'undefined' && bootstrap.Modal) {
|
|
||||||
bootstrap.Modal.getOrCreateInstance($modal[0]).show();
|
|
||||||
} else if ($modal.modal) {
|
|
||||||
$modal.modal('show');
|
|
||||||
} else {
|
|
||||||
$modal.show();
|
|
||||||
}
|
|
||||||
startTgicsWaPoll(contactId);
|
startTgicsWaPoll(contactId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '#tgics-validate-wa-modal [data-bs-dismiss="modal"], #tgics-validate-wa-modal .btn-close, #tgics-validate-wa-modal .btn-secondary', function() {
|
||||||
|
hideTgicsValidateModal();
|
||||||
|
});
|
||||||
|
$(document).on('click', '.tgics-validate-backdrop', function() {
|
||||||
|
hideTgicsValidateModal();
|
||||||
|
});
|
||||||
|
|
||||||
$('#tgics-validate-wa-modal').on('hidden.bs.modal hide.bs.modal', function() {
|
$('#tgics-validate-wa-modal').on('hidden.bs.modal hide.bs.modal', function() {
|
||||||
stopTgicsWaPoll();
|
stopTgicsWaPoll();
|
||||||
|
$('.tgics-validate-backdrop').remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#execution-form').on('submit', function(event) {
|
$('#execution-form').on('submit', function(event) {
|
||||||
|
|
@ -944,28 +1002,27 @@
|
||||||
today = yyyy + '-' + mm + '-' + dd;
|
today = yyyy + '-' + mm + '-' + dd;
|
||||||
|
|
||||||
var recordDateField = document.getElementById('field-plan_date');
|
var recordDateField = document.getElementById('field-plan_date');
|
||||||
recordDateField.setAttribute('min', today);
|
if (recordDateField) {
|
||||||
|
recordDateField.setAttribute('min', today);
|
||||||
|
}
|
||||||
|
|
||||||
var executionDateField = document.getElementById('execution-plan_date');
|
var executionDateField = document.getElementById('execution-plan_date');
|
||||||
//executionDateField.setAttribute('min', today);
|
|
||||||
|
|
||||||
// $('.edit-btn').click(function() {
|
|
||||||
// var executionexeField = document.getElementById('execution-record_date');
|
|
||||||
// executionexeField.setAttribute('min', executionDateField.value);
|
|
||||||
// });
|
|
||||||
|
|
||||||
$('.edit-btn').click(function() {
|
$('.edit-btn').click(function() {
|
||||||
var executionexeField = document.getElementById('execution-execution_date');
|
var executionexeField = document.getElementById('execution-execution_date');
|
||||||
executionexeField.setAttribute('min', executionDateField.value);
|
if (executionexeField && executionDateField && executionDateField.value) {
|
||||||
|
executionexeField.setAttribute('min', executionDateField.value);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (executionDateField) {
|
||||||
|
executionDateField.addEventListener('change', function() {
|
||||||
executionDateField.addEventListener('change', function() {
|
var executionexeField = document.getElementById('execution-record_date');
|
||||||
console.log('gg');
|
if (executionexeField) {
|
||||||
var executionexeField = document.getElementById('execution-record_date');
|
executionexeField.setAttribute('min', executionDateField.value);
|
||||||
executionexeField.setAttribute('min', executionDateField.value);
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue