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,3 +0,0 @@
.example-card {
max-width: 400px;
}

View File

@ -1,71 +1,41 @@
<div fxLayout="row" fxFlex="50%" fxLayoutAlign="space-around center" class="example-card">
<mat-card fxFlex>
<mat-card-title-group>
<mat-card-title>User</mat-card-title>
</mat-card-title-group>
<mat-card-content>
<form [formGroup]="form" fxLayout="column">
<mat-card class="flex-auto lg:max-w-[50%]">
<mat-card-header>
<mat-card-title>User</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">
<mat-label>Password</mat-label>
<input matInput formControlName="password" [type]="hide ? 'password' : 'text'" />
<mat-icon matSuffix (click)="hide = !hide">{{
hide ? 'visibility' : 'visibility_off'
}}</mat-icon>
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-checkbox formControlName="lockedOut">Is Locked Out?</mat-checkbox>
</div>
<mat-divider></mat-divider>
<div formArrayName="roles">
<div
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
*ngFor="let r of item.roles; index as i"
[formGroupName]="i"
class="flex flex-row justify-around content-start items-start"
>
<mat-form-field fxFlex>
<mat-label>Name</mat-label>
<input matInput #nameElement placeholder="Name" formControlName="name" />
</mat-form-field>
<mat-checkbox formControlName="role" class="flex-auto">{{ r.name }}</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>Password</mat-label>
<input
matInput
placeholder="Password"
formControlName="password"
[type]="hide ? 'password' : 'text'"
/>
<mat-icon matSuffix (click)="hide = !hide">{{
hide ? 'visibility' : 'visibility_off'
}}</mat-icon>
</mat-form-field>
</div>
<div
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
>
<mat-checkbox formControlName="lockedOut">Is Locked Out?</mat-checkbox>
</div>
<mat-divider></mat-divider>
<div formArrayName="roles">
<div
fxLayout="row"
*ngFor="let r of item.roles; index as i"
[formGroupName]="i"
fxLayout="row"
fxLayoutAlign="space-around start"
fxLayout.lt-md="column"
fxLayoutGap="20px"
fxLayoutGap.lt-md="0px"
>
<mat-checkbox formControlName="role" fxFlex>{{ r.name }}</mat-checkbox>
</div>
</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()">Delete</button>
</mat-card-actions>
</mat-card>
</div>
</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()">Delete</button>
</mat-card-actions>
</mat-card>

View File

@ -1,11 +1,13 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Users</mat-card-title>
<a mat-button [routerLink]="['/users', 'new']">
<mat-icon>add_box</mat-icon>
Add
</a>
</mat-card-title-group>
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Users</mat-card-title>
<a mat-button [routerLink]="['/users', '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 -->

View File

@ -5,8 +5,8 @@ import { RouterModule, Routes } from '@angular/router';
import { AuthGuard } from '../auth/auth-guard.service';
import { UserDetailComponent } from './user-detail/user-detail.component';
import { UserListResolver } from './user-list-resolver.service';
import { UserListComponent } from './user-list/user-list.component';
import { UserListResolver } from './user-list-resolver.service';
import { UserResolver } from './user-resolver.service';
const usersRoutes: Routes = [

View File

@ -1,7 +1,6 @@
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 { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -22,7 +21,6 @@ import { UsersRoutingModule } from './users-routing.module';
imports: [
CommonModule,
CdkTableModule,
FlexLayoutModule,
MatButtonModule,
MatCardModule,
MatCheckboxModule,