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">
|
||||
<h5>Aide</h5>
|
||||
<h5>Contact</h5>
|
||||
<h5>Administrateurs</h5>
|
||||
<h5 routerLink="/admin">Administrateurs</h5>
|
||||
<h5>Mentions legales</h5>
|
||||
</div>
|
||||
|
||||
|
@ -13,4 +13,5 @@ h5{
|
||||
padding-right: 4em;
|
||||
color: white;
|
||||
font-weight: lighter;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<img src="assets/images-header/LOGO2.png" alt="logo">
|
||||
</div>
|
||||
|
||||
<app-search-bar></app-search-bar>
|
||||
<app-search-bar *ngIf="router.url != '/restaurants' && router.url != '/admin'"></app-search-bar>
|
||||
|
||||
<div class="trait">
|
||||
<p>LE BON PLAN POUR MANGER</p>
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-header-logo',
|
||||
@ -7,7 +8,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
})
|
||||
export class HeaderLogoComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
constructor(public router : Router) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<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..."
|
||||
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>
|
@ -42,7 +42,8 @@ export class SearchBarComponent implements OnInit {
|
||||
restau.nom.toLowerCase().includes(search.toLowerCase()));
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
<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">
|
||||
<app-card-resto [restaurant]= "restaurantData" (clickLike)="onEventLike()"></app-card-resto>
|
||||
<app-card-resto [restaurant]="restaurantData" (clickLike)="onEventLike()"></app-card-resto>
|
||||
</div>
|
||||
</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(){
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user