Commit 4b786a5e by Alex

test

parent 735a070f
......@@ -19,13 +19,13 @@ describe('AppComponent', () => {
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
/*
it(`should have as title 'ProyectoRobotAmbientales'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('ProyectoRobotAmbientales');
});
*/
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
......
......@@ -29,7 +29,7 @@ constructor(private pedidoService: ServicioPedidoService) {}
*
* @param event Objeto que contiene el ID del bloque y sus coordenadas de fila y columna.
*/
enCeldaSeleccionada(event: {id: string, row: number, col: number}): void {
enCeldaSeleccionada(event: {id: string, row: number, col: number}): void {
if (!this.puntoDeRecogida) {
this.puntoDeRecogida = event;
// Actualiza los estilos de resaltado aquí si es necesario
......@@ -68,15 +68,13 @@ enCeldaSeleccionada(event: {id: string, row: number, col: number}): void {
confirmarSeleccion(): void {
if (this.puntoDeRecogida && this.puntoDeEntrega) {
// Genera un ID único para el pedido, por ejemplo usando la fecha y hora actual.
// Esto es solo un ejemplo y puede que necesites una mejor generación de IDs según tu caso de uso.
const uniqueId = Date.now().toString();
const nuevoPedido: Pedido = {
id: uniqueId,
puntoDeRecogida: this.puntoDeRecogida,
puntoDeEntrega: this.puntoDeEntrega
// ... otras propiedades necesarias del pedido ...
};
};
this.pedidoService.agregarPedido(nuevoPedido);
this.resetearSeleccion(); // Resetear selección tras confirmar el pedido
}
......
......@@ -38,7 +38,7 @@ export class MapaService {
}
/**
* @brief Obtiene la ruta de imagen asociada con un ID de bloque específico.
* @brief Obtiene la ruta de imagen asociada con un ID de la casilla específica.
*
* Este método público accede al mapa de ID de bloque a ruta de imagen y
* devuelve la ruta de la imagen correspondiente.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment