CE-1727 - Improve (fix?) next/submit handling for validation screen and linear flow.

This commit is contained in:
2024-09-20 12:17:30 -05:00
parent 98a02cda96
commit 3adb8ab4ba
2 changed files with 13 additions and 3 deletions

View File

@ -6,7 +6,7 @@
"@auth0/auth0-react": "1.10.2",
"@emotion/react": "11.7.1",
"@emotion/styled": "11.6.0",
"@kingsrook/qqq-frontend-core": "1.0.107",
"@kingsrook/qqq-frontend-core": "1.0.108",
"@mui/icons-material": "5.4.1",
"@mui/material": "5.11.1",
"@mui/styles": "5.11.1",

View File

@ -168,7 +168,7 @@ function ProcessRun({process, table, defaultProcessValues, isModal, isWidget, is
const [overrideOnLastStep, setOverrideOnLastStep] = useState(null as boolean);
/////////////////////////////////////////////////////////////////////////////////////
// determine if we're on the last-step or not (e.g., to decide "Submit" vs "Next"( //
// determine if we're on the last-step or not (e.g., to decide "Submit" vs "Next") //
/////////////////////////////////////////////////////////////////////////////////////
let onLastStep = false;
if (processMetaData?.stepFlow == "LINEAR" && activeStepIndex === steps.length - 2)
@ -1022,7 +1022,17 @@ function ProcessRun({process, table, defaultProcessValues, isModal, isWidget, is
if (doesStepHaveComponent(activeStep, QComponentType.VALIDATION_REVIEW_SCREEN))
{
addField("doFullValidation", {type: "radio"}, "true", null);
setOverrideOnLastStep(false);
//////////////////////////////////////////////////////////////////////////////////////////////
// so - if we're on the validation screen, and we don't have a validationSummary right now, //
// and the process supports doing full validation - then the user will choose, via radio, //
// if this is the last step or not - and by default that radio will be true, to make this //
// NOT the last step - so set this value. //
//////////////////////////////////////////////////////////////////////////////////////////////
if(!processValues["validationSummary"] && processValues["supportsFullValidation"])
{
setOverrideOnLastStep(false);
}
}
if (doesStepHaveComponent(activeStep, QComponentType.GOOGLE_DRIVE_SELECT_FOLDER))