From dca38179bb942ab70e46efea9d30a234e2a5f231 Mon Sep 17 00:00:00 2001 From: onsaliyo Date: Wed, 10 Feb 2021 15:45:25 +0100 Subject: [PATCH] mejorado el look del evento form --- .../prompt-evento-routing.module.ts | 4 ++- src/app/prompt-evento/prompt-evento.page.html | 25 ++++++++++--------- src/app/prompt-evento/prompt-evento.page.scss | 20 ++++++++++++--- src/app/prompt-evento/prompt-evento.page.ts | 16 ++++++------ src/app/tab1/tab1-routing.module.ts | 8 +++++- 5 files changed, 47 insertions(+), 26 deletions(-) diff --git a/src/app/prompt-evento/prompt-evento-routing.module.ts b/src/app/prompt-evento/prompt-evento-routing.module.ts index 01e3a70..e8162d4 100644 --- a/src/app/prompt-evento/prompt-evento-routing.module.ts +++ b/src/app/prompt-evento/prompt-evento-routing.module.ts @@ -7,7 +7,9 @@ const routes: Routes = [ { path: '', component: PromptEventoPage - } + }, + + ]; @NgModule({ diff --git a/src/app/prompt-evento/prompt-evento.page.html b/src/app/prompt-evento/prompt-evento.page.html index 4590699..a831e5f 100644 --- a/src/app/prompt-evento/prompt-evento.page.html +++ b/src/app/prompt-evento/prompt-evento.page.html @@ -7,33 +7,34 @@
-
+ -
+ -
+ -
+ -
- -
-
+ -
+ + + + +
diff --git a/src/app/prompt-evento/prompt-evento.page.scss b/src/app/prompt-evento/prompt-evento.page.scss index 749ffa2..48ce5fa 100644 --- a/src/app/prompt-evento/prompt-evento.page.scss +++ b/src/app/prompt-evento/prompt-evento.page.scss @@ -1,12 +1,24 @@ *{ - --ion-text-color: #000000; - padding: 5px; + --ion-text-color: #fbffc4; + padding: 15px; letter-spacing: 2px; } -.campoInput{ - display: block; +ion-item{ + text-align: center; + color: wheat, } +input{ + display: inline-block; + text-align: left; + color: black; +} + +label{ + display: inline-block; + text-align: left; + color: wheat, +} diff --git a/src/app/prompt-evento/prompt-evento.page.ts b/src/app/prompt-evento/prompt-evento.page.ts index 77163c3..a16cc58 100644 --- a/src/app/prompt-evento/prompt-evento.page.ts +++ b/src/app/prompt-evento/prompt-evento.page.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; import { Tab1Service } from '../tab1/tab1.service'; import { Evento } from '../evento'; import { Router } from '@angular/router'; @@ -11,12 +11,12 @@ import { Router } from '@angular/router'; }) export class PromptEventoPage implements OnInit{ eventoForm = new FormGroup({ - nombre: new FormControl(''), - fecha: new FormControl(''), - hora: new FormControl(''), - precio1: new FormControl(''), - precio2: new FormControl(''), - descripcion: new FormControl('') + nombre: new FormControl('', Validators.required), + fecha: new FormControl('', Validators.required), + hora: new FormControl('', Validators.required), + precio1: new FormControl('', Validators.required), + precio2: new FormControl('', Validators.required), + descripcion: new FormControl('', Validators.required), }); eventos: Evento[]; @@ -33,7 +33,7 @@ export class PromptEventoPage implements OnInit{ onSubmit(){ let evento = new Evento(); this.asignarEvento(evento); - this.router.navigate(['/tabs/tab1/perfil-discoteca']); + this.router.navigate(['/tabs']); } asignarEvento(evento: Evento){ evento.setNombre(this.eventoForm.get('nombre').value); diff --git a/src/app/tab1/tab1-routing.module.ts b/src/app/tab1/tab1-routing.module.ts index 19fb6ff..5da7584 100644 --- a/src/app/tab1/tab1-routing.module.ts +++ b/src/app/tab1/tab1-routing.module.ts @@ -9,9 +9,15 @@ const routes: Routes = [ { - path: '', + path: 'perfil-discoteca', component: PerfilDiscotecaPage }, + + { + path: '', + redirectTo: 'perfil-discoteca', + pathMatch: 'full,' + }, { path: 'prompt-evento',