From 1b96d20ddfe4a5a34a2de02e09bc3b9e66a911c8 Mon Sep 17 00:00:00 2001 From: mpuebla Date: Wed, 7 Aug 2019 11:45:57 -0300 Subject: [PATCH] Creado servicio y movidos componentes. --- src/app/app-routing.module.ts | 6 +- src/app/app.module.ts | 22 +++-- .../busqueda-productos.component.html | 1 - .../busqueda-productos.component.scss | 0 .../busqueda-productos.component.spec.ts | 25 ------ .../busqueda-productos.component.ts | 15 ---- src/app/carousel/carousel.component.html | 28 ------- src/app/carousel/carousel.component.scss | 0 src/app/carousel/carousel.component.spec.ts | 25 ------ src/app/carousel/carousel.component.ts | 15 ---- .../busqueda-productos.component.html | 21 +++++ .../busqueda-productos.component.scss | 0 .../busqueda-productos.component.spec.ts | 25 ++++++ .../busqueda-productos.component.ts | 15 ++++ .../components/carousel/carousel.component.html | 28 +++++++ .../components/carousel/carousel.component.scss | 0 .../components/carousel/carousel.component.spec.ts | 25 ++++++ src/app/components/carousel/carousel.component.ts | 15 ++++ src/app/components/header/header.component.html | 3 + src/app/components/header/header.component.scss | 0 src/app/components/header/header.component.spec.ts | 25 ++++++ src/app/components/header/header.component.ts | 15 ++++ src/app/components/home/home.component.html | 47 +++++++++++ src/app/components/home/home.component.scss | 8 ++ src/app/components/home/home.component.spec.ts | 25 ++++++ src/app/components/home/home.component.ts | 21 +++++ src/app/components/inicio/inicio.component.html | 94 ++++++++++++++++++++++ src/app/components/inicio/inicio.component.scss | 0 src/app/components/inicio/inicio.component.spec.ts | 25 ++++++ src/app/components/inicio/inicio.component.ts | 20 +++++ src/app/components/sidebar/sidebar.component.html | 42 ++++++++++ src/app/components/sidebar/sidebar.component.scss | 3 + .../components/sidebar/sidebar.component.spec.ts | 25 ++++++ src/app/components/sidebar/sidebar.component.ts | 15 ++++ src/app/header/header.component.html | 3 - src/app/header/header.component.scss | 0 src/app/header/header.component.spec.ts | 25 ------ src/app/header/header.component.ts | 15 ---- src/app/home/home.component.html | 47 ----------- src/app/home/home.component.scss | 8 -- src/app/home/home.component.spec.ts | 25 ------ src/app/home/home.component.ts | 21 ----- src/app/inicio/inicio.component.html | 94 ---------------------- src/app/inicio/inicio.component.scss | 0 src/app/inicio/inicio.component.spec.ts | 25 ------ src/app/inicio/inicio.component.ts | 20 ----- src/app/services/producto.service.spec.ts | 12 +++ src/app/services/producto.service.ts | 16 ++++ src/app/sidebar/sidebar.component.html | 42 ---------- src/app/sidebar/sidebar.component.scss | 3 - src/app/sidebar/sidebar.component.spec.ts | 25 ------ src/app/sidebar/sidebar.component.ts | 15 ---- 52 files changed, 542 insertions(+), 488 deletions(-) delete mode 100644 src/app/busqueda-productos/busqueda-productos.component.html delete mode 100644 src/app/busqueda-productos/busqueda-productos.component.scss delete mode 100644 src/app/busqueda-productos/busqueda-productos.component.spec.ts delete mode 100644 src/app/busqueda-productos/busqueda-productos.component.ts delete mode 100644 src/app/carousel/carousel.component.html delete mode 100644 src/app/carousel/carousel.component.scss delete mode 100644 src/app/carousel/carousel.component.spec.ts delete mode 100644 src/app/carousel/carousel.component.ts create mode 100644 src/app/components/busqueda-productos/busqueda-productos.component.html create mode 100644 src/app/components/busqueda-productos/busqueda-productos.component.scss create mode 100644 src/app/components/busqueda-productos/busqueda-productos.component.spec.ts create mode 100644 src/app/components/busqueda-productos/busqueda-productos.component.ts create mode 100644 src/app/components/carousel/carousel.component.html create mode 100644 src/app/components/carousel/carousel.component.scss create mode 100644 src/app/components/carousel/carousel.component.spec.ts create mode 100644 src/app/components/carousel/carousel.component.ts create mode 100644 src/app/components/header/header.component.html create mode 100644 src/app/components/header/header.component.scss create mode 100644 src/app/components/header/header.component.spec.ts create mode 100644 src/app/components/header/header.component.ts create mode 100644 src/app/components/home/home.component.html create mode 100644 src/app/components/home/home.component.scss create mode 100644 src/app/components/home/home.component.spec.ts create mode 100644 src/app/components/home/home.component.ts create mode 100644 src/app/components/inicio/inicio.component.html create mode 100644 src/app/components/inicio/inicio.component.scss create mode 100644 src/app/components/inicio/inicio.component.spec.ts create mode 100644 src/app/components/inicio/inicio.component.ts create mode 100644 src/app/components/sidebar/sidebar.component.html create mode 100644 src/app/components/sidebar/sidebar.component.scss create mode 100644 src/app/components/sidebar/sidebar.component.spec.ts create mode 100644 src/app/components/sidebar/sidebar.component.ts delete mode 100644 src/app/header/header.component.html delete mode 100644 src/app/header/header.component.scss delete mode 100644 src/app/header/header.component.spec.ts delete mode 100644 src/app/header/header.component.ts delete mode 100644 src/app/home/home.component.html delete mode 100644 src/app/home/home.component.scss delete mode 100644 src/app/home/home.component.spec.ts delete mode 100644 src/app/home/home.component.ts delete mode 100644 src/app/inicio/inicio.component.html delete mode 100644 src/app/inicio/inicio.component.scss delete mode 100644 src/app/inicio/inicio.component.spec.ts delete mode 100644 src/app/inicio/inicio.component.ts create mode 100644 src/app/services/producto.service.spec.ts create mode 100644 src/app/services/producto.service.ts delete mode 100644 src/app/sidebar/sidebar.component.html delete mode 100644 src/app/sidebar/sidebar.component.scss delete mode 100644 src/app/sidebar/sidebar.component.spec.ts delete mode 100644 src/app/sidebar/sidebar.component.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 53084e5..a717055 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,8 +1,8 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { InicioComponent } from './inicio/inicio.component'; -import { BusquedaProductosComponent } from './busqueda-productos/busqueda-productos.component'; +import { HomeComponent } from './components/home/home.component'; +import { InicioComponent } from './components/inicio/inicio.component'; +import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component'; const routes: Routes = [ { path: 'home', component: HomeComponent }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0bb1471..60cf6f0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,14 +1,19 @@ +//#region MODULES import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; - import { AppRoutingModule } from './app-routing.module'; +import { HttpClientModule } from '@angular/common/http'; +//#endregion + +//#region COMPONENTS import { AppComponent } from './app.component'; -import { HeaderComponent } from './header/header.component'; -import { SidebarComponent } from './sidebar/sidebar.component'; -import { CarouselComponent } from './carousel/carousel.component'; -import { HomeComponent } from './home/home.component'; -import { InicioComponent } from './inicio/inicio.component'; -import { BusquedaProductosComponent } from './busqueda-productos/busqueda-productos.component'; +import { HeaderComponent } from './components/header/header.component'; +import { SidebarComponent } from './components/sidebar/sidebar.component'; +import { CarouselComponent } from './components/carousel/carousel.component'; +import { HomeComponent } from './components/home/home.component'; +import { InicioComponent } from './components/inicio/inicio.component'; +import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component'; +//#endregion @NgModule({ declarations: [ @@ -22,7 +27,8 @@ import { BusquedaProductosComponent } from './busqueda-productos/busqueda-produc ], imports: [ BrowserModule, - AppRoutingModule + AppRoutingModule, + HttpClientModule ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/busqueda-productos/busqueda-productos.component.html b/src/app/busqueda-productos/busqueda-productos.component.html deleted file mode 100644 index 45c72b6..0000000 --- a/src/app/busqueda-productos/busqueda-productos.component.html +++ /dev/null @@ -1 +0,0 @@ -

busqueda-productos works!

diff --git a/src/app/busqueda-productos/busqueda-productos.component.scss b/src/app/busqueda-productos/busqueda-productos.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/busqueda-productos/busqueda-productos.component.spec.ts b/src/app/busqueda-productos/busqueda-productos.component.spec.ts deleted file mode 100644 index ae313b1..0000000 --- a/src/app/busqueda-productos/busqueda-productos.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BusquedaProductosComponent } from './busqueda-productos.component'; - -describe('BusquedaProductosComponent', () => { - let component: BusquedaProductosComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ BusquedaProductosComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(BusquedaProductosComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/busqueda-productos/busqueda-productos.component.ts b/src/app/busqueda-productos/busqueda-productos.component.ts deleted file mode 100644 index cd705f3..0000000 --- a/src/app/busqueda-productos/busqueda-productos.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-busqueda-productos', - templateUrl: './busqueda-productos.component.html', - styleUrls: ['./busqueda-productos.component.scss'] -}) -export class BusquedaProductosComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} diff --git a/src/app/carousel/carousel.component.html b/src/app/carousel/carousel.component.html deleted file mode 100644 index 396440c..0000000 --- a/src/app/carousel/carousel.component.html +++ /dev/null @@ -1,28 +0,0 @@ - \ No newline at end of file diff --git a/src/app/carousel/carousel.component.scss b/src/app/carousel/carousel.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/carousel/carousel.component.spec.ts b/src/app/carousel/carousel.component.spec.ts deleted file mode 100644 index 4d935d7..0000000 --- a/src/app/carousel/carousel.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { CarouselComponent } from './carousel.component'; - -describe('CarouselComponent', () => { - let component: CarouselComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ CarouselComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CarouselComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/carousel/carousel.component.ts b/src/app/carousel/carousel.component.ts deleted file mode 100644 index c05dba6..0000000 --- a/src/app/carousel/carousel.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-carousel', - templateUrl: './carousel.component.html', - styleUrls: ['./carousel.component.scss'] -}) -export class CarouselComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} diff --git a/src/app/components/busqueda-productos/busqueda-productos.component.html b/src/app/components/busqueda-productos/busqueda-productos.component.html new file mode 100644 index 0000000..d6352b5 --- /dev/null +++ b/src/app/components/busqueda-productos/busqueda-productos.component.html @@ -0,0 +1,21 @@ +
+
+ + + + +
+
+

Búsqueda

+
+
+ +
+ +
+ +
+ + + +
\ No newline at end of file diff --git a/src/app/components/busqueda-productos/busqueda-productos.component.scss b/src/app/components/busqueda-productos/busqueda-productos.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/busqueda-productos/busqueda-productos.component.spec.ts b/src/app/components/busqueda-productos/busqueda-productos.component.spec.ts new file mode 100644 index 0000000..ae313b1 --- /dev/null +++ b/src/app/components/busqueda-productos/busqueda-productos.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BusquedaProductosComponent } from './busqueda-productos.component'; + +describe('BusquedaProductosComponent', () => { + let component: BusquedaProductosComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BusquedaProductosComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BusquedaProductosComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/busqueda-productos/busqueda-productos.component.ts b/src/app/components/busqueda-productos/busqueda-productos.component.ts new file mode 100644 index 0000000..cd705f3 --- /dev/null +++ b/src/app/components/busqueda-productos/busqueda-productos.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-busqueda-productos', + templateUrl: './busqueda-productos.component.html', + styleUrls: ['./busqueda-productos.component.scss'] +}) +export class BusquedaProductosComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/components/carousel/carousel.component.html b/src/app/components/carousel/carousel.component.html new file mode 100644 index 0000000..396440c --- /dev/null +++ b/src/app/components/carousel/carousel.component.html @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/src/app/components/carousel/carousel.component.scss b/src/app/components/carousel/carousel.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/carousel/carousel.component.spec.ts b/src/app/components/carousel/carousel.component.spec.ts new file mode 100644 index 0000000..4d935d7 --- /dev/null +++ b/src/app/components/carousel/carousel.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CarouselComponent } from './carousel.component'; + +describe('CarouselComponent', () => { + let component: CarouselComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CarouselComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CarouselComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/carousel/carousel.component.ts b/src/app/components/carousel/carousel.component.ts new file mode 100644 index 0000000..c05dba6 --- /dev/null +++ b/src/app/components/carousel/carousel.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-carousel', + templateUrl: './carousel.component.html', + styleUrls: ['./carousel.component.scss'] +}) +export class CarouselComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html new file mode 100644 index 0000000..484eea2 --- /dev/null +++ b/src/app/components/header/header.component.html @@ -0,0 +1,3 @@ +
+

HEADER

+
\ No newline at end of file diff --git a/src/app/components/header/header.component.scss b/src/app/components/header/header.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/header/header.component.spec.ts b/src/app/components/header/header.component.spec.ts new file mode 100644 index 0000000..8ed8130 --- /dev/null +++ b/src/app/components/header/header.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HeaderComponent } from './header.component'; + +describe('HeaderComponent', () => { + let component: HeaderComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HeaderComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HeaderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/header/header.component.ts b/src/app/components/header/header.component.ts new file mode 100644 index 0000000..591e148 --- /dev/null +++ b/src/app/components/header/header.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-header', + templateUrl: './header.component.html', + styleUrls: ['./header.component.scss'] +}) +export class HeaderComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/components/home/home.component.html b/src/app/components/home/home.component.html new file mode 100644 index 0000000..5d15e68 --- /dev/null +++ b/src/app/components/home/home.component.html @@ -0,0 +1,47 @@ +
+
+
+
+ + +
+

HEADER

+
+ +
+
+
+
+ + +
+
+
+

¡BIENVENIDO!

+

Toque la pantalla
para comenzar.

+
+
+
+
+ + +
+

FOOTER

+
+
+
+
+
\ No newline at end of file diff --git a/src/app/components/home/home.component.scss b/src/app/components/home/home.component.scss new file mode 100644 index 0000000..a9edeff --- /dev/null +++ b/src/app/components/home/home.component.scss @@ -0,0 +1,8 @@ +.background-image { + background-image: url(http://www.nortecorrientes.com/content/bucket/7/304027w980.jpg); + background-repeat: no-repeat; + background-size: cover; + position: absolute; + width: 100%; + height: 100%; +} diff --git a/src/app/components/home/home.component.spec.ts b/src/app/components/home/home.component.spec.ts new file mode 100644 index 0000000..bdc59df --- /dev/null +++ b/src/app/components/home/home.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomeComponent } from './home.component'; + +describe('HomeComponent', () => { + let component: HomeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HomeComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HomeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/home/home.component.ts b/src/app/components/home/home.component.ts new file mode 100644 index 0000000..6b8d768 --- /dev/null +++ b/src/app/components/home/home.component.ts @@ -0,0 +1,21 @@ +import { Component, OnInit, HostListener } from '@angular/core'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'] +}) +export class HomeComponent implements OnInit { + + constructor(private router: Router) { } + + ngOnInit() { + } + + @HostListener('document:click', ['$event']) + documentClick(event: MouseEvent) { + this.router.navigate(['/inicio']); + } + +} diff --git a/src/app/components/inicio/inicio.component.html b/src/app/components/inicio/inicio.component.html new file mode 100644 index 0000000..3f645c1 --- /dev/null +++ b/src/app/components/inicio/inicio.component.html @@ -0,0 +1,94 @@ +
+
+ + + + +
+
+

Inicio

+
+
+ +
+
+ + +
+
+

Promociones

+

Conozca las ofertas del momento.

+
+ +
+ + +
+
+

Ordenar

+

Arme su pedido y solo pase a retirar.

+
+ +
+ +
+ +
+ + +
+
+

Cargar Productos

+

+ Coloque el código de
+ barras o QR frente al scanner. +

+
+
+ +
+

Galletas Oreo x117 grs Chocolate.

+

COD. 12121222

+
+
+
+ + +
+
+

Buscar Productos

+

+ Busque aquí los productos
+ que no tienen código +

+
+
+ +
+ +
+ +
+ + + +
\ No newline at end of file diff --git a/src/app/components/inicio/inicio.component.scss b/src/app/components/inicio/inicio.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/inicio/inicio.component.spec.ts b/src/app/components/inicio/inicio.component.spec.ts new file mode 100644 index 0000000..86b65f6 --- /dev/null +++ b/src/app/components/inicio/inicio.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { InicioComponent } from './inicio.component'; + +describe('InicioComponent', () => { + let component: InicioComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ InicioComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(InicioComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/inicio/inicio.component.ts b/src/app/components/inicio/inicio.component.ts new file mode 100644 index 0000000..1e01dcc --- /dev/null +++ b/src/app/components/inicio/inicio.component.ts @@ -0,0 +1,20 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'app-inicio', + templateUrl: './inicio.component.html', + styleUrls: ['./inicio.component.scss'] +}) +export class InicioComponent implements OnInit { + + constructor(private router: Router) { } + + ngOnInit() { + } + + private goPage(pageUrl) { + this.router.navigate([pageUrl]); + } + +} diff --git a/src/app/components/sidebar/sidebar.component.html b/src/app/components/sidebar/sidebar.component.html new file mode 100644 index 0000000..1241543 --- /dev/null +++ b/src/app/components/sidebar/sidebar.component.html @@ -0,0 +1,42 @@ +
+ +

Mi compra

+
+
+ ... +
+
+

Galleta oreo x 199 gs Chocolate

+

COD: 1234567

+
+
+ {{90 | currency}} +
+
+
+
+ + +
+ + + +
+
+
+
+
+ +
+
+
+

(1) item

+

Total

+

{{5000 | currency}}

+
+
+ + +
+
+
\ No newline at end of file diff --git a/src/app/components/sidebar/sidebar.component.scss b/src/app/components/sidebar/sidebar.component.scss new file mode 100644 index 0000000..d2b8114 --- /dev/null +++ b/src/app/components/sidebar/sidebar.component.scss @@ -0,0 +1,3 @@ +.card-description{ + font-size: 12px; +} \ No newline at end of file diff --git a/src/app/components/sidebar/sidebar.component.spec.ts b/src/app/components/sidebar/sidebar.component.spec.ts new file mode 100644 index 0000000..f90fbce --- /dev/null +++ b/src/app/components/sidebar/sidebar.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SidebarComponent } from './sidebar.component'; + +describe('SidebarComponent', () => { + let component: SidebarComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SidebarComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SidebarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/sidebar/sidebar.component.ts b/src/app/components/sidebar/sidebar.component.ts new file mode 100644 index 0000000..60de369 --- /dev/null +++ b/src/app/components/sidebar/sidebar.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-sidebar', + templateUrl: './sidebar.component.html', + styleUrls: ['./sidebar.component.scss'] +}) +export class SidebarComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html deleted file mode 100644 index 484eea2..0000000 --- a/src/app/header/header.component.html +++ /dev/null @@ -1,3 +0,0 @@ -
-

HEADER

-
\ No newline at end of file diff --git a/src/app/header/header.component.scss b/src/app/header/header.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/header/header.component.spec.ts b/src/app/header/header.component.spec.ts deleted file mode 100644 index 8ed8130..0000000 --- a/src/app/header/header.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HeaderComponent } from './header.component'; - -describe('HeaderComponent', () => { - let component: HeaderComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [HeaderComponent] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(HeaderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts deleted file mode 100644 index 591e148..0000000 --- a/src/app/header/header.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-header', - templateUrl: './header.component.html', - styleUrls: ['./header.component.scss'] -}) -export class HeaderComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html deleted file mode 100644 index 5d15e68..0000000 --- a/src/app/home/home.component.html +++ /dev/null @@ -1,47 +0,0 @@ -
-
-
-
- - -
-

HEADER

-
- -
-
-
-
- - -
-
-
-

¡BIENVENIDO!

-

Toque la pantalla
para comenzar.

-
-
-
-
- - -
-

FOOTER

-
-
-
-
-
\ No newline at end of file diff --git a/src/app/home/home.component.scss b/src/app/home/home.component.scss deleted file mode 100644 index a9edeff..0000000 --- a/src/app/home/home.component.scss +++ /dev/null @@ -1,8 +0,0 @@ -.background-image { - background-image: url(http://www.nortecorrientes.com/content/bucket/7/304027w980.jpg); - background-repeat: no-repeat; - background-size: cover; - position: absolute; - width: 100%; - height: 100%; -} diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts deleted file mode 100644 index bdc59df..0000000 --- a/src/app/home/home.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HomeComponent } from './home.component'; - -describe('HomeComponent', () => { - let component: HomeComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [HomeComponent] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(HomeComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts deleted file mode 100644 index 6b8d768..0000000 --- a/src/app/home/home.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, OnInit, HostListener } from '@angular/core'; -import { Router } from '@angular/router'; - -@Component({ - selector: 'app-home', - templateUrl: './home.component.html', - styleUrls: ['./home.component.scss'] -}) -export class HomeComponent implements OnInit { - - constructor(private router: Router) { } - - ngOnInit() { - } - - @HostListener('document:click', ['$event']) - documentClick(event: MouseEvent) { - this.router.navigate(['/inicio']); - } - -} diff --git a/src/app/inicio/inicio.component.html b/src/app/inicio/inicio.component.html deleted file mode 100644 index 3f645c1..0000000 --- a/src/app/inicio/inicio.component.html +++ /dev/null @@ -1,94 +0,0 @@ -
-
- - - - -
-
-

Inicio

-
-
- -
-
- - -
-
-

Promociones

-

Conozca las ofertas del momento.

-
- -
- - -
-
-

Ordenar

-

Arme su pedido y solo pase a retirar.

-
- -
- -
- -
- - -
-
-

Cargar Productos

-

- Coloque el código de
- barras o QR frente al scanner. -

-
-
- -
-

Galletas Oreo x117 grs Chocolate.

-

COD. 12121222

-
-
-
- - -
-
-

Buscar Productos

-

- Busque aquí los productos
- que no tienen código -

-
-
- -
- -
- -
- - - -
\ No newline at end of file diff --git a/src/app/inicio/inicio.component.scss b/src/app/inicio/inicio.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/inicio/inicio.component.spec.ts b/src/app/inicio/inicio.component.spec.ts deleted file mode 100644 index 86b65f6..0000000 --- a/src/app/inicio/inicio.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { InicioComponent } from './inicio.component'; - -describe('InicioComponent', () => { - let component: InicioComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ InicioComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(InicioComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/inicio/inicio.component.ts b/src/app/inicio/inicio.component.ts deleted file mode 100644 index 1e01dcc..0000000 --- a/src/app/inicio/inicio.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; - -@Component({ - selector: 'app-inicio', - templateUrl: './inicio.component.html', - styleUrls: ['./inicio.component.scss'] -}) -export class InicioComponent implements OnInit { - - constructor(private router: Router) { } - - ngOnInit() { - } - - private goPage(pageUrl) { - this.router.navigate([pageUrl]); - } - -} diff --git a/src/app/services/producto.service.spec.ts b/src/app/services/producto.service.spec.ts new file mode 100644 index 0000000..5ad3fc5 --- /dev/null +++ b/src/app/services/producto.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { ProductoService } from './producto.service'; + +describe('ProductoService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: ProductoService = TestBed.get(ProductoService); + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/producto.service.ts b/src/app/services/producto.service.ts new file mode 100644 index 0000000..33057f5 --- /dev/null +++ b/src/app/services/producto.service.ts @@ -0,0 +1,16 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class ProductoService { + + constructor(private http: HttpClient) { } + + getAll(): Observable { + return this.http.get('http://10.231.45.179:4705/autoservicio/articulos') + } + +} diff --git a/src/app/sidebar/sidebar.component.html b/src/app/sidebar/sidebar.component.html deleted file mode 100644 index 1241543..0000000 --- a/src/app/sidebar/sidebar.component.html +++ /dev/null @@ -1,42 +0,0 @@ -
- -

Mi compra

-
-
- ... -
-
-

Galleta oreo x 199 gs Chocolate

-

COD: 1234567

-
-
- {{90 | currency}} -
-
-
-
- - -
- - - -
-
-
-
-
- -
-
-
-

(1) item

-

Total

-

{{5000 | currency}}

-
-
- - -
-
-
\ No newline at end of file diff --git a/src/app/sidebar/sidebar.component.scss b/src/app/sidebar/sidebar.component.scss deleted file mode 100644 index d2b8114..0000000 --- a/src/app/sidebar/sidebar.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.card-description{ - font-size: 12px; -} \ No newline at end of file diff --git a/src/app/sidebar/sidebar.component.spec.ts b/src/app/sidebar/sidebar.component.spec.ts deleted file mode 100644 index f90fbce..0000000 --- a/src/app/sidebar/sidebar.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { SidebarComponent } from './sidebar.component'; - -describe('SidebarComponent', () => { - let component: SidebarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SidebarComponent] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(SidebarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/sidebar/sidebar.component.ts b/src/app/sidebar/sidebar.component.ts deleted file mode 100644 index 60de369..0000000 --- a/src/app/sidebar/sidebar.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-sidebar', - templateUrl: './sidebar.component.html', - styleUrls: ['./sidebar.component.scss'] -}) -export class SidebarComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} -- 1.9.1