Skip to content

Commit

Permalink
Merge pull request #910 from vstanojevic/dashboard-sprint-15-bugfix-8.1
Browse files Browse the repository at this point in the history
Possible bugfix KNOWAGE-8374
  • Loading branch information
Marco Libanori authored Jan 15, 2024
2 parents b64f84e + 12868c7 commit f8f0b45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getLocale } from '@/helpers/commons/localeHelper'
import deepcopy from 'deepcopy'
import moment from 'moment'

Expand Down Expand Up @@ -42,13 +43,9 @@ function checkIfMultivalueDriverContainsCrossNavigationValue(tempParam: any, cro
}

function getValidDate(value: string) {
let momentDate = moment(deepcopy(value))
let momentDate = moment(deepcopy(value)).locale(getLocale())
if (momentDate.isValid()) return momentDate.toDate()
const validFormats = ['DD/MM/YYYY', 'DD/MM/YYYY HH:mm:ss.SSS']
for (let i = 0; i < validFormats.length; i++) {
momentDate = moment(deepcopy(value), validFormats[i])
if (momentDate.isValid()) return momentDate.toDate()
}

return ''
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const removeUnusedVisibleColumnsFromModel = (treeListTypeModel) => {
if (!treeListTypeModel || !treeListTypeModel['VISIBLE-COLUMNS']) return
if (!treeListTypeModel || !treeListTypeModel['VISIBLE-COLUMNS'] || !treeListTypeModel.STMT) return
const visibleColumns = treeListTypeModel['VISIBLE-COLUMNS'].split(',')
const filteredColumns = visibleColumns.filter((column: string) => treeListTypeModel.STMT.includes(column.trim()))
treeListTypeModel['VISIBLE-COLUMNS'] = filteredColumns.join(',')
Expand Down

0 comments on commit f8f0b45

Please sign in to comment.