Skip to content

Commit 74cd843

Browse files
- FIX: Fixed issues with tagging.
1 parent 8676643 commit 74cd843

2 files changed

Lines changed: 17 additions & 24 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
VUE_APP_BASE_URL=http://localhost:8080/frickl/v1.2.0/api/
1+
VUE_APP_BASE_URL=http://localhost:8080/frickl/v2.1.0/api/
22
# VUE_APP_BASE_URL=./api/

src/components/modals/AddTagModal.vue

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ export default {
3939
type: {
4040
type: String,
4141
default: null
42-
},
43-
prefilledTags: {
44-
type: Array,
45-
default: function () {
46-
return []
47-
}
4842
}
4943
},
5044
components: {
@@ -75,7 +69,9 @@ export default {
7569
})
7670
7771
if (this.tempInput !== null && this.tempInput.length > 0) {
78-
mappedTags.push(this.tempInput)
72+
mappedTags.push({
73+
name: this.tempInput
74+
})
7975
}
8076
8177
if (this.type === 'image') {
@@ -90,25 +86,22 @@ export default {
9086
})
9187
}
9288
},
89+
update: function () {
90+
this.apiGetTags(result => {
91+
this.allTags = result.map(t => {
92+
return {
93+
text: t.tag.name
94+
}
95+
})
96+
})
97+
},
9398
show () {
99+
this.newTags = []
100+
this.allTags = []
101+
this.update()
102+
94103
this.$nextTick(() => this.$refs.addTagModal.show())
95104
}
96-
},
97-
mounted: function () {
98-
this.apiGetTags(result => {
99-
this.allTags = result.map(t => {
100-
return {
101-
text: t.tag.name
102-
}
103-
})
104-
})
105-
106-
this.newTags = this.prefilledTags.map(t => {
107-
return {
108-
text: t,
109-
classes: 'bg-primary'
110-
}
111-
})
112105
}
113106
}
114107
</script>

0 commit comments

Comments
 (0)