47 lines
998 B
HTML
47 lines
998 B
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
{% block content %}
|
|
|
|
<h3>Allocate Parts for Build</h3>
|
|
|
|
<h4><a href="{% url 'build-detail' build.id %}">{{ build.title }}</a></h4>
|
|
|
|
<hr>
|
|
|
|
<table class='table table-striped' id='build-table'>
|
|
</table>
|
|
|
|
{% endblock %}
|
|
|
|
{% block js_load %}
|
|
{{ block.super }}
|
|
<script src="{% static 'script/inventree/api.js' %}"></script>
|
|
<script src="{% static 'script/inventree/part.js' %}"></script>
|
|
{% endblock %}
|
|
|
|
{% block js_ready %}
|
|
{{ block.super }}
|
|
|
|
$('#build-table').bootstrapTable({
|
|
sortable: true,
|
|
columns: [
|
|
{
|
|
field: 'sub_part.name',
|
|
title: 'Part',
|
|
},
|
|
{
|
|
title: 'Source',
|
|
},
|
|
{
|
|
field: 'quantity',
|
|
title: 'Quantity',
|
|
}
|
|
],
|
|
});
|
|
|
|
getBomList({part: {{ build.part.id }}}).then(function(response) {
|
|
$("#build-table").bootstrapTable('load', response);
|
|
});
|
|
|
|
{% endblock %} |