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:
2023-02-20 18:49:17 +05:30
parent 792ccf923f
commit 5c7985e392
232 changed files with 2703 additions and 3018 deletions

View File

@ -1,75 +1,43 @@
<div fxLayout="row" fxFlex="50%" fxLayoutAlign="space-around center" class="example-card">
<mat-card fxFlex>
<mat-card-title-group>
<mat-card-title>Modifier</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 #name 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-checkbox formControlName="showInBill">Show In Bill?</mat-checkbox>
</div>
<div
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
>
<mat-form-field fxFlex>
<mat-label>Price</mat-label>
<input matInput type="number" placeholder="Price" formControlName="price" />
</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>Category</mat-label>
<mat-select placeholder="Category" formControlName="modifierCategory">
<mat-option *ngFor="let mc of modifierCategories" [value]="mc.id">
{{ mc.name }}
</mat-option>
</mat-select>
</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>
</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()" *ngIf="!!item.id">
Delete
</button>
</mat-card-actions>
</mat-card>
</div>
<mat-card class="flex-auto lg:max-w-[50%]">
<mat-card-header>
<mat-card-title>Modifier</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 #name formControlName="name" />
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-checkbox formControlName="showInBill">Show In Bill?</mat-checkbox>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Price</mat-label>
<input matInput type="number" formControlName="price" />
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Category</mat-label>
<mat-select formControlName="modifierCategory">
<mat-option *ngFor="let mc of modifierCategories" [value]="mc.id">
{{ mc.name }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-checkbox formControlName="isActive">Is Active?</mat-checkbox>
</div>
</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()" *ngIf="!!item.id">
Delete
</button>
</mat-card-actions>
</mat-card>

View File

@ -1,27 +1,19 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Modifiers</mat-card-title>
<a mat-button [routerLink]="['/modifiers', 'new']">
<mat-icon>add_box</mat-icon>
Add
</a>
</mat-card-title-group>
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Modifiers</mat-card-title>
<a mat-button [routerLink]="['/modifiers', 'new']">
<mat-icon>add_box</mat-icon>
Add
</a>
</mat-card-title-group>
</mat-card-header>
<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>
<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>Modifier Category</mat-label>
<mat-select
placeholder="Modifier Category"
formControlName="modifierCategory"
(selectionChange)="filterOn($event)"
>
<mat-select formControlName="modifierCategory" (selectionChange)="filterOn($event)">
<mat-option>-- All Categories --</mat-option>
<mat-option *ngFor="let mc of modifierCategories" [value]="mc.id">
{{ mc.name }}
@ -57,7 +49,7 @@
<!-- Price Column -->
<ng-container matColumnDef="price">
<mat-header-cell *matHeaderCellDef>Price</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.price | currency: 'INR' }}</mat-cell>
<mat-cell *matCellDef="let row">{{ row.price | currency : 'INR' }}</mat-cell>
</ng-container>
<!-- Modifier Category Column -->

View File

@ -6,8 +6,8 @@ import { AuthGuard } from '../auth/auth-guard.service';
import { ModifierCategoryListResolver } from '../modifier-categories/modifier-category-list-resolver.service';
import { ModifierDetailComponent } from './modifier-detail/modifier-detail.component';
import { ModifierListResolver } from './modifier-list-resolver.service';
import { ModifierListComponent } from './modifier-list/modifier-list.component';
import { ModifierListResolver } from './modifier-list-resolver.service';
import { ModifierResolver } from './modifier-resolver.service';
const modifiersRoutes: Routes = [

View File

@ -1,6 +1,5 @@
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';
@ -19,7 +18,6 @@ import { ModifiersRoutingModule } from './modifiers-routing.module';
@NgModule({
imports: [
CommonModule,
FlexLayoutModule,
MatTableModule,
MatCardModule,
MatProgressSpinnerModule,