First commit

This commit is contained in:
2026-01-13 21:02:23 -06:00
commit 054f45b5bd
403 changed files with 44137 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, MenuController, NavController, Events } from '@ionic/angular';
import { EnvService } from 'src/app/services/env.service';
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 { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Component({
selector: 'app-already',
templateUrl: './already.page.html',
styleUrls: ['./already.page.scss'],
})
export class AlreadyPage implements OnInit {
postulations = [];
postulations_dates = [];
constructor(
private modalController: ModalController,
private menu: MenuController,
private navCtrl: NavController,
private events: Events,
private authService: AuthService,
private alertService: AlertService,
private ichambaService: IchambaService,
private iab: InAppBrowser,
private env: EnvService,
) {
this.events.subscribe('refreshpostulations', (data) => {
this.getpostulations();
});
}
ngOnInit() {
this.getpostulations();
}
refresh(event) {
this.ichambaService.getContractedPostulation().subscribe(
data => {
this.postulations = data;
for (var i of this.postulations) {
this.postulations_dates.push(new Date((new Date(i.date).toLocaleString('en-US') + ' UTC').replace("," ,"")).toLocaleDateString('es-US', { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute:'numeric', timeZoneName: 'long'}));
}
event.target.complete();
}, error => {
this.alertService.presentToast("Por favor contacte a soporte técnico, Estatus:" + error['status']);
event.target.complete();
});
}
getpostulations() {
this.ichambaService.getContractedPostulation().subscribe(
data => {
this.postulations = data;
for (var i of this.postulations) {
this.postulations_dates.push(new Date((new Date(i.date).toLocaleString('en-US') + ' UTC').replace("," ,"")).toLocaleDateString('es-US', { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute:'numeric', timeZoneName: 'long'}));
}
}, error => {
this.alertService.presentToast("Por favor contacte a soporte técnico, Estatus:" + error['status']);
});
}
openMaps(lat: Number, lng: Number) {
this.iab.create(('http://maps.google.com/maps?q=' + lat + ',' + lng), '_system')
}
}