remove unnecessary imports

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

@ -21,7 +21,6 @@ import {
timelineMarkerSelectionStartClass, timelineMarkerSelectionStartClass,
} from '../wp-timeline'; } from '../wp-timeline';
import Moment = moment.Moment; import Moment = moment.Moment;
import { DayResourceService } from 'core-app/core/state/days/day.service';
export interface CellDateMovement { export interface CellDateMovement {
// Target values to move work package to // Target values to move work package to
@ -52,8 +51,6 @@ export class TimelineCellRenderer {
@InjectField() weekdayService:WeekdayService; @InjectField() weekdayService:WeekdayService;
@InjectField() dayService:DayResourceService;
@InjectField() schemaCache:SchemaCacheService; @InjectField() schemaCache:SchemaCacheService;
@InjectField() I18n!:I18nService; @InjectField() I18n!:I18nService;

@ -147,6 +147,13 @@ export class WorkPackageTimelineTableController extends UntilDestroyedMixin impl
ngAfterViewInit() { ngAfterViewInit() {
this.$element = jQuery(this.elementRef.nativeElement); this.$element = jQuery(this.elementRef.nativeElement);
const scrollBar = document.querySelector('.work-packages-tabletimeline--timeline-side');
if (scrollBar) {
scrollBar.addEventListener("scroll", async () => {
await this.requireNonWorkingDays(this.getFirstDayInViewport().format('YYYY-MM-DD'), this.getLastDayInViewport().format('YYYY-MM-DD'));
})
}
this.text = { this.text = {
selectionMode: this.I18n.t('js.timelines.selection_mode.notification'), selectionMode: this.I18n.t('js.timelines.selection_mode.notification'),
}; };
@ -236,7 +243,7 @@ export class WorkPackageTimelineTableController extends UntilDestroyedMixin impl
this.calculateViewParams(this._viewParameters); this.calculateViewParams(this._viewParameters);
await this.requireNonWorkingDays(this._viewParameters.visibleViewportAtCalculationTime[0].format('YYYY-MM-DD'), this._viewParameters.visibleViewportAtCalculationTime[1].format('YYYY-MM-DD')); await this.requireNonWorkingDays(this.getFirstDayInViewport().format('YYYY-MM-DD'), this.getLastDayInViewport().format('YYYY-MM-DD'));
// Update all cells // Update all cells
this.cellsRenderer.refreshAllCells(); this.cellsRenderer.refreshAllCells();

@ -42,7 +42,6 @@ import {
} from '../wp-timeline'; } from '../wp-timeline';
import { WeekdayService } from 'core-app/core/days/weekday.service'; import { WeekdayService } from 'core-app/core/days/weekday.service';
import Moment = moment.Moment; import Moment = moment.Moment;
import { DayResourceService } from 'core-app/core/state/days/day.service';
@Component({ @Component({
selector: 'wp-timeline-grid', selector: 'wp-timeline-grid',
@ -57,7 +56,6 @@ export class WorkPackageTableTimelineGrid implements AfterViewInit {
private elementRef:ElementRef, private elementRef:ElementRef,
public wpTimeline:WorkPackageTimelineTableController, public wpTimeline:WorkPackageTimelineTableController,
private weekdaysService:WeekdayService, private weekdaysService:WeekdayService,
private daysService:DayResourceService,
) {} ) {}
ngAfterViewInit():void { ngAfterViewInit():void {

Loading…
Cancel
Save