Skip to content

Commit c1eef72

Browse files
author
Genaro Salas
committed
Retoques css y muestra mensaje cuando no obtiene resultados
1 parent 51d32a2 commit c1eef72

9 files changed

+47
-11
lines changed

src/app/components/crear-evento/crear-evento.component.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
border: 3px solid black;
5050
border-radius: 8px;
5151
padding: .4rem .2rem;
52-
min-width: 300px;
52+
width: 300px;
5353
}
5454

5555
.contenedor-crear form textarea{

src/app/components/crear-evento/crear-evento.component.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121
</div>
2222
<div class="input-container">
2323
<select formControlName="idUbicacion" >
24+
<option value="" selected="selected">Seleccione Ubicación</option>
2425
<option *ngFor="let ubicacion of ubicaciones" value="{{ubicacion.idUbicacion}}" >{{ubicacion.nombre}}</option> <!-- El value puede ser el ID --->
2526
</select>
26-
<strong class="add-button">Añadir ubicación <i class="bi bi-geo-alt-fill"></i></strong>
27+
<strong class="add-button" (click)="anadirUbicacion()">Añadir ubicación <i class="bi bi-geo-alt-fill"></i></strong>
2728
<p *ngIf="!this.validar('idUbicacion')" class="error">Ubicaciones</p>
2829
</div>
2930
<div class="input-container">
3031
<select formControlName="idSubcategoria">
32+
<option value="" selected="selected">Seleccione Subcategoría</option>
3133
<option *ngFor="let subcategoria of subcategorias" value="{{subcategoria.idSubcategoria}}">{{subcategoria.nombre}}</option>
3234
</select>
3335
<p *ngIf="!this.validar('idSubcategoria')" class="error">Subcategoría</p>

src/app/components/crear-evento/crear-evento.component.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,15 @@ export class CrearEventoComponent implements OnInit {
171171
console.log(data);
172172
if (data['status'] != 'error') {
173173
console.log('data');
174-
this.router.navigate(['/ubicacion']);
174+
this.modal.generateModal(
175+
'Éxito',
176+
`Evento creado con éxito.`,
177+
'De acuerdo',
178+
'success'
179+
);
180+
setTimeout(() => {
181+
this.router.navigate(['/mis-eventos']);
182+
}, 2000);
175183
//this.borrarForm();
176184
} else {
177185
this.modal.generateModal(
@@ -200,6 +208,10 @@ export class CrearEventoComponent implements OnInit {
200208
this.imagen=event[0]['base64']
201209
console.log(event[0]['base64'])
202210
}
211+
212+
anadirUbicacion() {
213+
this.router.navigate(['/formularioUbicacion', 0]);
214+
}
203215
}
204216

205217

src/app/components/datos-ubicaciones/datos-ubicaciones.component.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class DatosUbicacionesComponent implements OnInit {
2323
private appService: AppService,
2424
private router: Router,
2525
private activatedRoute: ActivatedRoute
26+
2627
) {
2728
this.activatedRoute.params.subscribe((parametros) => {
2829
this.idUbicacion = parametros['idUbicacion'];
@@ -99,7 +100,7 @@ export class DatosUbicacionesComponent implements OnInit {
99100
console.log(data);
100101
if (data['status'] != 'error') {
101102
console.log('data');
102-
this.router.navigate(['/ubicacion']);
103+
window.history.back();
103104
//this.borrarForm();
104105
} else {
105106
this.modal.generateModal(
@@ -134,8 +135,7 @@ export class DatosUbicacionesComponent implements OnInit {
134135
console.log(data);
135136
if (data['status'] != 'error') {
136137
console.log('data');
137-
this.router.navigate(['/ubicacion']);
138-
//this.borrarForm();
138+
window.history.back();
139139
} else {
140140
this.modal.generateModal(
141141
`Algo salió mal`,
@@ -159,7 +159,7 @@ export class DatosUbicacionesComponent implements OnInit {
159159
* @ignore
160160
*/
161161
volver() {
162-
this.router.navigate(['ubicacion']);
162+
window.history.back();
163163
}
164164

165165
/**

src/app/components/home/home.component.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
position: absolute;
5050
bottom: 10px;
5151
right: 10px;
52-
font-size: 1.4rem;
52+
font-size: 1.3rem;
5353
cursor: pointer;
5454
border: none;
5555
background: none;

src/app/components/home/home.component.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ <h2>{{evento.titulo}}</h2>
1010
<span><strong>Nº asistentes: </strong> {{evento.numParticipantes}}</span>
1111
<span><strong>{{evento.nombreSubcateogria}}</strong></span>
1212
</div>
13-
<button *ngIf="comprobarParticipante(evento.idEvento)"(click)="anadirParticipante(evento.idEvento)"><i class="bi bi-check-circle-fill"></i></button>
13+
<button *ngIf="comprobarParticipante(evento.idEvento)"(click)="anadirParticipante(evento.idEvento)">Apuntarme <i class="bi bi-check-circle-fill"></i></button>
1414
<button *ngIf="!comprobarParticipante(evento.idEvento)"><i class="bi bi-check-circle-fill" style="opacity: 10%; cursor: default;"></i></button>
1515
<!--<button *ngIf="!comprobarParticipante(evento.idEvento)"><i class="bi bi-dash-circle-fill" style="opacity: 10%"></i></button>-->
1616
</div>
1717
</div>
18+
<p *ngIf="!mostrar">No hay eventos</p>
1819
<app-modal></app-modal>

src/app/components/mis-eventos/mis-eventos.component.css

+18-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,28 @@
44
--secondary-color: #939393;
55
--text-base-color: black;
66
}
7+
8+
h2{
9+
color: var(--primary-color);
10+
}
711

12+
.separador{
13+
margin-top: 50px;
14+
}
15+
816
.contenedor-filtros{
917
display: flex;
1018
gap: 1rem;
19+
padding: .5rem;
1120
align-items: center;
21+
position: absolute;
22+
top: 79px;
23+
left: 0;
24+
z-index: 10;
25+
background-color: rgba(255, 255, 255, .75);
26+
backdrop-filter: blur(15px);
27+
width: 100%;
28+
height: 60px;
1229
}
1330

1431
.contenedor-eventos {
@@ -55,7 +72,7 @@
5572
position: absolute;
5673
bottom: 10px;
5774
right: 10px;
58-
font-size: 1.4rem;
75+
font-size: 1.2rem;
5976
cursor: pointer;
6077
border: none;
6178
background: none;

src/app/components/mis-eventos/mis-eventos.component.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<input type="checkbox" name="creados" #creados value="1" (change)="mostrar(creados.value)" checked><label for="">Eventos creados</label>
33
<input type="checkbox" name="apuntados" #apuntados value="2" (change)="mostrar(apuntados.value)" checked><label for="">Eventos apuntados</label>
44
</div>
5+
<div class="separador"></div>
6+
<h2 *ngIf="mostrarCreados">Eventos creados</h2>
57
<div class="contenedor-eventos creados" *ngIf="mostrarCreados && mostrarC">
68
<div class="evento" *ngFor="let eventoCreado of eventosCreados">
79
<div class="imagen-evento" [ngStyle]="{'background-image': 'url(' + 'http://localhost/proyecto/badajozUnida/php/eventos/imagenes/'+eventoCreado.imagen + ')'}"></div>
@@ -19,6 +21,7 @@ <h2>{{eventoCreado.titulo}}</h2>
1921
</div>
2022
<p *ngIf="!mostrarC && mostrarCreados">No has creado ningún evento.</p>
2123
<hr *ngIf="mostrarParticipo && mostrarCreados"/>
24+
<h2 *ngIf="mostrarParticipo">Eventos apuntados</h2>
2225
<div class="contenedor-eventos apuntados" *ngIf="mostrarParticipo && mostrarP">
2326
<div class="evento" *ngFor="let eventoParticipo of eventosParticipo">
2427
<div class="imagen-evento" [ngStyle]="{'background-image': 'url(' + 'http://localhost/proyecto/badajozUnida/php/eventos/imagenes/'+eventoParticipo.imagen + ')'}"></div>
@@ -31,7 +34,7 @@ <h2>{{eventoParticipo.titulo}}</h2>
3134
<span><strong>Nº asistentes: </strong>{{eventoParticipo.numParticipantes}}</span>
3235
<span><strong>{{eventoParticipo.nombreSubcategoria}}</strong></span>
3336
</div>
34-
<button (click)="preguntaBorrado(eventoParticipo.idEvento,eventoParticipo.imange,2)"><i class="bi bi-dash-circle-fill"></i></button>
37+
<button (click)="preguntaBorrado(eventoParticipo.idEvento,eventoParticipo.imange,2)">Desapuntarme <i class="bi bi-dash-circle-fill"></i></button>
3538
</div>
3639
</div>
3740
<p *ngIf="!mostrarP && mostrarParticipo">No participas en ningún evento.</p>

src/app/components/share/menu/menu.component.css

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ header .account-container>button{
5353

5454
header .account-container>.desplegable{
5555
position: absolute;
56+
z-index: 12;
5657
top: 60px;
5758
right: 10px;
5859
width: fit-content;

0 commit comments

Comments
 (0)