trithuc-mvc-react 3.2.7 → 3.2.9

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.
@@ -81,6 +81,7 @@ const DataTable = ({ multipleActions = [], page, setPage = () => {}, disableEdit
81
81
  toast.success("Thay đổi trạng thái thành công !");
82
82
  }
83
83
  queryClient.invalidateQueries({ queryKey: [tableName] });
84
+ queryClient.invalidateQueries({ queryKey: [tableName, "CountAllTrangThaiXuly"] });
84
85
  },
85
86
  onError: (error) => {
86
87
  if (error.response && error.response.data) {
@@ -105,6 +106,7 @@ const DataTable = ({ multipleActions = [], page, setPage = () => {}, disableEdit
105
106
  }
106
107
 
107
108
  queryClient.invalidateQueries({ queryKey: [tableName] });
109
+ queryClient.invalidateQueries({ queryKey: [tableName, "CountAllTrangThaiXuly"] });
108
110
  },
109
111
  onError: (error) => {
110
112
  if (error.response && error.response.data) {
@@ -157,24 +159,6 @@ const DataTable = ({ multipleActions = [], page, setPage = () => {}, disableEdit
157
159
  }
158
160
  setOpenDialog(false); // Đóng dialog sau khi chọn
159
161
  };
160
- // const handleDelete = (id) => {
161
- // confirm({
162
- // description: "Bạn có chắc chắn muốn xóa bản ghi này không?",
163
- // title: "Xác nhận",
164
- // cancellationText: "Hủy",
165
- // confirmationText: "Xóa"
166
- // })
167
- // .then(() => {
168
- // deleteMutation.mutate({
169
- // id,
170
- // tableName
171
- // });
172
- // })
173
- // .finally(() => {
174
- // // Đảm bảo phần hủy thao tác được xử lý trong finally
175
- // toast.info("Đã hủy thao tác xóa.");
176
- // });
177
- // };
178
162
 
179
163
  const handleChangeStatus = (Id) => {
180
164
  changeStatusMutation.mutate({
@@ -268,23 +252,6 @@ const DataTable = ({ multipleActions = [], page, setPage = () => {}, disableEdit
268
252
  }
269
253
  setOpenDeleteMultipleDialog(false); // Đóng Dialog sau khi chọn
270
254
  };
271
- // const handleDeleteMultiple = () => {
272
- // confirm({
273
- // description: `Bạn có chắc chắn muốn xóa ${selectedItems?.length} bản ghi này không?`,
274
- // title: "Xác nhận",
275
- // cancellationText: "Hủy",
276
- // confirmationText: "Đồng ý"
277
- // })
278
- // .then(() => {
279
- // deleteMultipleMutation.mutate({
280
- // tableName,
281
- // ids: selectedItems
282
- // });
283
- // })
284
- // .catch(() => {
285
- // toast.info("Đã hủy thao tác xóa.");
286
- // });
287
- // };
288
255
  const theme = useTheme();
289
256
  const downXL = useMediaQuery(theme.breakpoints.down("xl"));
290
257
 
@@ -110,14 +110,14 @@ export const TableRowRender = ({
110
110
  {!disableCellThaoTac && (
111
111
  <TableCell align="center">
112
112
  {!disableEdit && canEdit && (
113
- <Tooltip title="Chỉnh sửa">
113
+ <Tooltip title="Cập nhật">
114
114
  <IconButton size={downXl ? "small" : "medium"} onClick={() => onEdit(row)}>
115
115
  <EditOutlined fontSize="inherit" color="primary" />
116
116
  </IconButton>
117
117
  </Tooltip>
118
118
  )}
119
119
  {canView && !tableActions?.some(({ permissionType }) => permissionType == "view") && (
120
- <Tooltip title="Xem chi tiết">
120
+ <Tooltip title="Chi tiết">
121
121
  <IconButton onClick={() => onView(row)}>
122
122
  <RemoveRedEyeOutlinedIcon color="info" />
123
123
  </IconButton>
@@ -93,7 +93,7 @@ export const TableRowRenderSM = ({
93
93
  startIcon={<EditOutlined fontSize="inherit" />}
94
94
  sx={buttonStyle}
95
95
  >
96
- Sửa
96
+ Cập nhật
97
97
  </Button>
98
98
  </Grid>
99
99
  )}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trithuc-mvc-react",
3
- "version": "3.2.7",
3
+ "version": "3.2.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"