Skip to content
Snippets Groups Projects
Commit da447a38 authored by Nithya's avatar Nithya
Browse files
Changes updated
parent 3644db26
No related branches found
No related tags found
2 merge requests!260syncing cob-master with master again,!253Resolve TMSS-299
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* This is the custom component to use "@json-editor/json-editor" * This is the custom component to use "@json-editor/json-editor"
* to create form using JSON Schema and get JSON output * to create form using JSON Schema and get JSON output
*/ */
/* eslint-disable react-hooks/exhaustive-deps */
import React, {useEffect, useRef} from 'react'; import React, {useEffect, useRef} from 'react';
import _ from 'lodash'; import _ from 'lodash';
import flatpickr from 'flatpickr'; import flatpickr from 'flatpickr';
......
...@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'; ...@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
import moment from 'moment'; import moment from 'moment';
import Jeditor from '../../components/JSONEditor/JEditor'; import Jeditor from '../../components/JSONEditor/JEditor';
import UnitConversion from '../../utils/unit.converter'; import UnitConversion from '../../utils/unit.converter';
/* eslint-disable react-hooks/exhaustive-deps */
export default (props) => { export default (props) => {
const { parentFunction = () => {} } = props; const { parentFunction = () => {} } = props;
...@@ -24,6 +25,7 @@ export default (props) => { ...@@ -24,6 +25,7 @@ export default (props) => {
propertyValue.propertyOrder=3; propertyValue.propertyOrder=3;
setDateTimeOption(propertyValue); setDateTimeOption(propertyValue);
} }
if(propertyKey === 'between' || propertyKey === 'not_between' ){ if(propertyKey === 'between' || propertyKey === 'not_between' ){
propertyValue.propertyOrder=4; propertyValue.propertyOrder=4;
} }
...@@ -149,6 +151,7 @@ export default (props) => { ...@@ -149,6 +151,7 @@ export default (props) => {
if (!initValue.time.at) { if (!initValue.time.at) {
initValue.time.at= ''; initValue.time.at= '';
} }
/* for (let type in initValue.sky.transit_offset) { /* for (let type in initValue.sky.transit_offset) {
initValue.sky.transit_offset[type] = initValue.sky.transit_offset[type] / 60; initValue.sky.transit_offset[type] = initValue.sky.transit_offset[type] / 60;
}*/ }*/
......
...@@ -289,7 +289,13 @@ export class SchedulingUnitCreate extends Component { ...@@ -289,7 +289,13 @@ export class SchedulingUnitCreate extends Component {
for (let type in constStrategy.time) { for (let type in constStrategy.time) {
if (constStrategy.scheduler === 'online') { if (constStrategy.scheduler === 'online') {
delete constStrategy.time.at; 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 (constStrategy.time[type] && constStrategy.time[type].length) {
if (typeof constStrategy.time[type] === 'string') { if (typeof constStrategy.time[type] === 'string') {
constStrategy.time[type] = `${moment(constStrategy.time[type]).format("YYYY-MM-DDTh:mm:ss.SSSSS")}Z`; constStrategy.time[type] = `${moment(constStrategy.time[type]).format("YYYY-MM-DDTh:mm:ss.SSSSS")}Z`;
...@@ -359,7 +365,8 @@ export class SchedulingUnitCreate extends Component { ...@@ -359,7 +365,8 @@ export class SchedulingUnitCreate extends Component {
paramsOutput: null, paramsOutput: null,
validEditor: false, validEditor: false,
validFields: {}, validFields: {},
constraintSchema: null constraintSchema: null,
touched:false
}, () => { }, () => {
this.constraintStrategy(this.constraintTemplates[0]); this.constraintStrategy(this.constraintTemplates[0]);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment