Prechádzať zdrojové kódy

Set additionReasonCategory to ON_INTAKE if added as isRemoved: true

Vijayakrishnan 3 rokov pred
rodič
commit
4d2be2a48e

+ 4 - 0
resources/views/app/patient/wizard-partials/common-script.blade.php

@@ -173,6 +173,10 @@ parentSegment.find('#frm-add-{{$label}}')
             if(form.find('[name="isRemoved"][value="0"]').is(':checked')) {
                 form.find('[name="additionReasonCategory"]').attr('required', 'required');
             }
+            else if(form.find('[name="isRemoved"][value="1"]').is(':checked')) {
+                form.find('[name="additionReasonCategory"]').removeAttr('required');
+                form.find('[name="additionReasonCategory"][value="ON_INTAKE"]').prop('checked', true); // make ON_INTAKE if in-active
+            }
         }
 
         // require removalReasonCategory if not active