minor ui fix

This commit is contained in:
CITE\spapacharalampous 2024-08-28 17:29:57 +03:00
parent 15ec93a069
commit 7d3a359130
2 changed files with 6 additions and 3 deletions

View File

@ -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>

View File

@ -102,6 +102,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 +206,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 +220,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);
}