|
|
|
@ -33,10 +33,10 @@ import {AuthorisationService} from "core-app/modules/common/model-auth/model-aut |
|
|
|
|
import {StateService} from "@uirouter/core"; |
|
|
|
|
import {States} from "core-components/states.service"; |
|
|
|
|
import {RequestSwitchmap} from "core-app/helpers/rxjs/request-switchmap"; |
|
|
|
|
import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; |
|
|
|
|
import {filter} from 'rxjs/operators'; |
|
|
|
|
import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'wp-card-view', |
|
|
|
|
styleUrls: ['./wp-card-view.component.sass'], |
|
|
|
@ -99,8 +99,9 @@ export class WorkPackageCardViewComponent implements OnInit { |
|
|
|
|
readonly dragService:DragAndDropService, |
|
|
|
|
readonly reorderService:ReorderQueryService, |
|
|
|
|
readonly authorisationService:AuthorisationService, |
|
|
|
|
readonly causedUpdates:CausedUpdatesService, |
|
|
|
|
readonly cdRef:ChangeDetectorRef, |
|
|
|
|
readonly causedUpdates:CausedUpdatesService) { |
|
|
|
|
readonly pathHelper:PathHelperService) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
@ -163,6 +164,15 @@ export class WorkPackageCardViewComponent implements OnInit { |
|
|
|
|
return wp.subject; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public bcfSnapshotPath(wp:WorkPackageResource) { |
|
|
|
|
let vp = _.get(wp, 'bcf.viewpoints[0]'); |
|
|
|
|
if (vp) { |
|
|
|
|
return this.pathHelper.attachmentDownloadPath(vp.id, vp.file_name); |
|
|
|
|
} else { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public cardHighlightingClass(wp:WorkPackageResource) { |
|
|
|
|
return this.cardHighlighting(wp); |
|
|
|
|
} |
|
|
|
|