Simplify the member details page and account form

This commit is contained in:
Tanner Collin 2022-02-04 22:22:55 +00:00
parent 704333e7a2
commit bc96b0b3f6
3 changed files with 1 additions and 40 deletions

View File

@ -239,25 +239,6 @@ export function AccountForm(props) {
{...makeProps('phone')}
/>
<Form.Field>
<label>Are you under 18 years old?</label>
<Checkbox
label='I am a minor'
name='is_minor'
onChange={handleCheck}
checked={input.is_minor}
/>
</Form.Field>
{input.is_minor && <Form.Input
label='Birthdate YYYY-MM-DD'
{...makeProps('birthdate')}
/>}
{input.is_minor && <Form.Input
label="Guardian's Name"
{...makeProps('guardian_name')}
/>}
<Form.Input
label='Emergency Contact Name'
autoComplete='off'

View File

@ -516,19 +516,6 @@ export function AdminMemberInfo(props) {
<Table.Cell>{member.phone}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Minor:</Table.Cell>
<Table.Cell>{member.is_minor ? 'Yes' : 'No'}</Table.Cell>
</Table.Row>
{member.is_minor && <Table.Row>
<Table.Cell>Birthdate:</Table.Cell>
<Table.Cell>{member.birthdate}</Table.Cell>
</Table.Row>}
{member.is_minor && <Table.Row>
<Table.Cell>Guardian:</Table.Cell>
<Table.Cell>{member.guardian_name}</Table.Cell>
</Table.Row>}
<Table.Row>
<Table.Cell>Emergency Contact Name:</Table.Cell>
<Table.Cell>{member.emergency_contact_name || 'None'}</Table.Cell>

View File

@ -211,14 +211,7 @@ export function Home(props) {
user.member.set_details ?
<MemberInfo user={user} />
:
<div>
<Message warning>
<Message.Header>Please submit your member details</Message.Header>
<p>Press submit at the bottom if everything's correct.</p>
</Message>
<AccountForm {...props} />
</div>
<AccountForm {...props} />
:
<div>
<LoginForm {...props} />