From 1c892d7357f50ae0671e0d159cb9825768d52a03 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 4 Oct 2020 23:37:39 -0400 Subject: [PATCH] Fixed: Sorting of Queue time left --- frontend/src/Store/Actions/queueActions.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/Store/Actions/queueActions.js b/frontend/src/Store/Actions/queueActions.js index 56944426f..52f5844ac 100644 --- a/frontend/src/Store/Actions/queueActions.js +++ b/frontend/src/Store/Actions/queueActions.js @@ -1,4 +1,5 @@ import _ from 'lodash'; +import moment from 'moment'; import { createAction } from 'redux-actions'; import { batchActions } from 'redux-batched-actions'; import { sortDirections } from 'Helpers/Props'; @@ -142,6 +143,11 @@ export const defaultState = { isModifiable: false } ] + }, + sortPredicates: { + estimatedCompletionTime: function(item, direction) { + return moment.duration(item.timeleft).asMilliseconds(); + } } };