@@ -34,6 +34,7 @@
|
|||||||
"vue": "^2.5.16",
|
"vue": "^2.5.16",
|
||||||
"vue-click-outside": "^1.0.7",
|
"vue-click-outside": "^1.0.7",
|
||||||
"vue-color": "^2.7.0",
|
"vue-color": "^2.7.0",
|
||||||
|
"vue-easymde": "^0.1.6",
|
||||||
"vue-infinite-loading": "^2.4.1",
|
"vue-infinite-loading": "^2.4.1",
|
||||||
"vue-router": "^3.0.1",
|
"vue-router": "^3.0.1",
|
||||||
"vue-smooth-dnd": "^0.8.0",
|
"vue-smooth-dnd": "^0.8.0",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
}),
|
}),
|
||||||
// TODO: properly handle sidebar showing for route subview and board sidebar
|
// TODO: properly handle sidebar showing for route subview and board sidebar
|
||||||
sidebarRouterView() {
|
sidebarRouterView() {
|
||||||
console.log(this.$route)
|
// console.log(this.$route)
|
||||||
return this.$route.name === 'card' || this.$route.name === 'board.details'
|
return this.$route.name === 'card' || this.$route.name === 'board.details'
|
||||||
},
|
},
|
||||||
sidebarShown() {
|
sidebarShown() {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
<template #action />
|
<template #action />
|
||||||
<AppSidebarTab name="Details" icon="icon-home">
|
<AppSidebarTab name="Details" icon="icon-home">
|
||||||
|
|
||||||
{{ currentCard }}
|
|
||||||
<p>Tags</p>
|
<p>Tags</p>
|
||||||
<multiselect v-model="allLabels" :multiple="true" :options="currentBoard.labels"
|
<multiselect v-model="allLabels" :multiple="true" :options="currentBoard.labels"
|
||||||
:taggable="true" label="title"
|
:taggable="true" label="title"
|
||||||
@@ -39,8 +38,12 @@
|
|||||||
</multiselect>
|
</multiselect>
|
||||||
|
|
||||||
<p>Assign to user</p>
|
<p>Assign to user</p>
|
||||||
<multiselect v-model="addAclToCard" :options="unallocatedSharees" label="label"
|
{{ unallocatedSharees }}
|
||||||
track-by="value.shareWith"
|
<hr>
|
||||||
|
{{ addAclToCard }}
|
||||||
|
<multiselect v-model="addAclToCard" :multiple="true" :options="unallocatedSharees"
|
||||||
|
label="participant"
|
||||||
|
track-by="shareWith"
|
||||||
@select="assignUserToCard" @remove="removeUserFromCard" @search-change="asyncFind">
|
@select="assignUserToCard" @remove="removeUserFromCard" @search-change="asyncFind">
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
{{ scope.option.label }}
|
{{ scope.option.label }}
|
||||||
@@ -58,6 +61,8 @@
|
|||||||
<AppSidebarTab name="Description" icon="icon-description">
|
<AppSidebarTab name="Description" icon="icon-description">
|
||||||
<textarea v-model="copiedCard.description" type="text" autofocus />
|
<textarea v-model="copiedCard.description" type="text" autofocus />
|
||||||
<input type="button" class="icon-confirm" @click="saveDesc()">
|
<input type="button" class="icon-confirm" @click="saveDesc()">
|
||||||
|
|
||||||
|
<markdown-editor ref="markdownEditor" v-model="desc" :configs="{autosave: {enabled: true, uniqueId: 'unique'}}" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
<AppSidebarTab name="Attachments" icon="icon-files-dark">
|
<AppSidebarTab name="Attachments" icon="icon-files-dark">
|
||||||
{{ currentCard.attachments }}
|
{{ currentCard.attachments }}
|
||||||
@@ -71,6 +76,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { AppSidebar, AppSidebarTab, Multiselect, DatetimePicker } from 'nextcloud-vue'
|
import { AppSidebar, AppSidebarTab, Multiselect, DatetimePicker } from 'nextcloud-vue'
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
import markdownEditor from 'vue-easymde/src/markdown-editor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CardSidebar',
|
name: 'CardSidebar',
|
||||||
@@ -78,7 +84,8 @@ export default {
|
|||||||
AppSidebar,
|
AppSidebar,
|
||||||
AppSidebarTab,
|
AppSidebarTab,
|
||||||
Multiselect,
|
Multiselect,
|
||||||
DatetimePicker
|
DatetimePicker,
|
||||||
|
markdownEditor
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -86,7 +93,8 @@ export default {
|
|||||||
addedLabelToCard: null,
|
addedLabelToCard: null,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
copiedCard: null,
|
copiedCard: null,
|
||||||
allLabels: null
|
allLabels: null,
|
||||||
|
desc: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -135,6 +143,10 @@ export default {
|
|||||||
this.copiedCard = JSON.parse(JSON.stringify(this.currentCard))
|
this.copiedCard = JSON.parse(JSON.stringify(this.currentCard))
|
||||||
this.allLabels = this.currentCard.labels
|
this.allLabels = this.currentCard.labels
|
||||||
this.addAclToCard = this.currentCard.assignedUsers
|
this.addAclToCard = this.currentCard.assignedUsers
|
||||||
|
this.desc = this.currentCard.description
|
||||||
|
},
|
||||||
|
desc() {
|
||||||
|
this.$store.dispatch('updateCardDesc', this.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -161,7 +173,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
assignUserToCard(user) {
|
assignUserToCard(user) {
|
||||||
this.copiedCard.assignedUsers.push(user)
|
// this.copiedCard.assignedUsers.push(user)
|
||||||
this.copiedCard.newUserUid = user.value.shareWith
|
this.copiedCard.newUserUid = user.value.shareWith
|
||||||
this.$store.dispatch('assignCardToUser', this.copiedCard)
|
this.$store.dispatch('assignCardToUser', this.copiedCard)
|
||||||
/* this.addAclForAPI = {
|
/* this.addAclForAPI = {
|
||||||
@@ -205,3 +217,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@import "~easymde/dist/easymde.min.css";
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
<div v-if="card.attechments" class="card-files icon icon-files-dark" />
|
<div v-if="card.attechments" class="card-files icon icon-files-dark" />
|
||||||
<div v-if="card.description" class="card-comments icon icon-comment" />
|
<div v-if="card.description" class="card-comments icon icon-comment" />
|
||||||
|
|
||||||
<div v-if="card.duedate" :class="{'icon-calendar': true, 'icon-calendar-dark': false}" class="due icon now">
|
<!-- <div v-if="card.duedate" :class="{'icon-calendar': true, 'icon-calendar-dark': false}" class="due icon now"> -->
|
||||||
|
<div v-if="card.duedate" :class="dueIcon">
|
||||||
<span>{{ dueTimeDiff }}</span>
|
<span>{{ dueTimeDiff }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="true" class="card-tasks icon icon-checkmark">
|
<div v-if="true" class="card-tasks icon icon-checkmark">
|
||||||
@@ -56,13 +57,13 @@ export default {
|
|||||||
let timeInHours = Math.round((Date.parse(this.card.duedate) - Date.now()) / 1000 / 60 / 60 / 24)
|
let timeInHours = Math.round((Date.parse(this.card.duedate) - Date.now()) / 1000 / 60 / 60 / 24)
|
||||||
|
|
||||||
if (timeInHours === 1) {
|
if (timeInHours === 1) {
|
||||||
return 'due icon next'
|
return 'icon-calendar-dark due icon next'
|
||||||
}
|
}
|
||||||
if (timeInHours === 0) {
|
if (timeInHours === 0) {
|
||||||
return 'due icon now'
|
return 'icon-calendar-dark due icon now'
|
||||||
}
|
}
|
||||||
if (timeInHours < 0) {
|
if (timeInHours < 0) {
|
||||||
return 'due icon overdue'
|
return 'icon-calendar-dark due icon overdue'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dueTimeDiff() {
|
dueTimeDiff() {
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ export class CardApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assignUser(card) {
|
assignUser(card) {
|
||||||
|
console.log(card)
|
||||||
|
console.log(card.newUserUid)
|
||||||
return axios.post(this.url(`/cards/${card.id}/assign`), { userId: card.newUserUid })
|
return axios.post(this.url(`/cards/${card.id}/assign`), { userId: card.newUserUid })
|
||||||
.then(
|
.then(
|
||||||
(response) => {
|
(response) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user