Merge branch 'main' into vue3

# Conflicts:
#	src/components/input/editor.vue
#	src/components/list/partials/filters.vue
#	src/components/tasks/partials/editAssignees.vue
#	src/helpers/find.ts
#	src/helpers/time/formatDate.js
#	src/main.ts
#	src/store/modules/attachments.js
#	src/store/modules/kanban.js
#	src/views/list/views/List.vue
#	yarn.lock
This commit is contained in:
Dominik Pschenitschni 2021-10-07 12:20:52 +02:00
commit 3a7a4bdc42
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
120 changed files with 717 additions and 272 deletions

26
src/helpers/utils.ts Normal file
View file

@ -0,0 +1,26 @@
export function findIndexById(array : [], id : string | number) {
return array.findIndex(({id: currentId}) => currentId === id)
}
export function findById(array : [], id : string | number) {
return array.find(({id: currentId}) => currentId === id)
}
export function includesById(array: [], id: string | number) {
return array.some(({id: currentId}) => currentId === id)
}
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isnil
export function isNil(value: any) {
return value == null
}
export function omitBy(obj: {}, check: (value: any) => Boolean): {} {
if (isNil(obj)) {
return {}
}
return Object.fromEntries(
Object.entries(obj).filter(([, value]) => !check(value)),
)
}