Skip to content

Commit

Permalink
Fixed console error
Browse files Browse the repository at this point in the history
  • Loading branch information
remko48 committed Oct 2, 2024
1 parent ca9b899 commit 8cf92cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/modals/SourceConfiguration/EditSourceConfiguration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export default {
}
},
checkIfKeyIsUnique(key) {
if (!sourceStore.sourceItem.configuration) return false
const keys = Object.keys(sourceStore.sourceItem.configuration)
if (this.oldKey === key) return false
if (keys.includes(key)) return true
Expand Down
10 changes: 7 additions & 3 deletions src/views/Source/SourceDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { sourceStore, navigationStore } from '../../store/store.js'
</template>
Test
</NcActionButton>
<NcActionButton @click="navigationStore.setModal('editSourceConfiguration')">
<NcActionButton @click="addSourceConfiguration">
<template #icon>
<Plus :size="20" />
</template>
Expand Down Expand Up @@ -61,7 +61,7 @@ import { sourceStore, navigationStore } from '../../store/store.js'
:active="sourceStore.sourceConfigurationKey === key"
@click="setActiveSourceConfigurationKey(key)">
<template #icon>
<SitemapOutline
<FileCogOutline
:class="sourceStore.sourceConfigurationKey === key && 'selectedZaakIcon'"
disable-menu
:size="44" />
Expand Down Expand Up @@ -174,7 +174,7 @@ import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
import Sync from 'vue-material-design-icons/Sync.vue'
import BriefcaseAccountOutline from 'vue-material-design-icons/BriefcaseAccountOutline.vue'
import Delete from 'vue-material-design-icons/Delete.vue'
import SitemapOutline from 'vue-material-design-icons/SitemapOutline.vue'
import FileCogOutline from 'vue-material-design-icons/FileCogOutline.vue'
import Plus from 'vue-material-design-icons/Plus.vue'
export default {
Expand Down Expand Up @@ -203,6 +203,10 @@ export default {
sourceStore.setSourceConfigurationKey(key)
navigationStore.setModal('editSourceConfiguration')
},
addSourceConfiguration() {
sourceStore.setSourceConfigurationKey(null)
navigationStore.setModal('editSourceConfiguration')
},
setActiveSourceConfigurationKey(sourceConfigurationKey) {
if (sourceStore.sourceConfigurationKey === sourceConfigurationKey) {
sourceStore.setSourceConfigurationKey(false)
Expand Down

0 comments on commit 8cf92cd

Please sign in to comment.