This commit is contained in:
@@ -478,10 +478,15 @@ export default {
|
|||||||
hour12: window.$gz.locale.getHour12(),
|
hour12: window.$gz.locale.getHour12(),
|
||||||
formUserOptions: {},
|
formUserOptions: {},
|
||||||
tempFirstTime: null,
|
tempFirstTime: null,
|
||||||
lastMouseDownMS: null
|
lastMouseDownMS: null,
|
||||||
|
lastStart: null,
|
||||||
|
lastEnd: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async refresh() {
|
||||||
|
await this.fetchEvents({ start: null, end: null });
|
||||||
|
},
|
||||||
openObject: function(type, id) {
|
openObject: function(type, id) {
|
||||||
window.$gz.eventBus.$emit("openobject", {
|
window.$gz.eventBus.$emit("openobject", {
|
||||||
type: type,
|
type: type,
|
||||||
@@ -817,6 +822,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchEvents({ start, end }) {
|
async fetchEvents({ start, end }) {
|
||||||
|
if (start) {
|
||||||
|
this.lastStart = start;
|
||||||
|
this.lastEnd = end;
|
||||||
|
} else {
|
||||||
|
start = this.lastStart;
|
||||||
|
end = this.lastEnd;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||||
const res = await window.$gz.api.post("schedule/personal", {
|
const res = await window.$gz.api.post("schedule/personal", {
|
||||||
@@ -877,11 +889,7 @@ export default {
|
|||||||
async saveUserOptions() {
|
async saveUserOptions() {
|
||||||
this.settingsDialog = false;
|
this.settingsDialog = false;
|
||||||
await saveFormUserOptions(this);
|
await saveFormUserOptions(this);
|
||||||
//doesn't seem to be any reliable way to trigger refresh on the calendar itself
|
await this.refresh();
|
||||||
//and trying to load the events manually is not working out as the calendar reports a different
|
|
||||||
//start and end than it provides for the change event
|
|
||||||
//this is brutal but works
|
|
||||||
window.location.reload();
|
|
||||||
}
|
}
|
||||||
//eom
|
//eom
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -411,11 +411,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async refresh() {
|
async refresh() {
|
||||||
console.log("REFRESH");
|
|
||||||
await this.fetchEvents({ start: null, end: null });
|
await this.fetchEvents({ start: null, end: null });
|
||||||
//this.focus = null; //"";
|
|
||||||
// this.categories.splice(0);
|
|
||||||
// this.$refs.calendar.checkChange();
|
|
||||||
},
|
},
|
||||||
openObject: function(type, id) {
|
openObject: function(type, id) {
|
||||||
window.$gz.eventBus.$emit("openobject", {
|
window.$gz.eventBus.$emit("openobject", {
|
||||||
@@ -772,20 +768,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchEvents({ start, end }) {
|
async fetchEvents({ start, end }) {
|
||||||
console.log("fetchEvents ", { start: start, end: end });
|
|
||||||
if (start) {
|
if (start) {
|
||||||
console.log("Saving last dates");
|
|
||||||
this.lastStart = start;
|
this.lastStart = start;
|
||||||
this.lastEnd = end;
|
this.lastEnd = end;
|
||||||
} else {
|
} else {
|
||||||
console.log("rehydrating from last dates");
|
|
||||||
start = this.lastStart;
|
start = this.lastStart;
|
||||||
end = this.lastEnd;
|
end = this.lastEnd;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
|
||||||
{ items = r, users = Users }
|
|
||||||
*/
|
|
||||||
try {
|
try {
|
||||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||||
const res = await window.$gz.api.post("schedule/svc", {
|
const res = await window.$gz.api.post("schedule/svc", {
|
||||||
@@ -850,11 +839,7 @@ export default {
|
|||||||
async saveUserOptions() {
|
async saveUserOptions() {
|
||||||
this.settingsDialog = false;
|
this.settingsDialog = false;
|
||||||
await saveFormUserOptions(this);
|
await saveFormUserOptions(this);
|
||||||
//doesn't seem to be any reliable way to trigger refresh on the calendar itself
|
await this.refresh();
|
||||||
//and trying to load the events manually is not working out as the calendar reports a different
|
|
||||||
//start and end than it provides for the change event
|
|
||||||
//this is brutal but works
|
|
||||||
window.location.reload();
|
|
||||||
}
|
}
|
||||||
//eom
|
//eom
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user