Removed all Material Cards

Removed Tailwind
Moved to scss
Moved to material theme 3
This commit is contained in:
2025-07-16 05:16:51 +00:00
parent c542114e42
commit 846a7209ee
147 changed files with 6057 additions and 6377 deletions
@@ -1,129 +1,125 @@
<mat-card>
<mat-card-header>
<mat-card-title>Recipe Detail</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 mr-5">
<mat-label>Date</mat-label>
<input matInput [matDatepicker]="date" formControlName="date" autocomplete="off" #dateElement />
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
<mat-datepicker #date></mat-datepicker>
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Source</mat-label>
<input type="text" matInput formControlName="source" autocomplete="off" />
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
<mat-form-field class="flex-auto basis-4/5 mr-5">
<mat-label>Product</mat-label>
<input
type="text"
matInput
#productElement
[matAutocomplete]="autoP"
formControlName="product"
autocomplete="off"
/>
<mat-autocomplete
#autoP="matAutocomplete"
autoActiveFirstOption
[displayWith]="displayProduct"
(optionSelected)="productSelected($event)"
>
@for (product of products | async; track product) {
<mat-option [value]="product">{{ product.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5">
<mat-label>Yield</mat-label>
<input type="text" matInput formControlName="recipeYield" autocomplete="off" />
</mat-form-field>
</div>
<div formGroupName="addRow" 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>Ingredient</mat-label>
<input
type="text"
matInput
#ingredientElement
[matAutocomplete]="autoI"
formControlName="ingredient"
autocomplete="off"
/>
<mat-autocomplete
#autoI="matAutocomplete"
autoActiveFirstOption
[displayWith]="displayIngredient"
(optionSelected)="ingredientSelected($event)"
>
@for (product of ingredients | async; track product) {
<mat-option [value]="product">{{ product.name }} ({{ product.fractionUnits }})</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5 mr-5">
<mat-label>Quantity</mat-label>
<input type="text" matInput formControlName="quantity" autocomplete="off" />
</mat-form-field>
<mat-form-field class="flex-auto basis-[30%] mr-5">
<mat-label>Description</mat-label>
<input type="text" matInput formControlName="description" autocomplete="off" />
</mat-form-field>
<h2>Recipe Detail</h2>
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto basis-[10%]">Add</button>
</div>
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
<!-- Ingredient Column -->
<ng-container matColumnDef="product">
<mat-header-cell *matHeaderCellDef>Product</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.product.name }} {{ row.description }}</mat-cell>
</ng-container>
<form [formGroup]="form" class="flex-col">
<div class="row-container">
<mat-form-field class="flex-auto">
<mat-label>Date</mat-label>
<input matInput [matDatepicker]="date" formControlName="date" autocomplete="off" #dateElement />
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
<mat-datepicker #date></mat-datepicker>
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Source</mat-label>
<input type="text" matInput formControlName="source" autocomplete="off" />
</mat-form-field>
</div>
<div class="row-container">
<mat-form-field class="flex-auto basis-4-5">
<mat-label>Product</mat-label>
<input
type="text"
matInput
#productElement
[matAutocomplete]="autoP"
formControlName="product"
autocomplete="off"
/>
<mat-autocomplete
#autoP="matAutocomplete"
autoActiveFirstOption
[displayWith]="displayProduct"
(optionSelected)="productSelected($event)"
>
@for (product of products | async; track product) {
<mat-option [value]="product">{{ product.name }}</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1-5">
<mat-label>Yield</mat-label>
<input type="text" matInput formControlName="recipeYield" autocomplete="off" />
</mat-form-field>
</div>
<div formGroupName="addRow" class="row-container">
<mat-form-field class="flex-auto basis-2-5">
<mat-label>Ingredient</mat-label>
<input
type="text"
matInput
#ingredientElement
[matAutocomplete]="autoI"
formControlName="ingredient"
autocomplete="off"
/>
<mat-autocomplete
#autoI="matAutocomplete"
autoActiveFirstOption
[displayWith]="displayIngredient"
(optionSelected)="ingredientSelected($event)"
>
@for (product of ingredients | async; track product) {
<mat-option [value]="product">{{ product.name }} ({{ product.fractionUnits }})</mat-option>
}
</mat-autocomplete>
</mat-form-field>
<mat-form-field class="flex-auto basis-1-5">
<mat-label>Quantity</mat-label>
<input type="text" matInput formControlName="quantity" autocomplete="off" />
</mat-form-field>
<mat-form-field class="flex-auto basis-30">
<mat-label>Description</mat-label>
<input type="text" matInput formControlName="description" autocomplete="off" />
</mat-form-field>
<!-- Quantity Column -->
<ng-container matColumnDef="quantity">
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
<mat-cell *matCellDef="let row" class="right"
>{{ row.quantity | number: '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
>
</ng-container>
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto basis-10">Add</button>
</div>
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
<!-- Ingredient Column -->
<ng-container matColumnDef="product">
<mat-header-cell *matHeaderCellDef>Product</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.product.name }} {{ row.description }}</mat-cell>
</ng-container>
<!-- Action Column -->
<ng-container matColumnDef="action">
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
<mat-cell *matCellDef="let row" class="center">
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
<mat-icon>delete</mat-icon>
</button>
</mat-cell>
</ng-container>
<!-- Quantity Column -->
<ng-container matColumnDef="quantity">
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
<mat-cell *matCellDef="let row" class="right"
>{{ row.quantity | number: '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
<mat-form-field class="flex-auto">
<mat-label>Instructions</mat-label>
<textarea matInput matAutosizeMinRows="5" formControlName="instructions"></textarea>
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Garnishing</mat-label>
<textarea matInput matAutosizeMinRows="5" formControlName="garnishing"></textarea>
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Plating</mat-label>
<textarea matInput matAutosizeMinRows="5" formControlName="plating"></textarea>
</mat-form-field>
</form>
</mat-card-content>
<mat-card-actions>
<button mat-raised-button (click)="save()" color="primary" class="mr-5">
{{ item.id ? 'Update' : 'Save' }}
</button>
@if (item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</mat-card-actions>
</mat-card>
<!-- Action Column -->
<ng-container matColumnDef="action">
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
<mat-cell *matCellDef="let row" class="center">
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
<mat-icon>delete</mat-icon>
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
<mat-form-field class="flex-auto">
<mat-label>Instructions</mat-label>
<textarea matInput matAutosizeMinRows="5" formControlName="instructions"></textarea>
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Garnishing</mat-label>
<textarea matInput matAutosizeMinRows="5" formControlName="garnishing"></textarea>
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Plating</mat-label>
<textarea matInput matAutosizeMinRows="5" formControlName="plating"></textarea>
</mat-form-field>
</form>
<div class="row-container">
<button mat-raised-button (click)="save()" color="primary" class="">
{{ item.id ? 'Update' : 'Save' }}
</button>
@if (item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</div>