Skip to content

Commit

Permalink
[qa] fix access to store maps
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoPennec committed Jan 14, 2025
1 parent 9fa3b41 commit 3c6ac6b
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions src/components/lists/TaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -355,16 +355,8 @@ import ValidationTag from '@/components/widgets/ValidationTag.vue'
import assetStore from '@/store/modules/assets'
import editStore from '@/store/modules/edits'
import episodeStore from '@/store/modules/episodes'
import shotStore from '@/store/modules/shots'
import sequenceStore from '@/store/modules/sequences'
const stores = {
assetStore,
episodeStore,
shotStore,
sequenceStore,
editStore
}
import shotStore from '@/store/modules/shots'
export default {
name: 'task-list',
Expand Down Expand Up @@ -428,10 +420,6 @@ export default {
tasks: {
type: Array,
default: () => []
},
taskType: {
type: Object,
default: () => {}
}
},
Expand All @@ -445,21 +433,36 @@ export default {
computed: {
...mapGetters([
'assetMap',
'editMap',
'episodeMap',
'nbSelectedTasks',
'personMap',
'user',
'selectedTasks',
'sequenceMap',
'shotMap',
'taskMap',
'isCurrentUserManager',
'isCurrentUserSupervisor',
'taskTypeMap'
]),
assetMap() {
return assetStore.cache.assetMap
},
editMap() {
return editStore.cache.editMap
},
episodeMap() {
return episodeStore.cache.episodeMap
},
sequenceMap() {
return sequenceStore.cache.sequenceMap
},
shotMap() {
return shotStore.cache.shotMap
},
isAssets() {
return this.entityType === 'Asset'
},
Expand Down Expand Up @@ -743,9 +746,7 @@ export default {
},
getEntity(entityId) {
const store = stores[`${this.entityType.toLowerCase()}Store`]
const map = store.cache[`${this.entityType.toLowerCase()}Map`]
return map.get(entityId) || {}
return this[`${this.entityType.toLowerCase()}Map`].get(entityId) || {}
},
onKeyDown(event) {
Expand Down

0 comments on commit 3c6ac6b

Please sign in to comment.