NOJIRA added itemcounter
This commit is contained in:
@@ -28,6 +28,10 @@ class DTO:
|
|||||||
def items(self) -> List[Item]:
|
def items(self) -> List[Item]:
|
||||||
return sorted([Item(name, amount) for name, amount in self.__items.items()])
|
return sorted([Item(name, amount) for name, amount in self.__items.items()])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def item_count(self) -> int:
|
||||||
|
return sum(self.__items.values())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def applicants(self) -> List[str]:
|
def applicants(self) -> List[str]:
|
||||||
return sorted(self.__applicants)
|
return sorted(self.__applicants)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<h1>Streeplijst</h1>
|
<h1>Streeplijst - {{ data.item_count }} stuks</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in data.items %}
|
{% for item in data.items %}
|
||||||
<li>{{ item.name }}: {{ item.amount }}</li>
|
<li>{{ item.name }}: {{ item.amount }}</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user