refactor responses bool and fix name is_incoming
This commit is contained in:
parent
2e613265a6
commit
0d166b2b0c
|
@ -105,10 +105,8 @@ class Lot(Thing):
|
||||||
return False if self.trade else True
|
return False if self.trade else True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_incominig(self):
|
def is_incoming(self):
|
||||||
if self.trade and self.trade.user_to == current_user:
|
return bool(self.trade and self.trade.user_to == current_user)
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_outgoing(self):
|
def is_outgoing(self):
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
</a>
|
</a>
|
||||||
<ul id="incoming-lots-nav" class="nav-content collapse" data-bs-parent="#sidebar-nav">
|
<ul id="incoming-lots-nav" class="nav-content collapse" data-bs-parent="#sidebar-nav">
|
||||||
{% for lot in lots %}
|
{% for lot in lots %}
|
||||||
{% if lot.is_incominig %}
|
{% if lot.is_incoming %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ url_for('inventory.devices.lotdevicelist', lot_id=lot.id) }}">
|
<a href="{{ url_for('inventory.devices.lotdevicelist', lot_id=lot.id) }}">
|
||||||
<i class="bi bi-circle"></i><span>{{ lot.name }}</span>
|
<i class="bi bi-circle"></i><span>{{ lot.name }}</span>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{% elif lot.is_temporary %}
|
{% elif lot.is_temporary %}
|
||||||
<li class="breadcrumb-item active">Temporary Lot</li>
|
<li class="breadcrumb-item active">Temporary Lot</li>
|
||||||
<li class="breadcrumb-item active">{{ lot.name }}</li>
|
<li class="breadcrumb-item active">{{ lot.name }}</li>
|
||||||
{% elif lot.is_incominig %}
|
{% elif lot.is_incoming %}
|
||||||
<li class="breadcrumb-item active">Incoming Lot</li>
|
<li class="breadcrumb-item active">Incoming Lot</li>
|
||||||
<li class="breadcrumb-item active">{{ lot.name }}</li>
|
<li class="breadcrumb-item active">{{ lot.name }}</li>
|
||||||
{% elif lot.is_outgoing %}
|
{% elif lot.is_outgoing %}
|
||||||
|
|
Reference in a new issue