This commit is contained in:
2021-09-15 15:18:33 +00:00
parent e9b2b15814
commit 736cdddad2

View File

@@ -31,21 +31,21 @@
<v-menu bottom right> <v-menu bottom right>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn outlined color="grey darken-2" v-bind="attrs" v-on="on"> <v-btn outlined color="grey darken-2" v-bind="attrs" v-on="on">
<span>{{ typeToLabel[type] }}</span> <span>{{ typeToLabel[viewType] }}</span>
<v-icon right>$sort</v-icon> <v-icon right>$sort</v-icon>
</v-btn> </v-btn>
</template> </template>
<v-list> <v-list>
<v-list-item @click="type = 'day'"> <v-list-item @click="viewType = 'day'">
<v-list-item-title>Day</v-list-item-title> <v-list-item-title>Day</v-list-item-title>
</v-list-item> </v-list-item>
<v-list-item @click="type = 'week'"> <v-list-item @click="viewType = 'week'">
<v-list-item-title>Week</v-list-item-title> <v-list-item-title>Week</v-list-item-title>
</v-list-item> </v-list-item>
<v-list-item @click="type = 'month'"> <v-list-item @click="viewType = 'month'">
<v-list-item-title>Month</v-list-item-title> <v-list-item-title>Month</v-list-item-title>
</v-list-item> </v-list-item>
<v-list-item @click="type = '4day'"> <v-list-item @click="viewType = '4day'">
<v-list-item-title>4 days</v-list-item-title> <v-list-item-title>4 days</v-list-item-title>
</v-list-item> </v-list-item>
</v-list> </v-list>
@@ -59,7 +59,7 @@
color="primary" color="primary"
:events="events" :events="events"
:event-color="getEventColor" :event-color="getEventColor"
:type="type" :type="viewType"
@click:event="showEvent" @click:event="showEvent"
@click:more="viewDay" @click:more="viewDay"
@click:date="viewDay" @click:date="viewDay"
@@ -188,7 +188,7 @@ export default {
return { return {
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
focus: "", focus: "",
type: "month", viewType: "month",
typeToLabel: { typeToLabel: {
month: "Month", month: "Month",
week: "Week", week: "Week",
@@ -255,7 +255,7 @@ export default {
}, },
viewDay({ date }) { viewDay({ date }) {
this.focus = date; this.focus = date;
this.type = "day"; this.viewType = "day";
}, },
getEventColor(event) { getEventColor(event) {
return event.color; return event.color;
@@ -291,10 +291,10 @@ export default {
//NOTE: Need to add six days at least on either side due to calendar potentially showing up to six days of end and start of adjacent months //NOTE: Need to add six days at least on either side due to calendar potentially showing up to six days of end and start of adjacent months
//maybe easier if server does it and this just sticks to the //maybe easier if server does it and this just sticks to the
console.log( // console.log(
"UPDATE RANGE:", // "UPDATE RANGE:",
JSON.stringify({ start: start.date, end: end.date }) // JSON.stringify({ start: start.date, end: end.date })
); // );
/* /*
public enum PersonalScheduleWorkOrderColorSource : int public enum PersonalScheduleWorkOrderColorSource : int
{ {
@@ -303,7 +303,26 @@ export default {
WorkOrderItemStatus = 3, WorkOrderItemStatus = 3,
WorkOrderItemPriority = 4 WorkOrderItemPriority = 4
} }
public enum ScheduleView : int
{
Day = 1,
Week = 2,
Month = 3,
Day4 = 4
}
*/ */
let v = 3; //month - default
switch (this.viewType) {
case "day":
v = 1;
break;
case "week":
v = 2;
break;
case "4day":
v = 4;
break;
}
try { try {
window.$gz.form.deleteAllErrorBoxErrors(this); window.$gz.form.deleteAllErrorBoxErrors(this);