mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
ITOTEAM-594 Implementar o endpoint de listagem do tipo de agenda
This commit is contained in:
@@ -698,26 +698,21 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
changeAgenda() {
|
||||
async changeAgenda() {
|
||||
|
||||
setTimeout(() => {
|
||||
const result = await this.agendaDataRepository.geCalendars()
|
||||
|
||||
if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||
const selectedCalendar = result.find(e => e.wxUserId == this.selectedUserCalendar)
|
||||
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
|
||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial']) {
|
||||
if(selectedCalendar) {
|
||||
if(selectedCalendar.shareType == 1) {
|
||||
this.CalendarNamesOptions = ['Oficial']
|
||||
this.postEvent.CalendarName = 'Oficial'
|
||||
|
||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||
} else if(selectedCalendar.shareType == 2) {
|
||||
this.CalendarNamesOptions = ['Pessoal']
|
||||
this.postEvent.CalendarName = 'Pessoal'
|
||||
|
||||
} else {
|
||||
} else if (selectedCalendar.shareType == 3) {
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
}
|
||||
}, 50)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -537,26 +537,21 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
changeAgenda() {
|
||||
async changeAgenda() {
|
||||
|
||||
setTimeout(() => {
|
||||
const result = await this.agendaDataRepository.geCalendars()
|
||||
|
||||
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||
const selectedCalendar = result.find(e => e.wxUserId == this.selectedUserCalendar)
|
||||
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
|
||||
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial']) {
|
||||
if(selectedCalendar) {
|
||||
if(selectedCalendar.shareType == 1) {
|
||||
this.CalendarNamesOptions = ['Oficial']
|
||||
this.postEvent.CalendarName = 'Oficial'
|
||||
|
||||
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||
} else if(selectedCalendar.shareType == 2) {
|
||||
this.CalendarNamesOptions = ['Pessoal']
|
||||
this.postEvent.CalendarName = 'Pessoal'
|
||||
|
||||
} else {
|
||||
} else if (selectedCalendar.shareType == 3) {
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
}
|
||||
}, 50)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user