mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +01:00
feat: docs app
This commit is contained in:
parent
62e6828680
commit
165e64eaca
203 changed files with 15928 additions and 6 deletions
11
docs/app/pages/home/backend-bundles-section/license.pipe.ts
Normal file
11
docs/app/pages/home/backend-bundles-section/license.pipe.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { ProductVariant } from '../../../@core/data/service/bundles.service';
|
||||
|
||||
@Pipe({ name: 'license' })
|
||||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue