Skip to content
Snippets Groups Projects
Verified Commit 80ac4b17 authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Add air between guest info boxes

parent 8965e45e
No related branches found
No related tags found
1 merge request!266Various small stuff
Pipeline #113253 passed
...@@ -170,121 +170,125 @@ export default function GuestInfo({ ...@@ -170,121 +170,125 @@ export default function GuestInfo({
return ( return (
<Page> <Page>
<SponsorInfoButtons to="/sponsor" name={`${guest.first} ${guest.last}`} /> <SponsorInfoButtons to="/sponsor" name={`${guest.first} ${guest.last}`} />
<Typography variant="h2">{t('guestInfo.contactInfo')}</Typography> <Box sx={{ marginBottom: '2rem' }}>
<Typography variant="body1">{t('guestInfo.contactInfoBody')}</Typography> <Typography variant="h2">{t('guestInfo.contactInfo')}</Typography>
<Typography variant="body1">
{t('guestInfo.contactInfoBody')}
</Typography>
<TableContainer> <TableContainer>
<Table sx={{ minWidth: 650 }} aria-label="simple table"> <Table sx={{ minWidth: 650 }} aria-label="simple table">
<TableHead> <TableHead>
<TableRow> <TableRow>
<TableHeadCell align="left"> <TableHeadCell align="left">
{t('guestInfo.contactInfoTableText')} {t('guestInfo.contactInfoTableText')}
</TableHeadCell> </TableHeadCell>
<TableHeadCell /> <TableHeadCell />
<TableHeadCell /> <TableHeadCell />
</TableRow> </TableRow>
</TableHead> </TableHead>
<TableBody> <TableBody>
<TableRow> <TableRow>
<TableCell align="left">{t('input.fullName')}</TableCell> <TableCell align="left">{t('input.fullName')}</TableCell>
<TableCell align="left"> <TableCell align="left">
{`${guest.first} ${guest.last}`} {`${guest.first} ${guest.last}`}
</TableCell> </TableCell>
<TableCell /> <TableCell />
</TableRow> </TableRow>
<TableRow> <TableRow>
<TableCell align="left">{t('input.email')}</TableCell> <TableCell align="left">{t('input.email')}</TableCell>
<TableCell align="left"> <TableCell align="left">
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'flex-start', justifyContent: 'flex-start',
}}
>
<Controller
name="email"
control={control}
rules={{
validate: isValidEmail,
}} }}
render={({ field: { value }, ...rest }) => ( >
<TextField <Controller
id="email" name="email"
label={t('input.email')} control={control}
error={!!errors.email} rules={{
helperText={errors.email && errors.email.message} validate: isValidEmail,
value={value}
{...rest}
onChange={emailFieldChange}
/>
)}
/>
{/* If the guest has not completed the registration process, he should have an invitation he has not responded to */}
{!guest.registered && (
<Box
sx={{
display: 'flex',
flexDirection: 'row',
justifyContent: 'flex-end',
}} }}
> render={({ field: { value }, ...rest }) => (
<Button <TextField
color="secondary" id="email"
sx={{ maxHeight: '2.3rem', marginLeft: '1rem' }} label={t('input.email')}
onClick={resend} error={!!errors.email}
> helperText={errors.email && errors.email.message}
{t('button.resendInvitation')} value={value}
</Button> {...rest}
<Button onChange={emailFieldChange}
color="secondary" />
sx={{ maxHeight: '2.3rem', marginLeft: '0.5rem' }} )}
onClick={handleCancel} />
{/* If the guest has not completed the registration process, he should have an invitation he has not responded to */}
{!guest.registered && (
<Box
sx={{
display: 'flex',
flexDirection: 'row',
justifyContent: 'flex-end',
}}
> >
{t('button.cancelInvitation')} <Button
</Button> color="secondary"
</Box> sx={{ maxHeight: '2.3rem', marginLeft: '1rem' }}
)} onClick={resend}
</Box> >
<CancelConfirmationDialog {t('button.resendInvitation')}
open={confirmationDialogOpen} </Button>
onClose={handleDialogClose} <Button
/> color="secondary"
</TableCell> sx={{ maxHeight: '2.3rem', marginLeft: '0.5rem' }}
<TableCell /> onClick={handleCancel}
</TableRow> >
<TableRow> {t('button.cancelInvitation')}
<TableCell align="left">{t('input.mobilePhone')}</TableCell> </Button>
<TableCell align="left">{guest.mobile}</TableCell> </Box>
</TableRow> )}
<TableRow> </Box>
<TableCell align="left">{t('feideId')}</TableCell> <CancelConfirmationDialog
<TableCell align="left">{guest.feide_id}</TableCell> open={confirmationDialogOpen}
</TableRow> onClose={handleDialogClose}
/>
</TableCell>
<TableCell />
</TableRow>
<TableRow>
<TableCell align="left">{t('input.mobilePhone')}</TableCell>
<TableCell align="left">{guest.mobile}</TableCell>
</TableRow>
<TableRow>
<TableCell align="left">{t('feideId')}</TableCell>
<TableCell align="left">{guest.feide_id}</TableCell>
</TableRow>
<IdentityLine <IdentityLine
text={t('input.nationalIdNumber')} text={t('input.nationalIdNumber')}
identity={guest.fnr} identity={guest.fnr}
reloadGuest={reloadGuest} reloadGuest={reloadGuest}
reloadGuests={reloadGuests} reloadGuests={reloadGuests}
/> />
<IdentityLine <IdentityLine
text={t('input.passportNumber')} text={t('input.passportNumber')}
identity={guest.passport} identity={guest.passport}
reloadGuest={reloadGuest} reloadGuest={reloadGuest}
reloadGuests={reloadGuests} reloadGuests={reloadGuests}
/> />
</TableBody> </TableBody>
</Table> </Table>
</TableContainer> </TableContainer>
<Button <Button
color="secondary" color="secondary"
disabled={!errors.email && !emailDirty} disabled={!errors.email && !emailDirty}
onClick={onSubmit} onClick={onSubmit}
> >
{t('button.save')} {t('button.save')}
</Button> </Button>
</Box>
<Typography variant="h2">{t('guestInfo.roleInfoHead')}</Typography> <Typography variant="h2">{t('guestInfo.roleInfoHead')}</Typography>
<Typography variant="body1">{t('guestInfo.roleInfoBody')}</Typography> <Typography variant="body1">{t('guestInfo.roleInfoBody')}</Typography>
<TableContainer> <TableContainer>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment