diff --git a/package-lock.json b/package-lock.json
index 9f0907b..ac97b43 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,6 +17,7 @@
"@angular/platform-browser-dynamic": "~13.0.0",
"@angular/router": "~13.0.0",
"bootstrap": "^5.1.3",
+ "bootstrap-icons": "^1.7.2",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
@@ -3401,6 +3402,14 @@
"@popperjs/core": "^2.10.2"
}
},
+ "node_modules/bootstrap-icons": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.7.2.tgz",
+ "integrity": "sha512-NiR2PqC73AQOPdVSu6GJfnk+hN2z6powcistXk1JgPnKuoV2FSdSl26w931Oz9HYbKCcKUSB6ncZTYJAYJl3QQ==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -15041,6 +15050,11 @@
"integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==",
"requires": {}
},
+ "bootstrap-icons": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.7.2.tgz",
+ "integrity": "sha512-NiR2PqC73AQOPdVSu6GJfnk+hN2z6powcistXk1JgPnKuoV2FSdSl26w931Oz9HYbKCcKUSB6ncZTYJAYJl3QQ=="
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
diff --git a/package.json b/package.json
index 0222f00..f47f13c 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
"@angular/platform-browser-dynamic": "~13.0.0",
"@angular/router": "~13.0.0",
"bootstrap": "^5.1.3",
+ "bootstrap-icons": "^1.7.2",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 876f5cf..97ed3a3 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -5,6 +5,7 @@ import { HomePageComponent } from './pages/home-page/home-page.component';
import { ListCategoriesComponent } from './pages/list-categories/list-categories.component';
import { RestoPageComponent } from './pages/resto-page/resto-page.component';
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
+import { FiltersPageComponent } from './pages/filters-page/filters-page.component';
import { SigninComponent } from './pages/signin/signin.component';
const routes: Routes = [
@@ -12,6 +13,7 @@ const routes: Routes = [
{ path: 'home', component: HomePageComponent },
{ path: 'categories', component: ListCategoriesComponent },
{ path: 'favoris', component: FavorisUserComponent },
+ { path: 'filtres', component: FiltersPageComponent },
{ path: 'Deconnexion', redirectTo: 'home'},
{path: 'restaurants',component: RestoPageComponent},
{path: 'page-not-found',component: PageNotFoundComponent},
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index f86cb09..d7a4ae2 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -14,6 +14,10 @@ import { ListCategoriesComponent } from './pages/list-categories/list-categories
import { SigninComponent } from './pages/signin/signin.component';
import { RestoPageComponent } from './pages/resto-page/resto-page.component';
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
+import { FiltersPageComponent } from './pages/filters-page/filters-page.component';
+import { AvisBarComponent } from './filters/avis-bar/avis-bar.component';
+import { IconComponent } from './filters/icon/icon.component';
+import { TemplatePageComponent } from './components/template-page/template-page.component';
@NgModule({
declarations: [
@@ -27,7 +31,11 @@ import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.com
ListCategoriesComponent,
RestoPageComponent,
PageNotFoundComponent,
- SigninComponent
+ FiltersPageComponent,
+ AvisBarComponent,
+ IconComponent,
+ SigninComponent,
+ TemplatePageComponent
],
imports: [
BrowserModule,
diff --git a/src/app/card-category/card-category.component.html b/src/app/card-category/card-category.component.html
index 6b51e8c..3ddf1af 100644
--- a/src/app/card-category/card-category.component.html
+++ b/src/app/card-category/card-category.component.html
@@ -4,7 +4,7 @@
\ No newline at end of file
diff --git a/src/app/card-category/card-category.component.ts b/src/app/card-category/card-category.component.ts
index 9709a30..1bac8cd 100644
--- a/src/app/card-category/card-category.component.ts
+++ b/src/app/card-category/card-category.component.ts
@@ -1,4 +1,6 @@
import { Component, Input, OnInit } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { ApiBackService } from '../services/api-back.service';
@Component({
selector: 'app-card-category',
@@ -9,9 +11,18 @@ export class CardCategoryComponent implements OnInit {
@Input() categoryData : any;
- constructor() { }
+ constructor(private apiBackService : ApiBackService, private route : Router, private activatedRoute : ActivatedRoute) { }
ngOnInit(): void {
}
+ onClickCateg(id : number){
+
+ this.apiBackService.getRestaurantsByCateg(id , this.activatedRoute.snapshot.routeConfig?.path);
+ // on fait passer en second parametre le path de la route c'est a dire "home"(pour l'instant)
+
+ this.route.navigate(['restaurants']);
+
+ }
+
}
diff --git a/src/app/card-resto/card-resto.component.html b/src/app/card-resto/card-resto.component.html
index 9e05ba8..7226f7c 100644
--- a/src/app/card-resto/card-resto.component.html
+++ b/src/app/card-resto/card-resto.component.html
@@ -1 +1,92 @@
-card-resto works!
+
+
+
+
+
+ {{restaurant.nom }}
+
+
+
+
+
+
This is the first item's accordion body.
+
+
+
+
+ {{ categorie.libelle }}
+
+
+
+ {{distance}} mètres
+
+
+
+ 5-10€
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sur place :
+
+
A emporter :
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/card-resto/card-resto.component.scss b/src/app/card-resto/card-resto.component.scss
index e69de29..90f92f8 100644
--- a/src/app/card-resto/card-resto.component.scss
+++ b/src/app/card-resto/card-resto.component.scss
@@ -0,0 +1,90 @@
+.rond{
+ padding: 1em;
+ background-color: rgb(255, 255, 255);
+ top: 1em;
+ right: 1em;
+ border-radius: 50%;
+ width: 50px;
+ height: 50px;
+
+}
+.heart{
+ position: absolute;
+ top: 7px;
+ left: 13px;
+ font-size: 1.5em;
+ transform: rotate(5deg);
+
+
+
+}
+
+.titre-resto{
+ margin-bottom: 0.9rem;
+}
+.btn{
+ position: absolute;
+ background-color: #CE0000;
+ color: #fff;
+ width: 100%;
+ right: 0;
+ border-radius: 0 0 0.25rem 0.25rem;
+ padding: 1.375rem 0.75rem;
+
+}
+.accordion-button.collapsed {
+ background: #CE0000;
+ }
+
+.accordion-button.collapsed::after {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
+
+}
+
+.ps-5 {
+ padding-left: 6.4rem !important;
+}
+.pe-5 {
+ padding-right: 6rem !important;
+}
+
+
+.accordion .btn:focus{
+ box-shadow: none;
+}
+
+
+
+.star{
+ list-style-type: none;
+ font-size: 1.5em;
+ color:#ffd900;
+
+}
+
+.trait-rouge{
+border-bottom: 1px solid #CE0000;
+opacity: 50%;
+
+}
+
+.button{
+ display: block;
+ padding: 0.5em 2em 0.5em ;
+ width: 100%;
+ border-radius: 5px;
+ border: none;
+ background-color: #545454;
+ color: #ffffff;
+ text-transform: uppercase;
+ font-weight: bold;
+
+}
+
+
+
+
+
+
+
+
diff --git a/src/app/card-resto/card-resto.component.ts b/src/app/card-resto/card-resto.component.ts
index d5557fd..a90999f 100644
--- a/src/app/card-resto/card-resto.component.ts
+++ b/src/app/card-resto/card-resto.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component,EventEmitter, Input, Output, OnInit } from '@angular/core';
@Component({
selector: 'app-card-resto',
@@ -7,9 +7,56 @@ import { Component, OnInit } from '@angular/core';
})
export class CardRestoComponent implements OnInit {
- constructor() { }
+ @Input() restaurant : any ;
+ distance : number;
+ @Input() likeResto: any;
+ @Output() clickLike = new EventEmitter
();
+ isLiked : boolean = false;
+
+ constructor() {
+ this.distance = 0 ;
+ }
ngOnInit(): void {
+
+ console.log(this.restaurant);
+
+ this.distance = Math.round(
+ this.getDistanceFromLatLonInKm(
+ 48.86201110271593 , //latitude Simplon
+ 2.4361804827725417, //longitude Simplon
+ this.restaurant.latitude,
+ this.restaurant.longitude)
+ );
+
+ console.log(this.distance);
+
+
+ }
+ onClickLike() {
+ console.log('click');
+ this.isLiked = !this.isLiked;
+ this.clickLike.emit(this.isLiked);
}
+ getDistanceFromLatLonInKm(lat1 : number , lon1 : number, lat2 : number, lon2 : number) {
+ let R = 6371; // Radius of the earth in km
+ let dLat = this.deg2rad(lat2-lat1); // deg2rad below
+ let dLon = this.deg2rad(lon2-lon1);
+ let a =
+ Math.sin(dLat/2) * Math.sin(dLat/2) +
+ Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) *
+ Math.sin(dLon/2) * Math.sin(dLon/2)
+ ;
+ let c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
+ let d = R * c * 1000; // Distance in meters
+ return d;
+ }
+
+ deg2rad(deg : number) {
+ return deg * (Math.PI/180)
+ }
+
+
+
}
diff --git a/src/app/components/template-page/template-page.component.html b/src/app/components/template-page/template-page.component.html
new file mode 100644
index 0000000..061e291
--- /dev/null
+++ b/src/app/components/template-page/template-page.component.html
@@ -0,0 +1,6 @@
+
+ {{title}}
+
+
+
+
diff --git a/src/app/components/template-page/template-page.component.scss b/src/app/components/template-page/template-page.component.scss
new file mode 100644
index 0000000..9d01224
--- /dev/null
+++ b/src/app/components/template-page/template-page.component.scss
@@ -0,0 +1,15 @@
+.separation{
+ display: flex;
+ justify-content: flex-start;
+ border-bottom: 2px solid #CE0000;
+ max-width: 83%;
+}
+
+.titre{
+
+ display: flex;
+ justify-content: flex-start;
+ margin: 2.5em 0 0.5em 8.2em;
+ color: #CE0000;
+
+}
diff --git a/src/app/components/template-page/template-page.component.spec.ts b/src/app/components/template-page/template-page.component.spec.ts
new file mode 100644
index 0000000..540dd70
--- /dev/null
+++ b/src/app/components/template-page/template-page.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TemplatePageComponent } from './template-page.component';
+
+describe('TemplatePageComponent', () => {
+ let component: TemplatePageComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ TemplatePageComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(TemplatePageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/template-page/template-page.component.ts b/src/app/components/template-page/template-page.component.ts
new file mode 100644
index 0000000..91ac423
--- /dev/null
+++ b/src/app/components/template-page/template-page.component.ts
@@ -0,0 +1,16 @@
+import { Component, Input, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-template-page',
+ templateUrl: './template-page.component.html',
+ styleUrls: ['./template-page.component.scss']
+})
+export class TemplatePageComponent implements OnInit {
+ @Input() title!: string;
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/filters/avis-bar/avis-bar.component.html b/src/app/filters/avis-bar/avis-bar.component.html
new file mode 100644
index 0000000..014be1e
--- /dev/null
+++ b/src/app/filters/avis-bar/avis-bar.component.html
@@ -0,0 +1,10 @@
+
diff --git a/src/app/filters/avis-bar/avis-bar.component.scss b/src/app/filters/avis-bar/avis-bar.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/filters/avis-bar/avis-bar.component.spec.ts b/src/app/filters/avis-bar/avis-bar.component.spec.ts
new file mode 100644
index 0000000..dec29a8
--- /dev/null
+++ b/src/app/filters/avis-bar/avis-bar.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AvisBarComponent } from './avis-bar.component';
+
+describe('AvisBarComponent', () => {
+ let component: AvisBarComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ AvisBarComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(AvisBarComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/filters/avis-bar/avis-bar.component.ts b/src/app/filters/avis-bar/avis-bar.component.ts
new file mode 100644
index 0000000..e4757b7
--- /dev/null
+++ b/src/app/filters/avis-bar/avis-bar.component.ts
@@ -0,0 +1,70 @@
+import { Component, EventEmitter, OnInit, Output } from '@angular/core';
+
+@Component({
+ selector: 'app-avis-bar',
+ templateUrl: './avis-bar.component.html',
+ styleUrls: ['./avis-bar.component.scss']
+})
+export class AvisBarComponent implements OnInit {
+
+ starStates: {stateSelectedUser : boolean, stateHoverUser : boolean}[];
+ @Output() stateNumber = new EventEmitter();
+ starStateNumber: number = 0;
+
+
+ constructor() {
+
+ this.starStates = [];
+
+ for (let index = 0; index < 5; index++) {
+ this.starStates.push(
+ {
+ stateSelectedUser : false,
+ stateHoverUser : false
+ }
+ );
+ }
+
+ }
+
+ ngOnInit(): void {
+ }
+
+ onMouseOver(index: number) {
+ for (let i = 0; i < this.starStates.length ; i++) {
+ if(i <= index) {
+ this.starStates[i].stateHoverUser = true;
+ } else {
+ this.starStates[i].stateHoverUser = false;
+ }
+ }
+ }
+
+ onMouseLeave() {
+ const tempTab = [];
+ for (let index = 0; index < this.starStates.length; index++) {
+ tempTab.push(
+ {
+ stateSelectedUser : this.starStates[index].stateSelectedUser,
+ stateHoverUser : this.starStates[index].stateSelectedUser
+ }
+ );
+ }
+ this.starStates = [...tempTab];
+ }
+
+ onClickStar(starIndex: number) {
+ this.starStateNumber = 0;
+ for (let i = 0; i < this.starStates.length ; i++) {
+ if(i <= starIndex) {
+ this.starStates[i].stateSelectedUser = true;
+ this.starStateNumber++;
+ } else {
+ this.starStates[i].stateSelectedUser = false;
+ }
+ }
+ //console.log(`Rating : ${this.starStateNumber}`);
+ this.stateNumber.emit(this.starStateNumber);
+ }
+
+}
diff --git a/src/app/filters/icon/icon.component.html b/src/app/filters/icon/icon.component.html
new file mode 100644
index 0000000..322c471
--- /dev/null
+++ b/src/app/filters/icon/icon.component.html
@@ -0,0 +1,4 @@
+
+
+
diff --git a/src/app/filters/icon/icon.component.scss b/src/app/filters/icon/icon.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/filters/icon/icon.component.spec.ts b/src/app/filters/icon/icon.component.spec.ts
new file mode 100644
index 0000000..1719eb0
--- /dev/null
+++ b/src/app/filters/icon/icon.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { IconComponent } from './icon.component';
+
+describe('IconComponent', () => {
+ let component: IconComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ IconComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(IconComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/filters/icon/icon.component.ts b/src/app/filters/icon/icon.component.ts
new file mode 100644
index 0000000..5de95a3
--- /dev/null
+++ b/src/app/filters/icon/icon.component.ts
@@ -0,0 +1,22 @@
+import { Component, OnInit } from '@angular/core';
+import { Input } from '@angular/core';
+
+@Component({
+ selector: 'app-icon',
+ templateUrl: './icon.component.html',
+ styleUrls: ['./icon.component.scss']
+})
+export class IconComponent implements OnInit {
+
+ @Input() iconName!: string;
+ @Input() iconSize!: number;
+ @Input() iconColor!: string;
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+
+
+}
diff --git a/src/app/footer/footer.component.html b/src/app/footer/footer.component.html
index ef56c83..dd586aa 100644
--- a/src/app/footer/footer.component.html
+++ b/src/app/footer/footer.component.html
@@ -1,6 +1,6 @@
+
diff --git a/src/app/pages/home-page/home-page.component.scss b/src/app/pages/home-page/home-page.component.scss
index b0748b5..8abe656 100644
--- a/src/app/pages/home-page/home-page.component.scss
+++ b/src/app/pages/home-page/home-page.component.scss
@@ -14,7 +14,7 @@
display: flex;
justify-content: flex-start;
- margin: 0 0 0.5em 8.2em;
+ margin: 2.5em 0 0.5em 8.2em;
color: #CE0000;
}
\ No newline at end of file
diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts
index 1202c98..128cd6d 100644
--- a/src/app/pages/home-page/home-page.component.ts
+++ b/src/app/pages/home-page/home-page.component.ts
@@ -16,16 +16,15 @@ export class HomePageComponent implements OnInit {
ngOnInit(): void {
this.apiBackService.getCategories().subscribe((listCategories: any[]) => {
- console.log(listCategories);
-
- // const listCategoriesLibelle = listCategories.map(
- // (category) => category.libelle
- // );
+ // console.log(listCategories);
this.listCategories = listCategories;
- });
+ });
}
+ onEventLike(isLiked : boolean) {
+ this.apiBackService.restoLiked$.next(isLiked);
+ }
}
diff --git a/src/app/pages/resto-page/resto-page.component.html b/src/app/pages/resto-page/resto-page.component.html
index 6f4530c..1d59db1 100644
--- a/src/app/pages/resto-page/resto-page.component.html
+++ b/src/app/pages/resto-page/resto-page.component.html
@@ -1,3 +1,10 @@
-
Catégories :
-
+
+
+
+
+
+
+
diff --git a/src/app/pages/resto-page/resto-page.component.scss b/src/app/pages/resto-page/resto-page.component.scss
index 9f66cf0..d553109 100644
--- a/src/app/pages/resto-page/resto-page.component.scss
+++ b/src/app/pages/resto-page/resto-page.component.scss
@@ -1,3 +1,5 @@
+
+
.separation{
display: flex;
justify-content: flex-start;
@@ -9,7 +11,8 @@
display: flex;
justify-content: flex-start;
- margin: 0 0 0.5em 8.2em;
+ margin: 2.5em 0 0.5em 8.2em;
color: #CE0000;
-}
\ No newline at end of file
+}
+
diff --git a/src/app/pages/resto-page/resto-page.component.ts b/src/app/pages/resto-page/resto-page.component.ts
index a0a5221..38a2ac5 100644
--- a/src/app/pages/resto-page/resto-page.component.ts
+++ b/src/app/pages/resto-page/resto-page.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
+import { ApiBackService } from 'src/app/services/api-back.service';
@Component({
selector: 'app-resto-page',
@@ -7,9 +8,32 @@ import { Component, OnInit } from '@angular/core';
})
export class RestoPageComponent implements OnInit {
- constructor() { }
+ public listRestaurants : any[];
+
+ constructor(private apiBackService : ApiBackService) {
+ this.listRestaurants = [];
+ }
ngOnInit(): void {
+
+ // arrivée sur la restau-page depuis filtres ou home(catégories) : appel a une méthode différente du service
+ if(this.apiBackService.routeParam === "filtres"){
+ this.listRestaurants = this.apiBackService.restoFilter;
+
+ }else if(this.apiBackService.routeParam === "home"){
+ this.apiBackService.restoByCat.subscribe((restaurants: any[]) => {
+ this.listRestaurants = restaurants;
+ });
+ }else{ // si on arrive sur l'url /restaurants directement = tous les restau affichés
+
+ this.apiBackService.getRestaurants().subscribe((restaurants: any[]) => {
+ this.listRestaurants = restaurants;
+
+ })
+ }
+
+
+
}
}
diff --git a/src/app/services/api-back.service.ts b/src/app/services/api-back.service.ts
index 5104e04..52a6298 100644
--- a/src/app/services/api-back.service.ts
+++ b/src/app/services/api-back.service.ts
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
-import { Observable, Subject } from 'rxjs';
+import { Observable, of, Subject } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
@@ -8,16 +8,34 @@ import { environment } from 'src/environments/environment';
})
export class ApiBackService {
- constructor(private httpClient: HttpClient) { }
+ public restoByCat : Observable
= of([]);
+ restoLiked$ = new Subject();
+ public restoFilter : any[];
+ public routeParam ?: string;
+
+ constructor(private httpClient: HttpClient) {
+ this.restoFilter = [];
+ this.routeParam = "";
+ }
getRestaurants(): Observable {
return this.httpClient.get(`${environment.apiUrl}/restaurants`);
}
+ getRestaurantsByCateg(id : number, routeParam ?: string ): void {
+ this.restoByCat = this.httpClient.get(`${environment.apiUrl}/restaurantbytype/${id}`);
+ this.routeParam = routeParam;
+ }
+
getCategories(): Observable{
return this.httpClient.get(`${environment.apiUrl}/types`);
}
+ setListRestau(listRestau : any[], routeParam ?: string ) : void{
+ this.restoFilter = listRestau;
+ this.routeParam = routeParam;
+
+ }
}
diff --git a/src/assets/ImagesRestos/photo.jpg b/src/assets/ImagesRestos/photo.jpg
new file mode 100644
index 0000000..abc1158
Binary files /dev/null and b/src/assets/ImagesRestos/photo.jpg differ
diff --git a/src/assets/ImagesRestos/pieton.png b/src/assets/ImagesRestos/pieton.png
new file mode 100644
index 0000000..c2ada6d
Binary files /dev/null and b/src/assets/ImagesRestos/pieton.png differ
diff --git a/src/assets/images-header/LOGO2.png b/src/assets/images-header/LOGO2.png
new file mode 100644
index 0000000..cccfd49
Binary files /dev/null and b/src/assets/images-header/LOGO2.png differ
diff --git a/src/assets/images-header/fond.png b/src/assets/images-header/fond.png
index f417d33..294108f 100644
Binary files a/src/assets/images-header/fond.png and b/src/assets/images-header/fond.png differ
diff --git a/src/assets/pieton.svg b/src/assets/pieton.svg
new file mode 100644
index 0000000..be2f280
--- /dev/null
+++ b/src/assets/pieton.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/index.html b/src/index.html
index 975e7de..0ecced0 100644
--- a/src/index.html
+++ b/src/index.html
@@ -6,6 +6,8 @@
+
+