WEB-599 Display the Backend info in the footer of the WebApp Application using the envar MIFOS_DISPLAY_BACKEND_INFO (#3015)
This commit is contained in:
@@ -51,6 +51,24 @@
|
||||
{{ server }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-content">{{ 'labels.version.Username' | translate }}</td>
|
||||
<td class="right footer-content">
|
||||
{{ username }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-content">{{ 'labels.version.Name' | translate }}</td>
|
||||
<td class="right footer-content">
|
||||
{{ name }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer-content">{{ 'labels.version.Render Time' | translate }}</td>
|
||||
<td class="right footer-content">
|
||||
{{ renderTime | date: 'dd MMMM yyyy HH:mm:ss' }}
|
||||
</td>
|
||||
</tr>
|
||||
@if (isBusinessDateDefined) {
|
||||
<tr>
|
||||
<td class="footer-content">{{ 'labels.text.Current Business Date' | translate }}:</td>
|
||||
|
||||
@@ -43,6 +43,10 @@ export class FooterComponent implements OnInit, OnDestroy {
|
||||
private dateUtils = inject(Dates);
|
||||
private versionService = inject(VersionService);
|
||||
|
||||
username: string = '';
|
||||
name: string = '';
|
||||
renderTime: Date = new Date();
|
||||
|
||||
@Input() styleClass: string = '';
|
||||
@Input() variant: 'default' | 'compact' = 'default';
|
||||
|
||||
@@ -72,6 +76,8 @@ export class FooterComponent implements OnInit, OnDestroy {
|
||||
|
||||
constructor() {
|
||||
this.displayBackEndInfo = environment.displayBackEndInfo === 'true';
|
||||
this.setUserInfo();
|
||||
this.renderTime = new Date();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -104,6 +110,18 @@ export class FooterComponent implements OnInit, OnDestroy {
|
||||
this.versions.fineract.hash = buildVersion[1];
|
||||
}
|
||||
});
|
||||
this.setUserInfo();
|
||||
}
|
||||
}
|
||||
|
||||
setUserInfo() {
|
||||
const credentials = this.authenticationService.getCredentials();
|
||||
if (credentials) {
|
||||
this.username = credentials.username;
|
||||
this.name = credentials.staffDisplayName || credentials.username;
|
||||
} else {
|
||||
this.username = '';
|
||||
this.name = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user