Add changing list identifier
This commit is contained in:
parent
d7b4b2189a
commit
1da7ffb23c
4 changed files with 70 additions and 10 deletions
|
@ -12,23 +12,60 @@
|
||||||
</header>
|
</header>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form @submit.prevent="submit()">
|
<form @submit.prevent="submit()">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="listtext">List Name</label>
|
<label class="label" for="listtext">List Name</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input v-focus :class="{ 'disabled': listService.loading}" :disabled="listService.loading" class="input" type="text" id="listtext" placeholder="The list title goes here..." v-model="list.title">
|
<input
|
||||||
|
v-focus
|
||||||
|
:class="{ 'disabled': listService.loading}"
|
||||||
|
:disabled="listService.loading"
|
||||||
|
class="input"
|
||||||
|
type="text"
|
||||||
|
id="listtext"
|
||||||
|
placeholder="The list title goes here..."
|
||||||
|
@keyup.enter="submit"
|
||||||
|
v-model="list.title"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label
|
||||||
|
class="label"
|
||||||
|
for="listtext"
|
||||||
|
v-tooltip="'The list identifier can be used to uniquely identify a task across lists. You can set it to empty to disable it.'">
|
||||||
|
List Identifier
|
||||||
|
</label>
|
||||||
|
<div class="control">
|
||||||
|
<input
|
||||||
|
v-focus
|
||||||
|
:class="{ 'disabled': listService.loading}"
|
||||||
|
:disabled="listService.loading"
|
||||||
|
class="input"
|
||||||
|
type="text"
|
||||||
|
id="listtext"
|
||||||
|
placeholder="The list identifier goes here..."
|
||||||
|
@keyup.enter="submit"
|
||||||
|
v-model="list.identifier"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="listdescription">Description</label>
|
<label class="label" for="listdescription">Description</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<textarea :class="{ 'disabled': listService.loading}" :disabled="listService.loading" class="textarea" placeholder="The lists description goes here..." id="listdescription" v-model="list.description"></textarea>
|
<textarea
|
||||||
|
:class="{ 'disabled': listService.loading}"
|
||||||
|
:disabled="listService.loading"
|
||||||
|
class="textarea"
|
||||||
|
placeholder="The lists description goes here..."
|
||||||
|
id="listdescription"
|
||||||
|
v-model="list.description"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="isArchivedCheck">Is Archived</label>
|
<label class="label" for="isArchivedCheck">Is Archived</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<fancycheckbox v-model="list.isArchived" v-tooltip="'If a list is archived, you cannot create new tasks or edit the list or existing tasks.'">
|
<fancycheckbox
|
||||||
|
v-model="list.isArchived"
|
||||||
|
v-tooltip="'If a list is archived, you cannot create new tasks or edit the list or existing tasks.'">
|
||||||
This list is archived
|
This list is archived
|
||||||
</fancycheckbox>
|
</fancycheckbox>
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,12 +86,14 @@
|
||||||
|
|
||||||
<div class="columns bigbuttons">
|
<div class="columns bigbuttons">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button @click="submit()" class="button is-primary is-fullwidth" :class="{ 'is-loading': listService.loading}">
|
<button @click="submit()" class="button is-primary is-fullwidth"
|
||||||
|
:class="{ 'is-loading': listService.loading}">
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-1">
|
<div class="column is-1">
|
||||||
<button @click="showDeleteModal = true" class="button is-danger is-fullwidth" :class="{ 'is-loading': listService.loading}">
|
<button @click="showDeleteModal = true" class="button is-danger is-fullwidth"
|
||||||
|
:class="{ 'is-loading': listService.loading}">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<icon icon="trash-alt"/>
|
<icon icon="trash-alt"/>
|
||||||
</span>
|
</span>
|
||||||
|
@ -65,8 +104,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<component :is="manageUsersComponent" :id="list.id" type="list" shareType="user" :userIsAdmin="userIsAdmin"></component>
|
<component
|
||||||
<component :is="manageTeamsComponent" :id="list.id" type="list" shareType="team" :userIsAdmin="userIsAdmin"></component>
|
:is="manageUsersComponent"
|
||||||
|
:id="list.id"
|
||||||
|
type="list"
|
||||||
|
shareType="user"
|
||||||
|
:userIsAdmin="userIsAdmin"/>
|
||||||
|
<component
|
||||||
|
:is="manageTeamsComponent"
|
||||||
|
:id="list.id"
|
||||||
|
type="list"
|
||||||
|
shareType="team"
|
||||||
|
:userIsAdmin="userIsAdmin"/>
|
||||||
|
|
||||||
<link-sharing :list-id="$route.params.id" v-if="linkSharingEnabled"/>
|
<link-sharing :list-id="$route.params.id" v-if="linkSharingEnabled"/>
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,11 @@
|
||||||
<div class="loader-container" :class="{ 'is-loading': taskService.loading}">
|
<div class="loader-container" :class="{ 'is-loading': taskService.loading}">
|
||||||
<div class="task-view">
|
<div class="task-view">
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<h1 class="title task-id">
|
<h1 class="title task-id" v-if="task.identifier === ''">
|
||||||
#{{ task.id }}
|
#{{ task.index }}
|
||||||
|
</h1>
|
||||||
|
<h1 class="title task-id" v-else>
|
||||||
|
{{ task.identifier }}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="is-done" v-if="task.done">Done</div>
|
<div class="is-done" v-if="task.done">Done</div>
|
||||||
<h1 class="title input" contenteditable="true" @focusout="saveTaskOnChange()" ref="taskTitle"
|
<h1 class="title input" contenteditable="true" @focusout="saveTaskOnChange()" ref="taskTitle"
|
||||||
|
|
|
@ -33,6 +33,7 @@ export default class ListModel extends AbstractModel {
|
||||||
namespaceId: 0,
|
namespaceId: 0,
|
||||||
isArchived: false,
|
isArchived: false,
|
||||||
hexColor: '',
|
hexColor: '',
|
||||||
|
identifier: '',
|
||||||
|
|
||||||
created: null,
|
created: null,
|
||||||
updated: null,
|
updated: null,
|
||||||
|
|
|
@ -63,6 +63,11 @@ export default class TaskModel extends AbstractModel {
|
||||||
return new AttachmentModel(a)
|
return new AttachmentModel(a)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Set the task identifier to empty if the list does not have one
|
||||||
|
if(this.identifier === `-${this.index}`) {
|
||||||
|
this.identifier = ''
|
||||||
|
}
|
||||||
|
|
||||||
this.created = new Date(this.created)
|
this.created = new Date(this.created)
|
||||||
this.updated = new Date(this.updated)
|
this.updated = new Date(this.updated)
|
||||||
}
|
}
|
||||||
|
@ -87,6 +92,8 @@ export default class TaskModel extends AbstractModel {
|
||||||
percentDone: 0,
|
percentDone: 0,
|
||||||
relatedTasks: {},
|
relatedTasks: {},
|
||||||
attachments: [],
|
attachments: [],
|
||||||
|
identifier: '',
|
||||||
|
index: 0,
|
||||||
|
|
||||||
createdBy: UserModel,
|
createdBy: UserModel,
|
||||||
created: null,
|
created: null,
|
||||||
|
|
Loading…
Reference in a new issue