Prettied, Linted and updated angular.json according to the latest schematic of Angular CLI.
Now all that is needed is to make it ready for strict compiling. Removed eslint-plugin-prettier as it is not recommended and causes errors for both eslint and prettier Bumped to v8.0.0
This commit is contained in:
@@ -3,13 +3,15 @@ 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 { Observable } from 'rxjs';
|
||||
import * as moment from 'moment';
|
||||
import { RawMaterialCostDataSource } from './raw-material-cost-datasource';
|
||||
import { RawMaterialCost } from './raw-material-cost';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Product } from '../core/product';
|
||||
import { ToCsvService } from '../shared/to-csv.service';
|
||||
|
||||
import { RawMaterialCost } from './raw-material-cost';
|
||||
import { RawMaterialCostDataSource } from './raw-material-cost-datasource';
|
||||
|
||||
@Component({
|
||||
selector: 'app-raw-material-cost',
|
||||
templateUrl: './raw-material-cost.component.html',
|
||||
@@ -82,20 +84,12 @@ export class RawMaterialCostComponent implements OnInit {
|
||||
}
|
||||
|
||||
exportCsv() {
|
||||
const headers = this.info.id
|
||||
? {
|
||||
Name: 'name',
|
||||
Group: 'group',
|
||||
Quantity: 'quantity',
|
||||
Net: 'net',
|
||||
Gross: 'gross',
|
||||
}
|
||||
: {
|
||||
Name: 'name',
|
||||
Issue: 'issue',
|
||||
Sale: 'sale',
|
||||
RMC: 'rmc',
|
||||
};
|
||||
let headers: {};
|
||||
if (this.info.id) {
|
||||
headers = { Name: 'name', Group: 'group', Quantity: 'quantity', Net: 'net', Gross: 'gross' };
|
||||
} else {
|
||||
headers = { Name: 'name', Issue: 'issue', Sale: 'sale', RMC: 'rmc' };
|
||||
}
|
||||
|
||||
const csvData = new Blob([this.toCsv.toCsv(headers, this.dataSource.data)], {
|
||||
type: 'text/csv;charset=utf-8;',
|
||||
|
||||
Reference in New Issue
Block a user