Skip to content

Commit 2a6ba68

Browse files
committed
Code styling
1 parent 9336c5b commit 2a6ba68

File tree

3 files changed

+60
-8
lines changed

3 files changed

+60
-8
lines changed

src/client/src/pages/UserManagement/Components/Dialog/ChangePasswordDialog.jsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import { yupResolver } from "@hookform/resolvers/yup";
2-
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, TextField, Typography } from '@material-ui/core';
2+
import {
3+
Button,
4+
Dialog,
5+
DialogActions,
6+
DialogContent,
7+
DialogTitle,
8+
TextField,
9+
Typography
10+
} from '@material-ui/core';
311
import React from 'react';
412
import { useForm } from 'react-hook-form';
513
import * as Yup from 'yup';
@@ -8,7 +16,12 @@ import { buildPasswordValidation } from '../../Validations';
816

917

1018
export default function ChangePasswordDialog(props) {
11-
const { onClose, notifyResult, token, user } = props;
19+
const {
20+
onClose,
21+
notifyResult,
22+
token,
23+
user
24+
} = props;
1225
const { username } = user;
1326

1427
const validationSchema = Yup.object().shape({

src/client/src/pages/UserManagement/Components/Dialog/NewUserDialog.jsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,33 @@
11
import { yupResolver } from "@hookform/resolvers/yup";
2-
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, TextField, Typography } from '@material-ui/core';
2+
import {
3+
Button,
4+
Dialog,
5+
DialogActions,
6+
DialogContent,
7+
DialogTitle,
8+
TextField,
9+
Typography
10+
} from '@material-ui/core';
311
import React from 'react';
412
import { useForm } from 'react-hook-form';
513
import * as Yup from 'yup';
614
import { createUser } from "../../../../utils/api";
7-
import { buildNameValidation, buildPasswordValidation, buildRoleValidation, buildUsernameValidation } from '../../Validations';
15+
import {
16+
buildNameValidation,
17+
buildPasswordValidation,
18+
buildRoleValidation,
19+
buildUsernameValidation
20+
} from '../../Validations';
821

922

1023
export default function NewUserDialog(props) {
1124
const [responseError, setResponseError] = React.useState(undefined);
12-
const { onClose, notifyResult, token, updateUsers } = props;
25+
const {
26+
onClose,
27+
notifyResult,
28+
token,
29+
updateUsers
30+
} = props;
1331

1432
const validationSchema = Yup.object().shape({
1533
name: buildNameValidation(),

src/client/src/pages/UserManagement/Components/Dialog/UpdateUserDialog.jsx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import { yupResolver } from "@hookform/resolvers/yup";
2-
import { Button, Checkbox, Dialog, DialogActions, DialogContent, DialogTitle, FormControlLabel, TextField, Typography } from '@material-ui/core';
2+
import {
3+
Button,
4+
Checkbox,
5+
Dialog,
6+
DialogActions,
7+
DialogContent,
8+
DialogTitle,
9+
FormControlLabel,
10+
TextField,
11+
Typography
12+
} from '@material-ui/core';
313
import React from 'react';
414
import { useForm } from 'react-hook-form';
515
import * as Yup from 'yup';
@@ -8,8 +18,19 @@ import { buildNameValidation, buildRoleValidation } from '../../Validations';
818

919

1020
export default function UpdateUserDialog(props) {
11-
const { onClose, notifyResult, token, updateUsers, user } = props;
12-
const { username, full_name: name, role, active } = user;
21+
const {
22+
onClose,
23+
notifyResult,
24+
token,
25+
updateUsers,
26+
user
27+
} = props;
28+
const {
29+
username,
30+
full_name: name,
31+
role,
32+
active
33+
} = user;
1334

1435
const validationSchema = Yup.object().shape({
1536
name: buildNameValidation(),

0 commit comments

Comments
 (0)