trithuc-mvc-react 3.2.9 → 3.3.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { URL_APPLICATION, URL_APPLICATION_API } from "@/constants";
|
|
2
2
|
import { Download } from "@mui/icons-material";
|
|
3
|
-
import { Button, IconButton, Tooltip, useMediaQuery, useTheme } from "@mui/material";
|
|
3
|
+
import { Button, IconButton, Tooltip, Typography, useMediaQuery, useTheme } from "@mui/material";
|
|
4
4
|
import { toast } from "react-toastify";
|
|
5
5
|
import { exportExcel } from "../../api";
|
|
6
6
|
|
|
@@ -27,9 +27,23 @@ const ExportExcelButton = ({ tableName, data, size = "small" }) => {
|
|
|
27
27
|
onClick={() => {
|
|
28
28
|
handleExportExcel(tableName, data);
|
|
29
29
|
}}
|
|
30
|
-
sx={{ ml: 0.5, mr: 0.5, minWidth: "73px" }}
|
|
30
|
+
sx={{ ml: 0.5, mr: 0.5, minWidth: "73px", textTransform: "none" }}
|
|
31
31
|
>
|
|
32
|
-
|
|
32
|
+
<Typography
|
|
33
|
+
noWrap
|
|
34
|
+
sx={{
|
|
35
|
+
width: "100%",
|
|
36
|
+
fontSize: {
|
|
37
|
+
xs: "0.75rem",
|
|
38
|
+
sm: "0.875rem",
|
|
39
|
+
md: "1rem"
|
|
40
|
+
},
|
|
41
|
+
textAlign: "center",
|
|
42
|
+
textTransform: "none" // ✅ Đảm bảo chữ gốc giữ nguyên
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
Excel
|
|
46
|
+
</Typography>
|
|
33
47
|
</Button>
|
|
34
48
|
) : (
|
|
35
49
|
<Button
|
|
@@ -39,9 +53,23 @@ const ExportExcelButton = ({ tableName, data, size = "small" }) => {
|
|
|
39
53
|
onClick={() => {
|
|
40
54
|
handleExportExcel(tableName, data);
|
|
41
55
|
}}
|
|
42
|
-
sx={{ ml: 0.5, mr: 0.5, minWidth: "73px" }}
|
|
56
|
+
sx={{ ml: 0.5, mr: 0.5, minWidth: "73px", textTransform: "none" }}
|
|
43
57
|
>
|
|
44
|
-
|
|
58
|
+
<Typography
|
|
59
|
+
noWrap
|
|
60
|
+
sx={{
|
|
61
|
+
width: "100%",
|
|
62
|
+
fontSize: {
|
|
63
|
+
xs: "0.75rem",
|
|
64
|
+
sm: "0.875rem",
|
|
65
|
+
md: "1rem"
|
|
66
|
+
},
|
|
67
|
+
textAlign: "center",
|
|
68
|
+
textTransform: "none" // ✅ Đảm bảo chữ gốc giữ nguyên
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
Excel
|
|
72
|
+
</Typography>
|
|
45
73
|
</Button>
|
|
46
74
|
);
|
|
47
75
|
};
|
|
@@ -152,7 +152,7 @@ export const FilterGod = ({ tableName, filters, filterButtons, elementSize = "sm
|
|
|
152
152
|
);
|
|
153
153
|
|
|
154
154
|
return (
|
|
155
|
-
<Grid container key={field.toString()} size={{ ...size }}>
|
|
155
|
+
<Grid sx={{ mb: "5px" }} container key={field.toString()} size={{ ...size }}>
|
|
156
156
|
<Grid size={{ xs: 12, md: 6 }}>{renderDatePicker(field[0], label1, field[1], "max")}</Grid>
|
|
157
157
|
<Grid size={{ xs: 12, md: 6 }}>{renderDatePicker(field[1], label2, field[0], "min")}</Grid>
|
|
158
158
|
</Grid>
|
|
@@ -161,7 +161,7 @@ export const FilterGod = ({ tableName, filters, filterButtons, elementSize = "sm
|
|
|
161
161
|
|
|
162
162
|
if (rest.type === "slider-range") {
|
|
163
163
|
return (
|
|
164
|
-
<Grid key={field.toString()} size={{ ...size }}>
|
|
164
|
+
<Grid sx={{ mb: "5px" }} key={field.toString()} size={{ ...size }}>
|
|
165
165
|
<Slider
|
|
166
166
|
onChange={(e, value) => {
|
|
167
167
|
setDataSearch({
|
|
@@ -182,7 +182,7 @@ export const FilterGod = ({ tableName, filters, filterButtons, elementSize = "sm
|
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
184
|
return (
|
|
185
|
-
<Grid key={field.toString()} size={{ ...size }}>
|
|
185
|
+
<Grid sx={{ mb: "5px" }} key={field.toString()} size={{ ...size }}>
|
|
186
186
|
<FilterElement name={field.toString()} label={label} placeholder={placeHolder} {...rest} setPage={setPage} />
|
|
187
187
|
</Grid>
|
|
188
188
|
);
|
|
@@ -108,7 +108,7 @@ function DataManagement({
|
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
defaultRowsPerPage = 5,
|
|
111
|
-
titleAddButton = "Thêm",
|
|
111
|
+
titleAddButton = "Thêm mới",
|
|
112
112
|
thongKe,
|
|
113
113
|
bieuDo,
|
|
114
114
|
disableHead = false
|
|
@@ -413,10 +413,25 @@ function DataManagement({
|
|
|
413
413
|
sx={{
|
|
414
414
|
ml: 0.5,
|
|
415
415
|
mr: 0.5,
|
|
416
|
-
minWidth: "73px"
|
|
416
|
+
minWidth: "73px",
|
|
417
|
+
textTransform: "none" // ✅ Không viết hoa tự động
|
|
417
418
|
}}
|
|
418
419
|
>
|
|
419
|
-
|
|
420
|
+
<Typography
|
|
421
|
+
noWrap
|
|
422
|
+
sx={{
|
|
423
|
+
width: "100%",
|
|
424
|
+
fontSize: {
|
|
425
|
+
xs: "0.75rem",
|
|
426
|
+
sm: "0.875rem",
|
|
427
|
+
md: "1rem"
|
|
428
|
+
},
|
|
429
|
+
textAlign: "center",
|
|
430
|
+
textTransform: "none" // ✅ Đảm bảo chữ gốc giữ nguyên
|
|
431
|
+
}}
|
|
432
|
+
>
|
|
433
|
+
{titleAddButton}
|
|
434
|
+
</Typography>
|
|
420
435
|
</Button>
|
|
421
436
|
)}
|
|
422
437
|
</Box>
|