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

@ -1,13 +1,11 @@
import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { catchError } from 'rxjs/operators';
import { Observable } from 'rxjs/internal/Observable';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { CashFlow } from './cash-flow';
import { catchError } from 'rxjs/operators';
import { ErrorLoggerService } from '../core/error-logger.service';
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
};
import { CashFlow } from './cash-flow';
const url = '/api/cash-flow';
const serviceName = 'CashFlowService';
@ -26,7 +24,14 @@ export class CashFlowService {
if (finishDate !== null) {
options.params = options.params.set('f', finishDate);
}
const listUrl = id === null ? (startDate || finishDate ? `${url}/data` : url) : `${url}/${id}`;
let listUrl = '';
if (id !== null) {
listUrl = `${url}/${id}`;
} else if (startDate || finishDate) {
listUrl = `${url}/data`;
} else {
listUrl = url;
}
return <Observable<CashFlow>>(
this.http
.get<CashFlow>(listUrl, options)