trithuc-mvc-react 2.3.5 → 2.3.6
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.
|
@@ -9,19 +9,20 @@ import { styled, useTheme } from "@mui/material/styles";
|
|
|
9
9
|
import MoreMenu from "../MoreMenu";
|
|
10
10
|
import { useMemo } from "react";
|
|
11
11
|
|
|
12
|
-
export const TableRowRender = ({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} =
|
|
12
|
+
export const TableRowRender = ({
|
|
13
|
+
index,
|
|
14
|
+
row,
|
|
15
|
+
page,
|
|
16
|
+
rowsPerPage,
|
|
17
|
+
selected,
|
|
18
|
+
onSelect,
|
|
19
|
+
onChangeStatus,
|
|
20
|
+
onDelete,
|
|
21
|
+
onEdit,
|
|
22
|
+
onView
|
|
23
|
+
}) => {
|
|
24
|
+
const { selectedField, columns, statusKey, disableStatus, tableActions, disableCellThaoTac, tableName, sttLuyKe } =
|
|
25
|
+
useDataTable();
|
|
25
26
|
const { canEdit, canDelete, canView, canAction } = usePermission(tableName);
|
|
26
27
|
|
|
27
28
|
console.log(">>> useDataTable()", useDataTable());
|
|
@@ -78,9 +78,7 @@ function DataManagement({
|
|
|
78
78
|
sx: {}
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
defaultRowsPerPage = 5
|
|
82
|
-
page = 0,
|
|
83
|
-
rowsPerPage = defaultRowsPerPage
|
|
81
|
+
defaultRowsPerPage = 5
|
|
84
82
|
}) {
|
|
85
83
|
const [openEditorDialog, setOpenEditorDialog] = useState(false);
|
|
86
84
|
const [selectedEditItem, setSelectedEditItem] = useState(null);
|
|
@@ -133,9 +131,7 @@ function DataManagement({
|
|
|
133
131
|
onEditClick,
|
|
134
132
|
hasTabpanel,
|
|
135
133
|
backParentNavigator,
|
|
136
|
-
defaultRowsPerPage
|
|
137
|
-
page,
|
|
138
|
-
rowsPerPage
|
|
134
|
+
defaultRowsPerPage
|
|
139
135
|
};
|
|
140
136
|
}, [
|
|
141
137
|
sttLuyKe,
|
|
@@ -152,9 +148,7 @@ function DataManagement({
|
|
|
152
148
|
setOpenViewDialog,
|
|
153
149
|
onEditClick,
|
|
154
150
|
backParentNavigator,
|
|
155
|
-
defaultRowsPerPage
|
|
156
|
-
page,
|
|
157
|
-
rowsPerPage
|
|
151
|
+
defaultRowsPerPage
|
|
158
152
|
]);
|
|
159
153
|
|
|
160
154
|
const methods = useForm({ defaultValues: getDefaultValues(filters) });
|