fix(demo-docs): fix banners in backend bundles section (#5594)

This commit is contained in:
Denis Strigo 2020-02-07 10:28:24 +03:00 committed by GitHub
parent f3e9bef4d2
commit e4c53bf70d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View file

@ -21,8 +21,8 @@ export interface ProductVariant {
} }
export const BUNDLE_LICENSE = { export const BUNDLE_LICENSE = {
single: 'single', personal: 'personal',
multi: 'multi', developer: 'developer',
}; };
export class Feature { export class Feature {

View file

@ -62,8 +62,8 @@
<table class="features-table"> <table class="features-table">
<tr class="header"> <tr class="header">
<th class="left">FEATURES</th> <th class="left">FEATURES</th>
<th>SINGLE APP</th> <th>PERSONAL APP</th>
<th>MULTI APP</th> <th>DEVELOPER APP</th>
</tr> </tr>
<tr *ngFor="let feature of features | async"> <tr *ngFor="let feature of features | async">
<td class="left">{{ feature.text }}</td> <td class="left">{{ feature.text }}</td>

View file

@ -29,7 +29,7 @@ export class BackendBundlesSectionComponent implements AfterViewInit {
@Output() loaded = new EventEmitter(); @Output() loaded = new EventEmitter();
selectedLicenseType = BUNDLE_LICENSE.single; selectedLicenseType = BUNDLE_LICENSE.personal;
licenses = Object.values(BUNDLE_LICENSE); licenses = Object.values(BUNDLE_LICENSE);

View file

@ -5,7 +5,7 @@ import { ProductVariant } from '../../../@core/data/service/bundles.service';
export class LicensePipe implements PipeTransform { export class LicensePipe implements PipeTransform {
transform(variants: ProductVariant[], license: string): ProductVariant { transform(variants: ProductVariant[], license: string): ProductVariant {
const result = variants const result = variants
.filter(variant => variant.title.toLowerCase().includes(license.toLowerCase())); .find(variant => variant.title.toLowerCase().includes(license.toLowerCase()));
return result.length ? result[0] : undefined; return result ? result : variants[0];
} }
} }