|
@@ -1,10 +1,11 @@
|
|
|
<div style="text-align: center;">
|
|
<div style="text-align: center;">
|
|
|
- <h2>MAKE RESERVATION</h2>
|
|
|
|
|
|
|
+ <h2 translate="reservations.title"></h2>
|
|
|
</div>
|
|
</div>
|
|
|
<form (submit)="makeReservation()" #myForm="ngForm" style="font-family: Courier New, monospace;">
|
|
<form (submit)="makeReservation()" #myForm="ngForm" style="font-family: Courier New, monospace;">
|
|
|
- <h3 style="text-align: center;margin-bottom: 0;">BOAT</h3>
|
|
|
|
|
- <label id="boat_label" for="boat"
|
|
|
|
|
- style="font-family: Courier New, monospace;text-align: center;margin-bottom: 5px;"></label>
|
|
|
|
|
|
|
+ <h3 style="text-align: center;margin-bottom: 0;" translate="reservations.boat"></h3>
|
|
|
|
|
+ <label translate="reservations.info" style="color: darkslategray; font-size: 80%;"></label>
|
|
|
|
|
+ <!-- <label id="boat_label" for="boat"-->
|
|
|
|
|
+ <!-- style="font-family: Courier New, monospace;text-align: center;margin-bottom: 5px;"></label>-->
|
|
|
<select name="_boats"
|
|
<select name="_boats"
|
|
|
id="boat"
|
|
id="boat"
|
|
|
style="text-align: center; width: 280px"
|
|
style="text-align: center; width: 280px"
|
|
@@ -12,8 +13,8 @@
|
|
|
<option *ngFor="let boat of boats">{{ boat.label.toString() }}</option>
|
|
<option *ngFor="let boat of boats">{{ boat.label.toString() }}</option>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <h3 style="text-align: center">DATE</h3>
|
|
|
|
|
- <p *ngIf="isDateFromPast()" style="color: #b70b0b">You can't select date from the past.</p>
|
|
|
|
|
|
|
+ <h3 style="text-align: center" translate="reservations.date"></h3>
|
|
|
|
|
+ <p *ngIf="isDateFromPast()" style="color: #b70b0b" translate="reservations.errors.past_date"></p>
|
|
|
<div style="text-align: center">
|
|
<div style="text-align: center">
|
|
|
<input type="date"
|
|
<input type="date"
|
|
|
id="date"
|
|
id="date"
|
|
@@ -33,24 +34,24 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr style="font-size: 12px;text-align: left">
|
|
<tr style="font-size: 12px;text-align: left">
|
|
|
<td id="free" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
<td id="free" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
|
- <td colspan="3">Available</td>
|
|
|
|
|
|
|
+ <td colspan="3" translate="reservations.available"></td>
|
|
|
<td id="taken" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
<td id="taken" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
|
- <td colspan="3">Reserved</td>
|
|
|
|
|
|
|
+ <td colspan="3" translate="reservations.reserved"></td>
|
|
|
<td id="selected" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
<td id="selected" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
|
- <td colspan="3">Selected</td>
|
|
|
|
|
|
|
+ <td colspan="3" translate="reservations.selected"></td>
|
|
|
<td id="conflict" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
<td id="conflict" style="border:1px #333333 solid;width: 20px; height: 20px"></td>
|
|
|
- <td colspan="3">Conflict</td>
|
|
|
|
|
|
|
+ <td colspan="3" translate="reservations.conflict"></td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <h3 style="text-align: center">TIME</h3>
|
|
|
|
|
|
|
+ <h3 style="text-align: center" translate="reservations.time"></h3>
|
|
|
<div style="display: flex; justify-content: center; align-items: center;">
|
|
<div style="display: flex; justify-content: center; align-items: center;">
|
|
|
<table style="width: 90%">
|
|
<table style="width: 90%">
|
|
|
<tr>
|
|
<tr>
|
|
|
<td style="width: 25%; text-align: right; padding-right: 10px;">
|
|
<td style="width: 25%; text-align: right; padding-right: 10px;">
|
|
|
- <label for="from_hour" style="font-family: Courier New, monospace;">START AT</label>
|
|
|
|
|
|
|
+ <label for="from_hour" style="font-family: Courier New, monospace;" translate="reservations.start_at"></label>
|
|
|
</td>
|
|
</td>
|
|
|
<td style="width: 25%; text-align: left">
|
|
<td style="width: 25%; text-align: left">
|
|
|
<select id="from_hour" style="width: 70px; box-sizing: border-box;" (change)="onStartHourSelected()">
|
|
<select id="from_hour" style="width: 70px; box-sizing: border-box;" (change)="onStartHourSelected()">
|
|
@@ -73,7 +74,7 @@
|
|
|
</select>
|
|
</select>
|
|
|
</td>
|
|
</td>
|
|
|
<td style="width: 25%; text-align: right; padding-right: 10px;">
|
|
<td style="width: 25%; text-align: right; padding-right: 10px;">
|
|
|
- <label for="to_hour" style="font-family: Courier New, monospace;">END AT</label>
|
|
|
|
|
|
|
+ <label for="to_hour" style="font-family: Courier New, monospace;" translate="reservations.ends_at"></label>
|
|
|
</td>
|
|
</td>
|
|
|
<td style="width: 25%; text-align: left">
|
|
<td style="width: 25%; text-align: left">
|
|
|
<select id="to_hour" style="width: 70px; box-sizing: border-box;" (change)="onEndHourSelected()">
|
|
<select id="to_hour" style="width: 70px; box-sizing: border-box;" (change)="onEndHourSelected()">
|
|
@@ -98,13 +99,13 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
|
</div>
|
|
</div>
|
|
|
- <p *ngIf="areHoursConflicting()" style="color: #b70b0b">Selected hours are conflicting with existing reservations.</p>
|
|
|
|
|
- <p *ngIf="areHoursOrderWrong()" style="color: #b70b0b">The start hour should be before the end hour.</p>
|
|
|
|
|
- <p *ngIf="isItTooLateToStart()" style="color: #b70b0b">It is too late to start this reservation.</p>
|
|
|
|
|
|
|
+ <p *ngIf="areHoursConflicting()" style="color: #b70b0b" translate="reservations.errors.conflict"></p>
|
|
|
|
|
+ <p *ngIf="areHoursOrderWrong()" style="color: #b70b0b" translate="reservations.errors.time_order"></p>
|
|
|
|
|
+ <p *ngIf="isItTooLateToStart()" style="color: #b70b0b" translate="reservations.errors.too_late"></p>
|
|
|
|
|
|
|
|
<br *ngIf="!(areHoursOrderWrong() || areHoursConflicting() || isItTooLateToStart())">
|
|
<br *ngIf="!(areHoursOrderWrong() || areHoursConflicting() || isItTooLateToStart())">
|
|
|
<div style="text-align: center;">
|
|
<div style="text-align: center;">
|
|
|
- <p *ngIf="isFormNotValid()" style="color: #b70b0b"><b>Fix the errors above to make reservation.</b></p>
|
|
|
|
|
|
|
+ <p *ngIf="isFormNotValid()" style="color: #b70b0b"><b translate="reservations.errors.general"></b></p>
|
|
|
<input type="submit" value="Submit" [disabled]="isFormNotValid()"
|
|
<input type="submit" value="Submit" [disabled]="isFormNotValid()"
|
|
|
[ngClass]="{'disabled': isFormNotValid(), 'enabled': !isFormNotValid()}">
|
|
[ngClass]="{'disabled': isFormNotValid(), 'enabled': !isFormNotValid()}">
|
|
|
</div>
|
|
</div>
|