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() {
@@ -182,7 +182,7 @@
</div>
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br />
<!-- <button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal"><ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label></button><br /> -->
<ion-label class="info-meeting-medium"><ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}</ion-label><br />
<ion-label class="info-meeting-medium"><ion-icon></ion-icon><ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}</ion-label><br />
</div>
@@ -175,28 +175,28 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
} catch (err) { }
}
async goToEvent(event: any) {
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
}
// async goToEvent(event: any) {
// let classs;
// if (window.innerWidth < 701) {
// classs = 'modal modal-desktop'
// } else {
// classs = 'modal modal-desktop showAsideOptions'
// }
const modal = await this.modalController.create({
component: ViewEventPage,
componentProps: {
eventId: event.id,
CalendarId: event.calendarId
},
cssClass: classs,
});
// const modal = await this.modalController.create({
// component: ViewEventPage,
// componentProps: {
// eventId: event.id,
// CalendarId: event.calendarId
// },
// cssClass: classs,
// });
modal.onDidDismiss().then((res) => {
// modal.onDidDismiss().then((res) => {
});
await modal.present();
}
// });
// await modal.present();
// }
ngAfterViewInit() {
this.scrollChangeCallback = () => this.onContentScrolled(event);
@@ -196,9 +196,9 @@
<ion-label *ngIf="msg.delate == false" class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
<button *ngIf="msg.delate == false" (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal">
<!-- <button *ngIf="msg.delate == false" (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal">
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
</button><br />
</button><br /> -->
<ion-label *ngIf="msg.delate == false" class="info-meeting-medium">
<ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a
{{showDateDuration(msg.file.end_date)}}
+19 -19
View File
@@ -392,27 +392,27 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this.timeService.showDateDuration(start);
}
async goToEvent(event: any) {
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
}
const modal = await this.modalController.create({
component: ViewEventPage,
componentProps: {
eventId: event.id,
CalendarId: event.calendarId
},
cssClass: classs,
});
// async goToEvent(event: any) {
// let classs;
// if (window.innerWidth < 701) {
// classs = 'modal modal-desktop'
// } else {
// classs = 'modal modal-desktop showAsideOptions'
// }
// const modal = await this.modalController.create({
// component: ViewEventPage,
// componentProps: {
// eventId: event.id,
// CalendarId: event.calendarId
// },
// cssClass: classs,
// });
modal.onDidDismiss().then((res) => {
// modal.onDidDismiss().then((res) => {
});
await modal.present();
}
// });
// await modal.present();
// }
sendMessage() {
this.ChatSystemService.getDmRoom(this.roomId).send({})