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