Display frontend / backend version at the homescreen
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bookie",
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
|
||||
version: "1.0.0",
|
||||
};
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
|
||||
version: "1.0.0",
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user