Skip to content

Commit 3269e8f

Browse files
committed
Beautify code and fix angular with spring
1 parent cbc4115 commit 3269e8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+881
-1026
lines changed

angular/wallypop/.idea/workspace.xml

Lines changed: 17 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular/wallypop/dist/ejem0/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ <h4 class="text-light text-center">Descárgate nuestras apps gratuitas</h4>
9393
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
9494
<script crossorigin="anonymous" src="https://kit.fontawesome.com/990e51666e.js"></script>
9595
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
96-
<script src="/new/runtime.js" type="module"></script><script src="/new/polyfills.js" type="module"></script><script src="/new/main.js" type="module"></script>
96+
<script src="runtime.js" type="module"></script><script src="polyfills.js" type="module"></script><script src="main.js" type="module"></script>
9797

98-
</body></html>
98+
</body></html>

angular/wallypop/dist/ejem0/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular/wallypop/src/app/app.component.html

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
<ul class="list-unstyled full-width">
1111
<li>
1212
<a href="/new/">
13-
INICIO
13+
INICIO
1414
</a>
1515
</li>
1616
<li>
1717
<a href="/new/commercial">
18-
ANUNCIOS
18+
ANUNCIOS
1919
</a>
2020
</li>
2121
<li>
2222
<a href="/new/sold">
23-
ANUNCIOS VENDIDOS
23+
ANUNCIOS VENDIDOS
2424
</a>
2525
</li>
2626
<span *ngIf="loginService.isLogged()">
@@ -36,7 +36,8 @@
3636
</li>
3737
<li>
3838
<a href="/new/profile">
39-
{{loginService.currentUser().full_NAME}} <i aria-hidden="true" class="fa fa-user NavBar-Nav-icon"></i>
39+
{{loginService.currentUser().full_NAME}} <i aria-hidden="true"
40+
class="fa fa-user NavBar-Nav-icon"></i>
4041
</a>
4142
</li>
4243
</span>
@@ -68,15 +69,3 @@
6869
<section>
6970
<router-outlet></router-outlet>
7071
</section>
71-
<!-- <div *ngIf="loginService.isLogged()" style="text-align: center">
72-
Current user: {{loginService.currentUser().name}}
73-
</div>
74-
<div *ngIf="loginService.isLogged() && loginService.isAdmin()" style="text-align: center">
75-
ROLE: ADMIN
76-
</div>
77-
<div *ngIf="loginService.isLogged() && !loginService.isAdmin()" style="text-align: center">
78-
ROLE: USER
79-
</div>
80-
<div *ngIf="!loginService.isLogged()" style="text-align: center">
81-
Current user: NULL
82-
</div> -->

angular/wallypop/src/app/app.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import {Component, OnInit} from '@angular/core';
2-
import { LoginService } from './services/login.service';
3-
import {User} from './models/user.model';
1+
import {Component} from '@angular/core';
2+
import {LoginService} from './services/login.service';
43

54
@Component({
6-
selector: 'app-root',
7-
templateUrl: './app.component.html'
5+
selector: 'app-root',
6+
templateUrl: './app.component.html'
87
})
98
export class AppComponent {
10-
constructor(public loginService: LoginService) { }
9+
constructor(public loginService: LoginService) {
10+
}
1111

1212
logOut(): void {
1313
this.loginService.logOut();
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
import { BrowserModule } from '@angular/platform-browser';
2-
import { FormsModule } from '@angular/forms';
3-
import { NgModule } from '@angular/core';
4-
import { HttpClientModule } from '@angular/common/http';
1+
import {BrowserModule} from '@angular/platform-browser';
2+
import {FormsModule} from '@angular/forms';
3+
import {NgModule} from '@angular/core';
4+
import {HttpClientModule} from '@angular/common/http';
55

6-
import { AppComponent } from './app.component';
7-
import { IndexComponent } from './components/index/index.component';
8-
import { routing } from './app.routing';
9-
import { LoginComponent } from './components/login/login.component';
6+
import {AppComponent} from './app.component';
7+
import {IndexComponent} from './components/index/index.component';
8+
import {routing} from './app.routing';
9+
import {LoginComponent} from './components/login/login.component';
1010
import {SearchComponent} from './components/search/search.component';
1111
import {NotFoundComponent} from './components/404/NotFound.component';
1212
import {NewaccountComponent} from './components/login/newaccount.component';
13-
import { ProfileComponent } from './components/profile/profile.component';
14-
import { CategoryComponent } from './components/category/category.component';
13+
import {ProfileComponent} from './components/profile/profile.component';
14+
import {CategoryComponent} from './components/category/category.component';
1515

16-
import { FormReportComponent } from './components/report/formReport.component';
17-
import { ReportsComponent } from './components/report/reports.component';
18-
import { ShowReportComponent } from './components/report/showReport.component';
19-
import { CategoryListComponent } from './components/category/categoryList.component';
20-
import { FavoritesComponent } from './components/favorites/favorites.component';
16+
import {FormReportComponent} from './components/report/formReport.component';
17+
import {ReportsComponent} from './components/report/reports.component';
18+
import {ShowReportComponent} from './components/report/showReport.component';
19+
import {CategoryListComponent} from './components/category/categoryList.component';
20+
import {FavoritesComponent} from './components/favorites/favorites.component';
2121
import {CommercialComponent} from './components/articles/commercial.component';
2222
import {PostComponent} from './components/articles/post.component';
2323
import {YourcommercialComponent} from './components/articles/yourcommercial.component';
@@ -28,9 +28,10 @@ import {GraphicComponent} from './components/graphic/graphic.component';
2828
import {HighchartsChartModule} from "highcharts-angular";
2929

3030
@NgModule({
31-
// tslint:disable-next-line:max-line-length
32-
declarations: [AppComponent, IndexComponent, LoginComponent, SearchComponent, NotFoundComponent, NewaccountComponent, ProfileComponent, CategoryComponent, CategoryListComponent, CommercialComponent, PostComponent, FormReportComponent, ReportsComponent, ShowReportComponent, FavoritesComponent, YourcommercialComponent, YourcommercialSoldComponent, SoldComponent, AddcommercialComponent, GraphicComponent],
33-
imports: [BrowserModule, FormsModule, HttpClientModule, routing, HighchartsChartModule],
34-
bootstrap: [AppComponent]
31+
// tslint:disable-next-line:max-line-length
32+
declarations: [AppComponent, IndexComponent, LoginComponent, SearchComponent, NotFoundComponent, NewaccountComponent, ProfileComponent, CategoryComponent, CategoryListComponent, CommercialComponent, PostComponent, FormReportComponent, ReportsComponent, ShowReportComponent, FavoritesComponent, YourcommercialComponent, YourcommercialSoldComponent, SoldComponent, AddcommercialComponent, GraphicComponent],
33+
imports: [BrowserModule, FormsModule, HttpClientModule, routing, HighchartsChartModule],
34+
bootstrap: [AppComponent]
3535
})
36-
export class AppModule { }
36+
export class AppModule {
37+
}
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { Routes, RouterModule } from '@angular/router';
1+
import {RouterModule} from '@angular/router';
22

33
import {IndexComponent} from './components/index/index.component';
44
import {LoginComponent} from './components/login/login.component';
55
import {NotFoundComponent} from './components/404/NotFound.component';
66
import {NewaccountComponent} from './components/login/newaccount.component';
77
import {ProfileComponent} from './components/profile/profile.component';
8-
import { CategoryComponent } from './components/category/category.component';
9-
import { FormReportComponent } from './components/report/formReport.component';
10-
import { ReportsComponent } from './components/report/reports.component';
11-
import { ShowReportComponent } from './components/report/showReport.component';
12-
import { CategoryListComponent } from './components/category/categoryList.component';
13-
import { FavoritesComponent } from './components/favorites/favorites.component';
8+
import {CategoryComponent} from './components/category/category.component';
9+
import {FormReportComponent} from './components/report/formReport.component';
10+
import {ReportsComponent} from './components/report/reports.component';
11+
import {ShowReportComponent} from './components/report/showReport.component';
12+
import {CategoryListComponent} from './components/category/categoryList.component';
13+
import {FavoritesComponent} from './components/favorites/favorites.component';
1414
import {CommercialComponent} from './components/articles/commercial.component';
1515
import {PostComponent} from './components/articles/post.component';
1616
import {YourcommercialComponent} from './components/articles/yourcommercial.component';
@@ -19,27 +19,27 @@ import {SoldComponent} from './components/articles/sold.component';
1919
import {AddcommercialComponent} from './components/articles/addcommercial.component';
2020

2121
const appRoutes = [
22-
{ path: '', component: IndexComponent },
23-
{ path: 'login', component: LoginComponent },
24-
{ path: 'newaccount', component: NewaccountComponent },
25-
{ path: 'profile', component: ProfileComponent },
26-
{ path: 'category', component: CategoryComponent},
27-
{ path: 'formReport/:id', component: FormReportComponent},
28-
{ path: 'reports', component: ReportsComponent},
29-
{ path: 'showReport', component: ShowReportComponent},
30-
{ path: 'categoryList', component: CategoryListComponent},
31-
{ path: 'favorites', component: FavoritesComponent},
32-
{ path: 'commercial', component: CommercialComponent },
33-
{ path: 'showReport/:id', component: ShowReportComponent},
34-
{ path: 'commercial/:id', component: CommercialComponent },
35-
{ path: 'post', component: PostComponent },
36-
{ path: 'post/:id', component: PostComponent },
37-
{ path: 'yourcommercial', component: YourcommercialComponent },
38-
{ path: 'yourcommercialsold', component: YourcommercialSoldComponent },
39-
{ path: 'sold', component: SoldComponent },
40-
{ path: 'sold/:id', component: SoldComponent },
41-
{ path: 'adcommercial', component: AddcommercialComponent },
42-
{ path: '**', component: NotFoundComponent}
22+
{path: '', component: IndexComponent},
23+
{path: 'login', component: LoginComponent},
24+
{path: 'newaccount', component: NewaccountComponent},
25+
{path: 'profile', component: ProfileComponent},
26+
{path: 'category', component: CategoryComponent},
27+
{path: 'formReport/:id', component: FormReportComponent},
28+
{path: 'reports', component: ReportsComponent},
29+
{path: 'showReport', component: ShowReportComponent},
30+
{path: 'categoryList', component: CategoryListComponent},
31+
{path: 'favorites', component: FavoritesComponent},
32+
{path: 'commercial', component: CommercialComponent},
33+
{path: 'showReport/:id', component: ShowReportComponent},
34+
{path: 'commercial/:id', component: CommercialComponent},
35+
{path: 'post', component: PostComponent},
36+
{path: 'post/:id', component: PostComponent},
37+
{path: 'yourcommercial', component: YourcommercialComponent},
38+
{path: 'yourcommercialsold', component: YourcommercialSoldComponent},
39+
{path: 'sold', component: SoldComponent},
40+
{path: 'sold/:id', component: SoldComponent},
41+
{path: 'adcommercial', component: AddcommercialComponent},
42+
{path: '**', component: NotFoundComponent}
4343
];
4444

4545
export const routing = RouterModule.forRoot(appRoutes);

angular/wallypop/src/app/components/articles/addcommercial.component.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ <h3 class="text-info">Busca la categoría donde verán tu anuncio</h3>
1313
<div class="col-sm-7">
1414
<div class="form-group">
1515
<select #categories class="form-control" multiple name="CATEGORYS">
16-
<option *ngFor="let category of categorys" name="CATEGORY" value="{{category.id_CATEGORY}}">{{category.title}}</option>
16+
<option *ngFor="let category of categorys" name="CATEGORY"
17+
value="{{category.id_CATEGORY}}">{{category.title}}</option>
1718
</select>
1819
</div>
1920
</div>
@@ -30,7 +31,8 @@ <h3 class="text-info">Detalles de tu anuncio</h3>
3031
<div class="form-group">
3132
<label class="col-sm-3 control-label">Descripción</label>
3233
<div class="col-sm-7">
33-
<textarea #description NAME="dESCRIPTION" class="form-control" placeholder="Descripción" required=""
34+
<textarea #description NAME="dESCRIPTION" class="form-control" placeholder="Descripción"
35+
required=""
3436
rows="3"></textarea>
3537
</div>
3638
</div>
@@ -49,7 +51,8 @@ <h3 class="text-info">Detalles de tu anuncio</h3>
4951
<div class="form-group">
5052
<label class="col-sm-3 control-label">Código postal</label>
5153
<div class="col-sm-7">
52-
<input #postal_CODE class="form-control" name="pOSTAL_CODE" placeholder="Código postal" required=""
54+
<input #postal_CODE class="form-control" name="pOSTAL_CODE" placeholder="Código postal"
55+
required=""
5356
type="text">
5457
</div>
5558
</div>
@@ -69,7 +72,8 @@ <h3 class="text-info">Foto</h3>
6972
Privacidad</a>
7073
</p>
7174
<p class="text-center">
72-
<input (click)="save($event, title.value, description.value, city.value, price.value, postal_CODE.value, categories.selectedOptions)" class="btn btn-info" type="submit" value="Guardar" />
75+
<input (click)="save($event, title.value, description.value, city.value, price.value, postal_CODE.value, categories.selectedOptions)"
76+
class="btn btn-info" type="submit" value="Guardar"/>
7377
</p>
7478
</div>
7579
</div>

0 commit comments

Comments
 (0)