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

Merge branch 'bugfix/reload-guests-on-verify' into 'master'

Bugfix/reload guests on verify

See merge request !180
parents a755a7e4 022da5e2
No related branches found
No related tags found
1 merge request!180Bugfix/reload guests on verify
Pipeline #101480 passed
......@@ -140,8 +140,8 @@
"sponsorSubmitSuccessDescription": "Your registration has been completed. You will receive an e-mail when the guest has filled in the missing information, so that the guest account can be approved.",
"guestSubmitSuccessDescription": "Your registration is now completed. You will receive an e-mail or SMS when your account has been created.",
"confirmationDialog": {
"confirmIdentityText": "Confirm?",
"confirmIdentityTitle": "Are you sure you want to verify this identity?",
"confirmIdentityText": "Are you sure you want to verify this identity?",
"confirmIdentityTitle": "Confirm?",
"cancelInvitation": "Cancel invitation?",
"cancelInvitationDescription": "Do you want to cancel the invitation?"
}
......
......@@ -140,8 +140,8 @@
"sponsorSubmitSuccessDescription": "Din registrering er nå fullført. Du vil få en e-post når gjesten har fylt inn informasjonen som mangler, slik at gjestekontoen kan godkjennes.",
"guestSubmitSuccessDescription": "Din registrering er nå fullført. Du vil få en e-post eller SMS når kontoen er opprettet.",
"confirmationDialog": {
"confirmIdentityText": "Bekrefte?",
"confirmIdentityTitle": "Er du sikker på at du vil bekrefte denne identiteten?",
"confirmIdentityText": "Er du sikker på at du vil bekrefte denne identiteten?",
"confirmIdentityTitle": "Bekrefte?",
"cancelInvitation": "Kanseller invitasjon?",
"cancelInvitationDescription": "Vil du kansellere invitasjonen?"
}
......
......@@ -141,8 +141,8 @@
"sponsorSubmitSuccessDescription": "Di registrering er no fullført. Du vil få ein e-post når gjesten har fylt inn informasjonen som manglar, slik at gjestekontoen kan godkjennast.",
"guestSubmitSuccessDescription": "Di registrering er no fullført. Du vil få ein e-post eller SMS når kontoen er oppretta.",
"confirmationDialog": {
"confirmIdentityText": "Bekrefte?",
"confirmIdentityTitle": "Er du sikker på at du vil bekrefte denne identiteten?",
"confirmIdentityText": "Er du sikker på at du vil bekrefte denne identiteten?",
"confirmIdentityTitle": "Bekrefte?",
"cancelInvitation": "Kanseller invitasjon?",
"cancelInvitationDescription": "Vil du kansellere invitasjonen?"
}
......
......@@ -10,14 +10,21 @@ interface IdentityLineProps {
text: string
identity: Identity | null
reloadGuest: () => void
reloadGuests: () => void
}
const IdentityLine = ({ text, identity, reloadGuest }: IdentityLineProps) => {
const IdentityLine = ({
text,
identity,
reloadGuest,
reloadGuests,
}: IdentityLineProps) => {
// Make a line with a confirmation button if the identity has not been verified
const [confirmOpen, setConfirmOpen] = useState(false)
const [t] = useTranslation('common')
const verifyIdentity = (id: string) => async () => {
await fetch(`/api/ui/v1/identity/${id}`, submitJsonOpts('PATCH', {}))
reloadGuest()
reloadGuests()
}
if (identity == null) {
......
......@@ -235,11 +235,13 @@ export default function GuestInfo({
text={t('input.nationalIdNumber')}
identity={guest.fnr}
reloadGuest={reloadGuest}
reloadGuests={reloadGuests}
/>
<IdentityLine
text={t('input.passportNumber')}
identity={guest.passport}
reloadGuest={reloadGuest}
reloadGuests={reloadGuests}
/>
<TableRow>
<TableCell align="left">{t('input.mobilePhone')}</TableCell>
......
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