trithuc-mvc-react 3.2.9 → 3.3.0

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,19 @@ 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
- Excel
32
+ <Typography
33
+ noWrap
34
+ sx={{
35
+ width: "100%",
36
+ fontSize: "clamp(0.75rem, 1.5vw, 1rem)",
37
+ textAlign: "center",
38
+ textTransform: "none" // ✅ Đảm bảo chữ gốc giữ nguyên
39
+ }}
40
+ >
41
+ Excel
42
+ </Typography>
33
43
  </Button>
34
44
  ) : (
35
45
  <Button
@@ -39,9 +49,19 @@ const ExportExcelButton = ({ tableName, data, size = "small" }) => {
39
49
  onClick={() => {
40
50
  handleExportExcel(tableName, data);
41
51
  }}
42
- sx={{ ml: 0.5, mr: 0.5, minWidth: "73px" }}
52
+ sx={{ ml: 0.5, mr: 0.5, minWidth: "73px", textTransform: "none" }}
43
53
  >
44
- Excel
54
+ <Typography
55
+ noWrap
56
+ sx={{
57
+ width: "100%",
58
+ fontSize: "clamp(0.75rem, 1.5vw, 1rem)",
59
+ textAlign: "center",
60
+ textTransform: "none" // ✅ Đảm bảo chữ gốc giữ nguyên
61
+ }}
62
+ >
63
+ Excel
64
+ </Typography>
45
65
  </Button>
46
66
  );
47
67
  };
@@ -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,21 @@ 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
- {titleAddButton}
420
+ <Typography
421
+ noWrap
422
+ sx={{
423
+ width: "100%",
424
+ fontSize: "clamp(0.75rem, 1.5vw, 1rem)",
425
+ textAlign: "center",
426
+ textTransform: "none" // ✅ Đảm bảo chữ gốc giữ nguyên
427
+ }}
428
+ >
429
+ {titleAddButton}
430
+ </Typography>
420
431
  </Button>
421
432
  )}
422
433
  </Box>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trithuc-mvc-react",
3
- "version": "3.2.9",
3
+ "version": "3.3.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"