call one time all lots
This commit is contained in:
parent
bc8944a498
commit
3a06ade79f
|
@ -179,7 +179,7 @@
|
|||
{% else %}
|
||||
<ul id="incoming-lots-nav" class="nav-content collapse" data-bs-parent="#sidebar-nav">
|
||||
{% endif %}
|
||||
{% for lot in lots %}
|
||||
{% for lot in all_lots %}
|
||||
{% if lot.is_incoming %}
|
||||
<li>
|
||||
<a href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
|
||||
|
@ -204,7 +204,7 @@
|
|||
{% else %}
|
||||
<ul id="outgoing-lots-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
|
||||
{% endif %}
|
||||
{% for lot in lots %}
|
||||
{% for lot in all_lots %}
|
||||
{% if lot.is_outgoing %}
|
||||
<li>
|
||||
<a href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
|
||||
|
@ -235,7 +235,7 @@
|
|||
<i class="bi bi-plus" style="font-size: larger;"></i><span>New temporary lot</span>
|
||||
</a>
|
||||
</li>
|
||||
{% for lot in lots %}
|
||||
{% for lot in all_lots %}
|
||||
{% if lot.is_temporary %}
|
||||
<li>
|
||||
<a href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
|
||||
|
|
|
@ -69,6 +69,7 @@ class GenericMixin(View):
|
|||
def get_context(self):
|
||||
self.context = {
|
||||
'lots': self.get_lots(),
|
||||
'all_lots': self.get_lots().all(),
|
||||
'version': __version__,
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue