Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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];
}
}