mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Many changes
Edit event
This commit is contained in:
@@ -10,6 +10,7 @@ import { AttendeeModalPage } from '../events/attendee-modal/attendee-modal.page'
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
||||
import { identifierModuleUrl } from '@angular/compiler';
|
||||
|
||||
@Component({
|
||||
selector: 'app-cal-modal',
|
||||
@@ -43,15 +44,20 @@ export class CalModalPage implements OnInit {
|
||||
formLocationSatus: boolean = false;
|
||||
formEventTypeSatus: boolean = false;
|
||||
|
||||
profile:string;
|
||||
|
||||
constructor(public formBuilder: FormBuilder, private modalCtrl: ModalController, private eventService: EventsService, private alertController:AlertService,
|
||||
private navParams: NavParams) {
|
||||
this.postEvent = new Event();
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postEvent.Body = this.eventBody;
|
||||
this.profile = this.navParams.get('profile');
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
this.selectedSegment = this.navParams.get('segment');
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
|
||||
@@ -127,9 +133,14 @@ export class CalModalPage implements OnInit {
|
||||
}
|
||||
|
||||
save(){
|
||||
if (this.ionicForm.valid)
|
||||
{
|
||||
this.eventService.postEvent(this.postEvent, this.postEvent.CalendarName, "md").subscribe();
|
||||
if (this.ionicForm.valid) {
|
||||
if(this.profile=='mdgpr'){
|
||||
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
|
||||
|
||||
}
|
||||
else if(this.profile=='pr'){
|
||||
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe();
|
||||
}
|
||||
this.modalCtrl.dismiss(this.postEvent);
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user