diff --git a/InvenTree/build/templates/build/allocate.html b/InvenTree/build/templates/build/allocate.html
index 63e15df135..0a746524b3 100644
--- a/InvenTree/build/templates/build/allocate.html
+++ b/InvenTree/build/templates/build/allocate.html
@@ -14,6 +14,12 @@
{% endblock %}
+{% block js_load %}
+{{ block.super }}
+
+
+{% endblock %}
+
{% block js_ready %}
{{ block.super }}
@@ -21,15 +27,21 @@
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 %}
\ No newline at end of file
diff --git a/InvenTree/static/script/inventree/part.js b/InvenTree/static/script/inventree/part.js
new file mode 100644
index 0000000000..9396e01772
--- /dev/null
+++ b/InvenTree/static/script/inventree/part.js
@@ -0,0 +1,19 @@
+/* Part API functions
+ * Requires api.js to be loaded first
+ */
+
+function getPartCategoryList(filters={}, options={}) {
+ return inventreeGet('/api/part/category/', filters, options);
+}
+
+function getSupplierPartList(filters={}, options={}) {
+ return inventreeGet('/api/part/supplier/', filters, options);
+}
+
+function getPartList(filters={}, options={}) {
+ return inventreeGet('/api/part/', filters, options);
+}
+
+function getBomList(filters={}, options={}) {
+ return inventreeGet('/api/part/bom/', filters, options);
+}
\ No newline at end of file