Chore:
Moved to sqlalchemy 2.0 Added type checking as much as possible Updated angular to 15 Moved from Angular flex layout to tailwind css Started developing on vscode with devcontainers
This commit is contained in:
@ -5,8 +5,8 @@ import { RouterModule, Routes } from '@angular/router';
|
||||
import { AuthGuard } from '../auth/auth-guard.service';
|
||||
|
||||
import { ModifierCategoryDetailComponent } from './modifier-category-detail/modifier-category-detail.component';
|
||||
import { ModifierCategoryListResolver } from './modifier-category-list-resolver.service';
|
||||
import { ModifierCategoryListComponent } from './modifier-category-list/modifier-category-list.component';
|
||||
import { ModifierCategoryListResolver } from './modifier-category-list-resolver.service';
|
||||
import { ModifierCategoryResolver } from './modifier-category-resolver.service';
|
||||
|
||||
const modifierCategoriesRoutes: Routes = [
|
||||
|
||||
@ -2,7 +2,6 @@ import { CdkTableModule } from '@angular/cdk/table';
|
||||
import { CdkTreeModule } from '@angular/cdk/tree';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
@ -25,7 +24,6 @@ import { ModifierCategoryListComponent } from './modifier-category-list/modifier
|
||||
CommonModule,
|
||||
CdkTableModule,
|
||||
CdkTreeModule,
|
||||
FlexLayoutModule,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
MatCheckboxModule,
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
.example-card {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.example-tree-invisible {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -1,89 +1,69 @@
|
||||
<div fxLayout="row" fxFlex="50%" fxLayoutAlign="space-around center" class="example-card">
|
||||
<mat-card fxFlex>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>ModifierCategory</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" fxLayout="column">
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="space-around start"
|
||||
fxLayout.lt-md="column"
|
||||
fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px"
|
||||
>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #nameElement placeholder="Name" formControlName="name" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="space-around start"
|
||||
fxLayout.lt-md="column"
|
||||
fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px"
|
||||
>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Minimum</mat-label>
|
||||
<input matInput placeholder="Minimum" type="number" formControlName="minimum" />
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Maximum</mat-label>
|
||||
<input matInput placeholder="Maximum" type="number" formControlName="maximum" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="space-around start"
|
||||
fxLayout.lt-md="column"
|
||||
fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px"
|
||||
>
|
||||
<mat-checkbox formControlName="isActive">Is Active?</mat-checkbox>
|
||||
</div>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" class="example-tree">
|
||||
<!-- This is the tree node template for leaf nodes -->
|
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle>
|
||||
<li class="mat-tree-node">
|
||||
<!-- use a disabled button to provide padding for tree leaf -->
|
||||
<button mat-icon-button disabled></button>
|
||||
<mat-card class="flex-auto lg:max-w-[50%]">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Modifier Category</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #nameElement formControlName="name" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Minimum</mat-label>
|
||||
<input matInput type="number" formControlName="minimum" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Maximum</mat-label>
|
||||
<input matInput type="number" formControlName="maximum" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-checkbox formControlName="isActive">Is Active?</mat-checkbox>
|
||||
</div>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" class="example-tree">
|
||||
<!-- This is the tree node template for leaf nodes -->
|
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle>
|
||||
<li class="mat-tree-node">
|
||||
<!-- use a disabled button to provide padding for tree leaf -->
|
||||
<button mat-icon-button disabled></button>
|
||||
<mat-checkbox
|
||||
class="checklist-leaf-node"
|
||||
[checked]="isProductSelected(node)"
|
||||
(change)="toggleProductSelection(node)"
|
||||
>{{ node.name }}</mat-checkbox
|
||||
>
|
||||
</li>
|
||||
</mat-tree-node>
|
||||
<!-- This is the tree node template for expandable nodes -->
|
||||
<mat-nested-tree-node *matTreeNodeDef="let node; when: hasChild">
|
||||
<li>
|
||||
<div class="mat-tree-node">
|
||||
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
|
||||
<mat-icon class="mat-icon-rtl-mirror">
|
||||
{{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}
|
||||
</mat-icon>
|
||||
</button>
|
||||
<mat-checkbox
|
||||
class="checklist-leaf-node"
|
||||
[checked]="isProductSelected(node)"
|
||||
(change)="toggleProductSelection(node)"
|
||||
[checked]="isMenuCategorySelected(node)"
|
||||
[indeterminate]="isMenuCategoryPartiallySelected(node)"
|
||||
(change)="toggleMenuCategorySelection(node)"
|
||||
>{{ node.name }}</mat-checkbox
|
||||
>
|
||||
</li>
|
||||
</mat-tree-node>
|
||||
<!-- This is the tree node template for expandable nodes -->
|
||||
<mat-nested-tree-node *matTreeNodeDef="let node; when: hasChild">
|
||||
<li>
|
||||
<div class="mat-tree-node">
|
||||
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
|
||||
<mat-icon class="mat-icon-rtl-mirror">
|
||||
{{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}
|
||||
</mat-icon>
|
||||
</button>
|
||||
<mat-checkbox
|
||||
[checked]="isMenuCategorySelected(node)"
|
||||
[indeterminate]="isMenuCategoryPartiallySelected(node)"
|
||||
(change)="toggleMenuCategorySelection(node)"
|
||||
>{{ node.name }}</mat-checkbox
|
||||
>
|
||||
</div>
|
||||
<ul [class.example-tree-invisible]="!treeControl.isExpanded(node)">
|
||||
<ng-container matTreeNodeOutlet></ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
</mat-nested-tree-node>
|
||||
</mat-tree>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
<ul [class.example-tree-invisible]="!treeControl.isExpanded(node)">
|
||||
<ng-container matTreeNodeOutlet></ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
</mat-nested-tree-node>
|
||||
</mat-tree>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" class="mr-5" (click)="save()">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Modifier Categories</mat-card-title>
|
||||
<a mat-button [routerLink]="['/modifier-categories', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Modifier Categories</mat-card-title>
|
||||
<a mat-button [routerLink]="['/modifier-categories', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table #table [dataSource]="dataSource" aria-label="Elements">
|
||||
<!-- Name Column -->
|
||||
|
||||
Reference in New Issue
Block a user