|
|
|
@ -26,7 +26,7 @@ |
|
|
|
|
// See docs/COPYRIGHT.rdoc for more details.
|
|
|
|
|
// ++
|
|
|
|
|
|
|
|
|
|
import {ChangeDetectionStrategy, ChangeDetectorRef, Component} from "@angular/core"; |
|
|
|
|
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input} from "@angular/core"; |
|
|
|
|
import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; |
|
|
|
|
import {CardViewOrientation} from "core-components/wp-card-view/wp-card-view.component"; |
|
|
|
|
import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; |
|
|
|
@ -36,12 +36,13 @@ import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/iso |
|
|
|
|
import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; |
|
|
|
|
import {WorkPackageCardDragAndDropService} from "core-components/wp-card-view/services/wp-card-drag-and-drop.service"; |
|
|
|
|
import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; |
|
|
|
|
import {WorkPackageTableConfiguration} from "core-components/wp-table/wp-table-configuration"; |
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'wp-grid', |
|
|
|
|
template: ` |
|
|
|
|
<wp-card-view [dragOutOfHandler]="canDragOutOf" |
|
|
|
|
[dragInto]="true" |
|
|
|
|
[dragInto]="dragInto" |
|
|
|
|
[cardsRemovable]="false" |
|
|
|
|
[highlightingMode]="highlightingMode" |
|
|
|
|
[showStatusButton]="true" |
|
|
|
@ -59,7 +60,10 @@ import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; |
|
|
|
|
] |
|
|
|
|
}) |
|
|
|
|
export class WorkPackagesGridComponent { |
|
|
|
|
public canDragOutOf = () => { return true; }; |
|
|
|
|
@Input() public configuration:WorkPackageTableConfiguration; |
|
|
|
|
|
|
|
|
|
public canDragOutOf:() => boolean; |
|
|
|
|
public dragInto:boolean; |
|
|
|
|
public gridOrientation:CardViewOrientation = 'horizontal'; |
|
|
|
|
public highlightingMode:HighlightingMode = 'none'; |
|
|
|
|
|
|
|
|
@ -71,6 +75,9 @@ export class WorkPackagesGridComponent { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
|
this.dragInto = this.configuration.dragAndDropEnabled; |
|
|
|
|
this.canDragOutOf = () => { return this.configuration.dragAndDropEnabled }; |
|
|
|
|
|
|
|
|
|
this.wpTableHighlight |
|
|
|
|
.updates$() |
|
|
|
|
.pipe( |
|
|
|
|