Merge branch 'main' of http://192.168.1.200:3000/Stratawiz/Rapport-Laravel
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m1s Details

This commit is contained in:
zeeshan 2026-06-18 13:50:27 +05:30
commit d46cc0974d
1 changed files with 34 additions and 0 deletions

View File

@ -404,7 +404,41 @@
$('#report-form').on('submit', function(event){
event.preventDefault();
// At least one brand should have value > 0
let brandFields = [
'#field-glycohale_f_capsules',
'#field-glycohale_fb',
'#field-foracort_g_400_rotacaps',
'#field-glycohale_fb_inhaler',
'#field-foracort_g_inhaler',
'#field-glycohale_fb_synchrobreathe',
'#field-foracort_g_synchrobreathe',
'#field-glycohale_f_inhaler',
'#field-glycohale_f_synchrobreathe',
'#field-foracort_g_400_ciphaler',
'#field-glycohale_fb_ciphaler'
];
let hasValue = false;
brandFields.forEach(function(field) {
if ((parseInt($(field).val()) || 0) > 0) {
hasValue = true;
}
});
if (!hasValue) {
Swal.fire({
icon: 'error',
title: 'Validation Error',
text: 'From all 11 brands, at least one field should be greater than 0.'
});
return false;
}
const formData = new FormData($('#report-form')[0]);
// Log form data to console
for (let [key, value] of formData.entries()) {