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 @@
* 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';
......
......@@ -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;
}*/
......
......@@ -289,6 +289,12 @@ 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') {
......@@ -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]);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment