Chore: ng lint using the recommended @angular-eslint style
This commit is contained in:
@ -83,7 +83,9 @@ export class UpdateProductPricesComponent implements OnInit {
|
||||
show() {
|
||||
const info = this.getInfo();
|
||||
const route = ['update-product-prices'];
|
||||
if (info.menuCategoryId !== null) route.push(info.menuCategoryId as string);
|
||||
if (info.menuCategoryId !== null) {
|
||||
route.push(info.menuCategoryId as string);
|
||||
}
|
||||
this.router.navigate(route, {
|
||||
queryParams: {
|
||||
date: info.date,
|
||||
|
||||
@ -23,19 +23,19 @@ export class UpdateProductPricesService {
|
||||
if (date !== null) {
|
||||
options.params = options.params.set('d', date);
|
||||
}
|
||||
return <Observable<UpdateProductPrices>>(
|
||||
this.http
|
||||
.get<UpdateProductPrices>(getUrl, options)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'get')))
|
||||
);
|
||||
return this.http
|
||||
.get<UpdateProductPrices>(getUrl, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'get')),
|
||||
) as Observable<UpdateProductPrices>;
|
||||
}
|
||||
|
||||
save(item: UpdateProductPrices): Observable<UpdateProductPrices> {
|
||||
const saveUrl: string = item.menuCategoryId === null ? url : `${url}/${item.menuCategoryId}`;
|
||||
return <Observable<UpdateProductPrices>>(
|
||||
this.http
|
||||
.post<Product[]>(saveUrl, item)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save')))
|
||||
);
|
||||
return this.http
|
||||
.post<Product[]>(saveUrl, item)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save')),
|
||||
) as Observable<UpdateProductPrices>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user