stash merge + card resto
This commit is contained in:
parent
334f799c60
commit
d7f423f93c
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
|
|
||||||
<i class="fas fa-euro-sign ps-2 pe-2" style="color:#a8a8a8"></i>
|
<i class="fas fa-euro-sign ps-2 pe-2" style="color:#a8a8a8"></i>
|
||||||
<span class="prix" style="font-weight: bold;">5-10€</span>
|
<span class="prix" style="font-weight: bold;"></span>
|
||||||
|
|
||||||
<div class="d-inline-flex" *ngIf="restaurant.website; else noWebsite">
|
<div class="d-inline-flex" *ngIf="restaurant.website; else noWebsite">
|
||||||
<p class="description pt-3 ps-2 pe-1"><i class="bi bi-globe2 ps-2 pe-2" style="color:#a8a8a8"></i>
|
<p class="description pt-3 ps-2 pe-1"><i class="bi bi-globe2 ps-2 pe-2" style="color:#a8a8a8"></i>
|
||||||
|
|
|
@ -13,6 +13,7 @@ export class CardRestoComponent implements OnInit {
|
||||||
@Input() likeResto: any;
|
@Input() likeResto: any;
|
||||||
@Output() clickLike = new EventEmitter<boolean>();
|
@Output() clickLike = new EventEmitter<boolean>();
|
||||||
isLiked : boolean = false;
|
isLiked : boolean = false;
|
||||||
|
priceRef = ["Info indisponible"," € 1-10€ "," €€ 11-20€"," €€€ 21-30€"," €€€€ 31-40€"];
|
||||||
|
|
||||||
constructor(private apiBackService : ApiBackService) {
|
constructor(private apiBackService : ApiBackService) {
|
||||||
this.distance = 0 ;
|
this.distance = 0 ;
|
||||||
|
@ -20,8 +21,6 @@ export class CardRestoComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
||||||
console.log(this.restaurant);
|
|
||||||
|
|
||||||
this.distance = Math.round(
|
this.distance = Math.round(
|
||||||
this.apiBackService.setDistance(
|
this.apiBackService.setDistance(
|
||||||
48.86201110271593 , //latitude Simplon
|
48.86201110271593 , //latitude Simplon
|
||||||
|
@ -30,9 +29,6 @@ export class CardRestoComponent implements OnInit {
|
||||||
this.restaurant.longitude)
|
this.restaurant.longitude)
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(this.distance);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
onClickLike() {
|
onClickLike() {
|
||||||
console.log('click');
|
console.log('click');
|
||||||
|
|
|
@ -74,20 +74,117 @@
|
||||||
class="form-control"
|
class="form-control"
|
||||||
id="floatingInputWebsite"
|
id="floatingInputWebsite"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
name="website" >
|
name="website"
|
||||||
|
formControlName="websiteFc"
|
||||||
|
[ngClass]="{'is-valid' : signupForm.controls['websiteFc'].touched && signupForm.controls['websiteFc'].valid,
|
||||||
|
'is-invalid': signupForm.controls['websiteFc'].touched && !signupForm.controls['websiteFc'].valid}">
|
||||||
<label for="floatingInputWebsite">Site Web</label>
|
<label for="floatingInputWebsite">Site Web</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating">
|
|
||||||
<input type="checkbox"
|
<div class="form-control">
|
||||||
class="form-control"
|
<p class="text-left"> Sur Place :</p>
|
||||||
id="floatingInputAEmporter"
|
<div class="form-check form-check-inline">
|
||||||
placeholder=""
|
<input
|
||||||
name="website" >
|
type="radio"
|
||||||
<label for="floatingInputAEmporter">A Emporter</label>
|
class="form-check-input"
|
||||||
|
id="checkboxSurPlaceTrue"
|
||||||
|
name="surPlaceFc"
|
||||||
|
value=true
|
||||||
|
formControlName="surPlaceFc">
|
||||||
|
<label class="form-check-label" for="checkboxSurPlaceTrue">Oui</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxSurPlaceFalse"
|
||||||
|
name="surPlaceFc"
|
||||||
|
value=false
|
||||||
|
formControlName="surPlaceFc">
|
||||||
|
<label class="form-check-label" for="checkboxSurPlaceFalse">Non</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxSurPlaceNull"
|
||||||
|
name="surPlaceFc"
|
||||||
|
value=null
|
||||||
|
formControlName="surPlaceFc">
|
||||||
|
<label class="form-check-label" for="checkboxSurPlaceNull">Pas d'infos</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="errorMessage" class="alert alert-warning">
|
<div class="form-control">
|
||||||
{{errorMessage}}
|
<p class="text-left"> A Emporter :</p>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxAEmporterTrue"
|
||||||
|
name="aEmporterFc"
|
||||||
|
value=true
|
||||||
|
formControlName="aEmporterFc">
|
||||||
|
<label class="form-check-label" for="checkboxAEmporterTrue">Oui</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxAEmporterFalse"
|
||||||
|
name="aEmporterFc"
|
||||||
|
value=false
|
||||||
|
formControlName="aEmporterFc">
|
||||||
|
<label class="form-check-label" for="checkboxAEmporterFalse">Non</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxAEmporterNull"
|
||||||
|
name="aEmporterFc"
|
||||||
|
value=null
|
||||||
|
formControlName="aEmporterFc">
|
||||||
|
<label class="form-check-label" for="checkboxAEmporterNull">Pas d'infos</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-control">
|
||||||
|
<p class="text-left"> Accès PMR :</p>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxAccesPMRTrue"
|
||||||
|
name="accesPMRFc"
|
||||||
|
value=true
|
||||||
|
formControlName="accesPMRFc">
|
||||||
|
<label class="form-check-label" for="checkboxAccesPMRTrue">Oui</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxAccesPMRFalse"
|
||||||
|
name="accesPMRFc"
|
||||||
|
value=false
|
||||||
|
formControlName="accesPMRFc">
|
||||||
|
<label class="form-check-label" for="checkboxAccesPMRFalse">Non</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
class="form-check-input"
|
||||||
|
id="checkboxAccesPMRNull"
|
||||||
|
name="accesPMRFc"
|
||||||
|
value=null
|
||||||
|
formControlName="accesPMRFc">
|
||||||
|
<label class="form-check-label" for="checkboxAccesPMRNull">Pas d'infos</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="errorMessage" class="alert alert-danger">
|
||||||
|
<p class="alert-link">{{errorMessage}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="w-100 btn btn-lg btn-success"
|
<button class="w-100 btn btn-lg btn-success"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
.form-signup {
|
.form-signup {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 330px;
|
max-width: 350px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
@ -30,3 +30,7 @@
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-left{
|
||||||
|
text-align: left;
|
||||||
|
}
|
|
@ -28,7 +28,9 @@ export class AdminPageComponent implements OnInit {
|
||||||
adresseFc : new FormControl('', [Validators.required]),
|
adresseFc : new FormControl('', [Validators.required]),
|
||||||
telephoneFc : new FormControl(''),
|
telephoneFc : new FormControl(''),
|
||||||
websiteFc : new FormControl(''),
|
websiteFc : new FormControl(''),
|
||||||
|
surPlaceFc : new FormControl(''),
|
||||||
aEmporterFc : new FormControl(''),
|
aEmporterFc : new FormControl(''),
|
||||||
|
accesPMRFc : new FormControl('')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,9 +44,9 @@ export class AdminPageComponent implements OnInit {
|
||||||
const adresseFc = this.signupForm.value['adresseFc'];
|
const adresseFc = this.signupForm.value['adresseFc'];
|
||||||
const telephoneFc = this.signupForm.value['telephoneFc'];
|
const telephoneFc = this.signupForm.value['telephoneFc'];
|
||||||
const websiteFc = this.signupForm.value['websiteFc'];
|
const websiteFc = this.signupForm.value['websiteFc'];
|
||||||
|
const surPlaceFc = this.signupForm.value['surPlaceFc'];
|
||||||
const aEmporterFc = this.signupForm.value['aEmporterFc'];
|
const aEmporterFc = this.signupForm.value['aEmporterFc'];
|
||||||
// const accesPMRFc = this.signupForm.value['accesPMRFc'];
|
const accesPMRFc = this.signupForm.value['accesPMRFc'];
|
||||||
// const surPlaceFc = this.signupForm.value['surPlaceFc'];
|
|
||||||
|
|
||||||
const restaurant: Restaurant = {
|
const restaurant: Restaurant = {
|
||||||
latitude: latitudeFc,
|
latitude: latitudeFc,
|
||||||
|
@ -54,9 +56,9 @@ export class AdminPageComponent implements OnInit {
|
||||||
adresse : adresseFc,
|
adresse : adresseFc,
|
||||||
telephone : telephoneFc,
|
telephone : telephoneFc,
|
||||||
website : websiteFc,
|
website : websiteFc,
|
||||||
|
surPlace : surPlaceFc,
|
||||||
aEmporter : aEmporterFc,
|
aEmporter : aEmporterFc,
|
||||||
// accesPMR : accesPMRFc,
|
accesPMR : accesPMRFc
|
||||||
// surPlace : surPlaceFc
|
|
||||||
}
|
}
|
||||||
if( restaurant.latitude !== '' &&
|
if( restaurant.latitude !== '' &&
|
||||||
restaurant.longitude !== '' &&
|
restaurant.longitude !== '' &&
|
||||||
|
@ -68,6 +70,8 @@ export class AdminPageComponent implements OnInit {
|
||||||
this.router.navigate(['restaurants'])
|
this.router.navigate(['restaurants'])
|
||||||
);
|
);
|
||||||
}else{
|
}else{
|
||||||
|
console.log("hello");
|
||||||
|
|
||||||
this.errorMessage = "Renseigner les champs obligatoires **";
|
this.errorMessage = "Renseigner les champs obligatoires **";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue