Merge branch 'dev' into Julian
This commit is contained in:
commit
5b700ae7bd
5 changed files with 42 additions and 39 deletions
1
db.json
1
db.json
|
@ -6050,3 +6050,4 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -31,5 +31,4 @@ export class FilterSideBarComponent implements OnInit {
|
|||
console.log(typeof(rangeArray[0]));
|
||||
this.rangeNumber.emit(rangeArray);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<div class="d-flex align-items-stretch">
|
||||
<app-filter-side-bar [listCategories]="listCategoriesFilter" (stateNumber)="onRatingFilter($event)" (rangeNumber)="onPriceFilter($event)"></app-filter-side-bar>
|
||||
|
||||
<div class="custom-main container p-3">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
|
@ -9,9 +8,9 @@
|
|||
|
||||
<div class="py-3">
|
||||
Trier par :
|
||||
<button class="btn btn-outline-success btn-sm me-2">Prix</button>
|
||||
<button class="btn btn-outline-success btn-sm me-2">Ordre Alpha</button>
|
||||
<button class="btn btn-outline-success btn-sm me-2">Avis</button>
|
||||
<button class="btn btn-outline-success btn-sm me-2" (click)="onPriceTri()">Prix</button>
|
||||
<button class="btn btn-outline-success btn-sm me-2"(click)="onAlphaTri()">Ordre Alpha</button>
|
||||
<button class="btn btn-outline-success btn-sm me-2" (click)="onRatingTri()">Avis</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
|
@ -2,6 +2,9 @@ import { Component, OnInit } from '@angular/core';
|
|||
import { PlantouneService } from 'src/app/services/plantoune.service';
|
||||
import * as _ from 'underscore';
|
||||
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-accueil',
|
||||
templateUrl: './page-accueil.component.html',
|
||||
|
@ -57,10 +60,11 @@ export class PageAccueilComponent implements OnInit {
|
|||
* Technique avec Underscore JS pour recupérer les catégories uniques de nos plantes
|
||||
*/
|
||||
const listAllCategories = listPlant.map(product => product.product_breadcrumb_label);
|
||||
console.log(listAllCategories);
|
||||
// console.log(listAllCategories);
|
||||
|
||||
const listUniqCategories = _.uniq(listAllCategories)
|
||||
console.log(listUniqCategories);
|
||||
// console.log(listUniqCategories);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -73,6 +77,7 @@ export class PageAccueilComponent implements OnInit {
|
|||
this.listCategoriesFilter = listUniqJsCategories;
|
||||
this.listData = listPlant;
|
||||
this.listData.length = 9;
|
||||
|
||||
console.log(this.listData);
|
||||
}
|
||||
)
|
||||
|
@ -133,5 +138,4 @@ export class PageAccueilComponent implements OnInit {
|
|||
|
||||
if(this.listData.length >= 9) this.listData.length = 9;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue