stash merge + card resto
This commit is contained in:
parent
334f799c60
commit
d7f423f93c
|
@ -41,8 +41,8 @@
|
|||
|
||||
|
||||
<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">
|
||||
<p class="description pt-3 ps-2 pe-1"><i class="bi bi-globe2 ps-2 pe-2" style="color:#a8a8a8"></i>
|
||||
<a href="{{restaurant.website}}" class="description text-decoration-none pe-1" style="font-style: italic;font-weight: bold; color:#545454">Site Web</a>
|
||||
|
@ -66,8 +66,8 @@
|
|||
[iconName]="restaurant.surPlace ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1 '"
|
||||
[iconColor]="restaurant.surPlace ? '#4ECB71' : '#ED2F2F'"
|
||||
></app-icon>
|
||||
<span class="a-emporter pe-2 ps-4 " style="color:#545454">A emporter :</span>
|
||||
<app-icon
|
||||
<span class="a-emporter pe-2 ps-4 " style="color:#545454">A emporter :</span>
|
||||
<app-icon
|
||||
[iconName]="restaurant.aEmporter ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1'"
|
||||
[iconColor]="restaurant.aEmporter ? '#4ECB71' : '#ED2F2F'"
|
||||
></app-icon>
|
||||
|
|
|
@ -13,6 +13,7 @@ export class CardRestoComponent implements OnInit {
|
|||
@Input() likeResto: any;
|
||||
@Output() clickLike = new EventEmitter<boolean>();
|
||||
isLiked : boolean = false;
|
||||
priceRef = ["Info indisponible"," € 1-10€ "," €€ 11-20€"," €€€ 21-30€"," €€€€ 31-40€"];
|
||||
|
||||
constructor(private apiBackService : ApiBackService) {
|
||||
this.distance = 0 ;
|
||||
|
@ -20,8 +21,6 @@ export class CardRestoComponent implements OnInit {
|
|||
|
||||
ngOnInit(): void {
|
||||
|
||||
console.log(this.restaurant);
|
||||
|
||||
this.distance = Math.round(
|
||||
this.apiBackService.setDistance(
|
||||
48.86201110271593 , //latitude Simplon
|
||||
|
@ -29,10 +28,7 @@ export class CardRestoComponent implements OnInit {
|
|||
this.restaurant.latitude,
|
||||
this.restaurant.longitude)
|
||||
);
|
||||
|
||||
console.log(this.distance);
|
||||
|
||||
|
||||
|
||||
}
|
||||
onClickLike() {
|
||||
console.log('click');
|
||||
|
|
|
@ -74,20 +74,117 @@
|
|||
class="form-control"
|
||||
id="floatingInputWebsite"
|
||||
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>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<input type="checkbox"
|
||||
class="form-control"
|
||||
id="floatingInputAEmporter"
|
||||
placeholder=""
|
||||
name="website" >
|
||||
<label for="floatingInputAEmporter">A Emporter</label>
|
||||
|
||||
<div class="form-control">
|
||||
<p class="text-left"> Sur Place :</p>
|
||||
<div class="form-check form-check-inline">
|
||||
<input
|
||||
type="radio"
|
||||
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 class="form-control">
|
||||
<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 *ngIf="errorMessage" class="alert alert-warning">
|
||||
{{errorMessage}}
|
||||
<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>
|
||||
|
||||
<button class="w-100 btn btn-lg btn-success"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
.form-signup {
|
||||
width: 100%;
|
||||
max-width: 330px;
|
||||
max-width: 350px;
|
||||
padding: 15px;
|
||||
margin: auto;
|
||||
}
|
||||
|
@ -29,4 +29,8 @@
|
|||
margin-bottom: 10px;
|
||||
border-top-left-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]),
|
||||
telephoneFc : new FormControl(''),
|
||||
websiteFc : new FormControl(''),
|
||||
surPlaceFc : new FormControl(''),
|
||||
aEmporterFc : new FormControl(''),
|
||||
accesPMRFc : new FormControl('')
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -42,9 +44,9 @@ export class AdminPageComponent implements OnInit {
|
|||
const adresseFc = this.signupForm.value['adresseFc'];
|
||||
const telephoneFc = this.signupForm.value['telephoneFc'];
|
||||
const websiteFc = this.signupForm.value['websiteFc'];
|
||||
const surPlaceFc = this.signupForm.value['surPlaceFc'];
|
||||
const aEmporterFc = this.signupForm.value['aEmporterFc'];
|
||||
// const accesPMRFc = this.signupForm.value['accesPMRFc'];
|
||||
// const surPlaceFc = this.signupForm.value['surPlaceFc'];
|
||||
const accesPMRFc = this.signupForm.value['accesPMRFc'];
|
||||
|
||||
const restaurant: Restaurant = {
|
||||
latitude: latitudeFc,
|
||||
|
@ -54,9 +56,9 @@ export class AdminPageComponent implements OnInit {
|
|||
adresse : adresseFc,
|
||||
telephone : telephoneFc,
|
||||
website : websiteFc,
|
||||
surPlace : surPlaceFc,
|
||||
aEmporter : aEmporterFc,
|
||||
// accesPMR : accesPMRFc,
|
||||
// surPlace : surPlaceFc
|
||||
accesPMR : accesPMRFc
|
||||
}
|
||||
if( restaurant.latitude !== '' &&
|
||||
restaurant.longitude !== '' &&
|
||||
|
@ -68,6 +70,8 @@ export class AdminPageComponent implements OnInit {
|
|||
this.router.navigate(['restaurants'])
|
||||
);
|
||||
}else{
|
||||
console.log("hello");
|
||||
|
||||
this.errorMessage = "Renseigner les champs obligatoires **";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue