This commit is contained in:
@@ -71,6 +71,9 @@ TO BE DETERMINED:
|
|||||||
|
|
||||||
|
|
||||||
//..........
|
//..........
|
||||||
|
Data Table filter, now impossible to remove a filter because save is blanked out, maybe needs a clear button that does it all? Delete should trigger save too I guess
|
||||||
|
so maybe save should expose on change, not on presence of filter
|
||||||
|
|
||||||
Dashboard / widgets
|
Dashboard / widgets
|
||||||
Installer INNO
|
Installer INNO
|
||||||
version with postgres included, version without postgres included
|
version with postgres included, version without postgres included
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-resize="onResize" class="my-n8">
|
<div v-resize="onResize" class="my-n8">
|
||||||
|
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||||
<v-sheet height="64">
|
<v-sheet height="64">
|
||||||
<v-toolbar flat>
|
<v-toolbar flat>
|
||||||
<v-btn outlined class="mr-4" color="grey darken-2" @click="setToday">
|
<v-btn outlined class="mr-4" color="grey darken-2" @click="setToday">
|
||||||
@@ -222,7 +223,9 @@ export default {
|
|||||||
},
|
},
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
calendarHeight: 600,
|
calendarHeight: 600,
|
||||||
settingsDialog: false
|
settingsDialog: false,
|
||||||
|
//cache display format stuff
|
||||||
|
timeZoneName: window.$gz.locale.getResolvedTimeZoneName()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -266,37 +269,75 @@ export default {
|
|||||||
|
|
||||||
nativeEvent.stopPropagation();
|
nativeEvent.stopPropagation();
|
||||||
},
|
},
|
||||||
fetchEvents({ start, end }) {
|
async fetchEvents({ start, end }) {
|
||||||
//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
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"UPDATE RANGE:",
|
"UPDATE RANGE:",
|
||||||
JSON.stringify({ start: start.date, end: end.date })
|
JSON.stringify({ start: start.date, end: end.date })
|
||||||
);
|
);
|
||||||
const events = [];
|
/*
|
||||||
|
public enum PersonalScheduleWorkOrderColorSource : int
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
WorkOrderStatus = 2,
|
||||||
|
WorkOrderItemStatus = 3,
|
||||||
|
WorkOrderItemPriority = 4
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||||
|
|
||||||
const min = new Date(`${start.date}T00:00:00`);
|
let res = await window.$gz.api.post("schedule/personal", {
|
||||||
const max = new Date(`${end.date}T23:59:59`);
|
start: window.$gz.locale.localTimeDateStringToUTC8601String(
|
||||||
const days = (max.getTime() - min.getTime()) / 86400000;
|
`${start.date}T00:00:00`,
|
||||||
const eventCount = this.rnd(days, days + 20);
|
this.timeZoneName
|
||||||
|
),
|
||||||
for (let i = 0; i < eventCount; i++) {
|
end: window.$gz.locale.localTimeDateStringToUTC8601String(
|
||||||
const allDay = this.rnd(0, 3) === 0;
|
`${end.date}T23:59:59`,
|
||||||
const firstTimestamp = this.rnd(min.getTime(), max.getTime());
|
this.timeZoneName
|
||||||
const first = new Date(firstTimestamp - (firstTimestamp % 900000));
|
),
|
||||||
const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000;
|
colorSource: 2,
|
||||||
const second = new Date(first.getTime() + secondTimestamp);
|
workOrders: true,
|
||||||
|
reviews: true,
|
||||||
events.push({
|
reminders: true
|
||||||
name: this.names[this.rnd(0, this.names.length - 1)],
|
|
||||||
start: first,
|
|
||||||
end: second,
|
|
||||||
color: this.colors[this.rnd(0, this.colors.length - 1)],
|
|
||||||
timed: !allDay
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (res.error) {
|
||||||
|
this.formState.serverError = res.error;
|
||||||
|
window.$gz.form.setErrorBoxErrors(this);
|
||||||
|
} else {
|
||||||
|
this.events = res.data;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
window.$gz.errorHandler.handleFormError(error, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.events = events;
|
// const events = [];
|
||||||
|
|
||||||
|
// const min = new Date(`${start.date}T00:00:00`);
|
||||||
|
// const max = new Date(`${end.date}T23:59:59`);
|
||||||
|
// const days = (max.getTime() - min.getTime()) / 86400000;
|
||||||
|
// const eventCount = this.rnd(days, days + 20);
|
||||||
|
|
||||||
|
// for (let i = 0; i < eventCount; i++) {
|
||||||
|
// const allDay = this.rnd(0, 3) === 0;
|
||||||
|
// const firstTimestamp = this.rnd(min.getTime(), max.getTime());
|
||||||
|
// const first = new Date(firstTimestamp - (firstTimestamp % 900000));
|
||||||
|
// const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000;
|
||||||
|
// const second = new Date(first.getTime() + secondTimestamp);
|
||||||
|
|
||||||
|
// events.push({
|
||||||
|
// name: this.names[this.rnd(0, this.names.length - 1)],
|
||||||
|
// start: first,
|
||||||
|
// end: second,
|
||||||
|
// color: this.colors[this.rnd(0, this.colors.length - 1)],
|
||||||
|
// timed: !allDay
|
||||||
|
// });
|
||||||
|
//}
|
||||||
|
|
||||||
|
//this.events = events;
|
||||||
},
|
},
|
||||||
rnd(a, b) {
|
rnd(a, b) {
|
||||||
return Math.floor((b - a + 1) * Math.random()) + a;
|
return Math.floor((b - a + 1) * Math.random()) + a;
|
||||||
|
|||||||
Reference in New Issue
Block a user