fix(UX): Cancel tasks if project is cancelled (#17497)
This commit is contained in:
parent
3083d8d453
commit
a90fe810b3
@ -109,6 +109,18 @@ frappe.ui.form.on("Project", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
status: function(frm) {
|
||||||
|
if (frm.doc.status === 'Cancelled') {
|
||||||
|
frappe.confirm(__('Set tasks in this project as cancelled?'), () => {
|
||||||
|
frm.doc.tasks = frm.doc.tasks.map(task => {
|
||||||
|
task.status = 'Cancelled';
|
||||||
|
return task;
|
||||||
|
});
|
||||||
|
frm.refresh_field('tasks');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on("Project Task", {
|
frappe.ui.form.on("Project Task", {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user