mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-20 09:20:12 +01:00
feat: demo version additions
This commit is contained in:
parent
0eec54695f
commit
eee950248e
322 changed files with 23456 additions and 188 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
|
||||
.find(variant => variant.title.toLowerCase().includes(license.toLowerCase()));
|
||||
return result ? result : variants[0];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue