fix(z-task-modal): fixed error with ID on draft subtask update

This commit is contained in:
Matej Glasnák committed 2025-12-16 17:08:22 +01:00
1 parent 621be0641e
commit 1ec7f2555a
2 files changed
+4 -3

No files matched your search

@@ -1104,6 +1104,7 @@ export default {
}
this.closeModal();
} catch (error) {
console.log('error', error);
this.$toast.error(this.$parseError(error));
} finally {
this.isSaving = false;
@@ -1154,7 +1155,7 @@ export default {
},
async _validateEmployees() {
if (this.subtask.id) {
if (this.subtask.id && !this.subtask.is_draft) {
// For existing subtasks, at least one employee is required
const hasEmployee = !!(
this.subtask.employee_id && this.subtask.duration