@if (hasFailed()) {
@@ -191,3 +192,5 @@
{{ translations.users_dialog_roles_title() }}
+
+
diff --git a/src/client/src/app/components/users/user-dialog/user-dialog.component.ts b/src/client/src/app/components/users/user-dialog/user-dialog.component.ts
index 6f95398..2034f42 100644
--- a/src/client/src/app/components/users/user-dialog/user-dialog.component.ts
+++ b/src/client/src/app/components/users/user-dialog/user-dialog.component.ts
@@ -6,6 +6,7 @@ import {
effect,
inject,
signal,
+ viewChild,
} from '@angular/core';
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
import { FormBuilder, FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
@@ -40,6 +41,7 @@ import { TranslateService } from '../../../services/translate.service';
import { areArraysEqual } from '../../../utils/array.utils';
import { notNullish } from '../../../utils/common.utils';
import { selectSignal } from '../../../utils/ngrx.utils';
+import { UserCreatedDialogComponent } from '../user-created-dialog/user-created-dialog.component';
import { UserItemComponent } from '../user-item/user-item.component';
@Component({
@@ -59,6 +61,7 @@ import { UserItemComponent } from '../user-item/user-item.component';
MessagesModule,
OverlayPanelModule,
ReactiveFormsModule,
+ UserCreatedDialogComponent,
UserItemComponent,
],
templateUrl: './user-dialog.component.html',
@@ -71,6 +74,8 @@ export class UserDialogComponent {
private readonly _allUsers = selectSignal(userSelectors.selectEntities);
private readonly _randomId = Math.random().toString(36).substring(2, 9);
+ private readonly _userCreatedDialog = viewChild.required(UserCreatedDialogComponent);
+
protected readonly form = this._formBuilder.group({
id: new FormControl
(null),
alias: new FormControl('', { nonNullable: true, validators: [Validators.required] }),
@@ -124,10 +129,10 @@ export class UserDialogComponent {
actions$
.pipe(ofType(addUserAction.success, updateUserAction.success), takeUntilDestroyed())
.subscribe(({ type, response }) => {
+ this.close();
if (type === addUserAction.success.type) {
- this.copyLoginToken(response.loginToken);
+ this._userCreatedDialog().open(response);
}
- this.close();
});
actions$
.pipe(ofType(loadUserLoginTokenAction.success), takeUntilDestroyed())
diff --git a/src/client/src/app/i18n/de.json b/src/client/src/app/i18n/de.json
index 31bfd57..2fd014f 100644
--- a/src/client/src/app/i18n/de.json
+++ b/src/client/src/app/i18n/de.json
@@ -206,6 +206,13 @@
"titleDefault": "Testbenachrichtigung",
"body": "Inhalt",
"bodyDefault": "Benachrichtigungen funktionieren!!! Wohoo ⛳"
+ },
+ "userCreatedDialog": {
+ "title": "User \"{{alias}}\" created",
+ "copyWelcomeMessage": "Willkommensnachricht kopieren",
+ "copyPassword": "Passwort kopieren",
+ "welcomeMessage": "Hallo Liebe Minigolffreunde!\nDie Anmeldung zum Minigolffreitag läuft ab jetzt über die Web-basierte App, welche du unter:\n{{url}}\naufrufen kannst.\nSpeichere sie dir als Lesezeichen, oder füge sie zu deinem Home-Bildschirm hinzu um jederzeit darauf zugreifen zu können.\nMelde dich dort bitte mit deinem Passwort an und registriere dich selber für deine Spielzeiten.\nBitte schreibe doch trotzdem im Facebook Beitrag, dass du dich registriert hast, damit dort die Konversation aufrecht erhalten wird.\nViel Spaß beim Minigolfen!\nDein Orga-Team",
+ "welcomeMessageCopied": "Willkommensnachricht kopiert"
}
},
"playerEvents": {
@@ -266,7 +273,8 @@
"minutes": "Minuten",
"none": "Keine",
"send": "Senden",
- "sent": "Gesendet"
+ "sent": "Gesendet",
+ "done": "Fertig"
},
"validation": {
"required": "Darf nicht leer sein.",
diff --git a/src/client/src/app/i18n/en.json b/src/client/src/app/i18n/en.json
index 7150371..5ff6c52 100644
--- a/src/client/src/app/i18n/en.json
+++ b/src/client/src/app/i18n/en.json
@@ -206,6 +206,13 @@
"titleDefault": "test notification",
"body": "body",
"bodyDefault": "Notifications are working!!! Wohoo ⛳"
+ },
+ "userCreatedDialog": {
+ "title": "User \"{{alias}}\" created",
+ "copyWelcomeMessage": "Copy welcome message",
+ "copyPassword": "Copy password",
+ "welcomeMessage": "Hello dear minigolf friends!\nRegistration for Minigolf Friday is now possible via the web-based app, which you can download at:\n{{url}}.\nSave it as a bookmark or add it to your home screen so that you can access it at any time.\nPlease log in there with your password and register yourself for your game times.\nPlease still write in the Facebook post that you have registered so that the conversation is maintained there.\nHave fun playing mini golf!\nYour organization team",
+ "welcomeMessageCopied": "Welcome message copied"
}
},
"playerEvents": {
@@ -265,8 +272,9 @@
"minute": "Minute",
"minutes": "Minutes",
"none": "None",
- "send": "send",
- "sent": "sent"
+ "send": "Send",
+ "sent": "Sent",
+ "done": "Done"
},
"validation": {
"required": "Cannot be blank.",