ソースを参照

Add-visit isNonMedical updates

Vijayakrishnan 3 年 前
コミット
7a2ced11e2
1 ファイル変更9 行追加41 行削除
  1. 9 41
      resources/views/app/patient/notes.blade.php

+ 9 - 41
resources/views/app/patient/notes.blade.php

@@ -146,32 +146,21 @@
                     @if($pro->pro_type === 'ADMIN')
                         <div class="form-group mb-2 pt-2 d-flex">
                             <label class="my-0 mr-3 d-flex align-items-center">
-                                <input type="radio" class="mr-1" name="noteType" value="regular" required>
-                                Regular Note
+                                <input type="radio" class="mr-1" name="isNonMedical" value="0" required {{$pro->is_hcp ? 'checked' : ''}}>
+                                <span class="text-nowrap">Regular Note</span>
                             </label>
                             <label class="my-0 mr-3 d-flex align-items-center">
-                                <input type="radio" class="mr-1" name="noteType" value="admin" required>
-                                Admin Note
+                                <input type="radio" class="mr-1" name="isNonMedical" value="1" required {{$pro->is_hcp ? '' : 'checked'}}>
+                                <span class="text-nowrap">Admin Note</span>
                             </label>
                         </div>
-
-                        <div if-admin-note class="d-none">
-                            <input type="hidden" x-name="hcpProUid" value="{{config('app.adminNoteHcpProUid')}}">
-                        </div>
-
-                        <div class="form-group d-none" if-regular-note>
-                            <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
-                            <select x-name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
-                            </select>
-                        </div>
-                    @else
-                        <div class="form-group mb-2">
-                            <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
-                            <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
-                            </select>
-                        </div>
                     @endif
 
+                    <div class="form-group mb-2">
+                        <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
+                        <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
+                        </select>
+                    </div>
 
                     <div class="form-group mb-2">
                         <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
@@ -439,27 +428,6 @@
                     }
                 });
 
-                $('[name="noteType"]').change(function() {
-                    let form = $(this).closest('form');
-                    form.find('[if-regular-note]').addClass('d-none');
-                    form.find('[if-regular-note] [x-name]').removeAttr('name');
-                    form.find('[if-admin-note]').addClass('d-none');
-                    form.find('[if-admin-note] [x-name]').removeAttr('name');
-                    if(form.find('[name="noteType"]:checked').attr('value') === 'regular') {
-                        form.find('[if-regular-note]').removeClass('d-none');
-                        form.find('[if-regular-note] [x-name]').each(function() {
-                            $(this).attr('name', $(this).attr('x-name'));
-                        });
-                    }
-                    else if(form.find('[name="noteType"]:checked').attr('value') === 'admin') {
-                        form.find('[if-admin-note]').removeClass('d-none');
-                        form.find('[if-admin-note] [x-name]').each(function() {
-                            $(this).attr('name', $(this).attr('x-name'));
-                        });
-                    }
-                    return false;
-                });
-
             }
             addMCInitializer('notes-list', initNotesList, '#notes-list-{{$patient->id}}');
         })();