This commit is contained in:
Yuri Kuznetsov
2025-06-29 11:39:12 +03:00
parent 8a177d5ac8
commit d0321be776
3 changed files with 50 additions and 3 deletions
@@ -144,6 +144,31 @@ class CalendarView extends View {
},
}
/**
* @param {{
* userId?: string,
* userName?: string|null,
* mode?: string|null,
* date?: string|null,
* scrollToNowSlots?: boolean,
* $container?: JQuery,
* suppressLoadingAlert?: boolean,
* slotDuration?: number,
* scrollHour?: number,
* teamIdList?: string[],
* containerSelector?: string,
* height?: number,
* enabledScopeList?: string[],
* header?: boolean,
* }} options
*/
constructor(options) {
super(options);
this.options = options;
}
data() {
return {
mode: this.mode,
@@ -123,6 +123,27 @@ class TimelineView extends View {
},
}
/**
* @param {{
* userId?: string,
* userName?: string|null,
* mode?: string|null,
* date?: string|null,
* $container?: JQuery,
* suppressLoadingAlert?: boolean,
* containerSelector?: string,
* enabledScopeList?: string[],
* calendarType?: string,
* userList?: string[],
* header?: boolean,
* }} options
*/
constructor(options) {
super(options);
this.options = options;
}
data() {
const calendarTypeDataList = this.getCalendarTypeDataList();
@@ -550,13 +571,14 @@ class TimelineView extends View {
onTag: (tag, html) => html,
},
},
moment: date => {
moment: /** Record */date => {
const m = moment(date);
if (date && date.noTimeZone) {
return m;
}
// noinspection JSUnresolvedReference
return m.tz(this.getDateTime().getTimeZone());
},
format: this.getFormatObject(),
@@ -903,7 +925,7 @@ class TimelineView extends View {
}
fetchEvents(from, to, callback) {
if (!this.options.noFetchLoadingMessage) {
if (!this.options.suppressLoadingAlert) {
Espo.Ui.notifyWait();
}
@@ -59,7 +59,7 @@ class CalendarDashletView extends BaseDashletView {
calendarType: 'shared',
userList: userList,
enabledScopeList: this.getOption('enabledScopeList'),
noFetchLoadingMessage: true,
suppressLoadingAlert: true,
}, view => {
view.render();
});