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:
@ -1,40 +1,38 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Update Report</mat-card-title>
|
||||
<button mat-button mat-icon-button (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Update Report</mat-card-title>
|
||||
<button mat-icon-button (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" fxLayout="column">
|
||||
<div
|
||||
fxLayout="row"
|
||||
fxLayout.lt-md="column"
|
||||
fxLayoutGap="20px"
|
||||
fxLayoutGap.lt-md="0px"
|
||||
fxLayoutAlign="space-around start"
|
||||
>
|
||||
<mat-form-field fxFlex="40">
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<mat-label>Date</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="date"
|
||||
(focus)="date.open()"
|
||||
placeholder="Date"
|
||||
formControlName="date"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
|
||||
<mat-datepicker #date></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex>
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<mat-label>Menu Category</mat-label>
|
||||
<mat-select placeholder="Menu Category" formControlName="menuCategory">
|
||||
<mat-select formControlName="menuCategory">
|
||||
<mat-option *ngFor="let s of menuCategories" [value]="s.id">
|
||||
{{ s.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button fxFlex="20" mat-raised-button color="primary" (click)="show()">Show</button>
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
<mat-table #table [dataSource]="dataSource" aria-label="Elements" formArrayName="prices">
|
||||
<!-- Name Column -->
|
||||
@ -47,15 +45,19 @@
|
||||
<ng-container matColumnDef="oldPrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Old Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.oldPrice | currency: 'INR'
|
||||
row.oldPrice | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- New Price Column -->
|
||||
<ng-container matColumnDef="newPrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">New Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index" [formGroupName]="i" fxFlex class="right">
|
||||
₹ <input matInput type="number" placeholder="Price" formControlName="newPrice" />
|
||||
<mat-cell *matCellDef="let row; let i = index" [formGroupName]="i" class="right">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>New Price</mat-label>
|
||||
<input matInput type="number" formControlName="newPrice" />
|
||||
<span matTextPrefix>₹ </span>
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -2,9 +2,7 @@ import { A11yModule } from '@angular/cdk/a11y';
|
||||
import { CdkTableModule } from '@angular/cdk/table';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
@ -20,6 +18,7 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
||||
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
|
||||
@ -43,7 +42,6 @@ export const MY_FORMATS = {
|
||||
A11yModule,
|
||||
CommonModule,
|
||||
CdkTableModule,
|
||||
FlexLayoutModule,
|
||||
MatAutocompleteModule,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
|
||||
Reference in New Issue
Block a user