Modif filtres page

This commit is contained in:
Romain Verger 2022-02-15 14:58:50 +01:00
parent 637e8f75cd
commit 8c1cee7e24
2 changed files with 31 additions and 33 deletions

View File

@ -17,7 +17,7 @@
<div class="distance p-3">
<span>Veuillez sélectionner la distance souhaitée</span>
</div>
<input type="range" class="form-range" min="{{minDistance}}" max="{{maxDistance}}" (change)="changeValueDistance($event)" >
<input type="range" class="form-range" min="{{minDistance}}" max="{{maxDistance}}" (change)="OnChangeValueDistance($event)" >
<div class="valuesDistance d-flex d-flex justify-content-between">
<span>0 KM</span>
<span>2 KM</span>
@ -41,7 +41,7 @@
<div class="minMax p-3">
<span>Veuillez sélectionner le prix souhaité</span>
</div>
<input type="range" class="form-range" ng-model="valuePrix" min="{{minPrice}}" max="{{maxPrice}}" (change)="changeValuePrice($event)">
<input type="range" class="form-range" ng-model="valuePrix" min="{{minPrice}}" max="{{maxPrice}}" (change)="OnChangeValuePrice($event)">
<div class="valuesPrix d-flex d-flex justify-content-between">
<span>0€</span>
<span>10€</span>
@ -67,8 +67,8 @@
<span>A Emporter</span>
</div>
<div class="PlaceEmporterCheck m-3 d-flex justify-content-around">
<input class="surPlace-check-input" type="checkbox" value="surPlaceOption" style="width: 25px; height: 25px; border-radius: 300px;" (change) = "changeValueSurPlace($event)">
<input class="Emporter-check-input" type="checkbox" value="aEmporterOption" style="width: 25px; height: 25px;" (change) = "changeValueEmporter($event)">
<input class="surPlace-check-input" type="checkbox" value="surPlaceOption" style="width: 25px; height: 25px; border-radius: 300px;" (change) = "OnChangeValueSurPlace($event)">
<input class="Emporter-check-input" type="checkbox" value="aEmporterOption" style="width: 25px; height: 25px;" (change) = "OnChangeValueEmporter($event)">
</div>
</div>
</div>
@ -89,7 +89,7 @@
<span>Accès PMR</span>
</div>
<div class="pmr-check d-flex justify-content-center p-2">
<input class="pmr-check-input mx-auto" type="checkbox" value="AccesPMR" style="width: 25px; height: 25px;" (change) = "changeValuePMR($event)">
<input class="pmr-check-input mx-auto" type="checkbox" value="AccesPMR" style="width: 25px; height: 25px;" (change) = "OnChangeValuePMR($event)">
</div>
</div>
</div>

View File

@ -9,22 +9,22 @@ import { ApiBackService } from 'src/app/services/api-back.service';
})
export class FiltersPageComponent implements OnInit {
minDistance : any;
maxDistance : any;
public minDistance : any;
public maxDistance : any;
minPrice : any;
maxPrice: any;
selectPrice : any;
selectDistance : any;
selectPmr :any;
selectSurPlace : any;
selectEmporter : any;
public minPrice : any;
public maxPrice: any;
public selectPrice : any;
public selectDistance : any;
public selectPmr :any;
public selectSurPlace : any;
public selectEmporter : any;
@Output() stateNumber = new EventEmitter();
@Output() rangeNumber = new EventEmitter();
selectRating: number;
public selectRating: number;
listRestau: string[];
public listRestau: string[];
constructor(private apiBackService : ApiBackService, private route : Router) {
@ -44,6 +44,7 @@ export class FiltersPageComponent implements OnInit {
this.selectRating = 0;
this.listRestau = [];
}
@ -55,23 +56,23 @@ export class FiltersPageComponent implements OnInit {
}
changeValueDistance(valueDistance: any){
OnChangeValueDistance(valueDistance: any){
this.selectDistance = valueDistance.target.value;
}
changeValuePrice(valuePrice: any){
OnChangeValuePrice(valuePrice: any){
this.selectPrice = valuePrice.target.value;
}
changeValuePMR(valuePmr : any){
OnChangeValuePMR(valuePmr : any){
this.selectPmr = (valuePmr.target.checked);
}
changeValueSurPlace(valuePlace : any){
OnChangeValueSurPlace(valuePlace : any){
this.selectSurPlace = valuePlace.target.checked;
}
changeValueEmporter(valueEmporter : any){
OnChangeValueEmporter(valueEmporter : any){
this.selectEmporter = valueEmporter.target.checked;
}
@ -79,21 +80,18 @@ onStateNumberChange(stateNumber: number): void {
this.selectRating = stateNumber;
}
onSendRating():void {
onSendRating() {
this.stateNumber.emit(this.selectRating);
}
onSendFilters(){
console.log("distance : " + this.selectDistance);
console.log("prix : " +this.selectPrice);
console.log("sur Place : " +this.selectSurPlace);
console.log("A Emporter : " +this.selectEmporter);
console.log("Acces PMR : " +this.selectPmr);
console.log("Avis : " +this.selectRating);
console.log()
console.log("Distance :" ,this.selectDistance);
console.log("Prix :" ,this.selectPrice);
console.log("Sur Place :" ,this.selectSurPlace);
console.log("A emporter :" ,this.selectEmporter);
console.log("PMR :" ,this.selectPmr);
console.log("avis :" ,this.selectRating);
}
}