This commit is contained in:
2021-09-15 00:21:52 +00:00
parent a976c59c4d
commit 84ae8e3cfc
3 changed files with 26 additions and 21 deletions

View File

@@ -74,6 +74,8 @@ 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
workorderitempriority edit form missing NEW option, also probably woitemstatus and maybe wostatus too
Dashboard / widgets
Installer INNO
version with postgres included, version without postgres included

View File

@@ -1,5 +1,6 @@
<template>
<div v-resize="onResize" class="my-n8">
<!-- {{ events }} -->
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<v-sheet height="64">
<v-toolbar flat>
@@ -65,8 +66,10 @@
@change="fetchEvents"
>
<template v-slot:event="{ event }">
<v-icon small color="blue">$ayiTools</v-icon>
{{ event.name }}
<v-icon small :color="getContrastYIQ(event.color)">$ayiTools</v-icon>
<span :class="getContrastYIQ(event.color) + '--text'">{{
event.name
}}</span>
</template>
</v-calendar>
@@ -234,6 +237,14 @@ export default {
this.$refs.calendar.checkChange();
},
methods: {
getContrastYIQ(hexcolor) {
hexcolor = hexcolor.replace("#", "");
var r = parseInt(hexcolor.substr(0, 2), 16);
var g = parseInt(hexcolor.substr(2, 2), 16);
var b = parseInt(hexcolor.substr(4, 2), 16);
var yiq = (r * 299 + g * 587 + b * 114) / 1000;
return yiq >= 128 ? "black" : "white";
},
onResize() {
this.calendarHeight = window.innerHeight * 0.84;
},
@@ -300,7 +311,7 @@ export default {
`${end.date}T23:59:59`,
this.timeZoneName
),
colorSource: 2,
colorSource: 4,
workOrders: true,
reviews: true,
reminders: true
@@ -310,24 +321,7 @@ export default {
this.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(this);
} else {
// this.events = res.data.map(i => {
// const o = { ...i };
// if (o.start) {
// o.start = new Date(o.start).getTime() / 1000;
// }
// if (o.end) {
// o.end = new Date(o.end).getTime() / 1000;
// }
// return o;
// });
this.events = res.data;
console.log("events", this.events);
//1630040400
//1630015200
//1631660554
//1630040400000
//Message:2021-08-26T22:00:00Z is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored
}
} catch (error) {
window.$gz.errorHandler.handleFormError(error, this);
@@ -357,6 +351,15 @@ export default {
//}
//this.events = events;
/*<style scoped>
.ay-auto-contrast {
color: black;
mix-blend-mode: hard-light;
}
</style>
[ { "start": 1628046000, "end": 1628049600, "name": "3 Runte - Harris", "color": "#c0c000", "type": 41, "id": 26 }, { "start": 1628046000, "end": 1628053200, "name": "3 Runte - Harris", "color": "#c0c000", "type": 41, "id": 27 }, { "start": 1628046000, "end": 1628049600, "name": "3 Runte - Harris", "color": "#c0c000", "type": 41, "id": 24 }, { "start": 1628046000, "end": 1628049600, "name": "3 Runte - Harris", "color": "#c0c000", "type": 41, "id": 23 }, { "start": 1628046000, "end": 1628049600, "name": "3 Runte - Harris", "color": "#c0c000", "type": 41, "id": 22 }, { "start": 1628046000, "end": 1628049600, "name": "3 Runte - Harris", "color": "#c0c000", "type": 41, "id": 21 }, { "start": 1630040400, "end": 1630044000, "name": "7 Conroy Group", "color": "#ff00ff", "type": 41, "id": 46 }, { "start": 1630040400, "end": 1630044000, "name": "7 Conroy Group", "color": "#ff00ff", "type": 41, "id": 45 } ]
*/
},
rnd(a, b) {
return Math.floor((b - a + 1) * Math.random()) + a;

View File

@@ -59,7 +59,7 @@ async function clickHandler(menuItem) {
switch (m.key) {
case "new":
m.vm.$router.push({
name: "svc-work-order-item-priority-edit",
name: "svc-work-order-item-priorities-edit",
params: { recordid: 0 }
});
break;