Updated to angular 11
Now compiling with strict mode in typescript Need to error checking now
This commit is contained in:
@ -17,7 +17,11 @@ const serviceName = 'CashierReportService';
|
||||
export class CashierReportService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
|
||||
list(id: string, startDate: string, finishDate): Observable<CashierReport> {
|
||||
list(
|
||||
id: string | null,
|
||||
startDate: string | null,
|
||||
finishDate: string | null,
|
||||
): Observable<CashierReport> {
|
||||
const listUrl = id === null ? url : `${url}/${id}`;
|
||||
const options = { params: new HttpParams() };
|
||||
if (startDate !== null) {
|
||||
@ -33,7 +37,7 @@ export class CashierReportService {
|
||||
);
|
||||
}
|
||||
|
||||
activeCashiers(startDate: string, finishDate): Observable<User[]> {
|
||||
activeCashiers(startDate: string | null, finishDate: string | null): Observable<User[]> {
|
||||
const options = { params: new HttpParams() };
|
||||
if (startDate !== null) {
|
||||
options.params = options.params.set('s', startDate);
|
||||
@ -47,7 +51,7 @@ export class CashierReportService {
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'activeCashiers')));
|
||||
}
|
||||
|
||||
print(id: string, startDate: string, finishDate): Observable<boolean> {
|
||||
print(id: string, startDate: string | null, finishDate: string | null): Observable<boolean> {
|
||||
const printUrl = `${url}/print/${id}`;
|
||||
const options = { params: new HttpParams() };
|
||||
if (startDate !== null) {
|
||||
|
||||
Reference in New Issue
Block a user