diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/create.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/create.js index 5634104ba724c67a83bd70610ecb695457dc8620..947d3c1164ba0bca3465c199c095223b526030d7 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/create.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/create.js @@ -335,6 +335,7 @@ export class CycleCreate extends Component { * Function to cancel form creation and navigate to other page/component */ cancelCreate() { + publish('edit-dirty', false); this.setState({redirect: '/cycle'}); } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/edit.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/edit.js index 195f63836bb0cf61f6f91adeabf8c446f05a9e1e..fc08193ce91dbb54eebfc35de12f5f0c0d27b542 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/edit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Cycle/edit.js @@ -404,6 +404,8 @@ export class CycleEdit extends Component { cancelEdit() { publish('edit-dirty', false); this.props.history.goBack(); + this.setState({showDialog: false}); + this.props.history.goBack(); } render() { diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/create.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/create.js index e8e83a5f2005940adf5ed1302f04b840e040feb3..6e988255776a588703e2251d5b47ba6a27657e6d 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/create.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/create.js @@ -371,6 +371,9 @@ export class ProjectCreate extends Component { * Function to cancel form creation and navigate to other page/component */ cancelCreate() { + publish('edit-dirty', false); + this.props.history.goBack(); + this.setState({showDialog: false}); this.props.history.goBack(); } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/edit.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/edit.js index cf26715145ea911d5da7562f71a1f64d45df039b..a8c35a62b88718d89354724c132c74dd0f27ea15 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/edit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/edit.js @@ -424,7 +424,10 @@ export class ProjectEdit extends Component { * Cancel edit and redirect to Project View page */ cancelEdit() { - this.props.history.goBack(); + publish('edit-dirty', false); + this.props.history.goBack(); + this.setState({showDialog: false}); + this.props.history.goBack(); } render() { diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js index 536ca2bd8223bfc65192f166e5dde6f133b4bf2e..7f552ba2d3c3bf60ebff7705b5f98edc3f38c999 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js @@ -424,6 +424,9 @@ export class SchedulingUnitCreate extends Component { * Cancel SU creation and redirect */ cancelCreate() { + publish('edit-dirty', false); + this.props.history.goBack(); + this.setState({showDialog: false}); this.props.history.goBack(); } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/edit.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/edit.js index 3a2295b97480e32b7b72a95dacb38e5bf863dfc4..d28fc907e584d5c443998210e87a01b5a55321a1 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/edit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/edit.js @@ -417,6 +417,9 @@ export class EditSchedulingUnit extends Component { * Cancel SU creation and redirect */ cancelCreate() { + publish('edit-dirty', false); + this.props.history.goBack(); + this.setState({showDialog: false}); this.props.history.goBack(); } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js index 7bb51d5b36ef3beba4245d473c951b71e21c5215..e600a9b500560287e499bfbce4830f54490cb63a 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Task/edit.js @@ -169,6 +169,9 @@ export class TaskEdit extends Component { } cancelEdit() { + publish('edit-dirty', false); + this.props.history.goBack(); + this.setState({showDialog: false}); this.props.history.goBack(); }