group type selection

main
alex 2023-05-06 22:33:02 +02:00
parent 631640f84c
commit ee46f1ec7c
1 changed files with 20 additions and 14 deletions

View File

@ -47,24 +47,30 @@ export default function GroupTypeSelectionModal({
};
const handleStartTask = () => {
const userSpecifiedGlobalInputs = document
.getElementById("groupTypeSelectionUserSpecifiedGlobalInput")
.getElementsByTagName("input");
const userSpecifiedGlobalInputForm = document.getElementById(
"groupTypeSelectionUserSpecifiedGlobalInputForm"
);
let globalInputs = [];
let canTaskBeStarted = true;
if (userSpecifiedGlobalInputs.length > 0) {
for (let i = 0; i < userSpecifiedGlobalInputs.length; i++) {
if (userSpecifiedGlobalInputs[i].value === "") {
canTaskBeStarted = false;
break;
}
if (userSpecifiedGlobalInputForm !== null) {
const userSpecifiedGlobalInputs = document
.getElementById("groupTypeSelectionUserSpecifiedGlobalInputForm")
.getElementsByTagName("input");
globalInputs.push({
parameterName: userSpecifiedGlobalInputs[i].id,
value: userSpecifiedGlobalInputs[i].value,
});
if (userSpecifiedGlobalInputs.length > 0) {
for (let i = 0; i < userSpecifiedGlobalInputs.length; i++) {
if (userSpecifiedGlobalInputs[i].value === "") {
canTaskBeStarted = false;
break;
}
globalInputs.push({
parameterName: userSpecifiedGlobalInputs[i].id,
value: userSpecifiedGlobalInputs[i].value,
});
}
}
}
@ -219,7 +225,7 @@ function GroupGlobalInputs({
<h3 style={{ fontWeight: "bold" }}>Fill in the global values</h3>
<Form
layout="vertical"
id={"groupTypeSelectionUserSpecifiedGlobalInput"}
id={"groupTypeSelectionUserSpecifiedGlobalInputForm"}
>
{elements}
</Form>