Feature: Adding recipe templates to print recipes.
Feautre: Recipe export to xlsx Chore: Python 11 style type annotations Chore: Moved to sqlalchemy 2.0 Chore: Minimum python is 3.11 Fix: Fix nullability of a lot of fields in the database.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
|
||||
import { EntriesService } from './entries.service';
|
||||
@@ -8,7 +8,7 @@ import { Report } from './report';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class EntriesResolver implements Resolve<Report> {
|
||||
export class EntriesResolver {
|
||||
constructor(private ser: EntriesService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<Report> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, RouterModule, RouterStateSnapshot, Routes } from '@angular/router';
|
||||
|
||||
import { AuthGuard } from '../auth/auth-guard.service';
|
||||
|
||||
@@ -11,12 +11,15 @@ const entriesRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: EntriesComponent,
|
||||
canActivate: [AuthGuard],
|
||||
canActivate: [
|
||||
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
|
||||
inject(AuthGuard).canActivate(route, state),
|
||||
],
|
||||
data: {
|
||||
permission: 'Ledger',
|
||||
},
|
||||
resolve: {
|
||||
info: EntriesResolver,
|
||||
info: (route: ActivatedRouteSnapshot) => inject(EntriesResolver).resolve(route),
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
},
|
||||
|
||||
@@ -88,14 +88,14 @@ export class EntriesComponent implements OnInit {
|
||||
sortDirection,
|
||||
);
|
||||
});
|
||||
this.sort?.sortChange.subscribe((x) =>
|
||||
this.sort?.sortChange.subscribe(() =>
|
||||
this.router.navigate([], {
|
||||
relativeTo: this.route,
|
||||
queryParams: { a: this.sort?.active ?? 'date', d: this.sort?.direction },
|
||||
queryParamsHandling: 'merge',
|
||||
}),
|
||||
);
|
||||
this.paginator?.page.subscribe((x) =>
|
||||
this.paginator?.page.subscribe(() =>
|
||||
this.router.navigate([], {
|
||||
relativeTo: this.route,
|
||||
queryParams: { ps: this.paginator?.pageSize, pi: this.paginator?.pageIndex },
|
||||
|
||||
@@ -3,7 +3,6 @@ import { CdkTableModule } from '@angular/cdk/table';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
@@ -22,6 +21,7 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSortModule } from '@angular/material/sort';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
||||
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user