|
@@ -699,6 +699,7 @@
|
|
eventTypes: '{{ $currentAppointment ? 'BOTH_ALL' : 'BOTH' }}',
|
|
eventTypes: '{{ $currentAppointment ? 'BOTH_ALL' : 'BOTH' }}',
|
|
calendar: null,
|
|
calendar: null,
|
|
proIds: ['{{ $currentAppointment ? $currentAppointment->pro_id : ($oPro ? $oPro->id : $pro->id) }}'],
|
|
proIds: ['{{ $currentAppointment ? $currentAppointment->pro_id : ($oPro ? $oPro->id : $pro->id) }}'],
|
|
|
|
+ lastSelectedProUid: '',
|
|
timezone: '{{ $currentAppointment ? $currentAppointment->timezone : 'EASTERN' }}',
|
|
timezone: '{{ $currentAppointment ? $currentAppointment->timezone : 'EASTERN' }}',
|
|
today: new Date('{{ date('Y-m-d 00:00:00') }}'),
|
|
today: new Date('{{ date('Y-m-d 00:00:00') }}'),
|
|
|
|
|
|
@@ -823,6 +824,14 @@
|
|
self.proIds = $(this).val();
|
|
self.proIds = $(this).val();
|
|
localStorage.stagCalendarProIds = JSON.stringify(self.proIds);
|
|
localStorage.stagCalendarProIds = JSON.stringify(self.proIds);
|
|
self.refreshEvents();
|
|
self.refreshEvents();
|
|
|
|
+ self.lastSelectedProUid = '';
|
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
|
+ if(self.proIds && self.proIds.length) {
|
|
|
|
+ $.get('/pro-uid/' + self.proIds[self.proIds.length - 1], _data => {
|
|
|
|
+ self.lastSelectedProUid = _data;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ @endif
|
|
});
|
|
});
|
|
|
|
|
|
// change from select2 to pro-suggest
|
|
// change from select2 to pro-suggest
|
|
@@ -1081,13 +1090,18 @@
|
|
let endTime = this.timeStr(this.selectedSlot.end);
|
|
let endTime = this.timeStr(this.selectedSlot.end);
|
|
this.newAppointment.clientUid = this.client.uid;
|
|
this.newAppointment.clientUid = this.client.uid;
|
|
this.newAppointment.proUid = '';
|
|
this.newAppointment.proUid = '';
|
|
- @if($oPro)
|
|
|
|
- this.newAppointment.proUid = '{{$oPro->uid}}';
|
|
|
|
- @elseif($pro->is_hcp && $pro->is_enrolled_as_mcp)
|
|
|
|
- this.newAppointment.proUid = '{{$pro->uid}}';
|
|
|
|
- @elseif($patient->mcp)
|
|
|
|
- this.newAppointment.proUid = '{{$patient->mcp->uid}}';
|
|
|
|
- @endif
|
|
|
|
|
|
+ if(this.lastSelectedProUid) {
|
|
|
|
+ this.newAppointment.proUid = this.lastSelectedProUid;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ @if($oPro)
|
|
|
|
+ this.newAppointment.proUid = '{{$oPro->uid}}';
|
|
|
|
+ @elseif($pro->is_hcp && $pro->is_enrolled_as_mcp)
|
|
|
|
+ this.newAppointment.proUid = '{{$pro->uid}}';
|
|
|
|
+ @elseif($patient->mcp)
|
|
|
|
+ this.newAppointment.proUid = '{{$patient->mcp->uid}}';
|
|
|
|
+ @endif
|
|
|
|
+ }
|
|
this.newAppointment.referringProUid = '';
|
|
this.newAppointment.referringProUid = '';
|
|
this.newAppointment.date = this.dateStr(this.selectedSlot.start);
|
|
this.newAppointment.date = this.dateStr(this.selectedSlot.start);
|
|
this.newAppointment.startTime = startTime === '00:00' ? '' : startTime;
|
|
this.newAppointment.startTime = startTime === '00:00' ? '' : startTime;
|