|
@@ -116,32 +116,44 @@
|
|
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
<li class="nav-item">
|
|
|
- <a native class="nav-link" :class="tab == 'appointments' ? 'active' : ''" href="#" v-on:click.prevent="tab='appointments'">Appointments</a>
|
|
|
+ <a native data-tab="appointments" class="nav-link"
|
|
|
+ :class="tab == 'appointments' ? 'active' : ''" href="#"
|
|
|
+ v-on:click.prevent="tab='appointments'">
|
|
|
+ Appointments
|
|
|
+ </a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
- <a native class="nav-link" :class="tab == 'measurements' ? 'active' : ''" href="#" v-on:click.prevent="tab='measurements'">Measurements</a>
|
|
|
+ <a native data-tab="measurements" class="nav-link"
|
|
|
+ :class="tab == 'measurements' ? 'active' : ''" href="#"
|
|
|
+ v-on:click.prevent="tab='measurements'">
|
|
|
+ Measurements
|
|
|
+ </a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
- <a native class="nav-link {{count($incomingReports) ? 'text-danger font-weight-bold' : ''}}"
|
|
|
- :class="tab == 'incoming_reports' ? 'active' : ''" href="#" v-on:click.prevent="tab='incoming_reports'">
|
|
|
+ <a native data-tab="incoming_reports" class="nav-link {{count($incomingReports) ? 'text-danger font-weight-bold' : ''}}"
|
|
|
+ :class="tab == 'incoming_reports' ? 'active' : ''" href="#"
|
|
|
+ v-on:click.prevent="tab='incoming_reports'">
|
|
|
Incoming Reports ({{count($incomingReports)}})
|
|
|
</a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
- <a native class="nav-link {{$numERx ? 'text-danger font-weight-bold' : ''}}"
|
|
|
- :class="tab == 'erx' ? 'active' : ''" href="#" v-on:click.prevent="tab='erx'">
|
|
|
+ <a native data-tab="erx" class="nav-link {{$numERx ? 'text-danger font-weight-bold' : ''}}"
|
|
|
+ :class="tab == 'erx' ? 'active' : ''" href="#"
|
|
|
+ v-on:click.prevent="tab='erx'">
|
|
|
ERx ({{$numERx}})
|
|
|
</a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
- <a native class="nav-link {{$numLabs ? 'text-danger font-weight-bold' : ''}}"
|
|
|
- :class="tab == 'labs' ? 'active' : ''" href="#" v-on:click.prevent="tab='labs'">
|
|
|
+ <a native data-tab="labs" class="nav-link {{$numLabs ? 'text-danger font-weight-bold' : ''}}"
|
|
|
+ :class="tab == 'labs' ? 'active' : ''" href="#"
|
|
|
+ v-on:click.prevent="tab='labs'">
|
|
|
Labs ({{$numLabs}})
|
|
|
</a>
|
|
|
</li>
|
|
|
<li class="nav-item">
|
|
|
- <a native class="nav-link {{$numImaging ? 'text-danger font-weight-bold' : ''}}"
|
|
|
- :class="tab == 'imaging' ? 'active' : ''" href="#" v-on:click.prevent="tab='imaging'">
|
|
|
+ <a native data-tab="imaging" class="nav-link {{$numImaging ? 'text-danger font-weight-bold' : ''}}"
|
|
|
+ :class="tab == 'imaging' ? 'active' : ''" href="#"
|
|
|
+ v-on:click.prevent="tab='imaging'">
|
|
|
Imaging ({{$numImaging}})
|
|
|
</a>
|
|
|
</li>
|
|
@@ -240,7 +252,7 @@
|
|
|
el: '#pro-dashboard-container',
|
|
|
delimiters: ['@{{', '}}'],
|
|
|
data: {
|
|
|
- tab: 'measurements', // appointments | measurements
|
|
|
+ tab: '{{ request()->input('tab') ? request()->input('tab') : 'measurements' }}',
|
|
|
selectedDate: '{{ date('Y-m-d') }}',
|
|
|
selectedStatus: 'CREATED',
|
|
|
events: [],
|
|
@@ -454,21 +466,27 @@
|
|
|
// init fast load
|
|
|
initFastLoad($('#pro-dashboard-container'));
|
|
|
|
|
|
- // ticket-popup
|
|
|
- $(document)
|
|
|
- .off('click', '.ticket-popup-trigger')
|
|
|
- .on('click', '.ticket-popup-trigger', function() {
|
|
|
- window.noMc = true;
|
|
|
- $.get(this.href, (_data) => {
|
|
|
- $('.ticket-popup').html(_data);
|
|
|
- showStagPopup('ticket-popup');
|
|
|
- $('.ticket-popup .stag-popup.stag-slide').attr('close-all-with-self', 1);
|
|
|
- runMCInitializer('patient-tickets'); // run specific mc initer
|
|
|
- });
|
|
|
- return false;
|
|
|
- });
|
|
|
}
|
|
|
});
|
|
|
+ // refresh once ticket popup is closed
|
|
|
+ $('body').off('stag-popup-closed')
|
|
|
+ $('body').on('stag-popup-closed', function() {
|
|
|
+ let activeTab = $('.nav-link.active[data-tab]').attr('data-tab');
|
|
|
+ fastLoad('/?tab=' + activeTab);
|
|
|
+ });
|
|
|
+ // ticket-popup
|
|
|
+ $(document)
|
|
|
+ .off('click', '.ticket-popup-trigger')
|
|
|
+ .on('click', '.ticket-popup-trigger', function() {
|
|
|
+ window.noMc = true;
|
|
|
+ $.get(this.href, (_data) => {
|
|
|
+ $('.ticket-popup').html(_data);
|
|
|
+ showStagPopup('ticket-popup');
|
|
|
+ $('.ticket-popup .stag-popup.stag-slide').attr('close-all-with-self', 1);
|
|
|
+ runMCInitializer('patient-tickets'); // run specific mc initer
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ });
|
|
|
}
|
|
|
addMCInitializer('pro-dashboard', init, '#pro-dashboard-container');
|
|
|
})();
|