exclude days added to home-schedule now to port to svc-schedule
This commit is contained in:
@@ -13,42 +13,29 @@
|
||||
|
||||
# Schedule form
|
||||
|
||||
SVC-SCHEDULE
|
||||
Needs backing route
|
||||
present techs desired and order to fetch
|
||||
show each in own category
|
||||
categories filled in from user setttings
|
||||
display as name but backed by id in case name changes
|
||||
category key in return data == user id / name
|
||||
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
|
||||
|
||||
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
|
||||
each row has up down control and checkbox to show so "Name|^|v|show"
|
||||
|
||||
Remove day view options and replace by category view I think, but keep code and see how it goes may be switch back in again if demanded or makes sense
|
||||
instead of new translation key, just use the day name but use it with the category view
|
||||
|
||||
need ability to drag to another tech in category view
|
||||
|
||||
3697 - arbitrarily order schedule by user instead of built in by lastname
|
||||
schedule settings keyed by form re-use
|
||||
3698 - hide unassigned tech slot (or case 3697 above would take care of that too)
|
||||
|
||||
Issues in svc-schedule
|
||||
day or category view once moreinfo then subsequent drags or extend causes moreinfo again, something isn't being cleared out on moreinfo I think
|
||||
click event and drag stepping on each other
|
||||
potential solution:
|
||||
dont' use event click at all, use enddrag extend which fires on mouse up of event
|
||||
this can check and then do moreinfo as it's already handling dragging
|
||||
see if it detects non vs drag and do accordingly?
|
||||
Start drag and end drag should handle it all
|
||||
TODO:
|
||||
Layer on the functionality, start with drag and move to extend, new and more info
|
||||
the fewer events used the easier can cleaner it will be
|
||||
on event mousedown capture time or mouse coords
|
||||
on event mouseup check if too little time or too short distance occured to be a drag and process as showmore else it's a drag
|
||||
On mouse up or down outside event then it's a new event
|
||||
Attempt is not saving anything, but does point to solution so modify prior code
|
||||
don't use event click, use the mouseup event instead
|
||||
dont' use the timer, port the isitaclick stuff instead
|
||||
Use dialog for moreinfo
|
||||
|
||||
|
||||
|
||||
|
||||
should there be a day view at all in svc sched?
|
||||
|
||||
|
||||
View schedule by user so can click through user to schedule for *that* user alone, (brings up home-schedule maybe or I guess a copy would be easiest)
|
||||
this will solve issue when people say "Why can't I view month but for one user instead?"
|
||||
probably easiest from both the User edit form for admin and from the svc-schedule form (maybe a link on their names at top?? Opens same view currently selected but for that *one* user)
|
||||
|
||||
|
||||
3766 - view schedule filtered by customer so can see at a glance all past and future for a single customer (more data table filter similarity)
|
||||
"show all " but on a schedule to view that way instead of a data table
|
||||
|
||||
@@ -911,6 +911,60 @@ export default {
|
||||
`gzutil->calendarViewtoAyaNovaEnum - Unknown view type '${view}'`
|
||||
);
|
||||
}
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// GZDaysOfWeek to VCalendar weekdays
|
||||
//
|
||||
//
|
||||
DaysOfWeekToWeekdays: function(dow) {
|
||||
/*
|
||||
AyaDaysOfWeek
|
||||
Monday = 1,
|
||||
Tuesday = 2,
|
||||
Wednesday = 4,
|
||||
Thursday = 8,
|
||||
Friday = 16,
|
||||
Saturday = 32,
|
||||
Sunday = 64
|
||||
|
||||
vCalendar [
|
||||
0,//sunday
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6//saturday
|
||||
]
|
||||
*/
|
||||
if (dow == null || dow == 0) {
|
||||
return [0, 1, 2, 3, 4, 5, 6]; //all the days
|
||||
}
|
||||
const ret = [];
|
||||
|
||||
//turn EXCLUDE selected gzDaysOfWeek into INCLUDE selected days for vCalendar
|
||||
if (!!!(dow & 64)) {
|
||||
ret.push(0);
|
||||
}
|
||||
if (!!!(dow & 1)) {
|
||||
ret.push(1);
|
||||
}
|
||||
if (!!!(dow & 2)) {
|
||||
ret.push(2);
|
||||
}
|
||||
if (!!!(dow & 4)) {
|
||||
ret.push(3);
|
||||
}
|
||||
if (!!!(dow & 8)) {
|
||||
ret.push(4);
|
||||
}
|
||||
if (!!!(dow & 16)) {
|
||||
ret.push(5);
|
||||
}
|
||||
if (!!!(dow & 32)) {
|
||||
ret.push(6);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
:locale="languageName"
|
||||
:event-more-text="$ay.t('More')"
|
||||
:first-time="formUserOptions.firstTime"
|
||||
:weekdays="weekdays"
|
||||
@click:more="viewDay"
|
||||
@click:date="viewDay"
|
||||
@change="fetchEvents"
|
||||
@@ -333,6 +334,7 @@
|
||||
</template>
|
||||
</v-sheet>
|
||||
<template>
|
||||
<!-- SETTINGS DIALOG -->
|
||||
<v-row justify="center">
|
||||
<v-dialog max-width="600px" v-model="settingsDialog">
|
||||
<v-card>
|
||||
@@ -345,6 +347,14 @@
|
||||
v-model="tempFirstTime"
|
||||
></gz-time-picker>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<GZDaysOfWeek
|
||||
:label="$ay.t('ExcludeDaysOfWeek')"
|
||||
v-model="formUserOptions.excludeDaysOfWeek"
|
||||
ref="daysofweek"
|
||||
></GZDaysOfWeek>
|
||||
</v-col>
|
||||
|
||||
<span class="text-h6 mt-3">{{
|
||||
$ay.t("ScheduleShowTypes")
|
||||
}}</span>
|
||||
@@ -411,7 +421,11 @@
|
||||
</template>
|
||||
<script>
|
||||
const FORM_KEY = "home-schedule";
|
||||
import GZDaysOfWeek from "../components/days-of-week-control.vue";
|
||||
export default {
|
||||
components: {
|
||||
GZDaysOfWeek
|
||||
},
|
||||
async created() {
|
||||
const vm = this;
|
||||
try {
|
||||
@@ -851,6 +865,13 @@ export default {
|
||||
window.location.reload();
|
||||
}
|
||||
//eom
|
||||
},
|
||||
computed: {
|
||||
weekdays() {
|
||||
return window.$gz.util.DaysOfWeekToWeekdays(
|
||||
this.formUserOptions.excludeDaysOfWeek
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1029,6 +1050,7 @@ async function getFormUserOptions(vm) {
|
||||
//make a default
|
||||
vm.formUserOptions = {
|
||||
firstTime: "00:00",
|
||||
excludeDaysOfWeek: 0,
|
||||
wisuColorSource: "2",
|
||||
wisu: true,
|
||||
reviews: true,
|
||||
@@ -1079,6 +1101,7 @@ async function saveFormUserOptions(vm) {
|
||||
async function fetchTranslatedText(vm) {
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"DateRangeToday",
|
||||
"ExcludeDaysOfWeek",
|
||||
"ScheduleMonth",
|
||||
"ScheduleDay",
|
||||
"ScheduleWeek",
|
||||
|
||||
Reference in New Issue
Block a user