Commit 6b4867ba1b826b01c65e2d4f0428a7ffd4a98565
1 parent
6b637fa378
Exists in
master
and in
1 other branch
Borrado import sin uso
Showing
1 changed file
with
0 additions
and
1 deletions
Show diff stats
src/app/services/comanda.service.ts
1 | import { Injectable } from "@angular/core"; | 1 | import { Injectable } from "@angular/core"; |
2 | import { HttpClient } from "@angular/common/http"; | 2 | import { HttpClient } from "@angular/common/http"; |
3 | import { appSettings } from "src/etc/AppSettings"; | 3 | import { appSettings } from "src/etc/AppSettings"; |
4 | import { Observable } from "rxjs"; | 4 | import { Observable } from "rxjs"; |
5 | import { Comanda } from '../wrappers/comanda'; | ||
6 | 5 | ||
7 | @Injectable({ | 6 | @Injectable({ |
8 | providedIn: "root" | 7 | providedIn: "root" |
9 | }) | 8 | }) |
10 | export class ComandaService { | 9 | export class ComandaService { |
11 | private apiUrl: string = appSettings.apiUrl; | 10 | private apiUrl: string = appSettings.apiUrl; |
12 | 11 | ||
13 | constructor(private http: HttpClient) { } | 12 | constructor(private http: HttpClient) { } |
14 | 13 | ||
15 | getAll(): Observable<any> { | 14 | getAll(): Observable<any> { |
16 | 15 | ||
17 | return this.http.get(`${this.apiUrl}/comandas`); | 16 | return this.http.get(`${this.apiUrl}/comandas`); |
18 | } | 17 | } |
19 | 18 | ||
20 | updateComanda(id: number, estado: number, observacion: string): Observable<any> { | 19 | updateComanda(id: number, estado: number, observacion: string): Observable<any> { |
21 | 20 | ||
22 | return this.http.get(`${this.apiUrl}/comandas/update/${id}/${estado}/${observacion}`); | 21 | return this.http.get(`${this.apiUrl}/comandas/update/${id}/${estado}/${observacion}`); |
23 | } | 22 | } |
24 | 23 | ||
25 | getPendientesEntrega() { | 24 | getPendientesEntrega() { |
26 | return this.http.get(`${this.apiUrl}/comandas/pendientes-entrega`); | 25 | return this.http.get(`${this.apiUrl}/comandas/pendientes-entrega`); |
27 | } | 26 | } |
28 | } | 27 | } |
29 | 28 |