Skip to content

Commit

Permalink
Merge pull request #2 from bamboo-firewall/quannt86/dev
Browse files Browse the repository at this point in the history
Feature: Update username field in login & admin create user
  • Loading branch information
bienkma authored Aug 8, 2023
2 parents 682d81c + bb44dd6 commit 9d5000c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/components/modal/CreateUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ export const CreateUser: React.FC<Props> = ({ refetchUser, onClose }) => {
<Input />
</Form.Item>

<Form.Item
label="Username"
name="username"
rules={[{ required: true, message: 'Please input your username!' }]}
>
<Input />
</Form.Item>

<Form.Item
label="Password"
name="password"
Expand All @@ -47,6 +55,7 @@ export const CreateUser: React.FC<Props> = ({ refetchUser, onClose }) => {
<Radio.Group>
<Radio value="admin"> Admin </Radio>
<Radio value="user"> User </Radio>
<Radio value="devops"> DevOps </Radio>
</Radio.Group>
</Form.Item>

Expand Down
4 changes: 2 additions & 2 deletions src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const Login = () => {
</div>
<div className="w-full">
<Form initialValues={{ remember: true }} onFinish={onFinish} autoComplete="off">
<Form.Item name="email" rules={[{ required: true, message: 'Email is required!' }]}>
<Input placeholder="Email" />
<Form.Item name="username" rules={[{ required: true, message: 'Username is required!' }]}>
<Input placeholder="Username" />
</Form.Item>
<Form.Item name="password" rules={[{ required: true, message: 'Password is required!' }]}>
<Input.Password placeholder="Password" />
Expand Down

0 comments on commit 9d5000c

Please sign in to comment.