@syncfusion/ej2-schedule 25.2.4 → 25.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16374,7 +16374,7 @@ class ResourceBase {
16374
16374
  // eslint-disable-next-line prefer-spread
16375
16375
  const resourceDates = [].concat.apply([], this.lastResourceLevel.map((e) => e.renderDates));
16376
16376
  const time = resourceDates.map((dateObj) => dateObj.getTime());
16377
- const removeDuplicateDates = (dateColl) => dateColl.filter((date, index, dates) => time.indexOf(date.getTime()) === index);
16377
+ const removeDuplicateDates = (dateColl) => dateColl.filter((date, index) => time.indexOf(date.getTime()) === index);
16378
16378
  const renderDates = removeDuplicateDates(resourceDates);
16379
16379
  renderDates.sort((a, b) => a.getTime() - b.getTime());
16380
16380
  return renderDates;
@@ -22585,10 +22585,27 @@ class ViewBase {
22585
22585
  // Method to refresh the date header
22586
22586
  }
22587
22587
  refreshResourceHeader() {
22588
- remove(this.element.querySelector('tbody').lastElementChild.firstElementChild);
22589
- const resTd = createElement('td');
22590
- resTd.appendChild(this.parent.resourceBase.createResourceColumn());
22591
- prepend([resTd], this.element.querySelector('tbody').lastElementChild);
22588
+ const resTbl = this.element.querySelector('.' + RESOURCE_COLUMN_TABLE_CLASS);
22589
+ const resourceTd = Array.from(resTbl.querySelectorAll('.' + RESOURCE_CELLS_CLASS));
22590
+ resourceTd.forEach((currentElement) => {
22591
+ const children = Array.from(currentElement.children);
22592
+ children.forEach((child) => {
22593
+ if (!child.classList.contains(RESOURCE_EXPAND_CLASS) && !child.classList.contains(RESOURCE_COLLAPSE_CLASS)) {
22594
+ remove(child);
22595
+ }
22596
+ });
22597
+ });
22598
+ if (!isNullOrUndefined(this.parent.resourceBase.renderedResources) && this.parent.resourceBase.renderedResources.length > 0) {
22599
+ for (let i = 0; i < resourceTd.length; i++) {
22600
+ const element = resourceTd[parseInt(i.toString(), 10)];
22601
+ const data = this.parent.resourceBase.renderedResources[parseInt(i.toString(), 10)];
22602
+ if (this.parent.activeView && !isNullOrUndefined(element) && !isNullOrUndefined(data)
22603
+ && parseInt(element.getAttribute('data-group-index'), 10) === data.groupIndex) {
22604
+ this.parent.activeView.setResourceHeaderContent(element, data, RESOURCE_TEXT_CLASS);
22605
+ }
22606
+ }
22607
+ }
22608
+ this.parent.renderTemplates();
22592
22609
  this.parent.notify(contentReady, {});
22593
22610
  }
22594
22611
  getDayName(date) {
@@ -24250,9 +24267,13 @@ class Month extends ViewBase {
24250
24267
  this.renderHeader();
24251
24268
  this.parent.notify(contentReady, {});
24252
24269
  const dateHeader = this.element.querySelector('.' + DATE_HEADER_WRAP_CLASS);
24270
+ const contentWrapper = this.element.querySelector('.' + CONTENT_WRAP_CLASS);
24253
24271
  if (dateHeader) {
24254
24272
  dateHeader.scrollLeft = this.parent.uiStateValues.left;
24255
24273
  }
24274
+ if (contentWrapper) {
24275
+ contentWrapper.scrollLeft = this.parent.uiStateValues.left;
24276
+ }
24256
24277
  }
24257
24278
  wireCellEvents(element) {
24258
24279
  EventHandler.add(element, 'mousedown', this.parent.workCellAction.cellMouseDown, this.parent.workCellAction);