diff --git a/src/renderer/utils/check.js b/src/renderer/utils/check.js index ae19991..1239d3f 100644 --- a/src/renderer/utils/check.js +++ b/src/renderer/utils/check.js @@ -74,7 +74,7 @@ async function checkGroundnet(data) { okNodes.push(parkingNode); okNodes.push(runwayNode); } else { - console.log(`No route from ${parkingNode} to ${runwayNode}`); + console.log(`No route from Parking ${parkingNode} to Runwaynode ${runwayNode}`); } this.postMessage(['progress', 1]); }); @@ -170,6 +170,17 @@ async function checkGroundnet(data) { this.postMessage(['progress', 1]); }); }); + // Check for name + parkingNodes.forEach(parkingNode => { + if (!parkingNode.name) { + notOkNodes.push({ id: parkingNode.index, message: 'Name empty' }); + this.postMessage(['progress', 1]); + } + if (!parkingNode.type) { + notOkNodes.push({ id: parkingNode.index, message: 'Parking type empty' }); + this.postMessage(['progress', 1]); + } + }); // Check for intersecting radii parkingNodes.forEach(parkingNode => { if (!parkingNode.name || /^\s*$/.test(parkingNode.name)) {