authscape 1.0.548 → 1.0.552
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.
- package/index.js +482 -188
- package/package.json +1 -1
- package/src/components/EditableDatagrid.js +16 -13
- package/src/components/FileUploader.js +55 -55
- package/src/components/users/UserEditor.js +344 -129
- package/src/components/users/UserManagement.js +119 -100
package/package.json
CHANGED
|
@@ -6,13 +6,19 @@ export const EditableDatagrid = ({url = null, eRows = null, columns, isCellEdita
|
|
|
6
6
|
|
|
7
7
|
const [rows, setRows] = useState([]);
|
|
8
8
|
const [totalRows, setTotalRows] = useState(0);
|
|
9
|
-
const [offset, setOffset] = useState(0);
|
|
9
|
+
// const [offset, setOffset] = useState(0);
|
|
10
|
+
|
|
11
|
+
const [paginationModel, setPaginationModel] = React.useState({
|
|
12
|
+
page: 0,
|
|
13
|
+
pageSize: pageSize,
|
|
14
|
+
});
|
|
15
|
+
|
|
10
16
|
|
|
11
17
|
useEffect(() => {
|
|
12
18
|
|
|
13
19
|
reloadDataGrid();
|
|
14
20
|
|
|
15
|
-
}, [
|
|
21
|
+
}, [paginationModel]);
|
|
16
22
|
|
|
17
23
|
|
|
18
24
|
const reloadDataGrid = async () => {
|
|
@@ -24,19 +30,18 @@ export const EditableDatagrid = ({url = null, eRows = null, columns, isCellEdita
|
|
|
24
30
|
{
|
|
25
31
|
response = await apiService().post(url,
|
|
26
32
|
{
|
|
27
|
-
offset:
|
|
28
|
-
length: pageSize
|
|
33
|
+
offset: paginationModel.page,
|
|
34
|
+
length: paginationModel.pageSize
|
|
29
35
|
});
|
|
30
36
|
}
|
|
31
37
|
else
|
|
32
38
|
{
|
|
33
|
-
params.offset =
|
|
34
|
-
params.length = pageSize;
|
|
39
|
+
params.offset = paginationModel.page;
|
|
40
|
+
params.length = paginationModel.pageSize;
|
|
35
41
|
|
|
36
42
|
response = await apiService().post(url, params);
|
|
37
43
|
}
|
|
38
44
|
|
|
39
|
-
|
|
40
45
|
if (response != null && response.status == 200)
|
|
41
46
|
{
|
|
42
47
|
setTotalRows(response.data.recordsTotal);
|
|
@@ -69,12 +74,10 @@ export const EditableDatagrid = ({url = null, eRows = null, columns, isCellEdita
|
|
|
69
74
|
rowCount={totalRows}
|
|
70
75
|
onRowClick={onRowClick}
|
|
71
76
|
paginationMode="server"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
onPageChange={(newPage) => setOffset(newPage)}
|
|
77
|
-
rowsPerPageOptions={rowsPerPage}
|
|
77
|
+
pageSizeOptions={rowsPerPage}
|
|
78
|
+
rowHeight={rowHeight}
|
|
79
|
+
paginationModel={paginationModel}
|
|
80
|
+
onPaginationModelChange={setPaginationModel}
|
|
78
81
|
disableSelectionOnClick={true}
|
|
79
82
|
onCellClick={onCellClick}
|
|
80
83
|
onCellEditCommit={handleCellEditCommit()}
|
|
@@ -190,61 +190,61 @@ export const FileUploader = ({
|
|
|
190
190
|
|
|
191
191
|
{variant == "filemanager" &&
|
|
192
192
|
<Grid container spacing={2}>
|
|
193
|
-
<Grid ref={refOveride} item xs={
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
193
|
+
<Grid ref={refOveride} item xs={12} onClick={handleUploadFileInput}>
|
|
194
|
+
<Grid
|
|
195
|
+
container
|
|
196
|
+
sx={{
|
|
197
|
+
padding: 2,
|
|
198
|
+
backgroundColor: "#ECEDED",
|
|
199
|
+
fontSize: "14px",
|
|
200
|
+
cursor: "pointer",
|
|
201
|
+
borderRadius: "8px",
|
|
202
|
+
border: "1px dashed #C8D4D5",
|
|
203
|
+
}}
|
|
204
|
+
>
|
|
205
|
+
<Grid item xs={2}>
|
|
206
|
+
<Box>
|
|
207
|
+
<FileCopyRoundedIcon
|
|
208
|
+
sx={{ fill: "#C8D4D5", width: 50, height: 50 }}
|
|
209
|
+
/>
|
|
210
|
+
</Box>
|
|
211
|
+
</Grid>
|
|
212
|
+
<Grid item xs={10}>
|
|
213
|
+
<Box>Drag and drop files here or</Box>
|
|
214
|
+
<Box sx={{ marginTop: 1 }}>
|
|
215
|
+
<Stack direction="row" spacing={2}>
|
|
216
|
+
<UploadRoundedIcon
|
|
217
|
+
sx={{ fill: primaryColor, width: 30, height: 30 }}
|
|
218
|
+
/>
|
|
219
|
+
<Typography
|
|
220
|
+
variant="h3"
|
|
221
|
+
component={"span"}
|
|
222
|
+
sx={{ color: primaryColor, paddingTop: 0.6 }}
|
|
223
|
+
>
|
|
224
|
+
Upload
|
|
225
|
+
</Typography>
|
|
226
|
+
</Stack>
|
|
227
|
+
</Box>
|
|
228
|
+
</Grid>
|
|
229
|
+
<Grid item xs={12}>
|
|
230
|
+
{loaded > 0 && (
|
|
231
|
+
<LinearProgress
|
|
232
|
+
variant="buffer"
|
|
233
|
+
value={loaded}
|
|
234
|
+
sx={{ marginTop: 2 }}
|
|
235
|
+
/>
|
|
236
|
+
)}
|
|
237
|
+
|
|
238
|
+
{loaded == 100 && (
|
|
239
|
+
<Typography
|
|
240
|
+
variant="h3"
|
|
241
|
+
component={"span"}
|
|
242
|
+
sx={{ color: primaryColor, paddingTop: 0.6 }}>
|
|
243
|
+
Completed
|
|
244
|
+
</Typography>
|
|
245
|
+
)}
|
|
246
|
+
</Grid>
|
|
247
|
+
</Grid>
|
|
248
248
|
</Grid>
|
|
249
249
|
|
|
250
250
|
{children}
|