Add auto save for task edit sidebar

This commit is contained in:
kolaente 2020-02-09 17:30:42 +01:00
parent 6324fc384b
commit 301c23fa9a
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -4,7 +4,7 @@
<label class="label" for="tasktext">Task Text</label> <label class="label" for="tasktext">Task Text</label>
<div class="control"> <div class="control">
<input v-focus :class="{ 'disabled': taskService.loading}" :disabled="taskService.loading" class="input" <input v-focus :class="{ 'disabled': taskService.loading}" :disabled="taskService.loading" class="input"
type="text" id="tasktext" placeholder="The task text is here..." v-model="taskEditTask.text"> type="text" id="tasktext" placeholder="The task text is here..." v-model="taskEditTask.text" @change="editTaskSubmit()">
</div> </div>
</div> </div>
<div class="field"> <div class="field">
@ -12,12 +12,13 @@
<div class="control"> <div class="control">
<textarea :class="{ 'disabled': taskService.loading}" :disabled="taskService.loading" class="textarea" <textarea :class="{ 'disabled': taskService.loading}" :disabled="taskService.loading" class="textarea"
placeholder="The tasks description goes here..." id="taskdescription" placeholder="The tasks description goes here..." id="taskdescription"
v-model="taskEditTask.description"></textarea> v-model="taskEditTask.description" @change="editTaskSubmit()">
</textarea>
</div> </div>
</div> </div>
<b>Reminder Dates</b> <b>Reminder Dates</b>
<reminders v-model="taskEditTask.reminderDates"/> <reminders v-model="taskEditTask.reminderDates" @change="editTaskSubmit()"/>
<div class="field"> <div class="field">
<label class="label" for="taskduedate">Due Date</label> <label class="label" for="taskduedate">Due Date</label>
@ -28,6 +29,7 @@
:disabled="taskService.loading" :disabled="taskService.loading"
v-model="taskEditTask.dueDate" v-model="taskEditTask.dueDate"
:config="flatPickerConfig" :config="flatPickerConfig"
@on-close="editTaskSubmit()"
id="taskduedate" id="taskduedate"
placeholder="The tasks due date is here..."> placeholder="The tasks due date is here...">
</flat-pickr> </flat-pickr>
@ -44,6 +46,7 @@
:disabled="taskService.loading" :disabled="taskService.loading"
v-model="taskEditTask.startDate" v-model="taskEditTask.startDate"
:config="flatPickerConfig" :config="flatPickerConfig"
@on-close="editTaskSubmit()"
id="taskduedate" id="taskduedate"
placeholder="Start date"> placeholder="Start date">
</flat-pickr> </flat-pickr>
@ -55,6 +58,7 @@
:disabled="taskService.loading" :disabled="taskService.loading"
v-model="taskEditTask.endDate" v-model="taskEditTask.endDate"
:config="flatPickerConfig" :config="flatPickerConfig"
@on-close="editTaskSubmit()"
id="taskduedate" id="taskduedate"
placeholder="End date"> placeholder="End date">
</flat-pickr> </flat-pickr>
@ -64,20 +68,20 @@
<div class="field"> <div class="field">
<label class="label" for="">Repeat after</label> <label class="label" for="">Repeat after</label>
<repeat-after v-model="taskEditTask.repeatAfter"/> <repeat-after v-model="taskEditTask.repeatAfter" @change="editTaskSubmit()"/>
</div> </div>
<div class="field"> <div class="field">
<label class="label" for="">Priority</label> <label class="label" for="">Priority</label>
<div class="control priority-select"> <div class="control priority-select">
<priority-select v-model="taskEditTask.priority"/> <priority-select v-model="taskEditTask.priority" @change="editTaskSubmit()"/>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label class="label">Percent Done</label> <label class="label">Percent Done</label>
<div class="control"> <div class="control">
<percent-done-select v-model="taskEditTask.percentDone"/> <percent-done-select v-model="taskEditTask.percentDone" @change="editTaskSubmit()"/>
</div> </div>
</div> </div>
@ -90,8 +94,9 @@
picker="square" picker="square"
model="hex" model="hex"
:enableAlpha="false" :enableAlpha="false"
:rgbSliders="true"> :rgbSliders="true"
</verte> @change="editTaskSubmit()"
/>
</div> </div>
</div> </div>