mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +01:00
feat(demo): add bundles section to material lending page (#5677)
Co-authored-by: d.strigo <d.strigo@akveo.com>
This commit is contained in:
parent
c416d894d4
commit
50b5696c3b
5 changed files with 38 additions and 13 deletions
|
|
@ -25,6 +25,11 @@ export const BUNDLE_LICENSE = {
|
|||
developer: 'developer',
|
||||
};
|
||||
|
||||
export const STORE_PRODUCTS_URL = {
|
||||
base: 'https://store.akveo.com/collections/frontpage/products.json',
|
||||
material: 'https://store.akveo.com/collections/material-bundles/products.json',
|
||||
};
|
||||
|
||||
export class Feature {
|
||||
text: string;
|
||||
availableInPersonalLicence: boolean;
|
||||
|
|
@ -34,7 +39,6 @@ export class Feature {
|
|||
@Injectable()
|
||||
export class BundlesService {
|
||||
|
||||
private readonly STORE_PRODUCTS: string = 'https://store.akveo.com/collections/frontpage/products.json';
|
||||
private readonly STORE: string = 'https://store.akveo.com/products';
|
||||
|
||||
private features: Feature[] = [
|
||||
|
|
@ -81,8 +85,8 @@ export class BundlesService {
|
|||
return observableOf(this.features);
|
||||
}
|
||||
|
||||
getProducts(): Observable<Product[]> {
|
||||
return this.http.get(this.STORE_PRODUCTS)
|
||||
getProducts(url: string): Observable<Product[]> {
|
||||
return this.http.get(url)
|
||||
.pipe(map((result: any) => {
|
||||
return result.products.map((item: any) => {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue