diff --git a/resources/views/form/rapport-zenova/1788239728-6f7f3c27-c5dc-4e6e-a042-aefd5681af3a.blade.php b/resources/views/form/rapport-zenova/1788239728-6f7f3c27-c5dc-4e6e-a042-aefd5681af3a.blade.php index 5ac630e2..967f2d93 100644 --- a/resources/views/form/rapport-zenova/1788239728-6f7f3c27-c5dc-4e6e-a042-aefd5681af3a.blade.php +++ b/resources/views/form/rapport-zenova/1788239728-6f7f3c27-c5dc-4e6e-a042-aefd5681af3a.blade.php @@ -367,19 +367,7 @@ } }) */ - $('#field-absi_camp').on('change', function(){ - - /* let value = $(this).val(); - - if(value == 'Yes'){ - $('#report-form input[name="absi_camp_count"]').val(1); - } else { - $('#report-form input[name="absi_camp_count"]').val(0); - } */ - - toggleAbsiPatientsField(); - - }); + /* $('#field-h1_cardio_conference').on('change',function(){ @@ -411,40 +399,7 @@ $(selector).prop('required', show); } - function toggleAbsiPatientsField() { - - let absiCamp = $('#field-absi_camp').val(); - const brand = $('#field-select_brand').val(); - - // Convert stored 1/0 values to Yes/No - if (absiCamp == 1 || absiCamp === '1') { - absiCamp = 'Yes'; - $('#field-absi_camp').val('Yes'); - } - else if (absiCamp == 0 || absiCamp === '0') { - absiCamp = 'No'; - $('#field-absi_camp').val('No'); - } - - const $patientsField = $('#field-no_of_patients_screened'); - const $patientsWrapper = $patientsField.closest('.col-md-12'); - - console.log("Brand:", brand); - console.log("ABSI:", absiCamp); - - if (brand === 'Glipiq' && absiCamp === 'Yes') { - - $patientsWrapper.show(); - $patientsField.prop('required', true); - - } else { - - $patientsField.val(''); - $patientsWrapper.hide(); - $patientsField.prop('required', false); - - } - } + // Initial hide toggleFields(glipiFields, false); @@ -459,7 +414,7 @@ console.log("Brand is :",brand); toggleFields(glipiFields, brand === 'Glipiq'); toggleFields(sitazitFields, brand === 'Sitazit'); - toggleAbsiPatientsField(); + if(brand==='Glipiq'){ /* $('#report-form').append(''); @@ -510,7 +465,7 @@ $('#field-absi_camp').val(""); $('#field-h1_cardio_conference').val(""); - toggleAbsiPatientsField(); + $('#report-form input[name="glipiq_new_conversion"]').val(0); $('#report-form input[name="glipiq_existing_conversion"]').val(0); $('#report-form input[name="glipiq_rx_total"]').val(0);