mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Updated allocation card view
This commit is contained in:
parent
22a5f921b8
commit
3ec2396ec1
@ -12,8 +12,7 @@ InvenTree | Allocate Parts
|
||||
{% include "build/tabs.html" with tab='allocate' %}
|
||||
|
||||
|
||||
{% if build.incomplete_outputs %}
|
||||
<h4>{% trans "Tracked Build Ouputs" %}</h4>
|
||||
<h4>{% trans "Incomplete Build Ouputs" %}</h4>
|
||||
<div class="panel-group" id="build-output-accordion" role="tablist" aria-multiselectable="true">
|
||||
{% for item in build.incomplete_outputs %}
|
||||
{% include "build/allocation_card.html" with item=item %}
|
||||
@ -21,8 +20,7 @@ InvenTree | Allocate Parts
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<h4>{% trans "Untracked Parts" %}</h4>
|
||||
{% endif %}
|
||||
<h4>{% trans "Assigned Stock" %}</h4>
|
||||
|
||||
<div id='build-item-toolbar'>
|
||||
{% if build.status == BuildStatus.PENDING %}
|
||||
|
@ -1,23 +1,15 @@
|
||||
{% load i18n %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% if item %}
|
||||
{% define item.pk as pk %}
|
||||
{% else %}
|
||||
{% define 'untracked' as pk %}
|
||||
{% endif %}
|
||||
|
||||
<div class="panel panel-default" id='allocation-panel-{{ pk }}'>
|
||||
<div class="panel-heading" role="tab" id="heading-{{ pk }}">
|
||||
<div class="panel-title">
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
<a role="button" data-toggle="collapse" data-parent="#build-output-accordion" href="#collapse-{{ pk }}" aria-expanded="true" aria-controls="collapse-{{ pk }}">
|
||||
{% if item %}
|
||||
{{ item }}
|
||||
{% else %}
|
||||
{% trans "Untracked items" %}
|
||||
{% endif %}
|
||||
<a class='collapsed' aria-expanded='false' role="button" data-toggle="collapse" data-parent="#build-output-accordion" href="#collapse-{{ pk }}" aria-controls="collapse-{{ pk }}">
|
||||
<span class='fas fa-caret-right'></span> {{ item }}
|
||||
</a>
|
||||
</div>
|
||||
<div class='col-sm-3'>
|
||||
@ -35,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse-{{ pk }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-{{ pk }}">
|
||||
<div id="collapse-{{ pk }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{ pk }}">
|
||||
<div class="panel-body">
|
||||
<table class='table table-striped table-condensed' id='allocation-table-{{ pk }}'></table>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<a href="{% url 'build-detail' build.id %}">{% trans "Details" %}</a>
|
||||
</li>
|
||||
<li{% if tab == 'allocate' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-allocate' build.id %}">{% trans "Allocated Parts" %}</a>
|
||||
<a href="{% url 'build-allocate' build.id %}">{% trans "Allocate Parts" %}</a>
|
||||
</li>
|
||||
<li{% if tab == 'output' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-output' build.id %}">{% trans "Build Outputs" %}{% if build.output_count > 0%}<span class='badge'>{{ build.output_count }}</span>{% endif %}</a>
|
||||
|
@ -573,9 +573,9 @@ class BuildCreate(AjaxCreateView):
|
||||
|
||||
if part.trackable:
|
||||
# For a trackable part, either batch or serial nubmber must be specified
|
||||
if not cleaned_data['batch'] and not cleaned_data['serial_numbers']:
|
||||
if not cleaned_data['serial_numbers']:
|
||||
raise ValidationError({
|
||||
'part': _('Trackable part must have either batch or serial number specified')
|
||||
'serial_numbers': _('Trackable part must have serial numbers specified')
|
||||
})
|
||||
|
||||
# If serial numbers are set...
|
||||
|
Loading…
Reference in New Issue
Block a user