ITOTEAM-594 Implementar o endpoint de listagem do tipo de agenda

This commit is contained in:
Peter Maquiran
2024-06-24 16:08:20 +01:00
parent 93476dc5c4
commit 76ff62d428
6 changed files with 80 additions and 110 deletions
@@ -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)
}
}
@@ -40,62 +40,57 @@ export class NotificationHolderService {
let notificationObject;
if (element.notification) {
notificationObject = {
index: i,
title: element.notification.title,
Service: element.data.Service || element.data.service,
Object: element.data.Object || element.data.object,
IdObject: element.data.IdObject || element.data.idObject,
FolderId: element.data.FolderId || element.data.folderId,
body: element.notification.body,
dateInit: this.getFormatedTime(element.data.dateInit),
dateEnd: this.getFormatedTime(element.data.dateEnd),
Location: element.data.Location || element.data.Location,
TypeAgenda: element.data.TypeAgenda || element.data.typeAgenda,
Role: element.data.Role,
Status: element.data.Status,
read: false,
index: i,
title: element.notification.title,
Service: element.data.Service || element.data.service ,
Object: element.data.Object || element.data.object ,
IdObject: element.data.IdObject || element.data.idObject ,
FolderId: element.data.FolderId || element.data.folderId ,
body: element.notification.body,
dateInit: this.getFormatedTime(element.data.dateInit),
dateEnd: this.getFormatedTime(element.data.dateEnd),
Location: element.data.Location || element.data.location ,
TypeAgenda: element.data.TypeAgenda || element.data.typeAgenda ,
Role: element.data.Role || element.data.role ,
Status: element.data.Status || element.data.status ,
read: false,
}
} else if (element.data) {
} else if (element.data) {
notificationObject = {
index: i,
title: element.title,
Service: element.data.Service || element.data.service,
Object: element.data.Object || element.data.object,
IdObject: element.data.IdObject || element.data.idObject,
FolderId: element.data.FolderId || element.data.folderId,
body: element.body,
dateInit: this.getFormatedTime(element.data.dateInit),
dateEnd: this.getFormatedTime(element.data.dateEnd),
Location: element.data.Location || element.data.folderId,
TypeAgenda: element.data.TypeAgenda || element.data.folderId,
Role: element.data.Role,
Status: element.data.Status,
read: false,
index: i,
title: element.title,
Service: element.data.Service || element.data.service ,
Object: element.data.Object || element.data.object ,
IdObject: element.data.IdObject || element.data.idObject ,
FolderId: element.data.FolderId || element.data.folderId ,
body: element.body,
dateInit: this.getFormatedTime(element.data.dateInit),
dateEnd: this.getFormatedTime(element.data.dateEnd),
Location: element.data.Location || element.data.location ,
TypeAgenda: element.data.TypeAgenda || element.data.typeAgenda ,
Role: element.data.Role || element.data.role ,
Status: element.data.Status || element.data.status ,
read: false,
}
} else {
{
notificationObject = {
FolderId: element.FolderId || element.data.folderId,
IdObject: element.IdObject || element.data.idObject,
Location: element.Location || element.data.location,
Object: element.Object || element.data.object,
Role: element.Role || element.data.role,
Service: element.Service || element.data.service,
Status: element.Status,
TypeAgenda: element.TypeAgenda,
} else {
notificationObject = {
FolderId: element.FolderId || element.folderId ,
IdObject: element.IdObject || element.idObject ,
Location: element.Location || element.location ,
Object: element.Object || element.object ,
Role: element.Role || element.role ,
Service: element.Service || element.service ,
Status: element.Status || element.status ,
TypeAgenda: element.TypeAgenda || element.typeAgenda ,
body: element.body,
dateEnd: element.dateEnd,
dateInit: element.dateInit,
index: element.index,
title: element.title,
read: false,
}
}
}
}
this.notificationList.push(notificationObject)
this.save()
@@ -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)
}
}
+6 -6
View File
@@ -1,11 +1,11 @@
export let versionData = {
"shortSHA": "ca50ae9da",
"SHA": "ca50ae9dae0ac0d3ed0e5f2a820a780fd6509564",
"shortSHA": "93476dc5c",
"SHA": "93476dc5c494511533d5ae327a3b026399581e9b",
"branch": "feature/agenda-api-peter",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Sun Jun 23 21:47:34 2024 +0100'",
"lastCommitMessage": "ITOTEAM-525 data validation",
"lastCommitNumber": "5839",
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is ahead of 'origin/feature/agenda-api-peter' by 2 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: angular.json\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/services/Repositorys/Agenda/agenda-data-repository.service.ts\n\tmodified: src/app/services/Repositorys/Agenda/agenda-data.service.ts\n\tnew file: src/app/services/Repositorys/Agenda/async/change/attendeesLIstChangeDetector.ts\n\tmodified: src/app/services/Repositorys/Agenda/mapper/EventDetailsMapper.ts\n\tmodified: src/app/services/Repositorys/Agenda/mapper/EventToApproveDetailsMapper.ts\n\tnew file: src/app/services/Repositorys/Agenda/model/attendeeRemoveInputDTO.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: src/app/interceptors/token.interceptors.ts\n\tmodified: src/app/services/notification/notification-holder.service.ts\n\tmodified: src/app/store/notification-holder.service.ts",
"lastCommitTime": "'Mon Jun 24 15:35:16 2024 +0100'",
"lastCommitMessage": "ITOTEAM-597 remove atendess from list",
"lastCommitNumber": "5840",
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is ahead of 'origin/feature/agenda-api-peter' by 3 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: src/app/services/notification/notification-holder.service.ts\n\tmodified: version/git-version.ts",
"changeAuthor": "peter.maquiran"
}