mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -35,19 +35,19 @@ export class EditEventPage implements OnInit {
|
||||
profile:string;
|
||||
|
||||
constructor(
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
private modalCtrl: ModalController,
|
||||
private alertService: AlertService,
|
||||
private attachamentsService: AttachmentsService,
|
||||
private route: Router,
|
||||
private iab: InAppBrowser) {
|
||||
private iab: InAppBrowser) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -73,7 +73,7 @@ export class EditEventPage implements OnInit {
|
||||
this.pageId = paramMap.get('eventId');
|
||||
eventid = paramMap.get('eventId');
|
||||
console.log(eventid);
|
||||
|
||||
|
||||
}
|
||||
if (paramMap.has("caller")){
|
||||
this.backURL = "/home/" + paramMap.get('caller');
|
||||
@@ -99,7 +99,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
@@ -142,20 +142,20 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
Delete()
|
||||
{
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento removido',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Save()
|
||||
@@ -165,18 +165,18 @@ export class EditEventPage implements OnInit {
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>{
|
||||
if (paramMap.has("profile")){
|
||||
console.log(paramMap.get('profile'));
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
|
||||
this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento actualizado',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
@@ -189,13 +189,13 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
loadAttachments()
|
||||
{
|
||||
{
|
||||
/* console.log(this.pageId); */
|
||||
|
||||
|
||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
||||
this.loadedEventAttachments = res;
|
||||
console.log(res);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
async viewDocument(documenturl:string)
|
||||
@@ -230,12 +230,12 @@ export class EditEventPage implements OnInit {
|
||||
cssClass: 'attachments',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user