Move Table with confirm
This commit is contained in:
@ -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'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user