diff --git a/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js b/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js index 8001b4941db29b14d0212fce19744d7f76588cb6..55e28fb7b7e7ed6c24d1bec42d4ff6a0bcca47bd 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js @@ -2,6 +2,7 @@ * This is the custom component to use "@json-editor/json-editor" * to create form using JSON Schema and get JSON output */ +/* eslint-disable react-hooks/exhaustive-deps */ import React, {useEffect, useRef} from 'react'; import _ from 'lodash'; import flatpickr from 'flatpickr'; 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 82ac739ea38e5d6fcd469645fc4ff1cf98932e5b..391378c4b95a36aaa9d58abca532cf276f91dab9 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 @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'; import moment from 'moment'; import Jeditor from '../../components/JSONEditor/JEditor'; import UnitConversion from '../../utils/unit.converter'; +/* eslint-disable react-hooks/exhaustive-deps */ export default (props) => { const { parentFunction = () => {} } = props; @@ -24,6 +25,7 @@ export default (props) => { propertyValue.propertyOrder=3; setDateTimeOption(propertyValue); } + if(propertyKey === 'between' || propertyKey === 'not_between' ){ propertyValue.propertyOrder=4; } @@ -149,6 +151,7 @@ export default (props) => { if (!initValue.time.at) { initValue.time.at= ''; } + /* 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 69464528fa81c424e3d7b9c33d83924c51c8fbd3..1d64b1f0cabf3a6c06bac1998b225b5b22b88ab8 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js @@ -289,7 +289,13 @@ export class SchedulingUnitCreate extends Component { for (let type in constStrategy.time) { if (constStrategy.scheduler === 'online') { delete constStrategy.time.at; - } + delete constStrategy.time.after; + delete constStrategy.time.before; + } + if (constStrategy.scheduler === 'manual') { + delete constStrategy.time.after; + delete constStrategy.time.before; + } if (constStrategy.time[type] && constStrategy.time[type].length) { if (typeof constStrategy.time[type] === 'string') { constStrategy.time[type] = `${moment(constStrategy.time[type]).format("YYYY-MM-DDTh:mm:ss.SSSSS")}Z`; @@ -359,7 +365,8 @@ export class SchedulingUnitCreate extends Component { paramsOutput: null, validEditor: false, validFields: {}, - constraintSchema: null + constraintSchema: null, + touched:false }, () => { this.constraintStrategy(this.constraintTemplates[0]); });