This commit is contained in:
Eric van der Vlist 2023-02-22 15:45:52 +01:00
parent 6c479eb83e
commit b4825cfd58
1 changed files with 19 additions and 3 deletions

View File

@ -139,6 +139,14 @@ const Invitation: Component<Props> = (props) => {
setOpenDialog(true); setOpenDialog(true);
}; };
const createUserHandler = async () => {
console.log({
caller: 'Invitation / createUserHandler',
props,
data: data(),
});
};
console.log({ console.log({
caller: 'Invitation ', caller: 'Invitation ',
props, props,
@ -222,15 +230,23 @@ const Invitation: Component<Props> = (props) => {
<Switch> <Switch>
<Match when={status() === 'baseError'}> <Match when={status() === 'baseError'}>
The database address seems to be wrong !! The database address seems to be wrong !!
</Match>{' '} </Match>
<Match when={status() === 'OK'}> <Match when={status() === 'OK'}>
The user is already existing. The user is already existing.
</Match> </Match>
<Match when={status() === 'notFound'}> <Match when={status() === 'notFound'}>
The user must be created. <div>The user must be created.</div>
<Button.Root onclick={createUserHandler}>
Create user
</Button.Root>
</Match> </Match>
<Match when={status() === 'passwordError'}> <Match when={status() === 'passwordError'}>
<div>
The user seems to exist but the password is wrong. The user seems to exist but the password is wrong.
</div>
<Button.Root onclick={createUserHandler}>
Update password
</Button.Root>
</Match> </Match>
</Switch> </Switch>
</Dialog.Description> </Dialog.Description>