fix: Update associations when a label is updated (#3046)

This commit is contained in:
Pranav Raj S 2021-09-21 10:16:32 +05:30 committed by GitHub
parent aaadd61e09
commit b59e73b10b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 124 additions and 5 deletions

View file

@ -24,12 +24,12 @@ export default {
computed: {
savedLabels() {
const result = this.$store.getters['contactLabels/getContactLabels'](
this.contactId
const availableContactLabels = this.$store.getters[
'contactLabels/getContactLabels'
](this.contactId);
return this.allLabels.filter(({ title }) =>
availableContactLabels.includes(title)
);
return result.map(value => {
return this.allLabels.find(label => label.title === value);
});
},
...mapGetters({