Sfoglia il codice sorgente

Enable change pro when editing appt as ADMIN

Samson Mutunga 3 anni fa
parent
commit
0155264128
1 ha cambiato i file con 22 aggiunte e 3 eliminazioni
  1. 22 3
      resources/views/app/patient/appointment-calendar.blade.php

+ 22 - 3
resources/views/app/patient/appointment-calendar.blade.php

@@ -312,9 +312,23 @@
                         Pro
                     </div>
                     <div class="col-9 font-weight-bold">
-                        <input type="text"
+                        <!-- <input type="text"
                                class="form-control form-control-sm"
-                               :value="editAppointment.proName" readonly>
+                               :value="editAppointment.proName" readonly> -->
+                        <!-- -- -->
+                        <select id="updateApptPro" name="proUid" {{$pro->pro_type !== 'ADMIN' ? '' : 'provider-search'}}
+                                v-model="editAppointment.proUid"
+                                :data-pro-uid="editAppointment.proUid"
+                                no-auto-pro-suggest-init
+                                class="form-control form-control-sm">
+                            @if($pro->pro_type !== 'ADMIN')
+                                @foreach($pros as $iPro)
+                                    <option value="{{$iPro->uid}}">
+                                        {{$iPro->displayName()}}
+                                    </option>
+                                @endforeach
+                            @endif
+                        </select>
                     </div>
                 </div>
                 <div class="row mb-2">
@@ -808,7 +822,7 @@
                             $('#addApptPro').on('change', function() {
                                 self.newAppointment.proUid = $(this).val();
                             });
-                            $('#editApptPro').on('change', function() {
+                            $('#editApptPro, #updateApptPro').on('change', function() {
                                 self.editAppointment.proUid = $(this).val();
                             });
                         },
@@ -1145,7 +1159,12 @@
                             this.editAppointment.status = this.selectedEvent.extendedProps.status;
                             this.editAppointment.isTrainingEvent = this.selectedEvent.extendedProps.isTrainingEvent;
                             Vue.nextTick(function() {
+                                $('#updateApptPro').find('option').prop('selected', false);
+                                $('#updateApptPro').trigger('change');
                                 showStagPopup('client-edit-appointment', true);
+                                $('#updateApptPro').removeAttr('no-auto-pro-suggest-init').removeAttr('pro-suggest-initialized');
+                                initProSuggest();
+
                             });
 
                             setTimeout(() => {