This commit is contained in:
2021-09-16 19:39:14 +00:00
parent 5b1e115d46
commit 04c83e19f4
2 changed files with 97 additions and 22 deletions

View File

@@ -390,7 +390,30 @@ export default {
this.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(this);
} else {
this.events = res.data;
console.log("fetch raw data:", JSON.stringify(res.data));
this.events = res.data.map(x => {
return {
...x,
start: window.$gz.locale.utcDateToScheduleCompatibleFormatLocalized(
x.start,
this.timeZoneName,
this.languageName,
this.hour12
),
end: window.$gz.locale.utcDateToScheduleCompatibleFormatLocalized(
x.end,
this.timeZoneName,
this.languageName,
this.hour12
)
};
});
console.log(
"fetch events data after processing:",
JSON.stringify(this.events)
);
}
} catch (error) {
window.$gz.errorHandler.handleFormError(error, this);