Finalizada estrutura de Cards de Movimentações abertas
A tela de listagem de movimentações agora conta com cartões que indicam, da mais antiga pra mais recente, as movimentações ainda em aberto
This commit is contained in:
1 parent
39bd2be04a
commit
8d61dc60a8
3 files changed
+5
-39
No files matched your search
@@ -1,21 +0,0 @@
|
|||||||
<div class="active-rotation-card">
|
|
||||||
<div class="identification">
|
|
||||||
<p>{{ obj.batch.identifier }} em piquete {{ obj.paddock.paddock_number }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="duration">
|
|
||||||
<p>Há {{ obj.duration_display_day }} dias, desde {{ obj.entry_date|date:"d/m/Y" }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="animals">
|
|
||||||
<p>Animais: {{ obj.animal_count }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="livestock">
|
|
||||||
<p>UGM: {{ obj.livestock_unit }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="details">
|
|
||||||
<a href="#vermais">Ver mais</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -8,16 +8,13 @@
|
|||||||
{% endblock extra_css %}
|
{% endblock extra_css %}
|
||||||
|
|
||||||
{% block before_table %}
|
{% block before_table %}
|
||||||
|
{% if open_rotations %}
|
||||||
<p>Movimentações em aberto</p>
|
<p>Movimentações em aberto</p>
|
||||||
<div class="open-rotations-container">
|
<div class="open-rotations-container">
|
||||||
{% if not open_rotations %}
|
|
||||||
<p>Nenhuma movimentação em aberto</p>
|
|
||||||
{% else %}
|
|
||||||
|
|
||||||
{% for obj in open_rotations %}
|
{% for obj in open_rotations %}
|
||||||
<div class="active-rotation-card">
|
<div class="active-rotation-card">
|
||||||
<div class="identification">
|
<div class="identification">
|
||||||
<p>{{ obj.batch.identifier }} em piquete {{ obj.paddock.paddock_number }}</p>
|
<p>Lote {{ obj.batch.identifier }} em piquete {{ obj.paddock.paddock_number }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
@@ -33,23 +30,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<a href="{% url details_url %}">Ver mais</a>
|
<p>Ver mais <i class="fa-solid fa-angle-right"></i></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% include "rotation/active_rotation_card.html" %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for obj in open_rotations %}
|
|
||||||
{% include "rotation/active_rotation_card.html" %}
|
|
||||||
{% endfor %}
|
|
||||||
{% for obj in open_rotations %}
|
|
||||||
{% include "rotation/active_rotation_card.html" %}
|
|
||||||
{% endfor %}
|
|
||||||
{% for obj in open_rotations %}
|
|
||||||
{% include "rotation/active_rotation_card.html" %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block table %}
|
{% block table %}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class RotationListView(BaseListView):
|
|||||||
details_url = "entities:rotation:rotation_home" # Trocar pela url de detalhe
|
details_url = "entities:rotation:rotation_home" # Trocar pela url de detalhe
|
||||||
|
|
||||||
filter_fields = ["id", "batch", "paddock"]
|
filter_fields = ["id", "batch", "paddock"]
|
||||||
|
order_by = ["id"] # Orders from oldest to newest
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
queryset = super().get_queryset()
|
queryset = super().get_queryset()
|
||||||
|
|||||||
Reference in new issue
Block a user