Forgot to lint earlier
This commit is contained in:
1 parent
d44c5b3e02
commit
facf2df91e
69 files changed
+411
-424
No files matched your search
@@ -9,14 +9,12 @@ describe('AccountDetailComponent', () => {
|
||||
let component: AccountDetailComponent;
|
||||
let fixture: ComponentFixture<AccountDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [AccountDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [AccountDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AccountDetailComponent);
|
||||
|
||||
@@ -3,36 +3,25 @@ import { TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AppComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
it(
|
||||
'should create the app',
|
||||
waitForAsync(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
}),
|
||||
);
|
||||
it(
|
||||
`should have as title 'app'`,
|
||||
waitForAsync(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('app');
|
||||
}),
|
||||
);
|
||||
it(
|
||||
'should render title in a h1 tag',
|
||||
waitForAsync(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AppComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
it('should create the app', waitForAsync(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
}));
|
||||
it(`should have as title 'app'`, waitForAsync(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('app');
|
||||
}));
|
||||
it('should render title in a h1 tag', waitForAsync(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
|
||||
}));
|
||||
});
|
||||
@@ -9,14 +9,12 @@ describe('AttendanceComponent', () => {
|
||||
let component: AttendanceComponent;
|
||||
let fixture: ComponentFixture<AttendanceComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [AttendanceComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [AttendanceComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AttendanceComponent);
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('LoginComponent', () => {
|
||||
let component: LoginComponent;
|
||||
let fixture: ComponentFixture<LoginComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LoginComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LoginComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoginComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('LogoutComponent', () => {
|
||||
let component: LogoutComponent;
|
||||
let fixture: ComponentFixture<LogoutComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LogoutComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LogoutComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LogoutComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('BalanceSheetComponent', () => {
|
||||
let component: BalanceSheetComponent;
|
||||
let fixture: ComponentFixture<BalanceSheetComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [BalanceSheetComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [BalanceSheetComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BalanceSheetComponent);
|
||||
|
||||
@@ -22,7 +22,11 @@ export class BalanceSheetComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['group', 'name', 'subAmount', 'total'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
date: '',
|
||||
});
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('BatchIntegrityComponent', () => {
|
||||
let component: BatchIntegrityReportComponent;
|
||||
let fixture: ComponentFixture<BatchIntegrityReportComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [BatchIntegrityReportComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [BatchIntegrityReportComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BatchIntegrityReportComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('CashFlowComponent', () => {
|
||||
let component: CashFlowComponent;
|
||||
let fixture: ComponentFixture<CashFlowComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [CashFlowComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [CashFlowComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CashFlowComponent);
|
||||
|
||||
@@ -18,7 +18,11 @@ export class CashFlowComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'amount'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('ClientDetailComponent', () => {
|
||||
let component: ClientDetailComponent;
|
||||
let fixture: ComponentFixture<ClientDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ClientDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ClientDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ClientDetailComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('ClosingStockComponent', () => {
|
||||
let component: ClosingStockComponent;
|
||||
let fixture: ComponentFixture<ClosingStockComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ClosingStockComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ClosingStockComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ClosingStockComponent);
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, FormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
FormControl,
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
@@ -137,9 +142,12 @@ export class ClosingStockComponent implements OnInit {
|
||||
Amount: 'amount',
|
||||
};
|
||||
|
||||
const d = JSON.parse(JSON.stringify(this.dataSource.data)).map(
|
||||
(x: ClosingStockItem)=> ({product: x.product.name, group: x.group, quantity: x.quantity, amount: x.amount})
|
||||
);
|
||||
const d = JSON.parse(JSON.stringify(this.dataSource.data)).map((x: ClosingStockItem) => ({
|
||||
product: x.product.name,
|
||||
group: x.group,
|
||||
quantity: x.quantity,
|
||||
amount: x.amount,
|
||||
}));
|
||||
const csvData = new Blob([this.toCsv.toCsv(headers, d)], {
|
||||
type: 'text/csv;charset=utf-8;',
|
||||
});
|
||||
|
||||
+6
-8
@@ -8,14 +8,12 @@ describe('CostCentreDetailComponent', () => {
|
||||
let component: CostCentreDetailComponent;
|
||||
let fixture: ComponentFixture<CostCentreDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [CostCentreDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [CostCentreDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CostCentreDetailComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('DaybookComponent', () => {
|
||||
let component: DaybookComponent;
|
||||
let fixture: ComponentFixture<DaybookComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [DaybookComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [DaybookComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DaybookComponent);
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('EmployeeDetailComponent', () => {
|
||||
let component: EmployeeDetailComponent;
|
||||
let fixture: ComponentFixture<EmployeeDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [EmployeeDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [EmployeeDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EmployeeDetailComponent);
|
||||
|
||||
@@ -37,7 +37,11 @@ export class EmployeeListComponent implements OnInit, AfterViewInit {
|
||||
'leavingDate',
|
||||
];
|
||||
|
||||
constructor(private route: ActivatedRoute, private fb: UntypedFormBuilder, private toCsv: ToCsvService) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private fb: UntypedFormBuilder,
|
||||
private toCsv: ToCsvService,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
filter: '',
|
||||
});
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('EntriesComponent', () => {
|
||||
let component: EntriesComponent;
|
||||
let fixture: ComponentFixture<EntriesComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [EntriesComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [EntriesComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EntriesComponent);
|
||||
|
||||
@@ -32,7 +32,11 @@ export class EntriesComponent implements OnInit {
|
||||
|
||||
posted: boolean | null = null;
|
||||
issue: boolean = false;
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('HomeComponent', () => {
|
||||
let component: HomeComponent;
|
||||
let fixture: ComponentFixture<HomeComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [HomeComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [HomeComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(HomeComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('IncentiveComponent', () => {
|
||||
let component: IncentiveComponent;
|
||||
let fixture: ComponentFixture<IncentiveComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [IncentiveComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [IncentiveComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(IncentiveComponent);
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('IssueDialogComponent', () => {
|
||||
let component: IssueDialogComponent;
|
||||
let fixture: ComponentFixture<IssueDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [IssueDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [IssueDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(IssueDialogComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('IssueComponent', () => {
|
||||
let component: IssueComponent;
|
||||
let fixture: ComponentFixture<IssueComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [IssueComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [IssueComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(IssueComponent);
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('JournalDialogComponent', () => {
|
||||
let component: JournalDialogComponent;
|
||||
let fixture: ComponentFixture<JournalDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [JournalDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [JournalDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(JournalDialogComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('JournalComponent', () => {
|
||||
let component: JournalComponent;
|
||||
let fixture: ComponentFixture<JournalComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [JournalComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [JournalComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(JournalComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('LedgerComponent', () => {
|
||||
let component: LedgerComponent;
|
||||
let fixture: ComponentFixture<LedgerComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [LedgerComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [LedgerComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LedgerComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('NetTransactionsComponent', () => {
|
||||
let component: NetTransactionsComponent;
|
||||
let fixture: ComponentFixture<NetTransactionsComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [NetTransactionsComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [NetTransactionsComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NetTransactionsComponent);
|
||||
|
||||
@@ -23,7 +23,11 @@ export class NetTransactionsComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('NonContractPurchaseComponent', () => {
|
||||
let component: NonContractPurchaseComponent;
|
||||
let fixture: ComponentFixture<NonContractPurchaseComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [NonContractPurchaseComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [NonContractPurchaseComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NonContractPurchaseComponent);
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('PaymentDialogComponent', () => {
|
||||
let component: PaymentDialogComponent;
|
||||
let fixture: ComponentFixture<PaymentDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PaymentDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PaymentDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PaymentDialogComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('PaymentComponent', () => {
|
||||
let component: PaymentComponent;
|
||||
let fixture: ComponentFixture<PaymentComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PaymentComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PaymentComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PaymentComponent);
|
||||
|
||||
@@ -174,7 +174,10 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
addRow() {
|
||||
const amount = this.math.parseAmount((this.form.get('addRow') as UntypedFormControl).value.amount, 2);
|
||||
const amount = this.math.parseAmount(
|
||||
(this.form.get('addRow') as UntypedFormControl).value.amount,
|
||||
2,
|
||||
);
|
||||
const debit = 1;
|
||||
if (this.account === null || amount <= 0) {
|
||||
return;
|
||||
|
||||
+6
-8
@@ -8,14 +8,12 @@ describe('ProductGroupDetailComponent', () => {
|
||||
let component: ProductGroupDetailComponent;
|
||||
let fixture: ComponentFixture<ProductGroupDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProductGroupDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProductGroupDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProductGroupDetailComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('ProductLedgerComponent', () => {
|
||||
let component: ProductLedgerComponent;
|
||||
let fixture: ComponentFixture<ProductLedgerComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProductLedgerComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProductLedgerComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProductLedgerComponent);
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('ProductDetailDialogComponent', () => {
|
||||
let component: ProductDetailDialogComponent;
|
||||
let fixture: ComponentFixture<ProductDetailDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ProductDetailDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ProductDetailDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProductDetailDialogComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('ProductDetailComponent', () => {
|
||||
let component: ProductDetailComponent;
|
||||
let fixture: ComponentFixture<ProductDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProductDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProductDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProductDetailComponent);
|
||||
|
||||
@@ -29,7 +29,11 @@ export class ProductListComponent implements OnInit, AfterViewInit {
|
||||
|
||||
private _showExtended = true;
|
||||
|
||||
constructor(private route: ActivatedRoute, private fb: UntypedFormBuilder, private toCsv: ToCsvService) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private fb: UntypedFormBuilder,
|
||||
private toCsv: ToCsvService,
|
||||
) {
|
||||
this.showExtended = true;
|
||||
this.form = this.fb.group({
|
||||
filter: '',
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('ProfitLossComponent', () => {
|
||||
let component: ProfitLossComponent;
|
||||
let fixture: ComponentFixture<ProfitLossComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProfitLossComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ProfitLossComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProfitLossComponent);
|
||||
|
||||
@@ -23,7 +23,11 @@ export class ProfitLossComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['group', 'name', 'amount', 'total'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('PurchaseEntriesComponent', () => {
|
||||
let component: PurchaseEntriesComponent;
|
||||
let fixture: ComponentFixture<PurchaseEntriesComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchaseEntriesComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchaseEntriesComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PurchaseEntriesComponent);
|
||||
|
||||
@@ -32,7 +32,11 @@ export class PurchaseEntriesComponent implements OnInit {
|
||||
'amount',
|
||||
];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('PurchaseReturnDialogComponent', () => {
|
||||
let component: PurchaseReturnDialogComponent;
|
||||
let fixture: ComponentFixture<PurchaseReturnDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PurchaseReturnDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PurchaseReturnDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PurchaseReturnDialogComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('PurchaseReturnComponent', () => {
|
||||
let component: PurchaseReturnComponent;
|
||||
let fixture: ComponentFixture<PurchaseReturnComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchaseReturnComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchaseReturnComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PurchaseReturnComponent);
|
||||
|
||||
@@ -7,13 +7,11 @@ describe('PurchaseDialogComponent', () => {
|
||||
let component: PurchaseDialogComponent;
|
||||
let fixture: ComponentFixture<PurchaseDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MatDialogModule, PurchaseDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MatDialogModule, PurchaseDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PurchaseDialogComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('PurchaseComponent', () => {
|
||||
let component: PurchaseComponent;
|
||||
let fixture: ComponentFixture<PurchaseComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchaseComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchaseComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PurchaseComponent);
|
||||
|
||||
@@ -238,7 +238,9 @@ export class PurchaseComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.product = null;
|
||||
((this.form.get('addRow') as UntypedFormControl).get('price') as UntypedFormControl).enable();
|
||||
((this.form.get('addRow') as UntypedFormControl).get('tax') as UntypedFormControl).enable();
|
||||
((this.form.get('addRow') as UntypedFormControl).get('discount') as UntypedFormControl).enable();
|
||||
(
|
||||
(this.form.get('addRow') as UntypedFormControl).get('discount') as UntypedFormControl
|
||||
).enable();
|
||||
setTimeout(() => {
|
||||
if (this.productElement) {
|
||||
this.productElement.nativeElement.focus();
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('PurchasesComponent', () => {
|
||||
let component: PurchasesComponent;
|
||||
let fixture: ComponentFixture<PurchasesComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchasesComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [PurchasesComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PurchasesComponent);
|
||||
|
||||
@@ -24,7 +24,11 @@ export class PurchasesComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['product', 'quantity', 'rate', 'amount'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
|
||||
+6
-8
@@ -8,14 +8,12 @@ describe('RateContractDetailComponent', () => {
|
||||
let component: RateContractDetailComponent;
|
||||
let fixture: ComponentFixture<RateContractDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RateContractDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RateContractDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RateContractDetailComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('RawMaterialCostComponent', () => {
|
||||
let component: RawMaterialCostComponent;
|
||||
let fixture: ComponentFixture<RawMaterialCostComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RawMaterialCostComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RawMaterialCostComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RawMaterialCostComponent);
|
||||
|
||||
@@ -7,14 +7,12 @@ describe('ReceiptDialogComponent', () => {
|
||||
let component: ReceiptDialogComponent;
|
||||
let fixture: ComponentFixture<ReceiptDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogRef],
|
||||
declarations: [ReceiptDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogRef],
|
||||
declarations: [ReceiptDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ReceiptDialogComponent);
|
||||
|
||||
@@ -9,14 +9,12 @@ describe('ReceiptComponent', () => {
|
||||
let component: ReceiptComponent;
|
||||
let fixture: ComponentFixture<ReceiptComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ReceiptComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [ReceiptComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ReceiptComponent);
|
||||
|
||||
@@ -173,7 +173,10 @@ export class ReceiptComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
addRow() {
|
||||
const amount = this.math.parseAmount((this.form.get('addRow') as UntypedFormControl).value.amount, 2);
|
||||
const amount = this.math.parseAmount(
|
||||
(this.form.get('addRow') as UntypedFormControl).value.amount,
|
||||
2,
|
||||
);
|
||||
const debit = -1;
|
||||
if (this.account === null || amount <= 0) {
|
||||
return;
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('ProductGroupDetailComponent', () => {
|
||||
let component: RecipeDetailComponent;
|
||||
let fixture: ComponentFixture<RecipeDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RecipeDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RecipeDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RecipeDetailComponent);
|
||||
|
||||
@@ -144,9 +144,9 @@ export class RecipeDetailComponent implements OnInit, AfterViewInit {
|
||||
this.ser
|
||||
.getIngredientDetails(ingredient.id, item.validFrom, item.validTill)
|
||||
.subscribe((x) =>
|
||||
((this.form.get('addRow') as UntypedFormControl).get('rate') as UntypedFormControl).setValue(
|
||||
'' + x.costPrice,
|
||||
),
|
||||
(
|
||||
(this.form.get('addRow') as UntypedFormControl).get('rate') as UntypedFormControl
|
||||
).setValue('' + x.costPrice),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('RoleDetailComponent', () => {
|
||||
let component: RoleDetailComponent;
|
||||
let fixture: ComponentFixture<RoleDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RoleDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [RoleDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RoleDetailComponent);
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
@@ -139,17 +144,17 @@ export class SettingsComponent implements OnInit {
|
||||
if (this.lockOlder && this.olderRolling) {
|
||||
item.start.days = +(this.lockInfoForm.get('olderDays') as UntypedFormControl).value;
|
||||
} else if (this.lockOlder && !this.olderRolling) {
|
||||
item.start.date = moment((this.lockInfoForm.get('olderDate') as UntypedFormControl).value).format(
|
||||
'DD-MMM-YYYY',
|
||||
);
|
||||
item.start.date = moment(
|
||||
(this.lockInfoForm.get('olderDate') as UntypedFormControl).value,
|
||||
).format('DD-MMM-YYYY');
|
||||
}
|
||||
if (this.lockNewer && this.newerRolling) {
|
||||
item.finish.days = +(this.lockInfoForm.get('newerDays') as UntypedFormControl).value;
|
||||
}
|
||||
if (this.lockNewer && !this.newerRolling) {
|
||||
item.finish.date = moment((this.lockInfoForm.get('newerDate') as UntypedFormControl).value).format(
|
||||
'DD-MMM-YYYY',
|
||||
);
|
||||
item.finish.date = moment(
|
||||
(this.lockInfoForm.get('newerDate') as UntypedFormControl).value,
|
||||
).format('DD-MMM-YYYY');
|
||||
}
|
||||
const atArray = this.lockInfoForm.get('accountTypes') as UntypedFormArray;
|
||||
this.accountTypes.forEach((at, index) => {
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('ConfirmDialogComponent', () => {
|
||||
let component: ConfirmDialogComponent;
|
||||
let fixture: ComponentFixture<ConfirmDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ConfirmDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ConfirmDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ConfirmDialogComponent);
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('ImageDialogComponent', () => {
|
||||
let component: ImageDialogComponent;
|
||||
let fixture: ComponentFixture<ImageDialogComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ImageDialogComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ImageDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ImageDialogComponent);
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('StockMovementComponent', () => {
|
||||
let component: StockMovementComponent;
|
||||
let fixture: ComponentFixture<StockMovementComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [StockMovementComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [StockMovementComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(StockMovementComponent);
|
||||
|
||||
@@ -23,7 +23,11 @@ export class StockMovementComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['group', 'name', 'opening', 'purchase', 'issue', 'closing'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('TrialBalanceComponent', () => {
|
||||
let component: TrialBalanceComponent;
|
||||
let fixture: ComponentFixture<TrialBalanceComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [TrialBalanceComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [TrialBalanceComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TrialBalanceComponent);
|
||||
|
||||
@@ -22,7 +22,11 @@ export class TrialBalanceComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['type', 'name', 'debit', 'credit'];
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder) {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
) {
|
||||
this.form = this.fb.group({
|
||||
date: '',
|
||||
});
|
||||
|
||||
@@ -8,14 +8,12 @@ describe('UserDetailComponent', () => {
|
||||
let component: UserDetailComponent;
|
||||
let fixture: ComponentFixture<UserDetailComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [UserDetailComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [UserDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(UserDetailComponent);
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
|
||||
Reference in new issue
Block a user