Compare commits
No commits in common. "0b84c0987e948bf41e766acfa8dc945f23fb27af" and "65658f5aa3e5da3935641695de58e4d21e5893be" have entirely different histories.
0b84c0987e
...
65658f5aa3
|
@ -358,31 +358,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@angular/animations": {
|
|
||||||
"version": "11.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-11.2.1.tgz",
|
|
||||||
"integrity": "sha512-U2gtMaiVfTNMn0FPpSDTgOgtYc45QUnQcc2Po40rCmgH7BGyJAOgmaXY9uv319Jjl+vNrX+bbXaZix73Zpjfyg==",
|
|
||||||
"requires": {
|
|
||||||
"tslib": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@angular/cdk": {
|
|
||||||
"version": "11.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-11.2.1.tgz",
|
|
||||||
"integrity": "sha512-d+ERvvWqGykBm5ooWG8TmMjL6q6aOpUd13ha1sx960EfKJqNyideYUfPMp6xprTyxmUIUZ/G9AQ/pxnzrLGnsA==",
|
|
||||||
"requires": {
|
|
||||||
"parse5": "^5.0.0",
|
|
||||||
"tslib": "^2.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"parse5": {
|
|
||||||
"version": "5.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
|
|
||||||
"integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@angular/cli": {
|
"@angular/cli": {
|
||||||
"version": "10.0.8",
|
"version": "10.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-10.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-10.0.8.tgz",
|
||||||
|
@ -857,14 +832,6 @@
|
||||||
"integrity": "sha512-QQLYUjD0T6u2hLNYXUEUbupAGsz5egmhCAckaQojvXCe3SLL/hQsrK4odrNuspy7TvMB0H5ZNEHGlF6m/WLZ3g==",
|
"integrity": "sha512-QQLYUjD0T6u2hLNYXUEUbupAGsz5egmhCAckaQojvXCe3SLL/hQsrK4odrNuspy7TvMB0H5ZNEHGlF6m/WLZ3g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@angular/material": {
|
|
||||||
"version": "11.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/material/-/material-11.2.1.tgz",
|
|
||||||
"integrity": "sha512-unHC8W+GcZSNRNSZ4l3ABdbezf6PIUtShx5MMG6HXgieqlkEgkU0W0BAeGvO/61vl6yEebizMYD/+5yqM9lUlw==",
|
|
||||||
"requires": {
|
|
||||||
"tslib": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@angular/platform-browser": {
|
"@angular/platform-browser": {
|
||||||
"version": "10.0.14",
|
"version": "10.0.14",
|
||||||
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-10.0.14.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-10.0.14.tgz",
|
||||||
|
|
|
@ -13,12 +13,9 @@
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^11.2.1",
|
|
||||||
"@angular/cdk": "^11.2.1",
|
|
||||||
"@angular/common": "~10.0.0",
|
"@angular/common": "~10.0.0",
|
||||||
"@angular/core": "~10.0.0",
|
"@angular/core": "~10.0.0",
|
||||||
"@angular/forms": "~10.0.0",
|
"@angular/forms": "~10.0.0",
|
||||||
"@angular/material": "^11.2.1",
|
|
||||||
"@angular/platform-browser": "~10.0.0",
|
"@angular/platform-browser": "~10.0.0",
|
||||||
"@angular/platform-browser-dynamic": "~10.0.0",
|
"@angular/platform-browser-dynamic": "~10.0.0",
|
||||||
"@angular/router": "~10.0.0",
|
"@angular/router": "~10.0.0",
|
||||||
|
@ -78,4 +75,4 @@
|
||||||
"android"
|
"android"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,16 +0,0 @@
|
||||||
import { TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { ApiService } from './api.service';
|
|
||||||
|
|
||||||
describe('ApiService', () => {
|
|
||||||
let service: ApiService;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
TestBed.configureTestingModule({});
|
|
||||||
service = TestBed.inject(ApiService);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be created', () => {
|
|
||||||
expect(service).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,33 +0,0 @@
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import { Observable, throwError } from 'rxjs';
|
|
||||||
import { catchError, retry } from 'rxjs/operators';
|
|
||||||
import { User } from './user';
|
|
||||||
import { Discoteca } from './discoteca';
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class ApiService {
|
|
||||||
|
|
||||||
constructor(private http: HttpClient) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
validateUser(loginUser: string, loginPassword: string): boolean{
|
|
||||||
return (loginUser=='');
|
|
||||||
}
|
|
||||||
|
|
||||||
getUser (loginUser: string): void{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
postNewUser(user: User): void{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
postNewDiscoteca(discoteca: Discoteca): void{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
|
||||||
import { RouteReuseStrategy } from '@angular/router';
|
import { RouteReuseStrategy } from '@angular/router';
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
||||||
|
@ -11,14 +10,12 @@ import { AppComponent } from './app.component';
|
||||||
import { PerfilDiscotecaPage } from './perfil-discoteca/perfil-discoteca.page';
|
import { PerfilDiscotecaPage } from './perfil-discoteca/perfil-discoteca.page';
|
||||||
import { PromptEventoPage} from './prompt-evento/prompt-evento.page'
|
import { PromptEventoPage} from './prompt-evento/prompt-evento.page'
|
||||||
import { GaleriamodalPageModule } from './galeriamodal/galeriamodal.module';
|
import { GaleriamodalPageModule } from './galeriamodal/galeriamodal.module';
|
||||||
import { MatMenuModule } from '@angular/material/menu';
|
|
||||||
import { LoginPage } from './login/login.page';
|
import { LoginPage } from './login/login.page';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent, PerfilDiscotecaPage, PromptEventoPage, LoginPage],
|
declarations: [AppComponent, PerfilDiscotecaPage, PromptEventoPage, LoginPage],
|
||||||
entryComponents: [],
|
entryComponents: [],
|
||||||
imports: [BrowserModule, HttpClientModule, IonicModule.forRoot(), AppRoutingModule, ReactiveFormsModule, GaleriamodalPageModule, MatMenuModule, BrowserAnimationsModule],
|
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, ReactiveFormsModule, GaleriamodalPageModule],
|
||||||
providers: [
|
providers: [
|
||||||
StatusBar,
|
StatusBar,
|
||||||
SplashScreen,
|
SplashScreen,
|
||||||
|
|
|
@ -8,7 +8,6 @@ export class Discoteca {
|
||||||
private telefono: number;
|
private telefono: number;
|
||||||
private localizacion: string;
|
private localizacion: string;
|
||||||
private eventos: Evento[];
|
private eventos: Evento[];
|
||||||
private descripcion: string;
|
|
||||||
|
|
||||||
|
|
||||||
setNombre(nombre: string): void{
|
setNombre(nombre: string): void{
|
||||||
|
@ -38,12 +37,4 @@ export class Discoteca {
|
||||||
getEventos(): Evento[]{
|
getEventos(): Evento[]{
|
||||||
return this.eventos;
|
return this.eventos;
|
||||||
}
|
}
|
||||||
|
|
||||||
setDescripcion(desc: string): void{
|
|
||||||
this.descripcion = desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
get Descripcion(): string{
|
|
||||||
return this.descripcion;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,9 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ApiService } from './api.service';
|
|
||||||
import { User } from './user';
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class LoginService {
|
export class LoginService {
|
||||||
|
|
||||||
private userId: number;
|
constructor() { }
|
||||||
private sessionType: number;
|
|
||||||
private loginUser: string;
|
|
||||||
private loginPassword: string;
|
|
||||||
|
|
||||||
constructor(private apiService: ApiService) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
validateUser(loginUser: string, loginPassword: string): boolean{
|
|
||||||
return (loginUser=='');
|
|
||||||
}
|
|
||||||
|
|
||||||
getUser (loginUser: string): void{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
postNewUser(user: User): void{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,13 +8,40 @@
|
||||||
|
|
||||||
<ion-content [fullscreen]="true">
|
<ion-content [fullscreen]="true">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class='fotoPerfil'>
|
<div class='fotoPerfil'>
|
||||||
<ion-grid>
|
<ion-grid>
|
||||||
<ion-row>
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
<ion-img class="fotoPerfil" width="100%" height="100%" [src]='fotoSrc' alt='barraquinha'></ion-img>
|
<ion-img class="fotoPerfil" width="100%" height="100%" [src]='fotoSrc' alt='barraquinha'></ion-img>
|
||||||
<div class="textoPie">{{nombre}}</div>
|
<div class="textoPie">{{nombre}}</div>
|
||||||
</ion-row>
|
|
||||||
|
|
||||||
|
<div class="addFoto">
|
||||||
|
<ion-button [disabled]='editDisabled'>
|
||||||
|
<ion-icon name="image" slot="icon-only"></ion-icon>
|
||||||
|
<input type="file" (change)="loadImageFromDevice($event);cargarImagen()" id="file-input-perfil" accept="image/png, image/jpeg">
|
||||||
|
</ion-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<ion-button (click)="enableEdit()" label="editar" [disabled]='editEnabled'>
|
||||||
|
<ion-icon name="create"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
<div id="botonesHidden1" class="botonesHidden">
|
||||||
|
<ion-button (click)="saveEdit()" label="guardar" [disabled]='editDisabled'>
|
||||||
|
<ion-icon name="save"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
<ion-button (click)="cancelEdit()" [disabled]='editDisabled'>
|
||||||
|
Cancelar
|
||||||
|
</ion-button></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
|
@ -25,16 +52,10 @@
|
||||||
<div [contentEditable]='editEnabled'>{{localizacion}}</div>
|
<div [contentEditable]='editEnabled'>{{localizacion}}</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
|
||||||
<ion-col>
|
|
||||||
<div>{{descripcion}}</div>
|
|
||||||
</ion-col>
|
|
||||||
</ion-row>
|
|
||||||
|
|
||||||
<ion-row>
|
<ion-col>
|
||||||
<div class="galeria">
|
<div class="galeria">
|
||||||
Galería de Fotos
|
Galería de Fotos
|
||||||
|
|
||||||
<input type="file" (change)="loadImageFromDevice($event)" id="file-input-galeria" accept="image/png, image/jpeg">
|
<input type="file" (change)="loadImageFromDevice($event)" id="file-input-galeria" accept="image/png, image/jpeg">
|
||||||
<ion-slides (ionDrag)="onSlideChanged()" [options]="sliderOpts">
|
<ion-slides (ionDrag)="onSlideChanged()" [options]="sliderOpts">
|
||||||
<ion-slide *ngFor="let foto of galeriaFotos">
|
<ion-slide *ngFor="let foto of galeriaFotos">
|
||||||
|
@ -48,8 +69,18 @@
|
||||||
</ion-slide>
|
</ion-slide>
|
||||||
</ion-slides>
|
</ion-slides>
|
||||||
</div>
|
</div>
|
||||||
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-row>
|
||||||
|
<ion-button (click)="addEvento()">
|
||||||
|
<ion-icon name="add-circle-outline">
|
||||||
|
</ion-icon>
|
||||||
|
Añadir evento
|
||||||
|
</ion-button>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<div *ngIf="eventos.length>0" class="eventos">
|
<div *ngIf="eventos.length>0" class="eventos">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
|
@ -71,40 +102,13 @@
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|
||||||
<ion-row>
|
|
||||||
<button mat-icon-button [matMenuTriggerFor]="menu">
|
|
||||||
<ion-icon name="create"></ion-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<mat-menu #menu="matMenu">
|
|
||||||
<button mat-menu-item [disabled]='editDisabled'>
|
|
||||||
<ion-icon name="image" slot="icon-only"></ion-icon>
|
|
||||||
<input type="file" (change)="loadImageFromDevice($event);cargarImagen()" id="file-input-perfil" accept="image/png, image/jpeg">
|
|
||||||
</button>
|
|
||||||
|
|
||||||
|
|
||||||
<button mat-menu-item (click)="enableEdit()" label="editar" [disabled]='editEnabled'>
|
|
||||||
<ion-icon name="create"></ion-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button mat-menu-item (click)="saveEdit()" label="guardar" [disabled]='editDisabled'>
|
|
||||||
<ion-icon name="save"></ion-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button mat-menu-item (click)="cancelEdit()" [disabled]='editDisabled'>
|
|
||||||
Cancelar
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button mat-menu-item (click)="addEvento()">
|
|
||||||
<ion-icon name="add-circle-outline">
|
|
||||||
</ion-icon>
|
|
||||||
Añadir evento
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</mat-menu>
|
|
||||||
</ion-row>
|
|
||||||
</ion-grid>
|
</ion-grid>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
|
@ -5,7 +5,6 @@ import { AlertController } from '@ionic/angular';
|
||||||
import { ViewChild } from '@angular/core';
|
import { ViewChild } from '@angular/core';
|
||||||
import { Evento } from '../evento';
|
import { Evento } from '../evento';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
|
||||||
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
|
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
|
||||||
import { GaleriamodalPage } from '../galeriamodal/galeriamodal.page';
|
import { GaleriamodalPage } from '../galeriamodal/galeriamodal.page';
|
||||||
import { stringify } from '@angular/compiler/src/util';
|
import { stringify } from '@angular/compiler/src/util';
|
||||||
|
@ -18,7 +17,6 @@ import { stringify } from '@angular/compiler/src/util';
|
||||||
export class PerfilDiscotecaPage implements OnInit {
|
export class PerfilDiscotecaPage implements OnInit {
|
||||||
|
|
||||||
@ViewChild('IonSlides') slides: IonSlides;
|
@ViewChild('IonSlides') slides: IonSlides;
|
||||||
@ViewChild('MatMenuTrigger') trigger: MatMenuTrigger;
|
|
||||||
nombre: string;
|
nombre: string;
|
||||||
telefono: number;
|
telefono: number;
|
||||||
localizacion: string;
|
localizacion: string;
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
export interface User {
|
|
||||||
userId: number;
|
|
||||||
userType: number;
|
|
||||||
loginUser: string;
|
|
||||||
loginPassword: string;
|
|
||||||
}
|
|
Loading…
Reference in New Issue