diff --git a/resources/views/form/rapport-team3/1755153847-d61bd26b-4cac-4ad8-ba01-d77d60772653.blade.php b/resources/views/form/rapport-team3/1755153847-d61bd26b-4cac-4ad8-ba01-d77d60772653.blade.php index 0f4ef064..c421be2d 100644 --- a/resources/views/form/rapport-team3/1755153847-d61bd26b-4cac-4ad8-ba01-d77d60772653.blade.php +++ b/resources/views/form/rapport-team3/1755153847-d61bd26b-4cac-4ad8-ba01-d77d60772653.blade.php @@ -82,10 +82,25 @@ @endphp - + @if(isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes') Execution Done + + @elseif(isset($sub->workflow_status) && $sub->workflow_status == 'approved') + + + + + @elseif(isset($sub->workflow_status) && $sub->workflow_status == 'rejected') + + + + + @endif {{ isset($sub->formdata->execution_date) && $sub->formdata->execution_date > 0 ? 'Yes' : 'No' }} @@ -345,6 +360,21 @@ }) $('.edit-btn').click(function() { + let selected = JSON.parse($(this).attr('plan_details')) + for (let k of Object.keys(selected)) { + if (selected[k] != '') + $('#execution-' + k).val(selected[k]); + } + $('#execution-id').val(selected['id']) + $('#form-wrapper').hide() + $('#execution-form-wrapper').show() + $('#table-wrapper').hide(); + $('#execution-form').append(''); + + }) + + + $('.edit-plan').click(function() { let selected = JSON.parse($(this).attr('plan_details')) for (let k of Object.keys(selected)) { if (selected[k] != '') @@ -354,6 +384,9 @@ $('#form-wrapper').hide() $('#execution-form-wrapper').show() $('#table-wrapper').hide() + $('#execution-execution_date,#execution-actual_number_of_patients,#execution-number_of_patients_detected_with_copd,#execution-number_of_patients_on_home_nebulization,#execution-foracort_rx,#execution-glycohale_rx,#execution-business_generated_for_foracort,#execution-business_generated_for_glycohale').parent().hide(); + $('#execution-execution_date,#execution-actual_number_of_patients,#execution-number_of_patients_detected_with_copd,#execution-number_of_patients_on_home_nebulization,#execution-foracort_rx,#execution-glycohale_rx,#execution-business_generated_for_foracort,#execution-business_generated_for_glycohale').attr('required', false); + }) jQuery(document).ready(function($) {