Chore: Check for deprecations using eslint plugin

Chore: environment file replacement stopped.
Chore: All components are now standalone and removed all modules
Chore: App routing is now in app.routes and similarly for all submodules
Chore: Http interceptors are now functional and split refresh interceptor into a separate one.
This commit is contained in:
2024-05-31 22:54:41 +05:30
parent b6bb3dbcfd
commit 4571b31fc0
309 changed files with 3897 additions and 5222 deletions
@@ -1,7 +1,29 @@
import { AsyncPipe } from '@angular/common';
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteSelectedEvent, MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete';
import { MatButton } from '@angular/material/button';
import { MatCard, MatCardHeader, MatCardTitle, MatCardContent, MatCardActions } from '@angular/material/card';
import { MatChipSet, MatChipOption } from '@angular/material/chips';
import { MatOption } from '@angular/material/core';
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
import { MatDialog } from '@angular/material/dialog';
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
import { MatIcon } from '@angular/material/icon';
import { MatInput } from '@angular/material/input';
import { MatSelect } from '@angular/material/select';
import {
MatTable,
MatColumnDef,
MatHeaderCellDef,
MatHeaderCell,
MatCellDef,
MatCell,
MatHeaderRowDef,
MatHeaderRow,
MatRowDef,
MatRow,
} from '@angular/material/table';
import { ActivatedRoute, Router } from '@angular/router';
import moment from 'moment';
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
@@ -22,6 +44,41 @@ import { EmployeeAttendanceService } from './employee-attendance.service';
selector: 'app-employee-attendance',
templateUrl: './employee-attendance.component.html',
styleUrls: ['./employee-attendance.component.css'],
standalone: true,
imports: [
MatCard,
MatCardHeader,
MatCardTitle,
MatCardContent,
ReactiveFormsModule,
MatFormField,
MatLabel,
MatInput,
MatDatepickerInput,
MatDatepickerToggle,
MatSuffix,
MatDatepicker,
MatAutocompleteTrigger,
MatAutocomplete,
MatOption,
MatButton,
MatTable,
MatColumnDef,
MatHeaderCellDef,
MatHeaderCell,
MatCellDef,
MatCell,
MatSelect,
MatIcon,
MatChipSet,
MatChipOption,
MatHeaderRowDef,
MatHeaderRow,
MatRowDef,
MatRow,
MatCardActions,
AsyncPipe,
],
})
export class EmployeeAttendanceComponent implements OnInit, AfterViewInit {
@ViewChild('employeeElement', { static: true }) employeeElement?: ElementRef;
@@ -129,14 +186,14 @@ export class EmployeeAttendanceComponent implements OnInit, AfterViewInit {
}
save() {
this.ser.save(this.getEmployeeAttendance()).subscribe(
() => {
this.ser.save(this.getEmployeeAttendance()).subscribe({
next: () => {
this.toaster.show('Success', '');
},
(error) => {
error: (error) => {
this.toaster.show('Danger', error);
},
);
});
}
getEmployeeAttendance(): EmployeeAttendance {