Skip to content

Commit

Permalink
fix start quest modal from items - disable invite quest button if a q…
Browse files Browse the repository at this point in the history
…uest is already active
  • Loading branch information
negue committed Sep 19, 2017
1 parent 1b6ede6 commit 4230a84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions website/client/components/groups/startQuestModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
div(v-if='questData')
questDialogContent(:item="questData")
div.text-center
button.btn.btn-primary(@click='questInit()') {{$t('inviteToPartyOrQuest')}}
button.btn.btn-primary(@click='questInit()', :disabled="Boolean(group.quest)") {{$t('inviteToPartyOrQuest')}}
div.text-center
p {{$t('inviteInformation')}}
.side-panel(v-if='questData')
Expand Down Expand Up @@ -165,12 +165,14 @@ export default {
partyID: this.group._id,
partySize: this.group.memberCount,
});
const key = this.selectedQuest;
const response = await this.$store.dispatch('guilds:inviteToQuest', {groupId: this.group._id, key});
const quest = response.data.data;
this.$store.state.party.data.quest = quest;
if (this.$store.state.party) {
this.$store.state.party.data.quest = quest;
}
this.$root.$emit('hide::modal', 'start-quest-modal');
},
},
Expand Down
2 changes: 1 addition & 1 deletion website/client/components/inventory/items/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
)

startQuestModal(
group="user.party"
:group="user.party"
)
</template>

Expand Down
2 changes: 1 addition & 1 deletion website/common/script/libs/shops-seasonal.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {EVENTS, SEASONAL_SETS} from '../content/constants';
import { SEASONAL_SETS} from '../content/constants';

module.exports = {
// opened: false,
Expand Down

0 comments on commit 4230a84

Please sign in to comment.