mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
ITOTEAM-594 Implementar o endpoint de listagem do tipo de agenda
This commit is contained in:
@@ -636,27 +636,21 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
changeAgenda() {
|
||||
async changeAgenda() {
|
||||
|
||||
setTimeout(() => {
|
||||
console.log('selecione agenda', this.eventsService.calendarNamesType)
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +185,8 @@ export class NewEventPage implements OnInit {
|
||||
this.selectedUserCalendar = SessionStore.user.UserId
|
||||
}
|
||||
|
||||
this.changeAgenda()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,34 +410,23 @@ export class NewEventPage implements OnInit {
|
||||
this.hasChangeCalendar = true
|
||||
}
|
||||
|
||||
changeAgenda() {
|
||||
async changeAgenda() {
|
||||
|
||||
this.CalendarNameShow = false
|
||||
|
||||
setTimeout(() => {
|
||||
const result = await this.agendaDataRepository.geCalendars()
|
||||
|
||||
this.CalendarNameShow = true
|
||||
const selectedCalendar = result.find(e => e.wxUserId == this.selectedUserCalendar)
|
||||
|
||||
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
console.log(this.postEvent.CalendarName)
|
||||
|
||||
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial']) {
|
||||
if(selectedCalendar) {
|
||||
if(selectedCalendar.shareType == 1) {
|
||||
this.CalendarNamesOptions = ['Oficial']
|
||||
this.postEvent.CalendarName = 'Oficial'
|
||||
console.log(this.postEvent.CalendarName)
|
||||
|
||||
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||
} else if(selectedCalendar.shareType == 2) {
|
||||
this.CalendarNamesOptions = ['Pessoal']
|
||||
this.postEvent.CalendarName = 'Pessoal'
|
||||
console.log(this.postEvent.CalendarName)
|
||||
|
||||
} else {
|
||||
} else if (selectedCalendar.shareType == 3) {
|
||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
console.log(this.postEvent.CalendarName)
|
||||
}
|
||||
}, 50)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user