use constant for board type

This commit is contained in:
Gamebrary 2022-10-24 10:53:53 -07:00
parent 6a0d3c480f
commit 526b8812a8
3 changed files with 11 additions and 5 deletions

View file

@ -35,7 +35,7 @@
</b-button>
</portal>
<basic-board v-if="board.type === 'basic'" />
<basic-board v-if="board.type === $options.BOARD_TYPE_LIST" />
<kanban-board v-else />
</template>
@ -54,9 +54,12 @@ import BoardPlaceholder from '@/components/Board/BoardPlaceholder';
import KanbanBoard from '@/components/Board/KanbanBoard';
import BasicBoard from '@/components/Board/BasicBoard';
import chunk from 'lodash.chunk';
import { BOARD_TYPE_LIST } from '@/constants';
import { mapState, mapGetters } from 'vuex';
export default {
BOARD_TYPE_LIST,
components: {
BoardPlaceholder,
KanbanBoard,

View file

@ -38,7 +38,7 @@
</b-form-group>
<b-form-checkbox
v-if="board.type === 'list'"
v-if="board.type === $options.BOARD_TYPE_LIST"
v-model="board.ranked"
name="check-button"
class="mb-3"
@ -68,7 +68,7 @@
</template>
<script>
import { BOARD_TYPES } from '@/constants';
import { BOARD_TYPES, BOARD_TYPE_LIST } from '@/constants';
export default {
BOARD_TYPES,

View file

@ -7,9 +7,12 @@ export const STEAM_CATEGORY_ID = 13;
export const GOG_CATEGORY_ID = 17;
export const TWITTER_CATEGORY_ID = 5;
export const BOARD_TYPE_KANBAN = 'kanban';
export const BOARD_TYPE_LIST = 'list';
export const BOARD_TYPES = [
{ text: 'Kanban', value: 'kanban' },
{ text: 'List', value: 'list' },
{ text: 'Kanban', value: BOARD_TYPE_KANBAN },
{ text: 'List', value: BOARD_TYPE_LIST },
// { text: 'Tier', value: 'tier' },
];