mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Many changes
Edit event
This commit is contained in:
@@ -7,6 +7,11 @@ import { ActivatedRoute, NavigationEnd } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { AuthConnstants } from 'src/app/config/auth-constants';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { EventDetailPage } from './event-detail/event-detail.page';
|
||||
import { EventDetailModalPage } from './event-detail-modal/event-detail-modal.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-events',
|
||||
@@ -46,8 +51,10 @@ export class EventsPage implements OnInit {
|
||||
|
||||
constructor(private eventService: EventsService,
|
||||
private router: Router,
|
||||
private storageService:StorageService,
|
||||
public activatedRoute: ActivatedRoute,
|
||||
private alertController: AlertService,
|
||||
private modalController: ModalController,
|
||||
private authService: AuthService) {
|
||||
this.prEventList = null;
|
||||
}
|
||||
@@ -57,6 +64,8 @@ export class EventsPage implements OnInit {
|
||||
this.segment = "Combinada";
|
||||
//Initialize profile as mdgpr
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.profile);
|
||||
|
||||
|
||||
this.showGreeting();
|
||||
|
||||
@@ -65,6 +74,10 @@ export class EventsPage implements OnInit {
|
||||
this.RefreshEvents();
|
||||
}
|
||||
});
|
||||
/* this.storageService.get(AuthConnstants.PROFILE).then(res=>{
|
||||
this.profile = res;
|
||||
}); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +106,6 @@ export class EventsPage implements OnInit {
|
||||
this.eventsList = res;
|
||||
console.log(this.eventsList);
|
||||
this.showLoader = false;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -163,5 +175,31 @@ export class EventsPage implements OnInit {
|
||||
this.router.navigate(['/home/login']);
|
||||
}
|
||||
|
||||
async openEventDetail1(id:any){
|
||||
console.log(id);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EventDetailPage,
|
||||
componentProps: {
|
||||
eventId: id,
|
||||
},
|
||||
cssClass: 'event-detail',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
|
||||
}
|
||||
async openEventDetail(id:any) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EventDetailModalPage,
|
||||
componentProps: {
|
||||
eventId: id,
|
||||
},
|
||||
cssClass: 'my-custom-class'
|
||||
});
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user