mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -13,6 +13,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ParticipantsPipe } from 'src/app/pipes/participants.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-event',
|
||||
@@ -83,6 +84,7 @@ export class EditEventPage implements OnInit {
|
||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||
|
||||
private participantsPipe = new ParticipantsPipe()
|
||||
sesseionStora = SessionStore
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -258,19 +260,37 @@ export class EditEventPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
|
||||
try {
|
||||
await this.eventsService.editEvent(this.postEvent, 2, 3).toPromise()
|
||||
if(this.initCalendarName != this.postEvent.CalendarName) {
|
||||
let body = {
|
||||
"EventId": this.postEvent.EventId,
|
||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||
await this.eventsService.editEvent(this.postEvent, 2, 3).toPromise()
|
||||
if(this.initCalendarName != this.postEvent.CalendarName) {
|
||||
let body = {
|
||||
"EventId": this.postEvent.EventId,
|
||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
||||
}
|
||||
|
||||
try {
|
||||
await this.eventsService.changeAgenda(body).toPromise();
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
try {
|
||||
await this.eventsService.changeAgenda(body).toPromise();
|
||||
} catch (e) {}
|
||||
this.showLoader = false;
|
||||
this.toastService.successMessage()
|
||||
} else {
|
||||
await this.eventsService.editEvent(this.postEvent, 2, 3).toPromise()
|
||||
if(this.initCalendarName != this.postEvent.CalendarName) {
|
||||
let body = {
|
||||
"EventId": this.postEvent.EventId,
|
||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
||||
}
|
||||
|
||||
try {
|
||||
await this.eventsService.changeAgenda(body).toPromise();
|
||||
} catch (e) {}
|
||||
}
|
||||
this.showLoader = false;
|
||||
this.toastService.successMessage()
|
||||
}
|
||||
this.showLoader = false;
|
||||
this.toastService.successMessage()
|
||||
|
||||
|
||||
} catch(error) {
|
||||
this.showLoader = false
|
||||
this.toastService.badRequest()
|
||||
|
||||
Reference in New Issue
Block a user