-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add end time and station in order
- Loading branch information
Showing
5 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
<hr /> | ||
<div class="wrapper"> | ||
<p>Order ID: {{ order.id }}</p> | ||
<p> | ||
Start Time: <b>{{ order.schedule.segments[0].time[0] | date: 'MMMM dd HH:mm' }}</b> | ||
</p> | ||
<p> | ||
Start Station: | ||
@if (stationsService.findStationById(order.path[0]); as startStation) { | ||
<b>{{ startStation.city }}</b> | ||
} | ||
</p> | ||
<p> | ||
Start Time: <b>{{ order.schedule.segments[0].time[0] | date: 'MMMM dd HH:mm' }}</b> | ||
</p> | ||
<p> | ||
End Station: | ||
@if (stationsService.findStationById(order.path[order.path.length - 1]); as endStation) { | ||
<b>{{ endStation.city }}</b> | ||
} | ||
</p> | ||
<p> | ||
End Time: | ||
<b>{{ order.schedule.segments[order.schedule.segments.length - 1].time[1] | date: 'MMMM dd HH:mm' }}</b> | ||
</p> | ||
</div> |
1 change: 0 additions & 1 deletion
1
src/app/orders/components/orders-list/orders-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<div> | ||
orders-list works! | ||
<div> | ||
@for (order of orders; track order.id) { | ||
<app-order [order]="order"></app-order> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
<p>orders works!</p> | ||
|
||
<div class="wrapper"> | ||
@let orders = ordersService.allOrders(); | ||
@if (orders.length) { | ||
|