QQQ-28 replacing QComponentType.FILE_UPLOAD with QFieldType.BLOB

This commit is contained in:
2022-07-25 07:56:45 -05:00
parent 33bcffd4c3
commit 0c6d17d103
2 changed files with 4 additions and 13 deletions

View File

@ -63,6 +63,9 @@ class DynamicFormUtils
case QFieldType.DATE: case QFieldType.DATE:
fieldType = field.type.toString(); fieldType = field.type.toString();
break; break;
case QFieldType.BLOB:
fieldType = "file";
break;
case QFieldType.TEXT: case QFieldType.TEXT:
case QFieldType.HTML: case QFieldType.HTML:
case QFieldType.STRING: case QFieldType.STRING:

View File

@ -234,7 +234,7 @@ function ProcessRun(): JSX.Element
} }
</div> </div>
)))} )))}
{(step.formFields || doesStepHaveComponent(step, QComponentType.FILE_UPLOAD)) && ( {(step.formFields) && (
<QDynamicForm <QDynamicForm
formData={formData} formData={formData}
bulkEditMode={doesStepHaveComponent(activeStep, QComponentType.BULK_EDIT_FORM)} bulkEditMode={doesStepHaveComponent(activeStep, QComponentType.BULK_EDIT_FORM)}
@ -392,18 +392,6 @@ function ProcessRun(): JSX.Element
logFormValidations("Post-disable thingie", formValidations); logFormValidations("Post-disable thingie", formValidations);
} }
else if (doesStepHaveComponent(activeStep, QComponentType.FILE_UPLOAD))
{
//////////////////////////////////////////////////////////////////////////
// if this step has an upload component, then set up the form for that. //
//////////////////////////////////////////////////////////////////////////
const {dynamicFormFields, formValidations} = DynamicFormUtils.getFormDataForUploadForm("fileUpload", "File");
setFormFields(dynamicFormFields);
setInitialValues(initialValues);
setValidationScheme(Yup.object().shape(formValidations));
setValidationFunction(null);
}
else else
{ {
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////