-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: show info when character creation is not possible
- Loading branch information
1 parent
1484bd7
commit 0c5597c
Showing
2 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
19 changes: 14 additions & 5 deletions
19
src/app/components/characters/create-character/create-character.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
<pap-h1>Neuen Charakter erstellen</pap-h1> | ||
@if (characterStore.count() > 0) { | ||
<pap-h1>Keine Charaktererstellung möglich</pap-h1> | ||
|
||
<form [formGroup]="formGroup" (ngSubmit)="submit()"> | ||
<pap-text-input [control]="formGroup.controls['name']" label="Name" autoComplete="nickname" /> | ||
<p> | ||
Du hast bereits einen Charakter erstellt, gehe daher bitte zu seinem | ||
<a class="underline" [routerLink]="['/characters', characterStore.entities()[0].id, 'dashboard']">Dashboard</a>. | ||
</p> | ||
} @else { | ||
<pap-h1>Neuen Charakter erstellen</pap-h1> | ||
|
||
<pap-submit-button class="mt-4" [disabled]="formGroup.invalid">Charakter erstellen</pap-submit-button> | ||
</form> | ||
<form [formGroup]="formGroup" (ngSubmit)="submit()"> | ||
<pap-text-input [control]="formGroup.controls['name']" label="Name" autoComplete="nickname" /> | ||
|
||
<pap-submit-button class="mt-4" [disabled]="formGroup.invalid">Charakter erstellen</pap-submit-button> | ||
</form> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters