From f8d83faf5800989825bf206006fc2544a70fde51 Mon Sep 17 00:00:00 2001 From: JOKI6696 Date: Wed, 31 May 2023 18:54:12 -0500 Subject: [PATCH] Correct preparing time format --- burguer-queen/src/app/orders/orders.component.ts | 8 ++------ burguer-queen/src/app/services/api-bq.service.ts | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/burguer-queen/src/app/orders/orders.component.ts b/burguer-queen/src/app/orders/orders.component.ts index 8da9bf1d..ce5a9682 100644 --- a/burguer-queen/src/app/orders/orders.component.ts +++ b/burguer-queen/src/app/orders/orders.component.ts @@ -17,8 +17,6 @@ export class OrdersComponent { verifyUser() { const sessionUser = sessionStorage.getItem('user') if (sessionUser === 'cheff') { return 'none' } else {return 'block'} - - } @@ -74,9 +72,7 @@ export class OrdersComponent { // Convertir tiempo transcurrido de milisegundos a minutos const minutes = Math.floor(timeDelivered / (1000 * 60)); - return minutes; + if (isNaN(minutes)) { return 0 + } else { return minutes} } - - - } diff --git a/burguer-queen/src/app/services/api-bq.service.ts b/burguer-queen/src/app/services/api-bq.service.ts index a2a1e589..27182efc 100644 --- a/burguer-queen/src/app/services/api-bq.service.ts +++ b/burguer-queen/src/app/services/api-bq.service.ts @@ -10,7 +10,7 @@ import { Observable } from 'rxjs';//un observable es un flujo de eventos o datos }) export class ApiBQService { - url:string = "http://localhost:8080/"; + url:string = "https://burgerqueen-db.onrender.com/"; constructor(private http:HttpClient) { }