|
@@ -741,6 +741,7 @@ GROUP BY erx_category");
|
|
|
};
|
|
|
$.post('/api/erx/create', payload, _data => {
|
|
|
if(!hasResponseError(_data)) {
|
|
|
+ localStorage.autoOpenNewestPrescription = 1;
|
|
|
fastReload();
|
|
|
}
|
|
|
}, 'json');
|
|
@@ -1565,11 +1566,14 @@ GROUP BY erx_category");
|
|
|
|
|
|
// auto select latest prescription (if no current is set)
|
|
|
Vue.nextTick(() => {
|
|
|
- if(!this.currentPrescription) {
|
|
|
- for(let x in this.prescriptions) {
|
|
|
- this.currentPrescription = this.prescriptions[x];
|
|
|
- break;
|
|
|
+ if(+localStorage.autoOpenNewestPrescription) {
|
|
|
+ if(!this.currentPrescription) {
|
|
|
+ for(let x in this.prescriptions) {
|
|
|
+ this.currentPrescription = this.prescriptions[x];
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
+ localStorage.autoOpenNewestPrescription = 0;
|
|
|
}
|
|
|
});
|
|
|
|