mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 21:30:45 +00:00
Feedback from code reviews
This commit is contained in:
@ -93,27 +93,6 @@ class DynamicFormUtils
|
||||
}
|
||||
return (null);
|
||||
}
|
||||
|
||||
public static getFormDataForUploadForm(fieldName: string, fieldLabel: string, isRequired: boolean = true)
|
||||
{
|
||||
const dynamicFormFields: any = {};
|
||||
const formValidations: any = {};
|
||||
|
||||
dynamicFormFields[fieldName] = {
|
||||
name: fieldName,
|
||||
label: fieldLabel,
|
||||
isRequired: isRequired,
|
||||
type: "file",
|
||||
// todo invalidMsg: "Zipcode is not valid (e.g. 70000).",
|
||||
};
|
||||
|
||||
if (isRequired)
|
||||
{
|
||||
formValidations[fieldName] = Yup.string().required(`${fieldLabel} is required.`);
|
||||
}
|
||||
|
||||
return {dynamicFormFields, formValidations};
|
||||
}
|
||||
}
|
||||
|
||||
export default DynamicFormUtils;
|
||||
|
@ -475,7 +475,7 @@ function EntityList({table}: Props): JSX.Element
|
||||
|
||||
const bulkLoadClicked = () =>
|
||||
{
|
||||
document.location.href = `/processes/${tableName}.bulkInsert${getRecordsQueryString()}`;
|
||||
document.location.href = `/processes/${tableName}.bulkInsert`;
|
||||
};
|
||||
|
||||
const bulkEditClicked = () =>
|
||||
@ -630,7 +630,15 @@ function EntityList({table}: Props): JSX.Element
|
||||
<MDBox my={3}>
|
||||
{alertContent ? (
|
||||
<MDBox mb={3}>
|
||||
<Alert severity="error">{alertContent}</Alert>
|
||||
<Alert
|
||||
severity="error"
|
||||
onClose={() =>
|
||||
{
|
||||
setAlertContent(null);
|
||||
}}
|
||||
>
|
||||
{alertContent}
|
||||
</Alert>
|
||||
</MDBox>
|
||||
) : (
|
||||
""
|
||||
|
Reference in New Issue
Block a user