2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 20:16:44 +00:00

Fix display of part table

This commit is contained in:
Oliver Walters 2020-04-20 00:00:14 +10:00
parent 092215918c
commit 3a64d0bc8f

View File

@ -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';