mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 13:20:43 +00:00
QQQ-28 replacing QComponentType.FILE_UPLOAD with QFieldType.BLOB
This commit is contained in:
@ -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:
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user