mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Javascript formatting
This commit is contained in:
parent
1a07ae0936
commit
6ef4325eac
@ -202,7 +202,7 @@ function loadPartVariantTable(table, partId, options={}) {
|
|||||||
showColumns: true,
|
showColumns: true,
|
||||||
original: params,
|
original: params,
|
||||||
queryParams: filters,
|
queryParams: filters,
|
||||||
formatNoMatches: function() { return "{% trans "No variants found" %}"; },
|
formatNoMatches: function() { return '{% trans "No variants found" %}'; },
|
||||||
columns: cols,
|
columns: cols,
|
||||||
treeEnable: true,
|
treeEnable: true,
|
||||||
rootParentId: partId,
|
rootParentId: partId,
|
||||||
@ -249,7 +249,7 @@ function loadParametricPartTable(table, options={}) {
|
|||||||
if (header === 'part') {
|
if (header === 'part') {
|
||||||
columns.push({
|
columns.push({
|
||||||
field: header,
|
field: header,
|
||||||
title: '{% trans 'Part' %}',
|
title: '{% trans "Part" %}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
sortName: 'name',
|
sortName: 'name',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
@ -268,7 +268,7 @@ function loadParametricPartTable(table, options={}) {
|
|||||||
} else if (header === 'description') {
|
} else if (header === 'description') {
|
||||||
columns.push({
|
columns.push({
|
||||||
field: header,
|
field: header,
|
||||||
title: '{% trans 'Description' %}',
|
title: '{% trans "Description" %}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -288,7 +288,7 @@ function loadParametricPartTable(table, options={}) {
|
|||||||
queryParams: table_headers,
|
queryParams: table_headers,
|
||||||
groupBy: false,
|
groupBy: false,
|
||||||
name: options.name || 'parametric',
|
name: options.name || 'parametric',
|
||||||
formatNoMatches: function() { return "{% trans "No parts found" %}"; },
|
formatNoMatches: function() { return '{% trans "No parts found" %}'; },
|
||||||
columns: columns,
|
columns: columns,
|
||||||
showColumns: true,
|
showColumns: true,
|
||||||
data: table_data,
|
data: table_data,
|
||||||
@ -454,7 +454,7 @@ function loadPartTable(table, url, options={}) {
|
|||||||
groupBy: false,
|
groupBy: false,
|
||||||
name: options.name || 'part',
|
name: options.name || 'part',
|
||||||
original: params,
|
original: params,
|
||||||
formatNoMatches: function() { return "{% trans "No parts found" %}"; },
|
formatNoMatches: function() { return '{% trans "No parts found" %}'; },
|
||||||
columns: columns,
|
columns: columns,
|
||||||
showColumns: true,
|
showColumns: true,
|
||||||
});
|
});
|
||||||
@ -564,12 +564,12 @@ function loadPartTestTemplateTable(table, options) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'test_name',
|
field: 'test_name',
|
||||||
title: "{% trans "Test Name" %}",
|
title: '{% trans "Test Name" %}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'description',
|
field: 'description',
|
||||||
title: "{% trans "Description" %}",
|
title: '{% trans "Description" %}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'required',
|
field: 'required',
|
||||||
@ -581,14 +581,14 @@ function loadPartTestTemplateTable(table, options) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'requires_value',
|
field: 'requires_value',
|
||||||
title: "{% trans "Requires Value" %}",
|
title: '{% trans "Requires Value" %}',
|
||||||
formatter: function(value) {
|
formatter: function(value) {
|
||||||
return yesNoLabel(value);
|
return yesNoLabel(value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'requires_attachment',
|
field: 'requires_attachment',
|
||||||
title: "{% trans "Requires Attachment" %}",
|
title: '{% trans "Requires Attachment" %}',
|
||||||
formatter: function(value) {
|
formatter: function(value) {
|
||||||
return yesNoLabel(value);
|
return yesNoLabel(value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user