Move Table with confirm

This commit is contained in:
Amritanshu committed 2019-08-10 17:22:25 +05:30
1 parent 4fb8d9118e
commit 2fcff26e34
12 files changed
+248 -33

No files matched your search

@@ -4,6 +4,7 @@ import { catchError } from 'rxjs/operators';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { ErrorLoggerService } from '../../core/error-logger.service';
import { Bill, PrintType } from './bill';
import { Table } from "../../core/table";
const httpOptions = {
headers: new HttpHeaders({'Content-Type': 'application/json'})
@@ -83,4 +84,12 @@ export class VoucherService {
catchError(this.log.handleError(serviceName, 'receivePayment'))
);
}
moveTable(id: string, table: Table): Observable<boolean> {
const options = {params: new HttpParams().set('m', table.id)};
return <Observable<boolean>>this.http.post<boolean>(`${url}/${id}`, {}, options)
.pipe(
catchError(this.log.handleError(serviceName, 'moveTable'))
);
}
}