Skip to content

Commit

Permalink
WIP - filter out schema's which are already used
Browse files Browse the repository at this point in the history
  • Loading branch information
SudoThijn committed Nov 7, 2024
1 parent efaa3ed commit b1a18d5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/views/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,25 @@ export default {
},
}
},
computed: {
filteredAvailableSchemas() {
console.log('filteredAvailableSchemas')
const usedSchemas = this.objectTypes.map((objectType) => this[objectType].selectedSchema?.value)
console.log(this.objectTypes)
console.log(usedSchemas)
return this.availableSchemas?.filter((schema) => !usedSchemas.includes(schema.id.toString())) ?? []
},
},
watch: {
filteredAvailableSchemas: {
handler(newValue) {
console.log(newValue)
},
deep: true,
},
'publication.selectedSource': {
handler(newValue) {
if (newValue?.value === 'internal') {
Expand Down

0 comments on commit b1a18d5

Please sign in to comment.