mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Improve display of allocation page
This commit is contained in:
@ -24,6 +24,21 @@ InvenTree | Allocate Parts
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
<h4>Part</h4>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<h4>Available</h4>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<h4>Required</h4>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<h4>Allocated</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for bom_item in bom_items.all %}
|
||||
{% include "build/allocation_item.html" with item=bom_item build=build collapse_id=bom_item.id %}
|
||||
{% endfor %}
|
||||
|
@ -3,6 +3,8 @@
|
||||
{% load static %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% block collapse_panel_setup %}class='panel part-allocation' id='allocation-panel-{{ item.sub_part.id }}'{% endblock %}
|
||||
|
||||
{% block collapse_title %}
|
||||
<div class='hover-icon media-left' style='float: left;'>
|
||||
<img class='hover-img-thumb' src="{% if item.sub_part.image %}{{ item.sub_part.image.url }}{% endif %}">
|
||||
@ -15,21 +17,16 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block collapse_heading %}
|
||||
<div class='col-sm-1' align='right'>
|
||||
Required:
|
||||
</div>
|
||||
<div class='col-sm-1'>
|
||||
<b>{% multiply build.quantity item.quantity %}</b>
|
||||
</div>
|
||||
<div class='col-sm-1' align='right'>
|
||||
Allocated:
|
||||
</div>
|
||||
<div class='col-sm-1' id='allocation-panel-{{ item.sub_part.id }}'>
|
||||
<b><span id='allocation-total-{{ item.sub_part.id }}'>{% part_allocation_count build item.sub_part %}</span></b>
|
||||
<div class='col-sm-2'>
|
||||
<b>{{ item.sub_part.available_stock }}</b>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<b>{% multiply build.quantity item.quantity %}</b>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<b><span id='allocation-total-{{ item.sub_part.id }}'>{% part_allocation_count build item.sub_part %}</span></b>
|
||||
<div class='btn-group' style='float: right;'>
|
||||
<button class='btn btn-success btn-sm' id='new-item-{{ item.sub_part.id }}' url="{% url 'build-item-create' %}?part={{ item.sub_part.id }}&build={{ build.id }}">Allocate Parts</button>
|
||||
<button class='btn btn-success btn-sm' title='Allocate stock for {{ item.sub_part}}' id='new-item-{{ item.sub_part.id }}' url="{% url 'build-item-create' %}?part={{ item.sub_part.id }}&build={{ build.id }}">Allocate</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user