Upgrade: Angular 18, Ionic 8, Capacitor 6

Modernizacion completa del frontend:

- Angular 8 -> 18.2.14
- Ionic 4 -> 8.7.17
- Capacitor 6.x (migracion desde Cordova/@ionic-native)
- TypeScript 5.4.5
- Swiper 11 con Web Components API

Cambios principales:
- Migrar NativeStorage a @capacitor/preferences
- Migrar InAppBrowser a @capacitor/browser
- Migrar Camera a @capacitor/camera
- Migrar Geolocation a @capacitor/geolocation
- Migrar StatusBar/SplashScreen a Capacitor
- Migrar Facebook/Google login a plugins Capacitor
- Actualizar lazy loading syntax (Angular 12+)
- Configurar buildOptimizer: false para Ionic 8
- Limpiar package.json de dependencias obsoletas
- Agregar README con guia de instalacion

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
CarlosTorres
2026-01-17 22:03:31 +00:00
parent a9508bd34a
commit dfcb1168b9
397 changed files with 19732 additions and 23677 deletions

31
src/app/pages/hero/hero.page.ts Normal file → Executable file
View File

@@ -3,7 +3,6 @@ import { NavController, LoadingController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { IchambaService } from 'src/app/services/ichamba.service';
import { AlertService } from 'src/app/services/alert.service';
import { GoogleMaps, GoogleMap, GoogleMapsEvent, LatLng, MarkerOptions, Geocoder, GeocoderRequest, GeocoderResult } from '@ionic-native/google-maps';
declare var google: any;
@@ -14,21 +13,22 @@ declare var google: any;
})
export class HeroPage implements OnInit {
private loading;
private loading: any;
categories: any[] = [];
categories_input: any[] = [];
categories_rearranged: any[] = [];
keywords: any[] = [];
keywords_string: any[] = [];
keywords_text: string = '';
aux_categories: any[] = [];
myPosition: any = {};
myAddress: string = null;
myIntnumber: string = null;
reference: string = null;
name: string = null;
selectedReference: number;
myAddress: string | null = null;
myIntnumber: string | null = null;
reference: string | null = null;
name: string | null = null;
selectedReference: number = 0;
addressAutocomplete: string = '';
placesSearch: string = '';
placesSearch: any = '';
showinput: boolean = false;
showif = true;
@@ -38,8 +38,6 @@ export class HeroPage implements OnInit {
private authService: AuthService,
private alertService: AlertService,
private ichambaService: IchambaService,
private googleMaps: GoogleMaps,
private geocoder: Geocoder,
private ngZone: NgZone,
) { }
@@ -105,13 +103,12 @@ export class HeroPage implements OnInit {
}
addHero(){
for (var i of this.categories_input) {
this.categories_rearranged.push(i.value);
}
if (this.keywords.length > 0) {
for (var i of this.keywords) {
this.keywords_string.push(i.value);
}
// categories_input is now an array of values directly from ion-select
this.categories_rearranged = this.categories_input.slice();
// keywords_text is now a string, split by comma
if (this.keywords_text && this.keywords_text.trim().length > 0) {
this.keywords_string = this.keywords_text.split(',').map(k => k.trim()).filter(k => k.length > 0);
}
if (this.name && this.categories_input && this.myAddress && this.myPosition.latitude && this.myPosition.longitude && this.selectedReference){