Merge pull request #164 from SchrodingersGat/search-page

Display available stock in part search page
This commit is contained in:
Oliver 2019-04-26 21:42:36 +10:00 committed by GitHub
commit 948c118695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,18 @@
field: 'description',
title: 'Description',
searchable: true,
}
},
{
field: 'available_stock',
title: 'Stock',
formatter: function(value, row, index, field) {
if (value) {
return renderLink(value, row.url + 'stock/');
} else {
return renderLink('No stock', row.url + 'stock/');
}
}
},
],
url: "{% url 'api-part-list' %}"
});