diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js index 391378c4b95a36aaa9d58abca532cf276f91dab9..52ebcb8b12c50be4fabdefe9279f7c493ac546aa 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js @@ -151,6 +151,12 @@ export default (props) => { if (!initValue.time.at) { initValue.time.at= ''; } + if (!initValue.time.after) { + initValue.time.after= ''; + } + if (!initValue.time.before) { + initValue.time.before= ''; + } /* for (let type in initValue.sky.transit_offset) { initValue.sky.transit_offset[type] = initValue.sky.transit_offset[type] / 60; 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 1d64b1f0cabf3a6c06bac1998b225b5b22b88ab8..efd6ddf088becf54f17a37e283ccd0f13f8ec268 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js @@ -289,11 +289,11 @@ export class SchedulingUnitCreate extends Component { for (let type in constStrategy.time) { if (constStrategy.scheduler === 'online') { delete constStrategy.time.at; + } + if (!constStrategy.time.after) { delete constStrategy.time.after; - delete constStrategy.time.before; - } - if (constStrategy.scheduler === 'manual') { - delete constStrategy.time.after; + } + if (!constStrategy.time.before) { delete constStrategy.time.before; } if (constStrategy.time[type] && constStrategy.time[type].length) { 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 4768491055da9a5949c5524196a232e0484e20fc..2064df3514f26dec32e618e4819dad6b9ed8b28a 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/edit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/edit.js @@ -273,7 +273,13 @@ export class EditSchedulingUnit extends Component { if (constStrategy.scheduler === 'online') { // For deleting property delete constStrategy.time.at; + } + if (!constStrategy.time.after) { + delete constStrategy.time.after; } + if (!constStrategy.time.before) { + delete constStrategy.time.before; + } for (let type in constStrategy.time) { if (constStrategy.time[type] && constStrategy.time[type].length) { if (typeof constStrategy.time[type] === 'string') {