remove unused files

This commit is contained in:
Peter Maquiran
2024-06-08 17:18:38 +01:00
parent ef30adcf46
commit cca859b6c4
69 changed files with 1022 additions and 6024 deletions
@@ -8,7 +8,6 @@ import { AlertController } from '@ionic/angular';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { SearchPage } from 'src/app/pages/search/search.page';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { Attachment } from 'src/app/models/attachment.model';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ParticipantsPipe } from 'src/app/pipes/participants.pipe';
import { ThemeService } from 'src/app/services/theme.service'
@@ -408,77 +407,77 @@ export class EditEventPage implements OnInit {
}
async save() {
// async save() {
this.injectValidation()
this.runValidation()
// this.injectValidation()
// this.runValidation()
if (this.Form.invalid) {
return false
}
// if (this.Form.invalid) {
// return false
// }
this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this._postEvent.Subject = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Subject/* ) */;
this._postEvent.Location = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Location/* ) */;
this._postEvent.Body.Text = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Body.Text/* ) */;
// this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
// this._postEvent.Subject = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Subject/* ) */;
// this._postEvent.Location = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Location/* ) */;
// this._postEvent.Body.Text = /* this.domSanitizeService.sanitizeInput( */this._postEvent.Body.Text/* ) */;
if (!this._postEvent.EventRecurrence.hasOwnProperty('Type')) {
this._postEvent.EventRecurrence.Type = '-1'
} else {
// if (!this._postEvent.EventRecurrence.hasOwnProperty('Type')) {
// this._postEvent.EventRecurrence.Type = '-1'
// } else {
}
// }
if (this._postEvent.EventRecurrence.Type == undefined) {
this._postEvent.EventRecurrence.Type = '-1'
}
// if (this._postEvent.EventRecurrence.Type == undefined) {
// this._postEvent.EventRecurrence.Type = '-1'
// }
this.showLoader = true;
// this.showLoader = true;
try {
if (this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
if (this.initCalendarName != this._postEvent.CalendarName) {
let body = {
"EventId": this._postEvent.EventId,
"CalendarDestinationName": this._postEvent.CalendarName,
}
// try {
// if (this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
// await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
// if (this.initCalendarName != this._postEvent.CalendarName) {
// let body = {
// "EventId": this._postEvent.EventId,
// "CalendarDestinationName": this._postEvent.CalendarName,
// }
try {
await this.eventsService.changeAgenda(body).toPromise();
} catch (e) { }
}
this.showLoader = false;
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
} else {
console.log(this._postEvent, 2, 3, this._postEvent.CalendarId)
await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
if (this.initCalendarName != this._postEvent.CalendarName) {
let body = {
"EventId": this._postEvent.EventId,
"CalendarDestinationName": this._postEvent.CalendarName,
}
// try {
// await this.eventsService.changeAgenda(body).toPromise();
// } catch (e) { }
// }
// this.showLoader = false;
// this.httpErrorHandle.httpsSucessMessagge('Editar evento')
// } else {
// console.log(this._postEvent, 2, 3, this._postEvent.CalendarId)
// await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
// if (this.initCalendarName != this._postEvent.CalendarName) {
// let body = {
// "EventId": this._postEvent.EventId,
// "CalendarDestinationName": this._postEvent.CalendarName,
// }
try {
await this.eventsService.changeAgenda(body).toPromise();
} catch (e) { }
}
this.showLoader = false;
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
}
// try {
// await this.eventsService.changeAgenda(body).toPromise();
// } catch (e) { }
// }
// this.showLoader = false;
// this.httpErrorHandle.httpsSucessMessagge('Editar evento')
// }
} catch (error) {
this.showLoader = false
this.httpErrorHandle.httpStatusHandle(error)
}
// } catch (error) {
// this.showLoader = false
// this.httpErrorHandle.httpStatusHandle(error)
// }
this.clearPostEvent.emit();
this.deleteTemporaryData();
// this.clearPostEvent.emit();
// this.deleteTemporaryData();
await this.saveDocument()
// await this.saveDocument()
this.close();
}
// this.close();
// }
async saveDocument() {
@@ -130,9 +130,9 @@ export class ViewEventPage implements OnInit {
if(res.isOk()) {
console.log('Loaded Event', res.value)
console.log('newAttahcmentList', res.value.Attachments)
let changeDate = this.dateService.fixDate(res.value as any) as any
this.loadedEvent = changeDate as any;
this.setTimeZone()
@@ -181,66 +181,66 @@ export class ViewEventPage implements OnInit {
});
}
async deleteEvent() {
// async deleteEvent() {
if (this.loadedEvent.IsRecurring) {
const loader = this.toastService.loading()
// if (this.loadedEvent.IsRecurring) {
// const loader = this.toastService.loading()
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => {
this.httpErrorHandle.httpsSucessMessagge('delete event')
this.close();
},(error)=>{
this.httpErrorHandle.httpStatusHandle(error)
},
()=>{
loader.remove();
});
} else {
// if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
// this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => {
// this.httpErrorHandle.httpsSucessMessagge('delete event')
// this.close();
// },(error)=>{
// this.httpErrorHandle.httpStatusHandle(error)
// },
// ()=>{
// loader.remove();
// });
// } else {
if(this.CalendarId) {
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
this.httpErrorHandle.httpsSucessMessagge('delete event');
this.close();
},(error)=>{
this.httpErrorHandle.httpStatusHandle(error)
},
()=>{
loader.remove();
});
}
// if(this.CalendarId) {
// this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
// this.httpErrorHandle.httpsSucessMessagge('delete event');
// this.close();
// },(error)=>{
// this.httpErrorHandle.httpStatusHandle(error)
// },
// ()=>{
// loader.remove();
// });
// }
}
// }
} else {
// } else {
const loader = this.toastService.loading()
// const loader = this.toastService.loading()
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => {
this.httpErrorHandle.httpsSucessMessagge('delete event');
this.close();
},(error)=>{
this.httpErrorHandle.httpStatusHandle(error)
},
()=>{
loader.remove();
});
} else {
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
this.httpErrorHandle.httpsSucessMessagge('delete event');
this.close();
},(error)=>{
this.httpErrorHandle.httpStatusHandle(error)
},
()=>{
loader.remove();
});
}
// if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
// this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => {
// this.httpErrorHandle.httpsSucessMessagge('delete event');
// this.close();
// },(error)=>{
// this.httpErrorHandle.httpStatusHandle(error)
// },
// ()=>{
// loader.remove();
// });
// } else {
// this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
// this.httpErrorHandle.httpsSucessMessagge('delete event');
// this.close();
// },(error)=>{
// this.httpErrorHandle.httpStatusHandle(error)
// },
// ()=>{
// loader.remove();
// });
// }
}
// }
}
// }
async deleteRecurringEvent() {