moved openDetails method to list and renamed

This commit is contained in:
Roman Cervantes 2020-10-21 16:31:19 -07:00
parent 9dd1b803c1
commit a11b0b980e
6 changed files with 6 additions and 11 deletions

View file

@ -67,13 +67,6 @@ export default {
},
methods: {
openDetails() {
const { gameId, list } = this;
this.$store.commit('SET_GAME_MODAL_DATA', { gameId, list });
this.$bvModal.show('game-modal');
},
removeTag(tagName) {
this.$store.commit('REMOVE_GAME_TAG', { tagName, gameId: this.gameId });
this.saveTags();

View file

@ -4,7 +4,6 @@
class="clickable mb-2"
:bg-variant="nightMode ? 'dark' : ''"
:text-variant="nightMode ? 'white' : ''"
@click="openDetails"
>
<b-row no-gutters v-if="game && game.name">
<b-col cols="3">

View file

@ -4,7 +4,6 @@
class="clickable mb-2"
:bg-variant="nightMode ? 'dark' : ''"
:text-variant="nightMode ? 'white' : ''"
@click="openDetails"
>
<b-row
no-gutters

View file

@ -6,7 +6,6 @@
:bg-variant="nightMode ? 'dark' : ''"
:text-variant="nightMode ? 'white' : ''"
img-top
@click="openDetails"
>
<b-card-body body-class="p-2" v-if="game && game.name">
<b-card-title class="mb-0" title-tag="h6">

View file

@ -4,7 +4,6 @@
class="clickable mb-2"
:bg-variant="nightMode ? 'dark' : ''"
:text-variant="nightMode ? 'white' : ''"
@click="openDetails"
>
<b-row no-gutters v-if="game && game.name">
<b-card-body body-class="pt-0 pb-1 px-2">

View file

@ -47,6 +47,7 @@
:key="game"
:list="list"
:game-id="game"
@click.native="openGame(game, list)"
/>
<b-button
@ -187,6 +188,11 @@ export default {
},
methods: {
openGame(gameId, list) {
this.$store.commit('SET_GAME_MODAL_DATA', { gameId, list });
this.$bvModal.show('game-modal');
},
validateMove({ from, to }) {
const isDifferentList = from.id !== to.id;
const isDuplicate = this.board.lists[to.id].games.includes(Number(this.draggingId));