fetch speed up implemented fully
This commit is contained in:
@@ -838,19 +838,36 @@ export default {
|
||||
this.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(this);
|
||||
} else {
|
||||
this.events = res.data.map(x => {
|
||||
return {
|
||||
...x,
|
||||
start: window.$gz.locale.utcDateToScheduleCompatibleFormatLocalized(
|
||||
x.start,
|
||||
this.timeZoneName
|
||||
),
|
||||
end: window.$gz.locale.utcDateToScheduleCompatibleFormatLocalized(
|
||||
x.end,
|
||||
this.timeZoneName
|
||||
)
|
||||
};
|
||||
});
|
||||
this.events.splice(0);
|
||||
const timeZoneName = this.timeZoneName;
|
||||
let i = res.data.length;
|
||||
while (i--) {
|
||||
const x = res.data[i];
|
||||
this.events.push({
|
||||
start: new Date(
|
||||
new Date(x.start)
|
||||
.toLocaleString("sv-SE", {
|
||||
timeZone: timeZoneName
|
||||
})
|
||||
.replace(" ", "T")
|
||||
).getTime(),
|
||||
end: new Date(
|
||||
new Date(x.end)
|
||||
.toLocaleString("sv-SE", {
|
||||
timeZone: timeZoneName
|
||||
})
|
||||
.replace(" ", "T")
|
||||
).getTime(),
|
||||
timed: true,
|
||||
name: x.name,
|
||||
color: x.color,
|
||||
textColor: x.textColor,
|
||||
type: x.type,
|
||||
id: x.id,
|
||||
editable: x.editable,
|
||||
userId: x.userId
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
window.$gz.errorHandler.handleFormError(error, this);
|
||||
|
||||
Reference in New Issue
Block a user