Chore: Upgrade to Angular v18
Chore: Upgrade to Python 3.12 Chore: Upgrade to psycopg3
This commit is contained in:
@ -1,272 +1,176 @@
|
||||
<div class="flex flex-row flex-wrap -mr-5 -mb-5">
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('customers')"
|
||||
[routerLink]="['/', 'guest-book']"
|
||||
>
|
||||
<h3>Guest Book</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('sales')"
|
||||
[routerLink]="['/', 'sales']"
|
||||
>
|
||||
<h3>Sales</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('customers')"
|
||||
[routerLink]="['/', 'customers']"
|
||||
>
|
||||
<h3>Customers</h3>
|
||||
</mat-card>
|
||||
@if (auth.allowed('customers')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'guest-book']">
|
||||
<h3>Guest Book</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('sales')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'sales']">
|
||||
<h3>Sales</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('customers')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'customers']">
|
||||
<h3>Customers</h3>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
<div class="flex flex-row flex-wrap -mr-5 -mb-5">
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('cashier-report')"
|
||||
[routerLink]="['/', 'cashier-report']"
|
||||
>
|
||||
<h3>Cashier Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('sale-report')"
|
||||
[routerLink]="['/', 'sale-report']"
|
||||
>
|
||||
<h3>Sale Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('tax-report')"
|
||||
[routerLink]="['/', 'tax-report']"
|
||||
>
|
||||
<h3>Tax Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('product-sale-report')"
|
||||
[routerLink]="['/', 'product-sale-report']"
|
||||
>
|
||||
<h3>Product Sale Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('bill-settlement-report')"
|
||||
[routerLink]="['/', 'bill-settlement-report']"
|
||||
>
|
||||
<h3>Bill Settlement Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('beer-sale-report')"
|
||||
[routerLink]="['/', 'beer-sale-report']"
|
||||
>
|
||||
<h3>Beer Sale Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('discount-report')"
|
||||
[routerLink]="['/', 'discount-report']"
|
||||
>
|
||||
<h3>Discount Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('product-sale-report')"
|
||||
[routerLink]="['/', 'menu-engineering-report']"
|
||||
>
|
||||
<h3>Menu Engineering Report</h3>
|
||||
</mat-card>
|
||||
@if (auth.allowed('cashier-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'cashier-report']">
|
||||
<h3>Cashier Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('sale-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'sale-report']">
|
||||
<h3>Sale Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('tax-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'tax-report']">
|
||||
<h3>Tax Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('product-sale-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'product-sale-report']">
|
||||
<h3>Product Sale Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('bill-settlement-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'bill-settlement-report']">
|
||||
<h3>Bill Settlement Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('beer-sale-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'beer-sale-report']">
|
||||
<h3>Beer Sale Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('discount-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'discount-report']">
|
||||
<h3>Discount Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('product-sale-report')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'menu-engineering-report']">
|
||||
<h3>Menu Engineering Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
<div class="flex flex-row flex-wrap -mr-5 -mb-5">
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('products')"
|
||||
[routerLink]="['/', 'products']"
|
||||
>
|
||||
<h3>Products</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('temporal-products')"
|
||||
[routerLink]="['/', 'temporal-products']"
|
||||
>
|
||||
<h3>Temporal Products</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('products')"
|
||||
[routerLink]="['/', 'update-product-prices']"
|
||||
>
|
||||
<h3>Update Product Prices</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('products')"
|
||||
[routerLink]="['/', 'product-updates-report']"
|
||||
>
|
||||
<h3>Product Updates Report</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('modifiers')"
|
||||
[routerLink]="['/', 'modifiers']"
|
||||
>
|
||||
<h3>Modifiers</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('modifiers')"
|
||||
[routerLink]="['/', 'modifier-categories']"
|
||||
>
|
||||
<h3>Modifier Categories</h3>
|
||||
</mat-card>
|
||||
@if (auth.allowed('products')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'products']">
|
||||
<h3>Products</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('temporal-products')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'temporal-products']">
|
||||
<h3>Temporal Products</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('products')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'update-product-prices']">
|
||||
<h3>Update Product Prices</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('products')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'product-updates-report']">
|
||||
<h3>Product Updates Report</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('modifiers')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'modifiers']">
|
||||
<h3>Modifiers</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('modifiers')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'modifier-categories']">
|
||||
<h3>Modifier Categories</h3>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
<div class="flex flex-row flex-wrap -mr-5 -mb-5">
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('sections')"
|
||||
[routerLink]="['/', 'tables']"
|
||||
>
|
||||
<h3>Tables</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('sections')"
|
||||
[routerLink]="['/', 'sections']"
|
||||
>
|
||||
<h3>Sections</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('products')"
|
||||
[routerLink]="['/', 'menu-categories']"
|
||||
>
|
||||
<h3>Menu Categories</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('products')"
|
||||
[routerLink]="['/', 'sale-categories']"
|
||||
>
|
||||
<h3>Sale Categories</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('taxes')"
|
||||
[routerLink]="['/', 'taxes']"
|
||||
>
|
||||
<h3>Taxes</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('regimes')"
|
||||
[routerLink]="['/', 'regimes']"
|
||||
>
|
||||
<h3>Regimes</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('devices')"
|
||||
[routerLink]="['/', 'devices']"
|
||||
>
|
||||
<h3>Devices</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('section-printers')"
|
||||
[routerLink]="['/', 'section-printers']"
|
||||
>
|
||||
<h3>Section Printers</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('printers')"
|
||||
[routerLink]="['/', 'printers']"
|
||||
>
|
||||
<h3>Printers</h3>
|
||||
</mat-card>
|
||||
@if (auth.allowed('sections')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'tables']">
|
||||
<h3>Tables</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('sections')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'sections']">
|
||||
<h3>Sections</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('products')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'menu-categories']">
|
||||
<h3>Menu Categories</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('products')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'sale-categories']">
|
||||
<h3>Sale Categories</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('taxes')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'taxes']">
|
||||
<h3>Taxes</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('regimes')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'regimes']">
|
||||
<h3>Regimes</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('devices')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'devices']">
|
||||
<h3>Devices</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('section-printers')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'section-printers']">
|
||||
<h3>Section Printers</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('printers')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'printers']">
|
||||
<h3>Printers</h3>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
<div class="flex flex-row flex-wrap -mr-5 -mb-5">
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('users')"
|
||||
[routerLink]="['/', 'roles']"
|
||||
>
|
||||
<h3>Roles</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('users')"
|
||||
[routerLink]="['/', 'users']"
|
||||
>
|
||||
<h3>Users</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('authenticated')"
|
||||
[routerLink]="['/', 'users', 'me']"
|
||||
>
|
||||
<h3>Change Password</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('owner')"
|
||||
[routerLink]="['/', 'header-footer']"
|
||||
>
|
||||
<h3>Header / Footer</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('owner')"
|
||||
[routerLink]="['/', 'settle-options']"
|
||||
>
|
||||
<h3>Settle Options</h3>
|
||||
</mat-card>
|
||||
<mat-card
|
||||
class="flex flex-col square-button mr-5, mb-5"
|
||||
matRipple
|
||||
*ngIf="auth.allowed('settings')"
|
||||
[routerLink]="['/', 'settings']"
|
||||
>
|
||||
<h3>Settings</h3>
|
||||
</mat-card>
|
||||
@if (auth.allowed('users')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'roles']">
|
||||
<h3>Roles</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('users')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'users']">
|
||||
<h3>Users</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('authenticated')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'users', 'me']">
|
||||
<h3>Change Password</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('owner')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'header-footer']">
|
||||
<h3>Header / Footer</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('owner')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'settle-options']">
|
||||
<h3>Settle Options</h3>
|
||||
</mat-card>
|
||||
}
|
||||
@if (auth.allowed('settings')) {
|
||||
<mat-card class="flex flex-col square-button mr-5, mb-5" matRipple [routerLink]="['/', 'settings']">
|
||||
<h3>Settings</h3>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<p>
|
||||
Backend: v{{ auth.user?.ver }} / Frontend: v{{ version }} on {{ auth.device.name }} @
|
||||
Backend: v{{ auth.user?.ver }} / Frontend: v{{ version }} on {{ auth.device.name }} @
|
||||
{{ auth.device.section.name }}
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
@ -8,7 +8,7 @@ describe('HomeComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [HomeComponent],
|
||||
imports: [HomeComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { MatCard } from '@angular/material/card';
|
||||
import { RouterLink } from '@angular/router';
|
||||
|
||||
import { environment } from '../../environments/environment';
|
||||
import { environment } from '../app.environment';
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.css'],
|
||||
standalone: true,
|
||||
imports: [MatCard, RouterLink],
|
||||
})
|
||||
export class HomeComponent {
|
||||
version: string;
|
||||
|
||||
Reference in New Issue
Block a user