diff --git a/src/components/board/Board.vue b/src/components/board/Board.vue index 8f5d11cd5..ecd280b0f 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -103,6 +103,8 @@ export default { this.$store.dispatch('setCurrentBoard', board) this.$store.dispatch('loadStacks', board) this.loading = false + console.log(board); + this.$store.state.labels = board.labels; }) }, onDropStack({ removedIndex, addedIndex }) { diff --git a/src/components/board/BoardSidebar.vue b/src/components/board/BoardSidebar.vue index 868d806c4..dad94440d 100644 --- a/src/components/board/BoardSidebar.vue +++ b/src/components/board/BoardSidebar.vue @@ -35,39 +35,26 @@
- - - -
    -
  • - - - {{ board.owner.displayname }} - -
  • -
  • - - - {{ acl.participant.displayname }} - -
  • -
+
-
    -
  • - - {{ label.title }}
    -
    -
  • -
+ +
+ +
+ +
+ +
+
@@ -77,12 +64,20 @@ diff --git a/src/components/board/SharingTabSidebard.vue b/src/components/board/SharingTabSidebard.vue new file mode 100644 index 000000000..a4e975f39 --- /dev/null +++ b/src/components/board/SharingTabSidebard.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/components/board/TagsTabSidebard.vue b/src/components/board/TagsTabSidebard.vue new file mode 100644 index 000000000..84d91ecba --- /dev/null +++ b/src/components/board/TagsTabSidebard.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/components/board/TimelineTabSidebard.vue b/src/components/board/TimelineTabSidebard.vue new file mode 100644 index 000000000..cd5548a68 --- /dev/null +++ b/src/components/board/TimelineTabSidebard.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/models/index.js b/src/models/index.js index 4649a5e57..4684a3faf 100644 --- a/src/models/index.js +++ b/src/models/index.js @@ -46,3 +46,10 @@ * @property {boolean} archived * @property {number} order */ +/** + * Label model + * + * @typedef {Object} Label + * @property {String} title + * @property {String} color + */ \ No newline at end of file diff --git a/src/store/label.js b/src/store/label.js new file mode 100644 index 000000000..2c9767809 --- /dev/null +++ b/src/store/label.js @@ -0,0 +1,43 @@ +import Vue from 'vue' + +export default { + state: { + labels: [] + }, + getters: { + labelByCurrentBoard() { + console.log(state) + return state.currentBoard.labels; + }, + labelById: state => (id) => { + //return state.cards.find((card) => card.id === id) + } + }, + mutations: { + addLabel(state, label) { + + }, + updateLabel(state, label) { + + }, + removeLabel(state, id) { + + + console.log(this.state.labels); + + + this.state.labels = this.state.labels.filter((l) => { + return id !== l.id + }) + + console.log(this.state.labels); + + }, + + }, + actions: { + removeLabel({ commit }, id) { + commit('removeLabel', id) + }, + } +} diff --git a/src/store/main.js b/src/store/main.js index a31610595..399a60dbc 100644 --- a/src/store/main.js +++ b/src/store/main.js @@ -27,6 +27,7 @@ import { boardToMenuItem } from './../helpers/boardToMenuItem' import { BoardApi } from './../services/BoardApi' import stack from './stack' import card from './card' +import label from './label' Vue.use(Vuex) @@ -42,7 +43,8 @@ export const BOARD_FILTERS = { export default new Vuex.Store({ modules: { stack, - card + card, + label }, strict: debug, state: {