mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
Build line labels (#5034)
* Adds BuildLineLabel model - New type of label for printing against BuildLine objects * Add serializer for new model * Add API endpoints for new label type * Add hooks to BuildLine table * Create default label - Create an example BuildLineLabel object * Add admin integration * Fix js code * Use two-tiered template - Allows base template to be updated * Improve default label * Add docs pages for labels * Update nav * Documentation for new label * Add permission role * Bump API version
This commit is contained in:
@ -2349,8 +2349,17 @@ function loadBuildLineTable(table, build_id, options={}) {
|
||||
let filters = loadTableFilters('buildlines', params);
|
||||
let filterTarget = options.filterTarget || '#filter-list-buildlines';
|
||||
|
||||
setupFilterList('buildlines', $(table), filterTarget);
|
||||
// If data is passed directly to this function, do not request data from the server
|
||||
// If data is passed directly to this function, do not setup filters
|
||||
if (!options.data) {
|
||||
setupFilterList('buildlines', $(table), filterTarget, {
|
||||
labels: {
|
||||
url: '{% url "api-buildline-label-list" %}',
|
||||
key: 'line',
|
||||
},
|
||||
singular_name: '{% trans "build line" %}',
|
||||
plural_name: '{% trans "build lines" %}',
|
||||
});
|
||||
}
|
||||
|
||||
let table_options = {
|
||||
name: name,
|
||||
|
Reference in New Issue
Block a user