Chore: Check for deprecations using eslint plugin
Chore: environment file replacement stopped. Chore: All components are now standalone and removed all modules Chore: App routing is now in app.routes and similarly for all submodules Chore: Http interceptors are now functional and split refresh interceptor into a separate one.
This commit is contained in:
1 parent
b6bb3dbcfd
commit
4571b31fc0
309 files changed
+3897
-5222
No files matched your search
@@ -1,13 +0,0 @@
|
||||
import { LedgerRoutingModule } from './ledger-routing.module';
|
||||
|
||||
describe('LedgerRoutingModule', () => {
|
||||
let ledgerRoutingModule: LedgerRoutingModule;
|
||||
|
||||
beforeEach(() => {
|
||||
ledgerRoutingModule = new LedgerRoutingModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(ledgerRoutingModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,7 +1,4 @@
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LedgerComponent } from './ledger.component';
|
||||
|
||||
@@ -9,15 +6,11 @@ describe('LedgerComponent', () => {
|
||||
let component: LedgerComponent;
|
||||
let fixture: ComponentFixture<LedgerComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [LedgerComponent],
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
providers: [provideHttpClient(withInterceptorsFromDi())],
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [LedgerComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LedgerComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -1,15 +1,41 @@
|
||||
import { AsyncPipe, CurrencyPipe } from '@angular/common';
|
||||
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
||||
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatAutocompleteSelectedEvent, MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete';
|
||||
import { MatIconButton, MatButton } from '@angular/material/button';
|
||||
import { MatCard, MatCardHeader, MatCardTitleGroup, MatCardTitle, MatCardContent } from '@angular/material/card';
|
||||
import { MatOption } from '@angular/material/core';
|
||||
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
|
||||
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { MatInput } from '@angular/material/input';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatSort, MatSortHeader } from '@angular/material/sort';
|
||||
import {
|
||||
MatTable,
|
||||
MatColumnDef,
|
||||
MatHeaderCellDef,
|
||||
MatHeaderCell,
|
||||
MatCellDef,
|
||||
MatCell,
|
||||
MatFooterCellDef,
|
||||
MatFooterCell,
|
||||
MatHeaderRowDef,
|
||||
MatHeaderRow,
|
||||
MatRowDef,
|
||||
MatRow,
|
||||
MatFooterRowDef,
|
||||
MatFooterRow,
|
||||
} from '@angular/material/table';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import moment from 'moment';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
||||
|
||||
import { Account } from '../core/account';
|
||||
import { AccountService } from '../core/account.service';
|
||||
import { AccountingPipe } from '../shared/accounting.pipe';
|
||||
import { ClearPipe } from '../shared/clear.pipe';
|
||||
import { ToCsvService } from '../shared/to-csv.service';
|
||||
|
||||
import { Ledger } from './ledger';
|
||||
@@ -20,6 +46,50 @@ import { LedgerService } from './ledger.service';
|
||||
selector: 'app-ledger',
|
||||
templateUrl: './ledger.component.html',
|
||||
styleUrls: ['./ledger.component.css'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
MatCard,
|
||||
MatCardHeader,
|
||||
MatCardTitleGroup,
|
||||
MatCardTitle,
|
||||
MatIconButton,
|
||||
MatIcon,
|
||||
MatCardContent,
|
||||
ReactiveFormsModule,
|
||||
MatFormField,
|
||||
MatLabel,
|
||||
MatInput,
|
||||
MatDatepickerInput,
|
||||
MatDatepickerToggle,
|
||||
MatSuffix,
|
||||
MatDatepicker,
|
||||
MatAutocompleteTrigger,
|
||||
MatAutocomplete,
|
||||
MatOption,
|
||||
MatButton,
|
||||
MatTable,
|
||||
MatSort,
|
||||
MatColumnDef,
|
||||
MatHeaderCellDef,
|
||||
MatHeaderCell,
|
||||
MatSortHeader,
|
||||
MatCellDef,
|
||||
MatCell,
|
||||
MatFooterCellDef,
|
||||
MatFooterCell,
|
||||
RouterLink,
|
||||
MatHeaderRowDef,
|
||||
MatHeaderRow,
|
||||
MatRowDef,
|
||||
MatRow,
|
||||
MatFooterRowDef,
|
||||
MatFooterRow,
|
||||
MatPaginator,
|
||||
AsyncPipe,
|
||||
CurrencyPipe,
|
||||
AccountingPipe,
|
||||
ClearPipe,
|
||||
],
|
||||
})
|
||||
export class LedgerComponent implements OnInit, AfterViewInit {
|
||||
@ViewChild('accountElement', { static: true }) accountElement?: ElementRef;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import { LedgerModule } from './ledger.module';
|
||||
|
||||
describe('LedgerModule', () => {
|
||||
let ledgerModule: LedgerModule;
|
||||
|
||||
beforeEach(() => {
|
||||
ledgerModule = new LedgerModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(ledgerModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,66 +0,0 @@
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
import { CdkTableModule } from '@angular/cdk/table';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatNativeDateModule } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
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';
|
||||
|
||||
import { LedgerRoutingModule } from './ledger-routing.module';
|
||||
import { LedgerComponent } from './ledger.component';
|
||||
|
||||
export const MY_FORMATS = {
|
||||
parse: {
|
||||
dateInput: 'DD-MMM-YYYY',
|
||||
},
|
||||
display: {
|
||||
dateInput: 'DD-MMM-YYYY',
|
||||
monthYearLabel: 'MMM YYYY',
|
||||
dateA11yLabel: 'DD-MMM-YYYY',
|
||||
monthYearA11yLabel: 'MMM YYYY',
|
||||
},
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
A11yModule,
|
||||
CommonModule,
|
||||
CdkTableModule,
|
||||
MatAutocompleteModule,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
MatCheckboxModule,
|
||||
MatDatepickerModule,
|
||||
MatFormFieldModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
MatPaginatorModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatSortModule,
|
||||
MatTableModule,
|
||||
ReactiveFormsModule,
|
||||
SharedModule,
|
||||
LedgerRoutingModule,
|
||||
],
|
||||
declarations: [LedgerComponent],
|
||||
providers: [
|
||||
{ provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE] },
|
||||
{ provide: MAT_DATE_FORMATS, useValue: MY_FORMATS },
|
||||
],
|
||||
})
|
||||
export class LedgerModule {}
|
||||
+2
-10
@@ -1,13 +1,11 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { Routes } from '@angular/router';
|
||||
|
||||
import { authGuard } from '../auth/auth-guard.service';
|
||||
|
||||
import { LedgerComponent } from './ledger.component';
|
||||
import { ledgerResolver } from './ledger.resolver';
|
||||
|
||||
const ledgerRoutes: Routes = [
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: LedgerComponent,
|
||||
@@ -33,9 +31,3 @@ const ledgerRoutes: Routes = [
|
||||
runGuardsAndResolvers: 'always',
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, RouterModule.forChild(ledgerRoutes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class LedgerRoutingModule {}
|
||||
Reference in new issue
Block a user