Fixed sort by date (#1719)
* Fixed sort by date Date property is in JSON string. So, we should parse it and sort later. * fix type script error Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
parent
792d8832c6
commit
5fe26615f1
1 changed files with 3 additions and 0 deletions
|
@ -199,6 +199,9 @@ function sortCards(cards: Card[], board: Board, activeView: BoardView, usersById
|
|||
} else if (template.type === 'updatedBy') {
|
||||
aValue = usersById[a.modifiedBy]?.username || ''
|
||||
bValue = usersById[b.modifiedBy]?.username || ''
|
||||
} else if (template.type === 'date') {
|
||||
aValue = (aValue === '') ? '' : JSON.parse(aValue as string).from
|
||||
bValue = (bValue === '') ? '' : JSON.parse(bValue as string).from
|
||||
}
|
||||
|
||||
let result = 0
|
||||
|
|
Loading…
Reference in a new issue