Compare commits
No commits in common. "3c2976437d7e2e0016409c8f256a040878fa19b2" and "277ad1d88a57265dedae48a611a1ea844364e03e" have entirely different histories.
3c2976437d
...
277ad1d88a
|
@ -33,15 +33,10 @@ const routes: Routes = [
|
|||
{
|
||||
path: 'tabs-user',
|
||||
loadChildren: () => import('./tabs-user/tabs-user.module').then( m => m.TabsUserPageModule)
|
||||
},
|
||||
{
|
||||
},
{
|
||||
path: 'feed',
|
||||
loadChildren: () => import('./feed/feed.module').then( m => m.FeedPageModule)
|
||||
},
|
||||
{
|
||||
path: 'view-evento-cliente',
|
||||
loadChildren: () => import('./view-evento-cliente/view-evento-cliente.module').then( m => m.ViewEventoClientePageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
{{evento.fecha}} ·
|
||||
<ion-icon name="cash-outline"></ion-icon>
|
||||
{{evento.precio1}},{{evento.precio2}}
|
||||
<ion-button (click)="editarEvento(evento);$event.stopPropagation();"><ion-icon name="pencil-outline"></ion-icon></ion-button>
|
||||
</div>
|
||||
<div class="eventoDesc">
|
||||
{{evento.descripcion}}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Eventoi } from '../interfaces/eventoi';
|
||||
import { FeedService } from '../services/feed.service';
|
||||
import { Tab1Service } from '../tab1/tab1.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-feed',
|
||||
|
@ -13,15 +11,10 @@ export class FeedPage implements OnInit {
|
|||
|
||||
eventos: Eventoi[];
|
||||
|
||||
constructor(private feedService:FeedService, private tab1Service: Tab1Service, private router:Router ) { }
|
||||
constructor(private feedService:FeedService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.eventos = this.feedService.eventos;
|
||||
}
|
||||
|
||||
mostrarEvento(evento: Eventoi){
|
||||
this.feedService.eventoIndex = this.eventos.indexOf(evento);
|
||||
this.router.navigate(['/tabsUser/tab2/view-evento-cliente']);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import { ApiService } from './api.service';
|
|||
export class FeedService {
|
||||
|
||||
eventos: Eventoi[];
|
||||
eventoIndex: number;
|
||||
|
||||
constructor(private apiService: ApiService, private router: Router) { }
|
||||
|
||||
|
@ -20,10 +19,4 @@ export class FeedService {
|
|||
this.router.navigate(['/tabsUser'])
|
||||
})
|
||||
}
|
||||
|
||||
getEventoByIndex(eventoIndex: number):Eventoi{
|
||||
return this.eventos[eventoIndex];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,18 +2,11 @@ import { NgModule } from '@angular/core';
|
|||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { FeedPage } from '../feed/feed.page';
|
||||
import { Tab2Page } from './tab2.page';
|
||||
import { ViewEventoClientePage } from '../view-evento-cliente/view-evento-cliente.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: FeedPage,
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
path: 'view-evento-cliente',
|
||||
component: ViewEventoClientePage
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { ViewEventoClientePage } from './view-evento-cliente.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ViewEventoClientePage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class ViewEventoClientePageRoutingModule {}
|
|
@ -1,20 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ViewEventoClientePageRoutingModule } from './view-evento-cliente-routing.module';
|
||||
|
||||
import { ViewEventoClientePage } from './view-evento-cliente.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
ViewEventoClientePageRoutingModule
|
||||
],
|
||||
declarations: [ViewEventoClientePage]
|
||||
})
|
||||
export class ViewEventoClientePageModule {}
|
|
@ -1,26 +0,0 @@
|
|||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>ViewEvento</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-grid>
|
||||
<div class="evento">
|
||||
<ion-row>
|
||||
<div class="eventoHeader">
|
||||
{{evento.nombre}} ·
|
||||
<ion-icon name="calendar-outline"></ion-icon>
|
||||
{{evento.fecha}} ·
|
||||
<ion-icon name="cash-outline"></ion-icon>
|
||||
{{evento.precio1}},{{evento.precio2}}
|
||||
</div>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<div class="eventoDesc">
|
||||
{{evento.descripcion}}
|
||||
</div>
|
||||
</ion-row>
|
||||
</div>
|
||||
</ion-grid>
|
||||
</ion-content>
|
|
@ -1,24 +0,0 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ViewEventoClientePage } from './view-evento-cliente.page';
|
||||
|
||||
describe('ViewEventoClientePage', () => {
|
||||
let component: ViewEventoClientePage;
|
||||
let fixture: ComponentFixture<ViewEventoClientePage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ViewEventoClientePage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ViewEventoClientePage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,19 +0,0 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Eventoi } from '../interfaces/eventoi';
|
||||
import { FeedService } from '../services/feed.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-evento-cliente',
|
||||
templateUrl: './view-evento-cliente.page.html',
|
||||
styleUrls: ['./view-evento-cliente.page.scss'],
|
||||
})
|
||||
export class ViewEventoClientePage implements OnInit {
|
||||
|
||||
evento: Eventoi;
|
||||
constructor(private feedService: FeedService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.evento = this.feedService.getEventoByIndex(this.feedService.eventoIndex);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue