api new changes

This commit is contained in:
Eudes Inácio
2024-06-13 16:02:09 +01:00
parent b0583ce9e6
commit b0294c5ccb
3 changed files with 30 additions and 20 deletions
+13 -13
View File
@@ -114,9 +114,9 @@ export class Utils {
atendeesSeletedType(type) {
var selectedType = {
'true': 0,
'false': 1,
'other': 2,
'true': 1,
'false': 2,
'other': 3,
}
return selectedType[type];
}
@@ -135,11 +135,11 @@ export class Utils {
statusEventAproval(type) {
var selectedType = {
'Pending': 0,
'Revision': 1,
'Approved': 2,
"Declined": 3,
"Communicated": 4
'Pending': 1,
'Revision': 2,
'Approved': 3,
"Declined": 4,
"Communicated": 5
}
return selectedType[type];
}
@@ -157,11 +157,11 @@ export class Utils {
eventRecurence(type) {
var selectedType = {
'never': 0,
'daily': 1,
'weekly': 2,
"monthly": 3,
"yearly": 4
'never': 1,
'daily': 2,
'weekly': 3,
"monthly": 4,
"yearly": 5
}
return selectedType[type];
}
@@ -118,12 +118,13 @@ export class EditEventPage implements OnInit {
this.loadedEventAttachments = this.postEvent.Attachments
console.log(this.postEvent)
this._postEvent = this.postEvent
if(!this._postEvent.IsRecurring) {
this.setCalendarNameValue(this._postEvent.CalendarName);
if (!this._postEvent.IsRecurring) {
this._postEvent.EventRecurrence.frequency = 'never';
} else {
this._postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
}
this.allDayCheck = this.postEvent.IsAllDayEvent;
if (!this.restoreTemporaryData()) {
// clear
@@ -407,7 +408,7 @@ export class EditEventPage implements OnInit {
try {
this.agendaDataRepository.updateEvent(this._postEvent.EventId, this._postEvent,editAllEvent).subscribe((value) => {
this.agendaDataRepository.updateEvent(this._postEvent.EventId, this._postEvent, editAllEvent).subscribe((value) => {
console.log(value)
}, ((error) => {
console.log('edit event error: ', error)
@@ -636,7 +637,7 @@ export class EditEventPage implements OnInit {
console.log(JSON.stringify(id))
let update = this.removeItemById(this.loadedEventAttachments, id)
this.loadedEventAttachments = update
console.log( update)
console.log(update)
this.deletedAttachmentsList.push(id)
}
@@ -660,7 +661,7 @@ export class EditEventPage implements OnInit {
modal.onDidDismiss().then(async (res) => {
if (res) {
const data = res.data;
console.log('Get Doc',data.selected)
console.log('Get Doc', data.selected)
/* const ApplicationIdDocumentToSave: any = {
SourceName: data.selected.Assunto,
@@ -703,6 +704,7 @@ export class EditEventPage implements OnInit {
changeAgenda() {
setTimeout(() => {
console.log('selecione agenda', this.eventsService.calendarNamesType)
if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
@@ -772,4 +774,12 @@ export class EditEventPage implements OnInit {
return date
}
setCalendarNameValue(calendarName) {
var selectedCalendar = {
1: 'Oficial',
2: 'Pessoal'
}
return selectedCalendar[calendarName];
}
}
@@ -149,12 +149,12 @@ export class ViewEventPage implements OnInit {
if (this.loadedEvent.IsRecurring) {
this.alertController.create({
header: 'Eliminar evento?',
message: '',
message: 'Este evento tem recorrência, deseja eliminar a Sequência de eventos?',
inputs: [
{
name: 'confirm',
type: 'checkbox',
label: 'Este evento tem recorrência, deseja eliminar a Sequência de eventos?',
label: '',
value: 'confirm',
checked: false,
}