Skip to content

Commit

Permalink
fix(demo-docs): fix banners in backend bundles section (#5594)
Browse files Browse the repository at this point in the history
  • Loading branch information
denStrigo committed Feb 7, 2020
1 parent f3e9bef commit e4c53bf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/app/@core/data/service/bundles.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export interface ProductVariant {
}

export const BUNDLE_LICENSE = {
single: 'single',
multi: 'multi',
personal: 'personal',
developer: 'developer',
};

export class Feature {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ <h4 class="package-card__title">{{ product.title }}</h4>
<table class="features-table">
<tr class="header">
<th class="left">FEATURES</th>
<th>SINGLE APP</th>
<th>MULTI APP</th>
<th>PERSONAL APP</th>
<th>DEVELOPER APP</th>
</tr>
<tr *ngFor="let feature of features | async">
<td class="left">{{ feature.text }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class BackendBundlesSectionComponent implements AfterViewInit {

@Output() loaded = new EventEmitter();

selectedLicenseType = BUNDLE_LICENSE.single;
selectedLicenseType = BUNDLE_LICENSE.personal;

licenses = Object.values(BUNDLE_LICENSE);

Expand Down
4 changes: 2 additions & 2 deletions docs/app/pages/home/backend-bundles-section/license.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ProductVariant } from '../../../@core/data/service/bundles.service';
export class LicensePipe implements PipeTransform {
transform(variants: ProductVariant[], license: string): ProductVariant {
const result = variants
.filter(variant => variant.title.toLowerCase().includes(license.toLowerCase()));
return result.length ? result[0] : undefined;
.find(variant => variant.title.toLowerCase().includes(license.toLowerCase()));
return result ? result : variants[0];
}
}

0 comments on commit e4c53bf

Please sign in to comment.