trithuc-mvc-react 2.5.1 → 2.5.3
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.
|
@@ -86,7 +86,7 @@ const DataTable = ({ multipleActions = [],page, setPage = () => { }, disableEdit
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
const handleDelete = (id) => {
|
|
89
|
-
confirm({ description: "Bạn có chắc chắn muốn xóa bản ghi này không?", title: "Xác nhận" })
|
|
89
|
+
confirm({ description: "Bạn có chắc chắn muốn xóa bản ghi này không?", title: "Xác nhận", cancellationText: "Hủy", confirmationText: "Xóa"})
|
|
90
90
|
.then(() => {
|
|
91
91
|
deleteMutation.mutate({
|
|
92
92
|
id,
|
|
@@ -164,7 +164,7 @@ const DataTable = ({ multipleActions = [],page, setPage = () => { }, disableEdit
|
|
|
164
164
|
setPage(0);
|
|
165
165
|
};
|
|
166
166
|
const handleDeleteMultiple = () => {
|
|
167
|
-
confirm({ description: `Bạn có chắc chắn muốn xóa ${selectedItems?.length} bản ghi này không?`, title: "Xác nhận" })
|
|
167
|
+
confirm({ description: `Bạn có chắc chắn muốn xóa ${selectedItems?.length} bản ghi này không?`, title: "Xác nhận", cancellationText: "Hủy", confirmationText: "Đồng ý" })
|
|
168
168
|
.then(() => {
|
|
169
169
|
deleteMultipleMutation.mutate({
|
|
170
170
|
tableName,
|
|
@@ -98,7 +98,7 @@ export const TableRowRender = ({
|
|
|
98
98
|
|
|
99
99
|
{!disableCellThaoTac && (
|
|
100
100
|
<TableCell align="center">
|
|
101
|
-
{!disableEdit && (
|
|
101
|
+
{!disableEdit && canEdit && (
|
|
102
102
|
<Tooltip title="Chỉnh sửa">
|
|
103
103
|
<IconButton size={downXl ? "small" : "medium"} onClick={() => onEdit(row)}>
|
|
104
104
|
<EditOutlined fontSize="inherit" color="primary" />
|
|
@@ -112,7 +112,7 @@ export const TableRowRender = ({
|
|
|
112
112
|
</IconButton>
|
|
113
113
|
</Tooltip>
|
|
114
114
|
)}
|
|
115
|
-
{!disableDelete && (
|
|
115
|
+
{!disableDelete && canDelete && (
|
|
116
116
|
<Tooltip title="Xóa">
|
|
117
117
|
<IconButton
|
|
118
118
|
size={downXl ? "small" : "medium"}
|
|
@@ -67,7 +67,8 @@ function DataManagement({
|
|
|
67
67
|
|
|
68
68
|
tableActions = [],
|
|
69
69
|
multipleActions = [],
|
|
70
|
-
|
|
70
|
+
disableDelete = false,
|
|
71
|
+
disableEdit = false,
|
|
71
72
|
disableEditor = false,
|
|
72
73
|
onAddClick = () => {},
|
|
73
74
|
onEditClick = () => {},
|
|
@@ -210,7 +211,7 @@ function DataManagement({
|
|
|
210
211
|
{tabPanel}
|
|
211
212
|
<FilterGod filters={filters} elementSize={elementSize} setPage={setPage} />
|
|
212
213
|
{backParentNavigator}
|
|
213
|
-
<DataTable multipleActions={multipleActions} page={page} setPage={setPage} disableEdit={
|
|
214
|
+
<DataTable multipleActions={multipleActions} page={page} setPage={setPage} disableEdit={disableEdit} disableDelete = {disableDelete}/>
|
|
214
215
|
</Card>
|
|
215
216
|
</FormProvider>
|
|
216
217
|
|
|
@@ -108,6 +108,7 @@ const DateRangePicker = ({ label = ["Từ ngày", "Đến ngày"] }) => {
|
|
|
108
108
|
}));
|
|
109
109
|
}}
|
|
110
110
|
edge="end"
|
|
111
|
+
style={{ visibility: dateRange.startDate ? 'visible' : 'hidden' }}
|
|
111
112
|
>
|
|
112
113
|
<ClearIcon />
|
|
113
114
|
</IconButton>
|
|
@@ -143,6 +144,7 @@ const DateRangePicker = ({ label = ["Từ ngày", "Đến ngày"] }) => {
|
|
|
143
144
|
}));
|
|
144
145
|
}}
|
|
145
146
|
edge="end"
|
|
147
|
+
style={{ visibility: dateRange.endDate ? 'visible' : 'hidden' }}
|
|
146
148
|
>
|
|
147
149
|
<ClearIcon />
|
|
148
150
|
</IconButton>
|