mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-25 00:03:27 +08:00
Make stock column work properly with different orders [SCI-6677] (#3974)
This commit is contained in:
parent
a32dd54a6e
commit
addd4a9522
1 changed files with 12 additions and 14 deletions
|
@ -75,22 +75,20 @@ var MyModuleRepositories = (function() {
|
|||
}
|
||||
|
||||
customColumns.each((i, column) => {
|
||||
if (!$(column).hasClass('item-stock')) {
|
||||
columns.push({
|
||||
visible: true,
|
||||
searchable: true,
|
||||
data: String(columns.length),
|
||||
data: column.dataset.type === 'RepositoryStockValue' ? 'stock' : String(columns.length),
|
||||
defaultContent: $.fn.dataTable.render['default' + column.dataset.type](column.id)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if ($(tableContainer).data('stock-management')) {
|
||||
columns = columns.concat(
|
||||
stockManagementColumns(
|
||||
$(tableContainer).data('stock-consumption-column')
|
||||
)
|
||||
);
|
||||
if ($(tableContainer).data('stock-consumption-column')) {
|
||||
columns.push({
|
||||
visible: true,
|
||||
searchable: false,
|
||||
data: 'consumedStock'
|
||||
});
|
||||
}
|
||||
|
||||
return columns;
|
||||
|
|
Loading…
Reference in a new issue