Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/updating angular16 #131

Closed
wants to merge 10 commits into from
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ edicionDemo_assets/
RemoteSystemsTempFiles/
ectemplate.iml
*.iml

# Angular Files
.angular/
3 changes: 1 addition & 2 deletions clientes-app/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,5 @@
}
}
}
},
"defaultProject": "clientes-app"
}
}
15,981 changes: 9,054 additions & 6,927 deletions clientes-app/package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions clientes-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~12.1.0-",
"@angular/common": "~12.1.0-",
"@angular/compiler": "~12.1.0-",
"@angular/core": "~12.1.0-",
"@angular/forms": "~12.1.0-",
"@angular/platform-browser": "~12.1.0-",
"@angular/platform-browser-dynamic": "~12.1.0-",
"@angular/router": "~12.1.0-",
"@angular/animations": "~16.2.12",
"@angular/common": "~16.2.12",
"@angular/compiler": "~16.2.12",
"@angular/core": "~16.2.12",
"@angular/forms": "~16.2.12",
"@angular/platform-browser": "~16.2.12",
"@angular/platform-browser-dynamic": "~16.2.12",
"@angular/router": "~16.2.12",
"rxjs": "~6.6.0",
"sweetalert2": "^11.1.9",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
"zone.js": "~0.13.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~15.0.0",
"@angular/cli": "~15.0.0",
"@angular/compiler-cli": "~12.1.0-",
"@angular-devkit/build-angular": "~16.2.9",
"@angular/cli": "~16.2.9",
"@angular/compiler-cli": "~16.2.12",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.99.0",
Expand All @@ -37,4 +37,4 @@
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.9.0"
}
}
}
5 changes: 2 additions & 3 deletions clientes-app/src/app/altaproducto/altaproducto.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import swal from 'sweetalert2';
import { ProductoCaracteristicas } from './../producto/productoCaracteristicas.model';
import { Observable } from 'rxjs';
import { ProductoEspecificaciones } from '../producto/productoEspecificaciones.model';
import { ProductoEspecificaciones } from '../producto/productoespecificaciones.model';
import { ProductoService } from './../producto/producto.service';
import { Component, Input, OnInit, Output } from '@angular/core';
import { Producto } from '../producto/producto.model';
Expand Down Expand Up @@ -46,7 +45,7 @@ export class AltaproductoComponent implements OnInit {
console.log(this.producto.productoCaracteristicas.descripcion);
this.productoService
.setProducto(this.producto)
.subscribe((response) =>
.subscribe((response: { id: any; }) =>
this.router.navigate(['/item/' + response.id])
);
console.log('sale');
Expand Down
7 changes: 2 additions & 5 deletions clientes-app/src/app/producto-item/producto-item.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { map } from 'rxjs/operators';
import { ActivatedRoute, Router } from '@angular/router';
import { ProductoService } from './../producto/producto.service';
import { Component, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { Producto } from '../producto/producto.model';
import { ThrowStmt } from '@angular/compiler';
import Swal from 'sweetalert2';

@Component({
selector: 'app-producto-item',
Expand All @@ -28,7 +25,7 @@ export class ProductoItemComponent implements OnInit {
{
let id:number = +params.get('id')!;
if (id){
this.productoService.getProductoById(id).subscribe(producto =>{
this.productoService.getProductoById(id).subscribe((producto: any) =>{
this.producto = producto;
console.log(this.producto?.productoCaracteristicas.descripcion);
});
Expand All @@ -47,7 +44,7 @@ export class ProductoItemComponent implements OnInit {

subirImagen(){
this.productoService.subirFoto(this.imagenSeleccionada, String(this.producto.id), this.descripcionImagen)
.subscribe(producto => {
.subscribe((producto: Producto) => {
this.producto = producto;
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProductoEspecificaciones } from './productoEspecificaciones.model';
import { ProductoEspecificaciones } from './productoespecificaciones.model';
import { ImagenProducto } from './imagenproducto.model';
export class ProductoCaracteristicas{
idProductoCaracteristicas!: number;
Expand Down
4 changes: 3 additions & 1 deletion clientes-app/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ declare const require: {
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
Expand Down
Loading