diff --git a/src/components/routes/submit.tsx b/src/components/routes/submit.tsx index 4aaf41199..97252ee45 100644 --- a/src/components/routes/submit.tsx +++ b/src/components/routes/submit.tsx @@ -204,6 +204,23 @@ function Submit() { flow.upload(); }; + const isSelected = service_name => { + let selected = false; + settings.services.forEach(cat => { + cat.services.forEach(srv => { + if (srv.name === service_name) { + selected = srv.selected; + } + }); + }); + return selected; + }; + + const anySelected = () => { + const serviceList = settings.service_spec.map(srv => srv.name); + return serviceList.some(isSelected); + }; + const setFileDropperFile = selectedFile => { setFile(selectedFile); }; @@ -621,82 +638,88 @@ function Submit() { - {settings && settings.service_spec.length !== 0 ? ( + {settings && settings.service_spec.length !== 0 && anySelected() ? (