From ea2ca8c3807b075a65c7870c5f73d4ef1f29431b Mon Sep 17 00:00:00 2001
From: Maksim Zakharov <m.zakharov@IBS.RU>
Date: Mon, 22 Aug 2022 17:54:33 +0300
Subject: remove sorting in inventory tables

---
 .../Overview/Inventory/InventoryTableFans.vue      | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

(limited to 'src/views/_sila/Overview/Inventory/InventoryTableFans.vue')

diff --git a/src/views/_sila/Overview/Inventory/InventoryTableFans.vue b/src/views/_sila/Overview/Inventory/InventoryTableFans.vue
index 1012b8a9..c24066a7 100644
--- a/src/views/_sila/Overview/Inventory/InventoryTableFans.vue
+++ b/src/views/_sila/Overview/Inventory/InventoryTableFans.vue
@@ -15,16 +15,11 @@
       </b-col>
     </b-row>
     <b-table
-      sort-icon-left
-      no-sort-reset
       hover
       responsive="md"
-      sort-by="health"
       show-empty
       :items="fans"
       :fields="fields"
-      :sort-desc="true"
-      :sort-compare="sortCompare"
       :filter="searchFilter"
       :empty-text="$t('global.table.emptyMessage')"
       :empty-filtered-text="$t('global.table.emptySearchMessage')"
@@ -102,7 +97,6 @@ import TableCellCount from '@/components/_sila/Global/TableCellCount';
 
 import StatusIcon from '@/components/_sila/Global/StatusIcon';
 import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin';
-import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin';
 import Search from '@/components/_sila/Global/Search';
 import SearchFilterMixin, {
   searchFilter,
@@ -113,12 +107,7 @@ import TableRowExpandMixin, {
 
 export default {
   components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount },
-  mixins: [
-    TableRowExpandMixin,
-    DataFormatterMixin,
-    TableSortMixin,
-    SearchFilterMixin,
-  ],
+  mixins: [TableRowExpandMixin, DataFormatterMixin, SearchFilterMixin],
   data() {
     return {
       isBusy: true,
@@ -127,26 +116,22 @@ export default {
           key: 'expandRow',
           label: '',
           tdClass: 'table-row-expand',
-          sortable: false,
         },
         {
           key: 'name',
           label: this.$t('pageInventory.table.id'),
           formatter: this.dataFormatter,
-          sortable: true,
         },
         {
           key: 'health',
           label: this.$t('pageInventory.table.health'),
           formatter: this.dataFormatter,
-          sortable: true,
           tdClass: 'text-nowrap',
         },
         {
           key: 'partNumber',
           label: this.$t('pageInventory.table.partNumber'),
           formatter: this.dataFormatter,
-          sortable: true,
         },
         {
           key: 'serialNumber',
@@ -177,11 +162,6 @@ export default {
     });
   },
   methods: {
-    sortCompare(a, b, key) {
-      if (key === 'health') {
-        return this.sortStatus(a, b, key);
-      }
-    },
     onFiltered(filteredItems) {
       this.searchTotalFilteredRows = filteredItems.length;
     },
-- 
cgit v1.2.3

