comanda.service.ts
755 Bytes
import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { APP_SETTINGS } from "src/etc/AppSettings";
import { Observable } from "rxjs";
@Injectable({
providedIn: "root"
})
export class ComandaService {
private urlDeboSuite: string = APP_SETTINGS.apiDeboSuite;
constructor(private http: HttpClient) { }
getAll(): Observable<any> {
return this.http.get(`${this.urlDeboSuite}/comandas`);
}
updateComanda(id: number, estado: number, observacion: string): Observable<any> {
return this.http.get(`${this.urlDeboSuite}/comandas/update/${id}/${estado}/${observacion}`);
}
getPendientesEntrega() {
return this.http.get(`${this.urlDeboSuite}/comandas/pendientes-entrega`);
}
}