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:
@ -2,14 +2,17 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { AttendanceDataSource } from './attendance-datasource';
|
||||
import * as moment from 'moment';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
import { AttendanceService } from './attendance.service';
|
||||
|
||||
import { Attendance } from './attendance';
|
||||
import { AttendanceDataSource } from './attendance-datasource';
|
||||
import { AttendanceItem } from './attendance-item';
|
||||
import { AttendanceType } from './attendance-type';
|
||||
import { Attendance, AttendanceItem } from './attendance';
|
||||
import { AttendanceService } from './attendance.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendance',
|
||||
@ -68,7 +71,7 @@ export class AttendanceComponent implements OnInit {
|
||||
getClass(index: number) {
|
||||
const array = this.form.get('attendances') as FormArray;
|
||||
const id = array.controls[index].value.attendanceType;
|
||||
const name: string = this.attendanceTypes.filter((x) => x.id === id)[0].name;
|
||||
const { name } = this.attendanceTypes.filter((x) => x.id === id)[0];
|
||||
return name.toLowerCase().replace(/(\s+\+\s+)|(\s+)/g, '-');
|
||||
}
|
||||
|
||||
@ -79,7 +82,7 @@ export class AttendanceComponent implements OnInit {
|
||||
|
||||
save() {
|
||||
this.ser.save(this.getAttendance()).subscribe(
|
||||
(result) => {
|
||||
() => {
|
||||
this.toaster.show('Success', '');
|
||||
},
|
||||
(error) => {
|
||||
|
||||
Reference in New Issue
Block a user