Moved from tslint to eslint as tslint was depreciated.
Added prettier and also prettied all the typescript files using prettier ESLint is using the AirBnB rules which are the most strict to lint the files.
This commit is contained in:
1 parent
40e79ff949
commit
1350870f9e
545 files changed
+8455
-7036
No files matched your search
@@ -1,16 +1,16 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {FormBuilder, FormGroup} from '@angular/forms';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
import {StockMovementDataSource} from './stock-movement-datasource';
|
||||
import {StockMovement} from './stock-movement';
|
||||
import { StockMovementDataSource } from './stock-movement-datasource';
|
||||
import { StockMovement } from './stock-movement';
|
||||
|
||||
@Component({
|
||||
selector: 'app-stock-movement',
|
||||
templateUrl: './stock-movement.component.html',
|
||||
styleUrls: ['./stock-movement.component.css']
|
||||
styleUrls: ['./stock-movement.component.css'],
|
||||
})
|
||||
export class StockMovementComponent implements OnInit {
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@@ -22,24 +22,19 @@ 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: FormBuilder
|
||||
) {
|
||||
constructor(private route: ActivatedRoute, private router: Router, private fb: FormBuilder) {
|
||||
this.createForm();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { info: StockMovement }) => {
|
||||
this.info = data.info;
|
||||
this.form.setValue({
|
||||
startDate: moment(this.info.startDate, 'DD-MMM-YYYY').toDate(),
|
||||
finishDate: moment(this.info.finishDate, 'DD-MMM-YYYY').toDate()
|
||||
});
|
||||
this.dataSource = new StockMovementDataSource(this.paginator, this.sort, this.info.body);
|
||||
this.route.data.subscribe((data: { info: StockMovement }) => {
|
||||
this.info = data.info;
|
||||
this.form.setValue({
|
||||
startDate: moment(this.info.startDate, 'DD-MMM-YYYY').toDate(),
|
||||
finishDate: moment(this.info.finishDate, 'DD-MMM-YYYY').toDate(),
|
||||
});
|
||||
this.dataSource = new StockMovementDataSource(this.paginator, this.sort, this.info.body);
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
@@ -47,8 +42,8 @@ export class StockMovementComponent implements OnInit {
|
||||
this.router.navigate(['stock-movement'], {
|
||||
queryParams: {
|
||||
startDate: l.startDate,
|
||||
finishDate: l.finishDate
|
||||
}
|
||||
finishDate: l.finishDate,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -65,7 +60,7 @@ export class StockMovementComponent implements OnInit {
|
||||
return {
|
||||
startDate: moment(formModel.startDate).format('DD-MMM-YYYY'),
|
||||
finishDate: moment(formModel.finishDate).format('DD-MMM-YYYY'),
|
||||
body: []
|
||||
body: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user