Skip to content

Commit

Permalink
Fix #987
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed May 24, 2019
1 parent d2bf484 commit edc48ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Expand Up @@ -105,7 +105,6 @@ export default {
this.parentSelected(parentId)
},
setParentRank: function (parent) {
this.$store.commit(MutationNames.SetRankClass, undefined)
this.$store.dispatch(ActionNames.SetParentAndRanks, parent)
this.$store.commit(MutationNames.UpdateLastChange)
},
Expand Down
Expand Up @@ -91,21 +91,24 @@ export default {
watch: {
ranks: {
handler: function (val, oldVal) {
if (this.rankClass == undefined) {
if (this.rankGroup) {
this.ranks[this.childOfParent[this.rankGroup]].find(item => {
if (this.defaultRanks.indexOf(item.name) >= 0) {
this.rankClass = item.rank_class
}
})
}
}
this.refresh()
},
deep: true,
immediate: true
}
},
methods: {
refresh: function () {
if (this.rankClass == undefined) {
if (this.rankGroup) {
this.ranks[this.childOfParent[this.rankGroup]].find(item => {
if (this.defaultRanks.indexOf(item.name) >= 0) {
this.rankClass = item.rank_class
}
})
}
}
},
isMajor: function (groupName, findGroup) {
return (Object.keys(this.ranks).indexOf(groupName) > Object.keys(this.ranks).indexOf(findGroup))
},
Expand Down

0 comments on commit edc48ba

Please sign in to comment.