search-bar modifiée+ link admin
This commit is contained in:
parent
a04197cceb
commit
321e0a16be
|
@ -7,7 +7,7 @@
|
||||||
<div class="liens d-flex justify-content-end align-items-center">
|
<div class="liens d-flex justify-content-end align-items-center">
|
||||||
<h5>Aide</h5>
|
<h5>Aide</h5>
|
||||||
<h5>Contact</h5>
|
<h5>Contact</h5>
|
||||||
<h5>Administrateurs</h5>
|
<h5 routerLink="/admin">Administrateurs</h5>
|
||||||
<h5>Mentions legales</h5>
|
<h5>Mentions legales</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,5 @@ h5{
|
||||||
padding-right: 4em;
|
padding-right: 4em;
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<img src="assets/images-header/LOGO2.png" alt="logo">
|
<img src="assets/images-header/LOGO2.png" alt="logo">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-search-bar></app-search-bar>
|
<app-search-bar *ngIf="router.url != '/restaurants' && router.url != '/admin'"></app-search-bar>
|
||||||
|
|
||||||
<div class="trait">
|
<div class="trait">
|
||||||
<p>LE BON PLAN POUR MANGER</p>
|
<p>LE BON PLAN POUR MANGER</p>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-header-logo',
|
selector: 'app-header-logo',
|
||||||
|
@ -7,7 +8,7 @@ import { Component, OnInit } from '@angular/core';
|
||||||
})
|
})
|
||||||
export class HeaderLogoComponent implements OnInit {
|
export class HeaderLogoComponent implements OnInit {
|
||||||
|
|
||||||
constructor() { }
|
constructor(public router : Router) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<form class="d-flex align-items-center pe-2 pt-2">
|
<form class="d-flex align-items-center pe-2 pt-2">
|
||||||
<input class="form-control me-5 position-relative" type="search" #newItem placeholder="Trouver votre SIMPL'EAT..."
|
<input class="form-control me-5 position-relative" type="search" #newItem placeholder="Trouver votre SIMPL'EAT..."
|
||||||
aria-label="Search">
|
aria-label="Search">
|
||||||
<button (click)="onChangeInput(newItem.value)">Recherche</button>
|
<button type="button" class="btn btn-outline-danger" (click)="onChangeInput(newItem.value)">Recherche</button>
|
||||||
</form>
|
</form>
|
|
@ -42,7 +42,8 @@ export class SearchBarComponent implements OnInit {
|
||||||
restau.nom.toLowerCase().includes(search.toLowerCase()));
|
restau.nom.toLowerCase().includes(search.toLowerCase()));
|
||||||
|
|
||||||
// Composant search-bar utilisé dans la page admin
|
// Composant search-bar utilisé dans la page admin
|
||||||
if(this.activatedRoute.snapshot.routeConfig?.path === "admin"){
|
if(this.activatedRoute.snapshot.routeConfig?.path === "admin" ||
|
||||||
|
this.activatedRoute.snapshot.routeConfig?.path === "restaurants"){
|
||||||
|
|
||||||
this.resultSearch.emit(this.restauByName);
|
this.resultSearch.emit(this.restauByName);
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<app-template-page [title]="'Restaurants :'">
|
<app-template-page [title]="'Restaurants :'">
|
||||||
|
<div class="div-search d-flex justify-content-center">
|
||||||
|
<div class="search-restau">
|
||||||
|
<app-search-bar (resultSearch)="saveRestauList($event)"></app-search-bar>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div *ngFor="let restaurantData of listRestaurants">
|
<div *ngFor="let restaurantData of listRestaurants">
|
||||||
<app-card-resto [restaurant]="restaurantData" (clickLike)="onEventLike()"></app-card-resto>
|
<app-card-resto [restaurant]="restaurantData" (clickLike)="onEventLike()"></app-card-resto>
|
||||||
</div>
|
</div>
|
||||||
</app-template-page>
|
</app-template-page>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,3 +17,12 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.div-search{
|
||||||
|
width : 100%;
|
||||||
|
margin: 8vh 0 2vh
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-restau{
|
||||||
|
width:35%
|
||||||
|
}
|
||||||
|
|
|
@ -50,6 +50,11 @@ export class RestoPageComponent implements OnInit {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveRestauList(event : any){
|
||||||
|
console.log(event);
|
||||||
|
this.listRestaurants = event;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
restauLiked(){
|
restauLiked(){
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue