mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
monitoring notifications
This commit is contained in:
@@ -428,8 +428,6 @@ export class EditEventPage implements OnInit {
|
||||
}));
|
||||
|
||||
|
||||
await this.saveDocument()
|
||||
|
||||
if (this.addedAttachmentsList.length > 0) {
|
||||
this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, this.loadedEventAttachments).subscribe((value) => {
|
||||
console.log(value)
|
||||
@@ -456,112 +454,6 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
// async save() {
|
||||
|
||||
// this.injectValidation()
|
||||
// this.runValidation()
|
||||
|
||||
// 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/* ) */;
|
||||
|
||||
// if (!this._postEvent.EventRecurrence.hasOwnProperty('Type')) {
|
||||
// this._postEvent.EventRecurrence.Type = '-1'
|
||||
// } else {
|
||||
|
||||
// }
|
||||
|
||||
// if (this._postEvent.EventRecurrence.Type == undefined) {
|
||||
// this._postEvent.EventRecurrence.Type = '-1'
|
||||
// }
|
||||
|
||||
// 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 {
|
||||
// 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')
|
||||
// }
|
||||
|
||||
|
||||
// } catch (error) {
|
||||
// this.showLoader = false
|
||||
// this.httpErrorHandle.httpStatusHandle(error)
|
||||
// }
|
||||
|
||||
// this.clearPostEvent.emit();
|
||||
// this.deleteTemporaryData();
|
||||
|
||||
// await this.saveDocument()
|
||||
|
||||
// this.close();
|
||||
// }
|
||||
|
||||
|
||||
async saveDocument() {
|
||||
|
||||
console.log('save document', this.loadedEventAttachments)
|
||||
try {
|
||||
|
||||
for (let e of this.loadedEventAttachments) {
|
||||
const id: any = e.Id
|
||||
const remove = e['remove']
|
||||
|
||||
if (id == 'add') {
|
||||
//data.selected
|
||||
const DocumentToSave = {
|
||||
SourceTitle: e.SourceName,
|
||||
ParentId: this._postEvent.EventId,
|
||||
Source: '1',
|
||||
SourceId: e.SourceId,
|
||||
ApplicationId: e.ApplicationId.toString(),
|
||||
Id: '0',
|
||||
Link: '',
|
||||
SerialNumber: '',
|
||||
};
|
||||
|
||||
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
|
||||
|
||||
} else if (remove) {
|
||||
await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise()
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async addParticipants() {
|
||||
|
||||
@@ -617,32 +509,17 @@ export class EditEventPage implements OnInit {
|
||||
window['temp.path:/home/agenda/edit-event.component.ts'] = {}
|
||||
}
|
||||
|
||||
async getAttachments(eventId: string) {
|
||||
if (this._postEvent.HasAttachments) {
|
||||
let rest: any;
|
||||
try {
|
||||
rest = this.attachmentsService.getAttachmentsById(eventId).toPromise()
|
||||
console.log('GetAttachment', rest)
|
||||
} catch (error) {
|
||||
console.error('getAttchment', error)
|
||||
}
|
||||
this.loadedEventAttachments = rest;
|
||||
}
|
||||
}
|
||||
|
||||
deleteAttachment(attachmentID: string, index) {
|
||||
console.log(JSON.stringify(this.loadedEventAttachments))
|
||||
const id: any = this.loadedEventAttachments[index].Id
|
||||
console.log(JSON.stringify(id))
|
||||
let update = this.removeItemById(this.loadedEventAttachments, id)
|
||||
this.loadedEventAttachments = update
|
||||
console.log(update)
|
||||
this.deletedAttachmentsList.push(id)
|
||||
const indexToRemove = index; // Assuming you already know the index you want to remove
|
||||
|
||||
const DocumentId: any = this.loadedEventAttachments[index].Id
|
||||
if (indexToRemove > -1 && indexToRemove < this.loadedEventAttachments.length) {
|
||||
this.loadedEventAttachments.splice(indexToRemove, 1);
|
||||
}
|
||||
|
||||
this.deletedAttachmentsList.push(DocumentId)
|
||||
}
|
||||
|
||||
removeItemById(array, id) {
|
||||
return array.filter(item => item.Id !== id);
|
||||
}
|
||||
|
||||
async getDoc() {
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<ion-segment [(ngModel)]="selectedUserCalendar" (ionChange)="segmentChanged($event)" *ngIf="SessionStore.user.RoleID !== 100000014">
|
||||
<ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" >
|
||||
<div *ngIf="environment.presidential">
|
||||
<div *ngIf="calendars.roleId == RoleIdService.PRES">AGEANDA DO PR </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGEANDA DO MDGPR</div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.PRES">AGENDA DO PR </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
|
||||
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName && calendars.wxUserId != SessionStore.user.UserId "> Agenda {{calendars.wxFullName}} </div>
|
||||
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId ">
|
||||
Minha agenda
|
||||
|
||||
Reference in New Issue
Block a user