2022-09-22 07:10:08 -04:00
|
|
|
<template>
|
|
|
|
<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>
|
|
|
|
<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">
|
2022-09-24 00:42:06 -04:00
|
|
|
<ViewSchedule :client="client" :selection="selection" :date_begin="date" :date_end="new Date(date_end.getTime() - 1)" />
|
2022-09-22 07:10:08 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ViewResourceLookup from './ViewResourceLookup.vue';
|
|
|
|
import DateRangePicker from './DateRangePicker.vue';
|
|
|
|
import ViewSchedule from './ViewSchedule.vue';
|
|
|
|
|
|
|
|
function dateonly(date) {
|
|
|
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
ViewResourceLookup, DateRangePicker, ViewSchedule
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
client: Object
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
date: dateonly(new Date()),
|
|
|
|
date_end: dateonly(new Date())
|
|
|
|
};
|
|
|
|
},
|
2022-09-28 01:28:11 -04:00
|
|
|
computed: {
|
|
|
|
selection: {
|
2022-10-01 07:05:12 -04:00
|
|
|
get() { return this.client.remotestate.resources ? (this.client.remotestate.resources.split(',').filter(x => x) || []) : [] },
|
|
|
|
set(value) { this.client.remotestate.resources = value.join(','); }
|
2022-09-22 07:10:08 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|