mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Display icons in supplier_part list
- Bug fix for part list API query
This commit is contained in:
parent
88a1df75d2
commit
0754afd5f5
@ -51,10 +51,10 @@
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
field: 'part_name',
|
||||
field: 'part_detail.name',
|
||||
title: 'Part',
|
||||
formatter: function(value, row, index, field) {
|
||||
return renderLink(value, '/part/' + row.part + '/suppliers/');
|
||||
return imageHoverIcon(row.part_detail.image_url) + renderLink(value, '/part/' + row.part + '/suppliers/');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ class SupplierPartSerializer(serializers.ModelSerializer):
|
||||
|
||||
url = serializers.CharField(source='get_absolute_url', read_only=True)
|
||||
|
||||
part_name = serializers.CharField(source='part.name', read_only=True)
|
||||
part_detail = PartBriefSerializer(source='part', many=False, read_only=True)
|
||||
|
||||
supplier_name = serializers.CharField(source='supplier.name', read_only=True)
|
||||
|
||||
@ -135,7 +135,7 @@ class SupplierPartSerializer(serializers.ModelSerializer):
|
||||
'pk',
|
||||
'url',
|
||||
'part',
|
||||
'part_name',
|
||||
'part_detail',
|
||||
'supplier',
|
||||
'supplier_name',
|
||||
'SKU',
|
||||
|
@ -86,7 +86,9 @@ function loadPartTable(table, url, options={}) {
|
||||
*/
|
||||
|
||||
// Default query params
|
||||
options.active = true;
|
||||
query = options.query;
|
||||
|
||||
query.active = true;
|
||||
|
||||
$(table).bootstrapTable({
|
||||
url: url,
|
||||
@ -98,7 +100,7 @@ function loadPartTable(table, url, options={}) {
|
||||
pageSize: 25,
|
||||
rememberOrder: true,
|
||||
queryParams: function(p) {
|
||||
return options;
|
||||
return query;
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user