diff --git a/resources/views/form/rapport-team3/1655458544-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac4.blade.php b/resources/views/form/rapport-team3/1655458544-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac4.blade.php index ab899e65..1c946a5b 100644 --- a/resources/views/form/rapport-team3/1655458544-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac4.blade.php +++ b/resources/views/form/rapport-team3/1655458544-00d0e7c9-c60e-410e-ada7-8e0fef8e6ac4.blade.php @@ -411,7 +411,9 @@ $('#execution-form-wrapper').show() $('#table-wrapper').hide() $('#execution-attendence').attr({min:"1"}); - $('#execution-no_of_patients_on_duolin').attr('max',10); + + + let type_of_meet=$('#execution-type_of_meeting').val(); console.log("type of meet",type_of_meet); @@ -419,17 +421,17 @@ if(type_of_meet==='Asthma Camp'){ $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().show(); $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',true); + $('#execution-no_of_patients_on_duolin').attr('max',10); $('label[for="execution-name_of_the_speaker"]').html('Name of the Speaker (Pedia or GP only) '); } else{ $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().hide(); $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',false); $('label[for="execution-name_of_the_speaker"]').html('Name of the speaker'); - } $('#execution-type_of_meeting').on('change',function(){ - let type_of_meet=$('##execution-type_of_meeting').val(); + let type_of_meet=$('#execution-type_of_meeting').val(); if(type_of_meet==='Asthma Camp'){ $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').parent().show(); $('#execution-no_of_patients_on_duolin,#execution-no_of_units_duolin_respules').attr('required',true); @@ -446,8 +448,8 @@ $('.edit-plan-btn').click(function(){ - $('#execution-new_continue,#execution-lta_regional,#execution-physical_virtual,#execution-yearly_honorarium,#execution-venue_av_food_etc_cost,#execution-total_eas_required').parent().hide(); - $('#execution-new_continue,#execution-lta_regional,#execution-physical_virtual,#execution-yearly_honorarium,#execution-venue_av_food_etc_cost,#execution-total_eas_required').prop('required',false); + $('#execution-new_continue,#execution-lta_regional,#execution-physical_virtual,#execution-yearly_honorarium,#execution-venue_av_food_etc_cost,#execution-total_eas_required').parent().hide(); + $('#execution-new_continue,#execution-lta_regional,#execution-physical_virtual,#execution-yearly_honorarium,#execution-venue_av_food_etc_cost,#execution-total_eas_required').prop('required',false); let selected = JSON.parse($(this).attr('plan_details')) @@ -463,10 +465,11 @@ if (selected[k] !== '') { $input.show().prop('required', true).val(selected[k]); // show + make required if needed - } else { + } + else { $input.show().prop('required', false).val(''); } - } + } $('#execution-id').val(selected['id']) $('#form-wrapper').hide() $('#execution-form-wrapper').show()