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