diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4f354c8..45fa8a3 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -7,6 +7,10 @@ const routes: Routes = [ path: '', loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule) }, + { + path: 'view-evento', + loadChildren: () => import('./view-evento/view-evento.module').then( m => m.ViewEventoPageModule) + }, ]; diff --git a/src/app/perfil-discoteca/perfil-discoteca.page.html b/src/app/perfil-discoteca/perfil-discoteca.page.html index cd694f9..2840b2a 100644 --- a/src/app/perfil-discoteca/perfil-discoteca.page.html +++ b/src/app/perfil-discoteca/perfil-discoteca.page.html @@ -84,7 +84,7 @@
- +
{{evento.nombre}} ยท diff --git a/src/app/perfil-discoteca/perfil-discoteca.page.scss b/src/app/perfil-discoteca/perfil-discoteca.page.scss index 02d61ab..a0df72b 100644 --- a/src/app/perfil-discoteca/perfil-discoteca.page.scss +++ b/src/app/perfil-discoteca/perfil-discoteca.page.scss @@ -61,12 +61,11 @@ } .eventos{ - margin: 20px; - justify-content: space-between; + display:block; } - .evento{ - margin-top: 20px; + .evento:hover{ + background-color: rgb(97, 97, 97); } .eventoHeader{ font-weight: bold; diff --git a/src/app/perfil-discoteca/perfil-discoteca.page.ts b/src/app/perfil-discoteca/perfil-discoteca.page.ts index 9ea5148..74e2432 100644 --- a/src/app/perfil-discoteca/perfil-discoteca.page.ts +++ b/src/app/perfil-discoteca/perfil-discoteca.page.ts @@ -161,6 +161,11 @@ export class PerfilDiscotecaPage implements OnInit { addEvento() { this.router.navigate(['/tabs/tab1/prompt-evento']); } + +mostrarEvento(evento: Evento){ + this.tab1Service.eventoIndex = this.eventos.indexOf(evento); + this.router.navigate(['/tabs/tab1/view-evento']); +} } diff --git a/src/app/prompt-evento/prompt-evento.page.ts b/src/app/prompt-evento/prompt-evento.page.ts index cef30c8..80243b0 100644 --- a/src/app/prompt-evento/prompt-evento.page.ts +++ b/src/app/prompt-evento/prompt-evento.page.ts @@ -42,9 +42,6 @@ export class PromptEventoPage{ if (!this.tab1Service.eventos){ this.tab1Service.initEventos();} this.tab1Service.eventos.push(evento); - for (var i=0; i - view-evento works! -

diff --git a/src/app/view-evento/view-evento.component.ts b/src/app/view-evento/view-evento.component.ts deleted file mode 100644 index c71e99a..0000000 --- a/src/app/view-evento/view-evento.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-view-evento', - templateUrl: './view-evento.component.html', - styleUrls: ['./view-evento.component.scss'], -}) -export class ViewEventoComponent implements OnInit { - - constructor() { } - - ngOnInit() {} - -} diff --git a/src/app/view-evento/view-evento.module.ts b/src/app/view-evento/view-evento.module.ts new file mode 100644 index 0000000..34afdb0 --- /dev/null +++ b/src/app/view-evento/view-evento.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { ViewEventoPageRoutingModule } from './view-evento-routing.module'; + +import { ViewEventoPage } from './view-evento.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + ViewEventoPageRoutingModule + ], + declarations: [ViewEventoPage] +}) +export class ViewEventoPageModule {} diff --git a/src/app/view-evento/view-evento.page.html b/src/app/view-evento/view-evento.page.html new file mode 100644 index 0000000..fbd24ed --- /dev/null +++ b/src/app/view-evento/view-evento.page.html @@ -0,0 +1,9 @@ + + + ViewEvento + + + + + + diff --git a/src/app/view-evento/view-evento.component.scss b/src/app/view-evento/view-evento.page.scss similarity index 100% rename from src/app/view-evento/view-evento.component.scss rename to src/app/view-evento/view-evento.page.scss diff --git a/src/app/view-evento/view-evento.component.spec.ts b/src/app/view-evento/view-evento.page.spec.ts similarity index 57% rename from src/app/view-evento/view-evento.component.spec.ts rename to src/app/view-evento/view-evento.page.spec.ts index 0df046e..b66d23f 100644 --- a/src/app/view-evento/view-evento.component.spec.ts +++ b/src/app/view-evento/view-evento.page.spec.ts @@ -1,19 +1,19 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { ViewEventoComponent } from './view-evento.component'; +import { ViewEventoPage } from './view-evento.page'; -describe('ViewEventoComponent', () => { - let component: ViewEventoComponent; - let fixture: ComponentFixture; +describe('ViewEventoPage', () => { + let component: ViewEventoPage; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ViewEventoComponent ], + declarations: [ ViewEventoPage ], imports: [IonicModule.forRoot()] }).compileComponents(); - fixture = TestBed.createComponent(ViewEventoComponent); + fixture = TestBed.createComponent(ViewEventoPage); component = fixture.componentInstance; fixture.detectChanges(); })); diff --git a/src/app/view-evento/view-evento.page.ts b/src/app/view-evento/view-evento.page.ts new file mode 100644 index 0000000..1fb6d97 --- /dev/null +++ b/src/app/view-evento/view-evento.page.ts @@ -0,0 +1,20 @@ +import { Component, OnInit } from '@angular/core'; +import { Evento } from '../evento'; +import { Tab1Service } from '../tab1/tab1.service'; + +@Component({ + selector: 'app-view-evento', + templateUrl: './view-evento.page.html', + styleUrls: ['./view-evento.page.scss'], +}) +export class ViewEventoPage implements OnInit { + + evento: Evento; + + constructor(private tab1Service: Tab1Service) { } + + ngOnInit() { + this.evento = this.tab1Service.getEventobyIndex(this.tab1Service.eventoIndex); + } + +}