|
|
|
@ -34,7 +34,7 @@ import { AuthService } from '@core/auth/auth.service'; |
|
|
|
import { ActivatedRoute } from '@angular/router'; |
|
|
|
import { isDefinedAndNotNull } from '@core/utils'; |
|
|
|
import { getCurrentAuthUser } from '@core/auth/auth.selectors'; |
|
|
|
import {ActionNotificationShow} from "@core/notification/notification.actions"; |
|
|
|
import { ActionNotificationShow } from '@core/notification/notification.actions'; |
|
|
|
import { DatePipe } from '@angular/common'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
@ -50,14 +50,14 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir |
|
|
|
languageList = env.supportedLangs; |
|
|
|
private readonly authUser: AuthUser; |
|
|
|
|
|
|
|
get token() { |
|
|
|
get jwtToken(): string { |
|
|
|
return `Bearer ${localStorage.getItem('jwt_token')}`; |
|
|
|
} |
|
|
|
|
|
|
|
get getExpirationDate() { |
|
|
|
get expirationJwtData(): string { |
|
|
|
const expirationData = this.datePipe.transform(localStorage.getItem('jwt_token_expiration'), 'yyyy-MM-dd HH:mm:ss'); |
|
|
|
return this.translate.instant('profile.valid-till', {expirationData}); |
|
|
|
}; |
|
|
|
return this.translate.instant('profile.valid-till', { expirationData }); |
|
|
|
} |
|
|
|
|
|
|
|
constructor(protected store: Store<AppState>, |
|
|
|
private route: ActivatedRoute, |
|
|
|
@ -153,7 +153,7 @@ export class ProfileComponent extends PageComponent implements OnInit, HasConfir |
|
|
|
return this.authUser.authority === Authority.SYS_ADMIN; |
|
|
|
} |
|
|
|
|
|
|
|
onTokenCopied($event) { |
|
|
|
onTokenCopied() { |
|
|
|
this.store.dispatch(new ActionNotificationShow({ |
|
|
|
message: this.translate.instant('profile.tokenCopiedMessage'), |
|
|
|
type: 'success', |
|
|
|
|