@@ -78,8 +78,8 @@ class CardController extends Controller {
|
|||||||
* @param int $order
|
* @param int $order
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
* @return \OCP\AppFramework\Db\Entity
|
||||||
*/
|
*/
|
||||||
public function create($title, $stackId, $type = 'plain', $order = 999) {
|
public function create($title, $stackId, $type = 'plain', $order = 999, $description = '', $duedate = null) {
|
||||||
return $this->cardService->create($title, $stackId, $type, $order, $this->userId);
|
return $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<h2><a href="#">{{ overviewName }}</a></h2>
|
<h2><a href="#">{{ overviewName }}</a></h2>
|
||||||
<Actions>
|
<Actions>
|
||||||
<ActionButton icon="icon-add" @click.stop="modalShow=true">
|
<ActionButton icon="icon-add" @click.stop="modalShow=true">
|
||||||
{{ t('deck', 'Add card') }}
|
{{ t('deck', 'Add card on Today') }}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</Actions>
|
</Actions>
|
||||||
</div>
|
</div>
|
||||||
@@ -199,9 +199,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Modal v-if="modalShow" :title="t('deck', 'Add card')" @close="modalShow=false">
|
<Modal v-if="modalShow" :title="t('deck', 'Add card on Today')" @close="modalShow=false">
|
||||||
<div class="modal__content">
|
<div class="modal__content">
|
||||||
<h3>{{ t('deck', 'Add card') }}</h3>
|
<h3>{{ t('deck', 'Add card on Today') }}</h3>
|
||||||
<Multiselect v-model="selectedBoard"
|
<Multiselect v-model="selectedBoard"
|
||||||
:placeholder="t('deck', 'Select a board')"
|
:placeholder="t('deck', 'Select a board')"
|
||||||
:options="boards"
|
:options="boards"
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
:max-height="100"
|
:max-height="100"
|
||||||
label="title" />
|
label="title" />
|
||||||
|
|
||||||
<label for="new-stack-input-main" class="hidden-visually">{{ t('deck', 'Add card') }}</label>
|
<label for="new-stack-input-main" class="hidden-visually">{{ t('deck', 'Add card on Today') }}</label>
|
||||||
<input id="new-stack-input-main"
|
<input id="new-stack-input-main"
|
||||||
ref="newCardInput"
|
ref="newCardInput"
|
||||||
v-model="newCardTitle"
|
v-model="newCardTitle"
|
||||||
@@ -381,10 +381,13 @@ export default {
|
|||||||
},
|
},
|
||||||
async addCard() {
|
async addCard() {
|
||||||
try {
|
try {
|
||||||
|
const today = new Date()
|
||||||
|
today.setHours(23, 59, 59, 999)
|
||||||
await this.$store.dispatch('addCard', {
|
await this.$store.dispatch('addCard', {
|
||||||
title: this.newCardTitle,
|
title: this.newCardTitle,
|
||||||
stackId: this.selectedStack.id,
|
stackId: this.selectedStack.id,
|
||||||
boardId: this.selectedBoard.id,
|
boardId: this.selectedBoard.id,
|
||||||
|
duedate: today.toISOString(),
|
||||||
})
|
})
|
||||||
this.newCardTitle = ''
|
this.newCardTitle = ''
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user