[Task modal] Fixed worked time

This commit is contained in:
Matej Glasnák committed 2023-06-16 13:25:58 +02:00
1 parent 6b3402235c
commit e77e5b1ab7
6 files changed
+45 -16

No files matched your search

@@ -60,8 +60,16 @@ export default {
time: typeof this.form.hours == 'string' ? parseFloat(this.form.hours) : this.form.hours
})
const payload = {
...this.subtask,
timesheets: this.subtask.timesheets.map((timesheet) => {
delete timesheet.employee_name
return timesheet
})
}
try {
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${this.subtask.id}`, this.subtask)
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${this.subtask.id}`, payload)
this.closeModal()
this.$events.emit('on-subtask-edited', subtask)