Display frontend / backend version at the homescreen

This commit is contained in:
tanshu committed 2020-10-11 11:13:06 +05:30
1 parent d677cfb1ea
commit 9ecf0b5cc9
10 files changed
+20 -4

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ export class User {
isAuthenticated: boolean;
access_token?: string;
exp?: number;
ver: string;
public constructor(init?: Partial<User>) {
Object.assign(this, init);
+3
View File
@@ -198,3 +198,6 @@
<h3 class="item-name">Users</h3>
</mat-card>
</div>
<footer class="footer">
<p>Backend: v{{ auth.user.ver }} / Frontend: v{{ version }}</p>
</footer>
+6 -1
View File
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { environment } from '../../environments/environment';
import { AuthService } from '../auth/auth.service';
@Component({
@@ -8,5 +9,9 @@ import { AuthService } from '../auth/auth.service';
styleUrls: ['./home.component.css'],
})
export class HomeComponent {
constructor(public auth: AuthService) {}
version: string;
constructor(public auth: AuthService) {
this.version = environment.version;
}
}
@@ -22,7 +22,8 @@ export class RunningTablesComponent implements OnInit {
navigateToBill(table: Table): void {
const qp = { table: table.id };
if (table.voucherId) {
qp.voucher = table.voucherId;
// eslint-disable-next-line @typescript-eslint/dot-notation
qp['voucher'] = table.voucherId;
}
const navigationExtras: NavigationExtras = {
queryParams: qp,