Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring
This commit is contained in:
commit
43a1ee470b
|
@ -14,7 +14,7 @@
|
|||
<div *ngIf="hasLoadedListingItems && (hasListingItems || hasFilters)" class="col-12">
|
||||
<app-navigation-breadcrumb />
|
||||
</div>
|
||||
<div *ngIf="hasLoadedListingItems && (hasListingItems || hasFilters) && !isPublic" class="filter-btn" [style.right]="dialog.getDialogById('filters') ? '446px' : '0px'" [style.width]="listingItems.length > 2 ? '57px' : '37px'" (click)="openFiltersDialog()">
|
||||
<div *ngIf="!versionsModeEnabled && hasLoadedListingItems && (hasListingItems || hasFilters) && !isPublic" class="filter-btn" [style.right]="dialog.getDialogById('filters') ? '446px' : '0px'" [style.width]="listingItems.length > 2 ? '57px' : '37px'" (click)="openFiltersDialog()">
|
||||
<button mat-raised-button class="p-0" [matBadge]="filtersCount" [matBadgeHidden]="!hasFilters" matBadgePosition="before">
|
||||
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
||||
</button>
|
||||
|
|
|
@ -55,7 +55,6 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
|
|||
@ViewChild(MatPaginator, { static: true }) _paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
lookup: PlanLookup;
|
||||
// groupId: string;
|
||||
totalCount: number;
|
||||
listingItems: any[] = [];
|
||||
isPublic: boolean = false;
|
||||
|
@ -102,6 +101,9 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
|
|||
this.lookup.planBlueprintSubQuery != null || this.lookup.planUserSubQuery != null ||
|
||||
this.lookup.tenantSubQuery != null;
|
||||
}
|
||||
get versionsModeEnabled(): boolean {
|
||||
return this.groupId != null;
|
||||
}
|
||||
|
||||
constructor(
|
||||
protected router: Router,
|
||||
|
@ -203,7 +205,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
|
|||
if (this.isPublic) {
|
||||
return this.planService.publicQuery(this.lookup).pipe(takeUntil(this._destroyed))
|
||||
.pipe(tap(result => {
|
||||
if (this.groupId != null) {
|
||||
if (this.versionsModeEnabled) {
|
||||
const latestVersionPlan: BasePlan = this._getLatestVersion(result.items);
|
||||
this.breadcrumbService.addIdResolvedValue(this.groupId.toString(), latestVersionPlan.label);
|
||||
}
|
||||
|
@ -217,7 +219,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
|
|||
} else {
|
||||
return this.planService.query(this.lookup).pipe(takeUntil(this._destroyed))
|
||||
.pipe(tap(result => {
|
||||
if (this.groupId != null) {
|
||||
if (this.versionsModeEnabled) {
|
||||
const latestVersionPlan: BasePlan = this._getLatestVersion(result.items);
|
||||
this.breadcrumbService.addIdResolvedValue(this.groupId.toString(), latestVersionPlan.label);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue