Settings page for clinic selection
This commit is contained in:
@@ -1,27 +1,19 @@
|
||||
<template>
|
||||
<Subtitle value="Schedule" />
|
||||
<div>
|
||||
<div class="card mb-3 shadow">
|
||||
<div class="card-header">Clinics</div>
|
||||
<div class="card-body">
|
||||
<ViewResourceLookup :client="client" v-model:selection="selection" />
|
||||
</div>
|
||||
<div class="card mb-3 shadow">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<span>Schedule</span>
|
||||
<router-link to="/settings">Select clinics<template v-if="selection.length > 0"> ({{selection.length}})</template></router-link>
|
||||
<DateRangePicker range="1D" direction="+1" v-model:date="date" v-model:date_end="date_end" />
|
||||
</div>
|
||||
<div class="card mb-3 shadow">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<span>Schedule</span>
|
||||
<DateRangePicker range="1D" direction="+1" v-model:date="date" v-model:date_end="date_end" />
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ViewSchedule :client="client" :selection="selection" :date_begin="date" :date_end="new Date(date_end.getTime() - 1)" />
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ViewSchedule :client="client" :selection="selection" :date_begin="date" :date_end="new Date(date_end.getTime() - 1)" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Subtitle from './Subtitle.vue';
|
||||
import ViewResourceLookup from './ViewResourceLookup.vue';
|
||||
import DateRangePicker from './DateRangePicker.vue';
|
||||
import ViewSchedule from './ViewSchedule.vue';
|
||||
|
||||
@@ -31,7 +23,7 @@
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Subtitle, ViewResourceLookup, DateRangePicker, ViewSchedule
|
||||
Subtitle, DateRangePicker, ViewSchedule
|
||||
},
|
||||
props: {
|
||||
client: Object
|
||||
@@ -43,10 +35,7 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
selection: {
|
||||
get() { return this.client.remotestate.resources ? (this.client.remotestate.resources.split(',').filter(x => x) || []) : [] },
|
||||
set(value) { this.client.remotestate.resources = value.join(','); }
|
||||
}
|
||||
selection() { return (this.client) && (this.client.remotestate.resources) ? (this.client.remotestate.resources.split(',').filter(x => x) || []) : [] }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user