mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Fix display of part table
This commit is contained in:
parent
092215918c
commit
3a64d0bc8f
@ -87,6 +87,9 @@ function loadPartTable(table, url, options={}) {
|
|||||||
* disableFilters: If true, disable custom filters
|
* disableFilters: If true, disable custom filters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Ensure category detail is included
|
||||||
|
options.params['category_detail'] = true;
|
||||||
|
|
||||||
var params = options.params || {};
|
var params = options.params || {};
|
||||||
|
|
||||||
var filters = {};
|
var filters = {};
|
||||||
@ -184,11 +187,11 @@ function loadPartTable(table, url, options={}) {
|
|||||||
|
|
||||||
columns.push({
|
columns.push({
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'category__name',
|
field: 'category_detail',
|
||||||
title: 'Category',
|
title: 'Category',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
if (row.category) {
|
if (row.category) {
|
||||||
return renderLink(row.category__name, "/part/category/" + row.category + "/");
|
return renderLink(value.pathstring, "/part/category/" + row.category + "/");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 'No category';
|
return 'No category';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user