mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
feature(task-modal): added ability to edit timeblocks both on create and edit
This commit is contained in:
1 parent
80d0e57351
commit
056b27b016
2 files changed
+133
-85
No files matched your search
@@ -27,7 +27,6 @@
|
||||
<v-text-field
|
||||
:value="timeblock.starts_at_time"
|
||||
@input="updateStartTime"
|
||||
@focus="onInputFocus"
|
||||
:class="{ error: v$?.timeblock.starts_at_time.$errors.length }"
|
||||
type="time"
|
||||
variant="solo"
|
||||
@@ -37,7 +36,6 @@
|
||||
<v-text-field
|
||||
:value="timeblock.ends_at_time"
|
||||
@input="updateEndTime"
|
||||
@focus="onInputFocus"
|
||||
:class="{ error: v$?.timeblock.ends_at_time.$errors.length }"
|
||||
type="time"
|
||||
variant="solo"
|
||||
@@ -109,20 +107,20 @@ export default {
|
||||
async openDatepicker(ref) {
|
||||
this.$refs[ref].openMenu();
|
||||
},
|
||||
|
||||
updateDate(date) {
|
||||
const timeblock = { ...this.timeblock };
|
||||
if (date) timeblock.date = date;
|
||||
this.$emit('updateTimeblock', timeblock);
|
||||
const updated = { ...this.timeblock, date };
|
||||
this.$emit('updateTimeblock', updated);
|
||||
},
|
||||
|
||||
updateStartTime(event) {
|
||||
const timeblock = { ...this.timeblock };
|
||||
timeblock.starts_at_time = event.target.value;
|
||||
this.$emit('updateTimeblock', timeblock);
|
||||
const updated = { ...this.timeblock, starts_at_time: event.target.value };
|
||||
this.$emit('updateTimeblock', updated);
|
||||
},
|
||||
|
||||
updateEndTime(event) {
|
||||
const timeblock = { ...this.timeblock };
|
||||
timeblock.ends_at_time = event.target.value;
|
||||
this.$emit('updateTimeblock', timeblock);
|
||||
const updated = { ...this.timeblock, ends_at_time: event.target.value };
|
||||
this.$emit('updateTimeblock', updated);
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -158,4 +156,3 @@ export default {
|
||||
width: 100% !important
|
||||
pointer-events: none
|
||||
</style>
|
||||
e
|
||||
Reference in new issue
Block a user