-
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.
- Loading branch information
Showing
11 changed files
with
510 additions
and
349 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
cd ../mkjAPI && php artisan serve & cd ../mkjAPI && php artisan reverb:start & cd ../mkjAPI&& php artisan queue:work & cd ../mkjAPP && ng serve && fg |
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
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
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
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
64 changes: 64 additions & 0 deletions
64
src/app/pages/password-reset/password-reset.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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<div style="z-index: 10000"> | ||
<p-toast></p-toast> | ||
<p-toast key="bottom-center" position="bottom-center"></p-toast> | ||
</div> | ||
<div class="login-body"> | ||
<div class="login-panel p-fluid"> | ||
<div class="grid grid-nogutter"> | ||
<div class="col-12 login-header"> | ||
<h1>Passwort zurücksetzen</h1> | ||
<h2>Setze hier ein neues Passwort für deinen Account.</h2> | ||
<img src="assets\images\app_logo.png" /> | ||
</div> | ||
|
||
<div class="col-12"> | ||
<span class="p-float-label"> | ||
<p-password [(ngModel)]="pwd" [inputStyleClass]="submitted && !pwd ? 'ng-invalid ng-dirty' : ''"> | ||
<ng-template pTemplate="footer"> | ||
<p-divider></p-divider> | ||
<p class="mt-2">Empfohlen:</p> | ||
<ul class="pl-2 ml-2 mt-0" style="line-height: 1.5"> | ||
<li>min. 1 Kleinbuchstabe</li> | ||
<li>min. 1 Großbuchstabe</li> | ||
<li>min. 1 Zahl</li> | ||
<li>min. 8 Zeichen lang</li> | ||
</ul> | ||
</ng-template> | ||
</p-password> | ||
@if (submitted && !pwd) { | ||
<small class="p-error">Passwort ist erforderlich!</small> | ||
} | ||
<label>Passwort wählen</label> | ||
</span> | ||
</div> | ||
<div class="col-12"> | ||
<span class="p-float-label"> | ||
<input | ||
type="password" | ||
pInputText | ||
[(ngModel)]="pwdCheck" | ||
[ngClass]="{ | ||
'ng-invalid ng-dirty': submitted && !pwdCheck | ||
}" | ||
(keydown.enter)="onSubmit()" | ||
required | ||
/> | ||
@if (submitted && !pwdCheck) { | ||
<small class="p-error">Wiederholung ist erforderlich!</small> | ||
} | ||
<label>Passwort wiederholen</label> | ||
</span> | ||
</div> | ||
<div class="col-12 button-container"> | ||
<button | ||
pButton | ||
type="button" | ||
label="Zurücksetzen" | ||
[icon]="isChecking ? 'pi pi-spin pi-spinner' : 'pi pi-check'" | ||
[disabled]="!pwdCheck || pwdCheck !== pwd" | ||
(click)="onSubmit()" | ||
></button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute, Router } from '@angular/router'; | ||
import { AuthAPIService } from 'src/app/services/api/auth-api.service'; | ||
import { InfoService } from 'src/app/services/info.service'; | ||
|
||
@Component({ | ||
selector: 'app-password-reset', | ||
templateUrl: './password-reset.component.html', | ||
}) | ||
export class PasswordResetComponent implements OnInit { | ||
submitted: boolean = false; | ||
isChecking: boolean = false; | ||
pwd: string = null; | ||
pwdCheck: string = null; | ||
|
||
constructor( | ||
private router: Router, | ||
private authService: AuthAPIService, | ||
private route: ActivatedRoute, | ||
private infoService: InfoService | ||
) {} | ||
|
||
public ngOnInit(): void {} | ||
|
||
public onSubmit() { | ||
this.submitted = true; | ||
const queryParams = { | ||
token: this.route.snapshot.queryParams.token, | ||
email: this.route.snapshot.queryParams.email, | ||
}; | ||
|
||
this.authService.resetPassword(queryParams.token, queryParams.email, this.pwd, this.pwdCheck).subscribe({ | ||
next: (result) => { | ||
setTimeout(() => this.infoService.success(result.message), 1000); | ||
this.router.navigate(['login']); | ||
}, | ||
error: (error) => { | ||
this.infoService.error(error); | ||
}, | ||
}); | ||
} | ||
} |
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
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
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