mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
fix(z-task-modal): fixed error with ID on draft subtask update
This commit is contained in:
1 parent
621be0641e
commit
1ec7f2555a
2 files changed
+4
-3
No files matched your search
@@ -72,12 +72,12 @@ export default {
|
|||||||
update_subtask(state: any, subtask: any) {
|
update_subtask(state: any, subtask: any) {
|
||||||
if (state.unscheduledSubtasks) {
|
if (state.unscheduledSubtasks) {
|
||||||
state.unscheduledSubtasks = state.unscheduledSubtasks.map((st) =>
|
state.unscheduledSubtasks = state.unscheduledSubtasks.map((st) =>
|
||||||
st.id == subtask.id ? subtask : st,
|
st?.id == subtask?.id ? subtask : st,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (state.ongoingSubtasks) {
|
if (state.ongoingSubtasks) {
|
||||||
state.ongoingSubtasks = state.ongoingSubtasks.map((st) =>
|
state.ongoingSubtasks = state.ongoingSubtasks.map((st) =>
|
||||||
st.id == subtask.id ? subtask : st,
|
st?.id == subtask?.id ? subtask : st,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1104,6 +1104,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.closeModal();
|
this.closeModal();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log('error', error);
|
||||||
this.$toast.error(this.$parseError(error));
|
this.$toast.error(this.$parseError(error));
|
||||||
} finally {
|
} finally {
|
||||||
this.isSaving = false;
|
this.isSaving = false;
|
||||||
@@ -1154,7 +1155,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async _validateEmployees() {
|
async _validateEmployees() {
|
||||||
if (this.subtask.id) {
|
if (this.subtask.id && !this.subtask.is_draft) {
|
||||||
// For existing subtasks, at least one employee is required
|
// For existing subtasks, at least one employee is required
|
||||||
const hasEmployee = !!(
|
const hasEmployee = !!(
|
||||||
this.subtask.employee_id && this.subtask.duration
|
this.subtask.employee_id && this.subtask.duration
|
||||||
|
|||||||
Reference in new issue
Block a user