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