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:
2020-10-10 08:45:05 +05:30
parent 438a98334d
commit 5ea09df272
320 changed files with 2233 additions and 2268 deletions

View File

@ -2,14 +2,13 @@ import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angula
import { FormBuilder, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import { ToasterService } from '../../core/toaster.service';
import { EmployeeService } from '../employee.service';
import { Employee } from '../employee';
import { CostCentre } from '../../core/cost-centre';
import { ToasterService } from '../../core/toaster.service';
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
import { Employee } from '../employee';
import { EmployeeService } from '../employee.service';
@Component({
selector: 'app-employee-detail',
@ -81,12 +80,14 @@ export class EmployeeDetailComponent implements OnInit, AfterViewInit {
}
listenToIsActiveChanges(): void {
this.form.get('isActive').valueChanges.subscribe((x) => (this.item.isActive = x));
this.form.get('isActive').valueChanges.subscribe((x) => {
this.item.isActive = x;
});
}
save() {
this.ser.saveOrUpdate(this.getItem()).subscribe(
(result) => {
() => {
this.toaster.show('Success', '');
this.router.navigateByUrl('/employees');
},
@ -98,7 +99,7 @@ export class EmployeeDetailComponent implements OnInit, AfterViewInit {
delete() {
this.ser.delete(this.item.id).subscribe(
(result) => {
() => {
this.toaster.show('Success', '');
this.router.navigateByUrl('/employees');
},