trithuc-mvc-react 1.9.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ import { Controller, useFormContext } from "react-hook-form";
|
|
|
4
4
|
import UploadMultiFile from "trithuc-mvc-react/components/DataManagement/upload/UploadMultiFile";
|
|
5
5
|
import { useCallback, useState } from "react";
|
|
6
6
|
import { saveFilesToServer } from "@/utils";
|
|
7
|
-
|
|
7
|
+
import { Typography } from '@mui/material';
|
|
8
8
|
const UploadMultipleFile = ({ name, label, disabled }) => {
|
|
9
9
|
const { control, getValues, setValue } = useFormContext();
|
|
10
10
|
const [isLoadingUpfile, setIsLoadingUpfile] = useState(false);
|
|
@@ -34,10 +34,10 @@ const UploadMultipleFile = ({ name, label, disabled }) => {
|
|
|
34
34
|
render={({ field, fieldState: { error } }) => {
|
|
35
35
|
return (
|
|
36
36
|
<>
|
|
37
|
-
|
|
37
|
+
<Typography variant="h5"> {label}</Typography>
|
|
38
38
|
<UploadMultiFile
|
|
39
39
|
disabled={disabled}
|
|
40
|
-
maxSize={
|
|
40
|
+
maxSize={31457280}
|
|
41
41
|
accept="*"
|
|
42
42
|
files={field.value}
|
|
43
43
|
onDrop={!disabled ? handleDrop : () => { }} // disabled lúc ở model view thì ko được chọn ảnh
|