Updated to angular 11
Now compiling with strict mode in typescript Need to error checking now
This commit is contained in:
@ -1,13 +1,11 @@
|
||||
.running {
|
||||
/* Red 900 */
|
||||
background-color: #b71c1c;
|
||||
color: #ffffff;
|
||||
background-color: #f8cbad;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.printed {
|
||||
/* Green 900 */
|
||||
background-color: #1b5e20;
|
||||
color: #ffffff;
|
||||
background-color: #c6e0b4;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.square-button {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
|
||||
import { RunningTablesComponent } from './running-tables.component';
|
||||
|
||||
@ -6,11 +6,13 @@ describe('RunningTablesComponent', () => {
|
||||
let component: RunningTablesComponent;
|
||||
let fixture: ComponentFixture<RunningTablesComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [RunningTablesComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [RunningTablesComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RunningTablesComponent);
|
||||
|
||||
@ -9,12 +9,13 @@ import { Table } from '../../core/table';
|
||||
styleUrls: ['./running-tables.component.css'],
|
||||
})
|
||||
export class RunningTablesComponent implements OnInit {
|
||||
list: Table[];
|
||||
list: Table[] = [];
|
||||
|
||||
constructor(private router: Router, private route: ActivatedRoute) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((data: { list: Table[] }) => {
|
||||
this.route.data.subscribe((value) => {
|
||||
const data = value as { list: Table[] };
|
||||
this.list = data.list;
|
||||
});
|
||||
}
|
||||
@ -23,7 +24,7 @@ export class RunningTablesComponent implements OnInit {
|
||||
const qp = { table: table.id };
|
||||
if (table.voucherId) {
|
||||
// eslint-disable-next-line @typescript-eslint/dot-notation
|
||||
qp['voucher'] = table.voucherId;
|
||||
Object.assign(qp, { voucher: table.voucherId });
|
||||
}
|
||||
const navigationExtras: NavigationExtras = {
|
||||
queryParams: qp,
|
||||
|
||||
Reference in New Issue
Block a user