diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js index e9b02b411bf57723186f092b0764fdbcc22886af..2842a5e2d6073cdac6d5c2f6aba78d51aec7d310 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js @@ -94,7 +94,7 @@ export default (props) => { ...stationState, [StationName]: { stations: response.stations, - missing_StationFields: missing_StationFields ? isNaN(missing_StationFields.max_nr_missing)? 0: missing_StationFields.max_nr_missing : '' + missing_StationFields: missing_StationFields ? isNaN(missing_StationFields.max_nr_missing)? 0: missing_StationFields.max_nr_missing : '0' }, Custom: { stations: [...stationState['Custom'].stations, ...response.stations], @@ -272,7 +272,7 @@ export default (props) => { className={(state[i] && state[i].error) ?'input-error':''} tooltip="Max No. of Missing Stations" tooltipOptions={tooltipOptions} maxLength="128" placeholder="Max No. of Missing Stations" - value={state[i] ? state[i].missing_StationFields : ''} + value={state[i] ? (state[i].missing_StationFields || 0) : '0'} disabled={props.view} onChange={(e) => setNoOfmissing_StationFields(i, e.target.value)}/> {(state[i] && state[i].error) && <span className="error-message">{state[i].missing_StationFields ? `Max. no of missing stations is ${state[i] ? state[i].stations.length : 0}` : 'Max. no of missing stations required'}</span>} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js index 9aeff323993dd4be253c5d5f19007d5b6b29532f..89e23b256b547511800b59062bc0651a3a2f4c47 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js @@ -701,7 +701,7 @@ export class SchedulingSetCreate extends Component { if(this.state.defaultStationGroups){ let stationValue = ''; this.state.defaultStationGroups.map(stationGroup =>{ - stationValue += stationGroup.stations+':'+stationGroup.max_nr_missing+"|"; + stationValue += stationGroup.stations+':'+ (stationGroup.max_nr_missing || 0)+"|"; }) defaultCellValues['stations'] = stationValue; }