Display bio on member search and notes to admins

This commit is contained in:
Tanner Collin 2020-05-01 03:54:23 +00:00
parent b4f52fb37a
commit 23c20a2c5c
3 changed files with 42 additions and 15 deletions

View File

@ -400,6 +400,11 @@ export function AdminMemberForm(props) {
/>
</Form.Field>
<Form.TextArea
label={'Private Notes (shared with ' + input.preferred_name + ')'}
{...makeProps('private_notes')}
/>
<Form.Button loading={loading} error={error.non_field_errors}>
Submit
</Form.Button>
@ -478,9 +483,16 @@ export function AdminMemberInfo(props) {
<Table.Cell>Emergency Contact Phone:</Table.Cell>
<Table.Cell>{member.emergency_contact_phone || 'None'}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Public Bio:</Table.Cell>
</Table.Row>
</Table.Body>
</BasicTable>
<p className='bio-paragraph'>
{member.public_bio || 'None yet.'}
</p>
{member.member_forms && <p>
<a href={staticUrl + '/' + member.member_forms} target='_blank'>
View application forms

View File

@ -162,21 +162,30 @@ export function MemberDetail(props) {
{isAdmin(user) ?
<AdminMemberInfo result={result} refreshResult={refreshResult} {...props} />
:
<BasicTable>
<Table.Body>
<Table.Row>
<Table.Cell>Status:</Table.Cell>
<Table.Cell>
<Icon name='circle' color={statusColor[member.status]} />
{member.status || 'Unknown'}
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Joined:</Table.Cell>
<Table.Cell>{member.current_start_date || 'Unknown'}</Table.Cell>
</Table.Row>
</Table.Body>
</BasicTable>
<React.Fragment>
<BasicTable>
<Table.Body>
<Table.Row>
<Table.Cell>Status:</Table.Cell>
<Table.Cell>
<Icon name='circle' color={statusColor[member.status]} />
{member.status || 'Unknown'}
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Joined:</Table.Cell>
<Table.Cell>{member.current_start_date || 'Unknown'}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Public Bio:</Table.Cell>
</Table.Row>
</Table.Body>
</BasicTable>
<p className='bio-paragraph'>
{member.public_bio || 'None yet.'}
</p>
</React.Fragment>
}
</Grid.Column>

View File

@ -108,6 +108,12 @@ body {
width: 10rem;
}
.bio-paragraph {
white-space: pre-line;
margin-top: -1rem;
margin-left: 1rem;
}
.footer {
margin-top: -20rem;