Merge pull request #1038 from chaotixkilla/fix-customer-list-sorting

Fix customer list sorting
This commit is contained in:
Rafael Taranto 2022-01-13 11:59:08 +00:00 committed by GitHub
commit cfb360ab4e

View file

@ -80,9 +80,9 @@ const Customers = () => {
const configData = R.path(['config'])(customersResponse) ?? [] const configData = R.path(['config'])(customersResponse) ?? []
const locale = configData && fromNamespace(namespaces.LOCALE, configData) const locale = configData && fromNamespace(namespaces.LOCALE, configData)
const customersData = R.sortWith([R.descend(R.prop('lastActive'))])( const customersData = R.sortWith([
filteredCustomers ?? [] R.descend(it => new Date(R.prop('lastActive', it) ?? '0'))
) ])(filteredCustomers ?? [])
const onFilterChange = filters => { const onFilterChange = filters => {
const filtersObject = getFiltersObj(filters) const filtersObject = getFiltersObj(filters)