Skip to content

Commit d1f5947

Browse files
committed
Fix users
1 parent 920ff15 commit d1f5947

File tree

13 files changed

+2255
-8
lines changed

13 files changed

+2255
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"lodash": "^4.17.21",
4343
"moment": "2.29.1",
4444
"mui-datatables": "^4.2.2",
45+
"prop-types": "^15.8.1",
4546
"query-string": "7.1.0",
4647
"react": "^17.0.2",
4748
"react-apexcharts": "^1.4.0",

src/components/FormItems/items/InputFormItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const InputFormItem = (props) => {
3838
placeholder={placeholder || undefined}
3939
autoFocus={autoFocus || undefined}
4040
autoComplete={autoComplete || undefined}
41-
error={FormErrors.validateStatus(form, name, errorMessage)}
41+
// error={FormErrors.validateStatus(form, name, errorMessage)}
4242
{...inputProps}
4343
/>
4444
<div className='invalid-feedback'>

src/components/FormItems/items/RadioFormItem.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const RadioFormItem = (props) => {
3333
>
3434
{options.map((option) => (
3535
<FormControlLabel
36+
key={option.value}
3637
value={option.value}
3738
control={<Radio />}
3839
label={option.label}

src/components/Layout/Layout.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import ColorChangeThemePopper from './components/ColorChangeThemePopper';
2222
import EditUser from '../../pages/user/EditUser';
2323
import AddUser from '../../pages/CRUD/Users/form/UsersForm';
2424

25-
2625
// pages
2726
import Dashboard from '../../pages/dashboard';
2827
import Profile from '../../pages/profile'

src/pages/CRUD/Users/form/UsersForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const UsersForm = (props) => {
4747
};
4848

4949
const renderForm = () => (
50-
<Widget title={<h4>{title()}</h4>} collapse close>
50+
<Widget title={title()} collapse close>
5151
<Formik
5252
onSubmit={handleSubmit}
5353
initialValues={iniValues()}

src/pages/CRUD/Users/table/UsersTable.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const UsersTable = () => {
4848
const dispatch = useDispatch();
4949
const history = useHistory();
5050
const classes = useStyles();
51-
const [setWidth] = React.useState(window.innerWidth);
51+
// eslint-disable-next-line no-unused-vars
52+
const [width, setWidth] = React.useState(window.innerWidth);
5253

5354
const [filters] = React.useState([
5455
{ label: 'First Name', title: 'firstName' },
@@ -63,7 +64,7 @@ const UsersTable = () => {
6364
const [loading, setLoading] = React.useState(false);
6465
const [sortModel, setSortModel] = React.useState([]);
6566
const [selectionModel, setSelectionModel] = React.useState([]);
66-
67+
// eslint-disable-next-line no-unused-vars
6768
const count = useSelector((store) => store.users.list.count);
6869
const modalOpen = useSelector((store) => store.users.list.modalOpen);
6970
const rows = useSelector((store) => store.users.list.rows);
@@ -382,7 +383,6 @@ const UsersTable = () => {
382383
pageSize={5}
383384
pagination
384385
{...rowsState}
385-
rowCount={count}
386386
paginationMode='server'
387387
components={{ NoRowsOverlay, LoadingOverlay: LinearProgress }}
388388
onPageChange={(page) => {
@@ -400,7 +400,7 @@ const UsersTable = () => {
400400
disableColumnMenu
401401
loading={loading}
402402
onRowClick={(e) => {
403-
history.push(`/admin/users/${e.id}/edit`);
403+
history.push(`/app/users/${e.id}/edit`);
404404
}}
405405
autoHeight
406406
/>
@@ -422,7 +422,7 @@ const UsersTable = () => {
422422
</Widget>
423423

424424
<Dialog
425-
open={modalOpen}
425+
open={modalOpen || false}
426426
title='Confirm delete'
427427
contentText='Are you sure you want to delete this item?'
428428
onClose={closeModal}

0 commit comments

Comments
 (0)