Compare commits
3 Commits
fix/2749-c
...
enh/dashbo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7364f5dfe6 | ||
|
|
1d12ab93f5 | ||
|
|
435994fb1b |
@@ -168,6 +168,7 @@ export default {
|
||||
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
this.$root.$emit('close')
|
||||
},
|
||||
async select() {
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
:members="members"
|
||||
name-key="uid"
|
||||
:tab-select="true">
|
||||
<template v-slot:item="s">
|
||||
<template #item="s">
|
||||
<Avatar class="atwho-li--avatar" :user="s.item.uid" :size="24" />
|
||||
<span class="atwho-li--name" v-text="s.item.displayname" />
|
||||
</template>
|
||||
<template v-slot:embeddedItem="scope">
|
||||
<template #embeddedItem="scope">
|
||||
<span>
|
||||
<UserBubble v-if="scope.current.uid"
|
||||
:data-mention-id="scope.current.uid"
|
||||
|
||||
@@ -149,6 +149,9 @@ export default {
|
||||
directives: {
|
||||
ClickOutside,
|
||||
},
|
||||
inject: [
|
||||
'boardApi',
|
||||
],
|
||||
props: {
|
||||
board: {
|
||||
type: Object,
|
||||
@@ -312,9 +315,6 @@ export default {
|
||||
this.updateDueSetting = null
|
||||
},
|
||||
},
|
||||
inject: [
|
||||
'boardApi',
|
||||
],
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,32 +21,40 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<DashboardWidget :items="cards"
|
||||
empty-content-icon="icon-deck"
|
||||
:empty-content-message="t('deck', 'No upcoming cards')"
|
||||
:show-more-text="t('deck', 'upcoming cards')"
|
||||
:show-more-url="showMoreUrl"
|
||||
:loading="loading"
|
||||
@hide="() => {}"
|
||||
@markDone="() => {}">
|
||||
<template v-slot:default="{ item }">
|
||||
<a :key="item.id"
|
||||
:href="cardLink(item)"
|
||||
target="_blank"
|
||||
class="card">
|
||||
<div class="card--header">
|
||||
<DueDate class="right" :card="item" />
|
||||
<span class="title">{{ item.title }}</span>
|
||||
</div>
|
||||
<ul v-if="item.labels && item.labels.length"
|
||||
class="labels">
|
||||
<li v-for="label in item.labels" :key="label.id" :style="labelStyle(label)">
|
||||
<span>{{ label.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</a>
|
||||
</template>
|
||||
</DashboardWidget>
|
||||
<div>
|
||||
<DashboardWidget :items="cards"
|
||||
empty-content-icon="icon-deck"
|
||||
:empty-content-message="t('deck', 'No upcoming cards')"
|
||||
:show-more-text="t('deck', 'upcoming cards')"
|
||||
:show-more-url="showMoreUrl"
|
||||
:loading="loading"
|
||||
@hide="() => {}"
|
||||
@markDone="() => {}">
|
||||
<template #default="{ item }">
|
||||
<a :key="item.id"
|
||||
:href="cardLink(item)"
|
||||
target="_blank"
|
||||
class="card">
|
||||
<div class="card--header">
|
||||
<DueDate class="right" :card="item" />
|
||||
<span class="title">{{ item.title }}</span>
|
||||
</div>
|
||||
<ul v-if="item.labels && item.labels.length"
|
||||
class="labels">
|
||||
<li v-for="label in item.labels" :key="label.id" :style="labelStyle(label)">
|
||||
<span>{{ label.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</a>
|
||||
</template>
|
||||
</DashboardWidget>
|
||||
<div class="center-button">
|
||||
<button @click="toggleAddCardModel">
|
||||
{{ t('deck', 'Add card') }}
|
||||
</button>
|
||||
<CardCreateDialog v-if="showAddCardModal" @close="toggleAddCardModel" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -55,17 +63,20 @@ import { mapGetters } from 'vuex'
|
||||
import labelStyle from './../mixins/labelStyle'
|
||||
import DueDate from '../components/cards/badges/DueDate'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import CardCreateDialog from '../CardCreateDialog'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
components: {
|
||||
DueDate,
|
||||
DashboardWidget,
|
||||
CardCreateDialog,
|
||||
},
|
||||
mixins: [labelStyle],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
showAddCardModal: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -73,11 +84,17 @@ export default {
|
||||
'assignedCardsDashboard',
|
||||
]),
|
||||
cards() {
|
||||
const list = [
|
||||
/* const list = [
|
||||
...this.assignedCardsDashboard,
|
||||
].filter((card) => {
|
||||
return card.duedate !== null
|
||||
})
|
||||
}) */
|
||||
|
||||
const list = this.assignedCardsDashboard.slice(0, 6)
|
||||
.filter((card) => {
|
||||
return card.duedate !== null
|
||||
})
|
||||
|
||||
list.sort((a, b) => {
|
||||
return (new Date(a.duedate)).getTime() - (new Date(b.duedate)).getTime()
|
||||
})
|
||||
@@ -98,6 +115,11 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
toggleAddCardModel() {
|
||||
this.showAddCardModal = !this.showAddCardModal
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -145,4 +167,8 @@ export default {
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.center-button {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,7 @@ const config = {
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
jsonpFunction: 'webpackJsonpOCADeck',
|
||||
// jsonpFunction: 'webpackJsonpOCADeck',
|
||||
chunkFilename: '[name].js?v=[contenthash]',
|
||||
},
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user