This commit is contained in:
2021-10-02 00:33:13 +00:00
parent 8226f4f253
commit d97f7b45f4
3 changed files with 36 additions and 23 deletions

View File

@@ -24,6 +24,13 @@
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 view extend triggers more info, probably need to distinguish events because two are firing likely
like the drag issue
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
Customer work order form / view / open???
@@ -261,6 +268,13 @@ todo:1.5 Joyce case 3931 test restore of 4alarm data
make sure it works one way or another
confirm it's really backing up everything
todo: 2 make priority / woitem / wostatus colors distinct from each other
whitecaps color scheme shale/pastel etc
Note: wostatus will be the default color source so concentrate on making that look nice and clean
change from strong primary colors to more faded pastel colors
maybe priority in primary and status of both kinds more muted but also in different ranges so no clash
i.e. no two the same color or even close between each so in theory you can see at a glance which is which
todo: 2 make sample data appointments suitable for evaluation of calendar
spread throughout the day
right now a bunch are extremely close if not on the same time window for same wo

View File

@@ -1040,7 +1040,7 @@ async function getFormUserOptions(vm) {
//make a default
vm.formUserOptions = {
firstTime: "00:00",
wisuColorSource: 4,
wisuColorSource: "2",
wisu: true,
reviews: true,
reminders: true

View File

@@ -353,28 +353,8 @@
v-model="tempFirstTime"
></gz-time-picker>
</v-col>
<span class="text-h6 mt-3">{{
$ay.t("ScheduleShowTypes")
}}</span>
<v-col cols="12">
<v-checkbox
v-model="formUserOptions.reminders"
:label="$ay.t('ReminderList')"
></v-checkbox>
</v-col>
<v-col cols="12">
<v-checkbox
v-model="formUserOptions.reviews"
:label="$ay.t('ReviewList')"
></v-checkbox>
</v-col>
<v-col cols="12">
<v-checkbox
v-model="formUserOptions.wisu"
:label="$ay.t('WorkOrderList')"
></v-checkbox>
<v-radio-group
v-model="formUserOptions.wisuColorSource"
:mandatory="true"
@@ -546,22 +526,33 @@ export default {
this.extendOriginal = event.end;
}
},
async endDragExtend() {
async endDragExtend(e) {
//Vuetify bug in calendar apparently where it fires for both day and day-category views
//since I set them to both call into this same method I need to ignore the incorrect one
if (!e.category && this.viewType == "category") {
return;
}
//On drag then dragged is set to true and dragEvent and dragTime are set
//on extend then dragged is set to true extendEvent (actual event), extendOriginal and createStart are set, dragEvent is null
//on create then dragged is set to false and createStart is only value set, dragEvent is null and extendEvent is null
//Handle the event, could be one of three things: changing an event start time, changing an event length or creating a new event
if (this.extendEvent && this.extendEvent.type == 0) {
// console.log(
// "endDragExtend::extendEvent",
// JSON.stringify(this.extendEvent)
// );
//NEW, prompt for deets and create or if cancelled then just remove this faux event from events list (it will be the last one in the array)
this.newItemDialog = true;
} else {
//console.log("dragged:", this.dragged);
if (!this.dragged) {
//we're here due to mouse up but it's not a drag or an extend so it's a More Info mouse up click so bail out now
this.dragEvent = null; //this needs to be set or it will keep dragging off an editable event even as the moreinfo dialog show
return;
}
//MODIFY existing event, drag or extend
//console.log("endDragExtend::dragEvent", JSON.stringify(this.dragEvent));
if (this.dragEvent || this.extendEvent) {
const param = { type: null, id: null, start: null, end: null };
@@ -689,18 +680,26 @@ export default {
this.dragEvent.end = this.dragEvent.end + moveDelta;
},
startTime(tms) {
//due to vuetify calendar bug day and day-category both fire to this event handler in day-category view so need to reject incorrect one here
if (!tms.category && this.viewType == "category") {
return;
}
//console.log("startTime, tms:", JSON.stringify(tms));
//This is called on the start of dragging an existing schedule item or drag extending a NEW schedule item
const mouse = this.toTime(tms);
if (this.dragEvent && this.dragTime === null) {
//console.log("startTime drag path");
//# DAY VIEW *DRAG* EXISTING START EVENT (not extend)
//(also called on simple click to view schedule more info)
if (this.dragEvent.editable) {
const start = this.dragEvent.start;
this.dragTime = mouse - start;
} else {
// console.log("startTime NOT EDITABLE!");
}
} else {
//# DAY VIEW CREATE START EVENT
// console.log("startTime create start path");
this.createStart = this.roundTime(mouse);
this.extendEvent = {
name: "-",
@@ -1078,7 +1077,7 @@ async function getFormUserOptions(vm) {
//make a default
vm.formUserOptions = {
firstTime: "00:00",
wisuColorSource: 4,
wisuColorSource: "2",
wisu: true,
users: [...vm.availableUsers.map(x => x.id)] //default to all users
};