This commit is contained in:
@@ -15,9 +15,10 @@
|
||||
|
||||
SVC-SCHEDULE OUTSTANDING ITEMS
|
||||
|
||||
Forgot to add hide days option in settings and support in view
|
||||
need for home schedule AND svc schedule, do this one first before anything else
|
||||
|
||||
loaded schedule is slow to display, see if any speedups available
|
||||
check the fetch events and put in some traces to calculate when and where
|
||||
|
||||
During settings form, fetchEvents should be disabled until after save as changing DOW is triggering fetch which can be slow in a loaded sched
|
||||
need tech selection setting control
|
||||
vertical in table in settings
|
||||
show all techs in table with prior selections in order at the top and non selected at the end in alpha order
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
</template>
|
||||
</v-sheet>
|
||||
<template>
|
||||
<!-- SETTINGS DIALOG -->
|
||||
<!-- ############## SETTINGS DIALOG #################-->
|
||||
<v-row justify="center">
|
||||
<v-dialog max-width="600px" v-model="settingsDialog">
|
||||
<v-card>
|
||||
@@ -347,6 +347,7 @@
|
||||
v-model="tempFirstTime"
|
||||
></gz-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12">
|
||||
<GZDaysOfWeek
|
||||
:label="$ay.t('ExcludeDaysOfWeek')"
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
:locale="languageName"
|
||||
:event-more-text="$ay.t('More')"
|
||||
:first-time="formUserOptions.firstTime"
|
||||
:weekdays="weekdays"
|
||||
@click:more="viewDay"
|
||||
@click:date="viewDay"
|
||||
@change="fetchEvents"
|
||||
@@ -349,6 +350,7 @@
|
||||
</template>
|
||||
</v-sheet>
|
||||
<template>
|
||||
<!-- ############## SETTINGS DIALOG #################-->
|
||||
<v-row justify="center">
|
||||
<v-dialog max-width="600px" v-model="settingsDialog">
|
||||
<v-card>
|
||||
@@ -362,6 +364,14 @@
|
||||
></gz-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12">
|
||||
<GZDaysOfWeek
|
||||
:label="$ay.t('ExcludeDaysOfWeek')"
|
||||
v-model="formUserOptions.excludeDaysOfWeek"
|
||||
ref="daysofweek"
|
||||
></GZDaysOfWeek>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12">
|
||||
<v-radio-group
|
||||
v-model="formUserOptions.wisuColorSource"
|
||||
@@ -407,7 +417,11 @@
|
||||
</template>
|
||||
<script>
|
||||
const FORM_KEY = "svc-schedule";
|
||||
import GZDaysOfWeek from "../components/days-of-week-control.vue";
|
||||
export default {
|
||||
components: {
|
||||
GZDaysOfWeek
|
||||
},
|
||||
async created() {
|
||||
const vm = this;
|
||||
try {
|
||||
@@ -809,7 +823,9 @@ export default {
|
||||
},
|
||||
async fetchEvents({ start, end }) {
|
||||
try {
|
||||
console.time("fetchEvents");
|
||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||
console.timeLog("fetchEvents");
|
||||
const res = await window.$gz.api.post("schedule/svc", {
|
||||
view: window.$gz.util.calendarViewToAyaNovaEnum(this.viewType),
|
||||
dark: this.$store.state.darkMode,
|
||||
@@ -827,6 +843,7 @@ export default {
|
||||
reminders: this.formUserOptions.reminders,
|
||||
users: this.formUserOptions.users
|
||||
});
|
||||
console.timeLog("fetchEvents");
|
||||
if (res.error) {
|
||||
this.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(this);
|
||||
@@ -846,9 +863,12 @@ export default {
|
||||
category: vm.availableUsers.find(a => a.id == x.userId).name
|
||||
};
|
||||
});
|
||||
console.timeLog("fetchEvents");
|
||||
}
|
||||
} catch (error) {
|
||||
window.$gz.errorHandler.handleFormError(error, this);
|
||||
} finally {
|
||||
console.timeEnd("fetchEvents");
|
||||
}
|
||||
},
|
||||
async saveUserOptions() {
|
||||
@@ -861,6 +881,13 @@ export default {
|
||||
window.location.reload();
|
||||
}
|
||||
//eom
|
||||
},
|
||||
computed: {
|
||||
weekdays() {
|
||||
return window.$gz.util.DaysOfWeekToWeekdays(
|
||||
this.formUserOptions.excludeDaysOfWeek
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1044,7 +1071,6 @@ function saveFormSettings(vm) {
|
||||
////////////////////
|
||||
//
|
||||
async function getFormUserOptions(vm) {
|
||||
//TODO: present and save SCHED USER LIST TO SELECT FROM AND ORDER
|
||||
const res = await window.$gz.api.get(`form-user-options/${FORM_KEY}`);
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
@@ -1054,6 +1080,7 @@ async function getFormUserOptions(vm) {
|
||||
//make a default
|
||||
vm.formUserOptions = {
|
||||
firstTime: "00:00",
|
||||
excludeDaysOfWeek: 0,
|
||||
wisuColorSource: "2",
|
||||
wisu: true,
|
||||
users: [...vm.availableUsers.map(x => x.id)] //default to all users
|
||||
@@ -1106,6 +1133,7 @@ async function saveFormUserOptions(vm) {
|
||||
async function fetchTranslatedText() {
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"DateRangeToday",
|
||||
"ExcludeDaysOfWeek",
|
||||
"ScheduleMonth",
|
||||
"ScheduleDay",
|
||||
"ScheduleWeek",
|
||||
|
||||
Reference in New Issue
Block a user