mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix
This commit is contained in:
@@ -16,7 +16,7 @@ import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -57,6 +57,9 @@ export class EditEventPage implements OnInit {
|
||||
recurringTypes: any;
|
||||
selectedRecurringType: any;
|
||||
|
||||
CalendarNameOwnerName = ''
|
||||
CalendarNamesOptions = []
|
||||
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
@@ -82,11 +85,12 @@ export class EditEventPage implements OnInit {
|
||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||
|
||||
sesseionStora = SessionStore
|
||||
|
||||
environment = environment
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private eventsService: EventsService,
|
||||
public eventsService: EventsService,
|
||||
public alertController: AlertController,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private toastService: ToastService,
|
||||
@@ -134,6 +138,9 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.getAttachments(this.postEvent.EventId);
|
||||
|
||||
|
||||
this.CalendarNameOwnerName = this.eventsService.detectCalendarNameByCalendarId(this.postEvent.CalendarId)
|
||||
this.changeAgenda()
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -559,4 +566,27 @@ export class EditEventPage implements OnInit {
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
changeAgenda() {
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
if(this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
|
||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial']) {
|
||||
this.CalendarNamesOptions = ['Oficial']
|
||||
this.postEvent.CalendarName = 'Oficial'
|
||||
|
||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||
this.CalendarNamesOptions = ['Pessoal']
|
||||
this.postEvent.CalendarName = 'Pessoal'
|
||||
|
||||
} else {
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
}
|
||||
}, 50)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user