code cleanup
This commit is contained in:
parent
614a929592
commit
846e448f01
|
@ -40,8 +40,6 @@ public class UserController {
|
||||||
User user = userRepository.findById(userId).get();
|
User user = userRepository.findById(userId).get();
|
||||||
model.addAttribute("user", user);
|
model.addAttribute("user", user);
|
||||||
|
|
||||||
//TODO: klären wegen Geschäftskundenunterscheidung
|
|
||||||
|
|
||||||
return "user/settings";
|
return "user/settings";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,4 +56,9 @@ public class CustomerOrder {
|
||||||
public String formatDeliveredAt(){
|
public String formatDeliveredAt(){
|
||||||
return new SimpleDateFormat("dd.MM.yyyy HH:mm").format(deliveredAt);
|
return new SimpleDateFormat("dd.MM.yyyy HH:mm").format(deliveredAt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getEstimatedArrival() {
|
||||||
|
//TODO: get estimated arrival from api
|
||||||
|
return "TODO TODO TODO";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<table class="key-value">
|
<table class="key-value">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Lieferstatus</th>
|
<th>Lieferstatus</th>
|
||||||
<td th:if="${order.deliveredAt == null}"><b>Unterwegs</b> <br/> Vorraussichtliche Ankunft: TODO TODO TODO TODO</td>
|
<td th:if="${order.deliveredAt == null}"><b>Unterwegs</b> <br/> Vorraussichtliche Ankunft: <span th:text="${order.getEstimatedArrival()}" /></td>
|
||||||
<td th:if="${order.deliveredAt != null}"><b>Angekommen</b> <br/> Ankunft: <span th:text="${order.formatDeliveredAt()}" /></td>
|
<td th:if="${order.deliveredAt != null}"><b>Angekommen</b> <br/> Ankunft: <span th:text="${order.formatDeliveredAt()}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Reference in New Issue