check NWDs on Gantt chart

pull/11934/head
bsatarnejad 2 years ago
parent 2e760c3918
commit 1c3f5f4807
  1. 6
      frontend/src/app/features/work-packages/components/wp-table/timeline/cells/timeline-cell-renderer.ts
  2. 3
      frontend/src/app/features/work-packages/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts

@ -324,7 +324,7 @@ export class TimelineCellRenderer {
break;
}
// Extend the duration if the currentDate is non-working
if (this.weekdayService.isNonWorkingDay(currentDate.toDate()) || this.dayService.isNonWorkingDay(currentDate.toDate())) {
if (this.weekdayService.isNonWorkingDay(currentDate.toDate() || this.workPackageTimeline.isNonWorkingDay(currentDate.toDate()))) {
duration += 1;
}
}
@ -476,10 +476,10 @@ export class TimelineCellRenderer {
? [this.cursorDateAndDayOffset(evOrDates, renderInfo)[0]]
: evOrDates;
if (!renderInfo.workPackage.ignoreNonWorkingDays && direction === 'both'
&& (this.weekdayService.isNonWorkingDay(dates[dates.length - 1].toDate()) || this.dayService.isNonWorkingDay(dates[dates.length - 1].toDate()))) {
&& (this.weekdayService.isNonWorkingDay(dates[dates.length - 1].toDate() || this.workPackageTimeline.isNonWorkingDay(dates[dates.length - 1].toDate())))) {
return false;
}
return dates.some((date) => (this.weekdayService.isNonWorkingDay(date.toDate()) || this.dayService.isNonWorkingDay(date.toDate())));
return dates.some((date) => (this.weekdayService.isNonWorkingDay(date.toDate()) || this.workPackageTimeline.isNonWorkingDay(date.toDate())));
}
/**

@ -189,8 +189,7 @@ export class WorkPackageTableTimelineGrid implements AfterViewInit {
private checkForNonWorkingDayHighlight(date:Moment, cell:HTMLElement) {
const day = date.toDate();
if (this.weekdaysService.isNonWorkingDay(day) || this.daysService.isNonWorkingDay(day)) {
if (this.weekdaysService.isNonWorkingDay(day) || this.wpTimeline.isNonWorkingDay(day)) {
cell.classList.add('wp-timeline--non-working-day');
cell.dataset.qaSelector = `wp-timeline--non-working-day_${day.getDate()}-${day.getMonth() + 1}-${day.getFullYear()}`;
}

Loading…
Cancel
Save