Skip to content

Commit

Permalink
- FIX: Fixed issues with tagging.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-raubach committed Sep 1, 2022
1 parent 8676643 commit 74cd843
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VUE_APP_BASE_URL=http://localhost:8080/frickl/v1.2.0/api/
VUE_APP_BASE_URL=http://localhost:8080/frickl/v2.1.0/api/
# VUE_APP_BASE_URL=./api/
39 changes: 16 additions & 23 deletions src/components/modals/AddTagModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ export default {
type: {
type: String,
default: null
},
prefilledTags: {
type: Array,
default: function () {
return []
}
}
},
components: {
Expand Down Expand Up @@ -75,7 +69,9 @@ export default {
})
if (this.tempInput !== null && this.tempInput.length > 0) {
mappedTags.push(this.tempInput)
mappedTags.push({
name: this.tempInput
})
}
if (this.type === 'image') {
Expand All @@ -90,25 +86,22 @@ export default {
})
}
},
update: function () {
this.apiGetTags(result => {
this.allTags = result.map(t => {
return {
text: t.tag.name
}
})
})
},
show () {
this.newTags = []
this.allTags = []
this.update()
this.$nextTick(() => this.$refs.addTagModal.show())
}
},
mounted: function () {
this.apiGetTags(result => {
this.allTags = result.map(t => {
return {
text: t.tag.name
}
})
})
this.newTags = this.prefilledTags.map(t => {
return {
text: t,
classes: 'bg-primary'
}
})
}
}
</script>
Expand Down

0 comments on commit 74cd843

Please sign in to comment.