[feat] - add filter transaction and display payer payee information
This commit is contained in:
@@ -46,13 +46,22 @@ export class LoginComponent implements OnInit {
|
||||
try {
|
||||
// const result = await lastValueFrom(this.authService.login(this.dataForm));
|
||||
let cathayResult: any = await lastValueFrom(this.cathayAuthService.login(this.cathayForm));
|
||||
let isAdmin = cathayResult.token.userName == ROLE_ADMIN ? true : false
|
||||
cathayResult = {
|
||||
...cathayResult,
|
||||
isAdmin: cathayResult.token.userName == ROLE_ADMIN ? true : false
|
||||
isAdmin: isAdmin
|
||||
}
|
||||
this.appService.setToken(cathayResult.token.token)
|
||||
this.appService.setAuth(cathayResult);
|
||||
return this.router.navigate(['/pages']);
|
||||
|
||||
if(isAdmin){
|
||||
return this.router.navigate(['/pages']);
|
||||
}
|
||||
|
||||
if(!isAdmin){
|
||||
return this.router.navigate(['/pages/report/transactions']);
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
return this.appService.message(EAction.ERROR, EText.NO_DATA);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user