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:
Soni Jay
2026-01-19 14:07:26 -06:00
committed by GitHub
parent fd12b25fd4
commit 9b041438c8
15 changed files with 88 additions and 13 deletions
@@ -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>
+18
View File
@@ -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 = '';
}
}