plan filters fixes (in progress)
This commit is contained in:
parent
3dcc415d5e
commit
1515a761a5
|
@ -15,7 +15,7 @@
|
||||||
<app-navigation-breadcrumb />
|
<app-navigation-breadcrumb />
|
||||||
</div>
|
</div>
|
||||||
<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()">
|
<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">
|
<button mat-raised-button class="p-0" [matBadge]="filtersCount" [matBadgeHidden]="filtersCount === 0" matBadgePosition="before">
|
||||||
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -224,7 +224,6 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
|
||||||
this.breadcrumbService.addIdResolvedValue(this.groupId.toString(), latestVersionPlan.label);
|
this.breadcrumbService.addIdResolvedValue(this.groupId.toString(), latestVersionPlan.label);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hasLoadedListingItems = true;
|
|
||||||
if (!result) { return []; }
|
if (!result) { return []; }
|
||||||
this.totalCount = result.count;
|
this.totalCount = result.count;
|
||||||
if (this.lookup?.page?.offset === 0) this.listingItems = [];
|
if (this.lookup?.page?.offset === 0) this.listingItems = [];
|
||||||
|
@ -381,6 +380,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
|
||||||
let lookup: PlanLookup = JSON.parse(params['lookup']);
|
let lookup: PlanLookup = JSON.parse(params['lookup']);
|
||||||
|
|
||||||
if (!lookup) return this.initializeLookup();
|
if (!lookup) return this.initializeLookup();
|
||||||
|
lookup.like = lookup.like ?? null;
|
||||||
|
|
||||||
const queryOffset = 0;
|
const queryOffset = 0;
|
||||||
const querySize = (lookup.page?.offset ?? 0) + this.pageSize;
|
const querySize = (lookup.page?.offset ?? 0) + this.pageSize;
|
||||||
|
@ -467,6 +467,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
|
||||||
|
|
||||||
private _buildFormFromLookup(lookup: PlanLookup): UntypedFormGroup {
|
private _buildFormFromLookup(lookup: PlanLookup): UntypedFormGroup {
|
||||||
return (new UntypedFormBuilder()).group({
|
return (new UntypedFormBuilder()).group({
|
||||||
|
like: lookup.like ?? null,
|
||||||
status: [lookup.statuses?.length > 0 ? lookup.statuses[0] : null],
|
status: [lookup.statuses?.length > 0 ? lookup.statuses[0] : null],
|
||||||
viewOnlyTenant: [lookup.tenantSubQuery?.codes?.length > 0 ? true : false],
|
viewOnlyTenant: [lookup.tenantSubQuery?.codes?.length > 0 ? true : false],
|
||||||
descriptionTemplates: lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds ? [lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds] : [],
|
descriptionTemplates: lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds ? [lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds] : [],
|
||||||
|
|
Loading…
Reference in New Issue