diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index 53b16aa2f..92672a61b 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -148,10 +148,6 @@ const routes: Routes = [ path:':SerialNumber/:caller', loadChildren: ()=> import('../pages/gabinete-digital/expediente/expediente-detail/expediente-detail.module').then(m => m.ExpedienteDetailPageModule) }, - { - path:'events/:eventId/:caller', - loadChildren: ()=> import('../pages/events/event-detail/event-detail.module').then(m => m.EventDetailPageModule), - }, { path:'expediente-task-modal', loadChildren: ()=> import('../pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.module').then(m => m.ExpedientTaskModalPageModule), diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index d64991053..d1b30d812 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -376,17 +376,17 @@ export class HomePage implements OnInit { // } - try { - await this.storage.get('eventDelete').then((req) => { - JSON.parse(req).forEach(element => { - this.eventservice.deleteEvent(element.eventid, element.eventDeleteType, element.calendarName).subscribe((res) => { - this.storage.remove('eventDelete') - }) - }); - }) - } catch (error) { + // try { + // await this.storage.get('eventDelete').then((req) => { + // JSON.parse(req).forEach(element => { + // this.eventservice.deleteEvent(element.eventid, element.eventDeleteType, element.calendarName).subscribe((res) => { + // this.storage.remove('eventDelete') + // }) + // }); + // }) + // } catch (error) { - } + // } try { await this.storage.get('event-listRever').then((req) => { diff --git a/src/app/pages/agenda/agenda-routing.module.ts b/src/app/pages/agenda/agenda-routing.module.ts index dd917765c..c27c884cb 100644 --- a/src/app/pages/agenda/agenda-routing.module.ts +++ b/src/app/pages/agenda/agenda-routing.module.ts @@ -1,46 +1,42 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { AgendaPage } from './agenda.page'; - -const routes: Routes = [ - { - path: '', - component: AgendaPage - }, - { - path: 'approve-event-modal', - loadChildren: () => import('../gabinete-digital/event-list/approve-event-modal/approve-event-modal.module').then( m => m.ApproveEventModalPageModule) - }, - { - path: 'event-actions-popover', - loadChildren: () => import('./event-actions-popover/event-actions-popover.module').then( m => m.EventActionsPopoverPageModule) - }, - { - path: 'emend-message-modal', - loadChildren: () => import('./emend-message-modal/emend-message-modal.module').then( m => m.EmendMessageModalPageModule) - }, - { - path: 'new-event', - loadChildren: () => import('./new-event/new-event.module').then( m => m.NewEventPageModule) - }, - { - path: 'edit-event', - loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule) - }, - { - path: 'view-event', - loadChildren: () => import('./view-event/view-event.module').then( m => m.ViewEventPageModule) - }, { - path: 'evandre', - loadChildren: () => import('./evandre/evandre.module').then( m => m.EvandrePageModule) - } +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; - -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class AgendaPageRoutingModule {} +import { AgendaPage } from './agenda.page'; + +const routes: Routes = [ + { + path: '', + component: AgendaPage + }, + { + path: 'approve-event-modal', + loadChildren: () => import('../gabinete-digital/event-list/approve-event-modal/approve-event-modal.module').then( m => m.ApproveEventModalPageModule) + }, + { + path: 'event-actions-popover', + loadChildren: () => import('./event-actions-popover/event-actions-popover.module').then( m => m.EventActionsPopoverPageModule) + }, + { + path: 'emend-message-modal', + loadChildren: () => import('./emend-message-modal/emend-message-modal.module').then( m => m.EmendMessageModalPageModule) + }, + { + path: 'new-event', + loadChildren: () => import('./new-event/new-event.module').then( m => m.NewEventPageModule) + }, + { + path: 'edit-event', + loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule) + }, + { + path: 'view-event', + loadChildren: () => import('./view-event/view-event.module').then( m => m.ViewEventPageModule) + }, + +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class AgendaPageRoutingModule {} diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts index 095fa092b..507087a4e 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.ts +++ b/src/app/pages/agenda/edit-event/edit-event.page.ts @@ -418,87 +418,87 @@ 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.selectedRecurringType != '-1') { - this.postEvent.EventRecurrence.Type = this.selectedRecurringType; - } + // if (this.Form.invalid) return false; + // if (this.selectedRecurringType != '-1') { + // this.postEvent.EventRecurrence.Type = this.selectedRecurringType; + // } - this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc) - this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ) */; - this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ) */; - this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ) */; + // this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc) + // this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ) */; + // this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ) */; + // this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ) */; - this.postEvent.EventRecurrence.Type = this.selectedRecurringType; + // this.postEvent.EventRecurrence.Type = this.selectedRecurringType; - if (this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') { - this.eventsService.editEvent(this.postEvent, 2, 3, null).subscribe(async () => { + // if (this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') { + // this.eventsService.editEvent(this.postEvent, 2, 3, null).subscribe(async () => { - if (window['reloadCalendar']) { - window['reloadCalendar']() - } + // if (window['reloadCalendar']) { + // window['reloadCalendar']() + // } - if (this.initCalendarName != this.postEvent.CalendarName) { + // if (this.initCalendarName != this.postEvent.CalendarName) { - let body = { - "EventId": this.postEvent.EventId, - "CalendarDestinationName": this.postEvent.CalendarName, - } - try { - await this.eventsService.changeAgenda(body).toPromise(); - } catch (error) { } - finally { - } + // let body = { + // "EventId": this.postEvent.EventId, + // "CalendarDestinationName": this.postEvent.CalendarName, + // } + // try { + // await this.eventsService.changeAgenda(body).toPromise(); + // } catch (error) { } + // finally { + // } - } + // } - this.httpErrorHandle.httpsSucessMessagge('Editar evento') + // this.httpErrorHandle.httpsSucessMessagge('Editar evento') - }, error => { - this.httpErrorHandle.httpStatusHandle(error) - }); - } else { - console.log('edid calendar id', this.postEvent.CalendarId); - this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => { + // }, error => { + // this.httpErrorHandle.httpStatusHandle(error) + // }); + // } else { + // console.log('edid calendar id', this.postEvent.CalendarId); + // this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => { - if (window['reloadCalendar']) { - window['reloadCalendar']() - } + // if (window['reloadCalendar']) { + // window['reloadCalendar']() + // } - if (this.initCalendarName != this.postEvent.CalendarName) { + // if (this.initCalendarName != this.postEvent.CalendarName) { - let body = { - "EventId": this.postEvent.EventId, - "CalendarDestinationName": this.postEvent.CalendarName, - } - try { - await this.eventsService.changeAgenda(body).toPromise(); - } catch (error) { } - finally { - } + // let body = { + // "EventId": this.postEvent.EventId, + // "CalendarDestinationName": this.postEvent.CalendarName, + // } + // try { + // await this.eventsService.changeAgenda(body).toPromise(); + // } catch (error) { } + // finally { + // } - } + // } - this.httpErrorHandle.httpsSucessMessagge('Editar evento') + // this.httpErrorHandle.httpsSucessMessagge('Editar evento') - }, error => { - this.httpErrorHandle.httpStatusHandle(error) - }); - } + // }, error => { + // this.httpErrorHandle.httpStatusHandle(error) + // }); + // } - this.isEventEdited = true; + // this.isEventEdited = true; - await this.saveDocument() + // await this.saveDocument() - this.goBack(); - } + // this.goBack(); + // } async saveDocument() { diff --git a/src/app/pages/agenda/evandre/evandre-routing.module.ts b/src/app/pages/agenda/evandre/evandre-routing.module.ts deleted file mode 100644 index 3fb00a40b..000000000 --- a/src/app/pages/agenda/evandre/evandre-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { EvandrePage } from './evandre.page'; - -const routes: Routes = [ - { - path: '', - component: EvandrePage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class EvandrePageRoutingModule {} diff --git a/src/app/pages/agenda/evandre/evandre.module.ts b/src/app/pages/agenda/evandre/evandre.module.ts deleted file mode 100644 index 8a20cd1c2..000000000 --- a/src/app/pages/agenda/evandre/evandre.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { EvandrePageRoutingModule } from './evandre-routing.module'; - -import { EvandrePage } from './evandre.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - EvandrePageRoutingModule - ], - declarations: [EvandrePage] -}) -export class EvandrePageModule {} diff --git a/src/app/pages/agenda/evandre/evandre.page.html b/src/app/pages/agenda/evandre/evandre.page.html deleted file mode 100644 index 0cc537051..000000000 --- a/src/app/pages/agenda/evandre/evandre.page.html +++ /dev/null @@ -1,9 +0,0 @@ - - - evandre - - - - - - diff --git a/src/app/pages/agenda/evandre/evandre.page.scss b/src/app/pages/agenda/evandre/evandre.page.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/app/pages/agenda/evandre/evandre.page.spec.ts b/src/app/pages/agenda/evandre/evandre.page.spec.ts deleted file mode 100644 index adce8c07c..000000000 --- a/src/app/pages/agenda/evandre/evandre.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { EvandrePage } from './evandre.page'; - -describe('EvandrePage', () => { - let component: EvandrePage; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ EvandrePage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(EvandrePage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/agenda/evandre/evandre.page.ts b/src/app/pages/agenda/evandre/evandre.page.ts deleted file mode 100644 index ff0b84c65..000000000 --- a/src/app/pages/agenda/evandre/evandre.page.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-evandre', - templateUrl: './evandre.page.html', - styleUrls: ['./evandre.page.scss'], -}) -export class EvandrePage implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index 8bbd453fe..785d74304 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -453,116 +453,116 @@ export class NewEventPage 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 + // } - if (this.documents.length >= 0) { - this.postEvent.HasAttachments = true; - } - if (this.selectedRecurringType != '-1') { - this.postEvent.EventRecurrence.Type = this.selectedRecurringType; - } + // if (this.documents.length >= 0) { + // this.postEvent.HasAttachments = true; + // } + // if (this.selectedRecurringType != '-1') { + // this.postEvent.EventRecurrence.Type = this.selectedRecurringType; + // } - this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); - this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ); */ - this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ); */ - this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ); */ + // this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); + // this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ); */ + // this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ); */ + // this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ); */ - let eventId: any; + // let eventId: any; - const loader = this.toastService.loading() + // const loader = this.toastService.loading() - try { + // try { - const CalendarId = this.selectedCalendarId() - this.postEvent.CalendarId = CalendarId + // const CalendarId = this.selectedCalendarId() + // this.postEvent.CalendarId = CalendarId - if (this.loggeduser.Profile == 'MDGPR') { + // if (this.loggeduser.Profile == 'MDGPR') { - eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise(); - this.hhtpErrorHandle.httpsSucessMessagge('new event') + // eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise(); + // this.hhtpErrorHandle.httpsSucessMessagge('new event') - } - else if (this.loggeduser.Profile == 'PR') { + // } + // else if (this.loggeduser.Profile == 'PR') { - const CalendarId = this.selectedCalendarId() - this.postEvent.CalendarId = CalendarId + // const CalendarId = this.selectedCalendarId() + // this.postEvent.CalendarId = CalendarId - eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise(); - this.hhtpErrorHandle.httpsSucessMessagge('new event') + // eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise(); + // this.hhtpErrorHandle.httpsSucessMessagge('new event') - } else if (this.loggeduser.Profile == 'SGGPR') { + // } else if (this.loggeduser.Profile == 'SGGPR') { - this.saveAproveEvent(); + // this.saveAproveEvent(); - } else { + // } else { - const CalendarId = this.selectedCalendarId() - this.postEvent.CalendarId = CalendarId + // const CalendarId = this.selectedCalendarId() + // this.postEvent.CalendarId = CalendarId - eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise(); - this.hhtpErrorHandle.httpsSucessMessagge('new event') + // eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise(); + // this.hhtpErrorHandle.httpsSucessMessagge('new event') - } + // } - //foi adicionado este if para não ter de fazer muitas alterações sobre a criação dos eventos. Deve ser refatorado - if (this.loggeduser.Profile != 'SGGPR') { + // //foi adicionado este if para não ter de fazer muitas alterações sobre a criação dos eventos. Deve ser refatorado + // if (this.loggeduser.Profile != 'SGGPR') { - const DocumentToSave: EventAttachment[] = this.documents.map((e) => { - return { - SourceTitle: e.Assunto, - ParentId: eventId, - Source: '1', - SourceId: e.Id, - ApplicationId: e.ApplicationType.toString(), - Id: '', - Link: '', - SerialNumber: '' - }; - }); + // const DocumentToSave: EventAttachment[] = this.documents.map((e) => { + // return { + // SourceTitle: e.Assunto, + // ParentId: eventId, + // Source: '1', + // SourceId: e.Id, + // ApplicationId: e.ApplicationType.toString(), + // Id: '', + // Link: '', + // SerialNumber: '' + // }; + // }); - await DocumentToSave.forEach(async (attachments, i) => { - try { - await this.attachmentsService.setEventAttachmentById(attachments).toPromise(); - } catch (error) { + // await DocumentToSave.forEach(async (attachments, i) => { + // try { + // await this.attachmentsService.setEventAttachmentById(attachments).toPromise(); + // } catch (error) { - } + // } - }); + // }); - let data1 = { - "subject": this.postEvent.Subject, - "start": this.postEvent.StartDate, - "end": this.postEvent.EndDate, - "venue": this.postEvent.Location, - "id": eventId, - "calendarId": CalendarId - } + // let data1 = { + // "subject": this.postEvent.Subject, + // "start": this.postEvent.StartDate, + // "end": this.postEvent.EndDate, + // "venue": this.postEvent.Location, + // "id": eventId, + // "calendarId": CalendarId + // } - if (this.roomId) { - this.chatMethodService.sendMessage(this.roomId, data1); - } + // if (this.roomId) { + // this.chatMethodService.sendMessage(this.roomId, data1); + // } - this.hhtpErrorHandle.httpsSucessMessagge('new event'); - let data = Object.assign(this.postEvent, { id: eventId }) - this.modalController.dismiss(data); - } + // this.hhtpErrorHandle.httpsSucessMessagge('new event'); + // let data = Object.assign(this.postEvent, { id: eventId }) + // this.modalController.dismiss(data); + // } - } catch (error) { - this.hhtpErrorHandle.httpStatusHandle(error) - } finally { - loader.remove() - } + // } catch (error) { + // this.hhtpErrorHandle.httpStatusHandle(error) + // } finally { + // loader.remove() + // } - } + // } //This method return calendar id @@ -717,177 +717,177 @@ export class NewEventPage implements OnInit { } //Deve ser removido posteriormente - async saveAproveEvent() { + // async saveAproveEvent() { - // console.log(this.postEvent) - // console.log(this.postEvent.CalendarName) - // console.log(this.CalendarName) - // console.log(this.eventService.calendarNamesAry) - const CalendarId = this.selectedCalendarId() + // // console.log(this.postEvent) + // // console.log(this.postEvent.CalendarName) + // // console.log(this.CalendarName) + // // console.log(this.eventService.calendarNamesAry) + // const CalendarId = this.selectedCalendarId() - let selectedCalendar - try { - selectedCalendar = this.eventService.calendarNamesAry.find(calendar => calendar.Fullname === this.CalendarName) - } catch (error) { + // let selectedCalendar + // try { + // selectedCalendar = this.eventService.calendarNamesAry.find(calendar => calendar.Fullname === this.CalendarName) + // } catch (error) { - } - // console.log('selectedCalendar', selectedCalendar) + // } + // // console.log('selectedCalendar', selectedCalendar) - if (selectedCalendar) { - if (selectedCalendar.Role = 'Presidente da República') { - let loader = this.toastService.loading(); + // if (selectedCalendar) { + // if (selectedCalendar.Role = 'Presidente da República') { + // let loader = this.toastService.loading(); - const DocumentToSave: EventAttachment[] = this.documents.map((e) => { - return { - SourceTitle: e.Assunto, - ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(), - Source: '1', - SourceId: e.Id, - ApplicationId: e.ApplicationType.toString(), - Id: '', - Link: '', - SerialNumber: '' - }; - }); + // const DocumentToSave: EventAttachment[] = this.documents.map((e) => { + // return { + // SourceTitle: e.Assunto, + // ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(), + // Source: '1', + // SourceId: e.Id, + // ApplicationId: e.ApplicationType.toString(), + // Id: '', + // Link: '', + // SerialNumber: '' + // }; + // }); - let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave); - await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'pr', body).subscribe((id) => { - loader.remove() - this.modalController.dismiss(); - this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove') + // let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave); + // await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'pr', body).subscribe((id) => { + // loader.remove() + // this.modalController.dismiss(); + // this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove') - /* DocumentToSave.forEach((attachments, i) => { - this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { - if (DocumentToSave.length == (i + 1)) { - this.afterSave(); - } - }); - }); + // /* DocumentToSave.forEach((attachments, i) => { + // this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { + // if (DocumentToSave.length == (i + 1)) { + // this.afterSave(); + // } + // }); + // }); - if (DocumentToSave.length == 0) { - this.afterSave(); - } */ + // if (DocumentToSave.length == 0) { + // this.afterSave(); + // } */ - }, (error) => { - loader.remove() - this.hhtpErrorHandle.httpStatusHandle(error) - }); + // }, (error) => { + // loader.remove() + // this.hhtpErrorHandle.httpStatusHandle(error) + // }); - } else if (selectedCalendar.Role = 'Ministro e Director do Gabinete do PR') { - let loader = this.toastService.loading(); + // } else if (selectedCalendar.Role = 'Ministro e Director do Gabinete do PR') { + // let loader = this.toastService.loading(); - const DocumentToSave: EventAttachment[] = this.documents.map((e) => { - return { - SourceTitle: e.Assunto, - ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(), - Source: '1', - SourceId: e.Id, - ApplicationId: e.ApplicationType.toString(), - Id: '', - Link: '', - SerialNumber: '' - }; - }); + // const DocumentToSave: EventAttachment[] = this.documents.map((e) => { + // return { + // SourceTitle: e.Assunto, + // ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(), + // Source: '1', + // SourceId: e.Id, + // ApplicationId: e.ApplicationType.toString(), + // Id: '', + // Link: '', + // SerialNumber: '' + // }; + // }); - let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave); - await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'md', body).subscribe((id) => { - loader.remove() - this.modalController.dismiss(); - this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove') + // let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave); + // await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'md', body).subscribe((id) => { + // loader.remove() + // this.modalController.dismiss(); + // this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove') - /* DocumentToSave.forEach((attachments, i) => { - this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { - if (DocumentToSave.length == (i + 1)) { - this.afterSave(); - } - }); - }); + // /* DocumentToSave.forEach((attachments, i) => { + // this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { + // if (DocumentToSave.length == (i + 1)) { + // this.afterSave(); + // } + // }); + // }); - if (DocumentToSave.length == 0) { - this.afterSave(); - } */ + // if (DocumentToSave.length == 0) { + // this.afterSave(); + // } */ - }, (error) => { - loader.remove() - this.hhtpErrorHandle.httpStatusHandle(error) - }); + // }, (error) => { + // loader.remove() + // this.hhtpErrorHandle.httpStatusHandle(error) + // }); - } + // } - } + // } - if (!selectedCalendar && this.CalendarName == "Meu calendario") { - console.log('SG generic') - this.postEvent.CalendarName + // if (!selectedCalendar && this.CalendarName == "Meu calendario") { + // console.log('SG generic') + // this.postEvent.CalendarName - const CalendarId = this.selectedCalendarId() - let loader = this.toastService.loading(); + // const CalendarId = this.selectedCalendarId() + // let loader = this.toastService.loading(); - this.postEvent.CalendarId = CalendarId + // this.postEvent.CalendarId = CalendarId - this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe( - (id) => { - loader.remove(); + // this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe( + // (id) => { + // loader.remove(); - const eventId: any = id; + // const eventId: any = id; - const DocumentToSave: EventAttachment[] = this.documents.map((e) => { - return { - SourceTitle: e.Assunto, - ParentId: eventId, - Source: '1', - SourceId: e.Id, - ApplicationId: e.ApplicationType.toString(), - Id: '', - Link: '', - SerialNumber: '' - }; - }); + // const DocumentToSave: EventAttachment[] = this.documents.map((e) => { + // return { + // SourceTitle: e.Assunto, + // ParentId: eventId, + // Source: '1', + // SourceId: e.Id, + // ApplicationId: e.ApplicationType.toString(), + // Id: '', + // Link: '', + // SerialNumber: '' + // }; + // }); - DocumentToSave.forEach((attachments, i) => { - this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { - if (DocumentToSave.length == (i + 1)) { - } - }); - }); + // DocumentToSave.forEach((attachments, i) => { + // this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { + // if (DocumentToSave.length == (i + 1)) { + // } + // }); + // }); - if (DocumentToSave.length == 0) { - } + // if (DocumentToSave.length == 0) { + // } - this.hhtpErrorHandle.httpsSucessMessagge('new event') - let data = { - "subject": this.postEvent.Subject, - "start": this.postEvent.StartDate, - "end": this.postEvent.EndDate, - "venue": this.postEvent.Location, - "id": id, - "calendarId": CalendarId - } - if (this.roomId) { - this.chatMethodService.sendMessage(this.roomId, data); - } + // this.hhtpErrorHandle.httpsSucessMessagge('new event') + // let data = { + // "subject": this.postEvent.Subject, + // "start": this.postEvent.StartDate, + // "end": this.postEvent.EndDate, + // "venue": this.postEvent.Location, + // "id": id, + // "calendarId": CalendarId + // } + // if (this.roomId) { + // this.chatMethodService.sendMessage(this.roomId, data); + // } - let dataa = Object.assign(this.postEvent, { id: eventId }) - this.modalController.dismiss(dataa); - }, (error) => { + // let dataa = Object.assign(this.postEvent, { id: eventId }) + // this.modalController.dismiss(dataa); + // }, (error) => { - loader.remove() - this.hhtpErrorHandle.httpStatusHandle(error) - }); + // loader.remove() + // this.hhtpErrorHandle.httpStatusHandle(error) + // }); - } + // } - } + // } // Deve ser removido posteriormente eventToaproveBody(event, calendarId, role, userId, attachments) { diff --git a/src/app/pages/chat/group-messages/group-messages.page.ts b/src/app/pages/chat/group-messages/group-messages.page.ts index 34927a2d0..889cde40b 100644 --- a/src/app/pages/chat/group-messages/group-messages.page.ts +++ b/src/app/pages/chat/group-messages/group-messages.page.ts @@ -15,7 +15,7 @@ import { NewEventPage } from '../../agenda/new-event/new-event.page'; import { EventPerson } from 'src/app/models/eventperson.model'; import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page'; import { ThemeService } from 'src/app/services/theme.service' -import { ViewEventPage } from 'src/app/modals/view-event/view-event.page'; +// import { ViewEventPage } from 'src/app/modals/view-event/view-event.page'; import { ChatSystemService } from 'src/app/services/chat/chat-system.service'; import { FileType } from 'src/app/models/fileType'; import { Storage } from '@ionic/storage'; @@ -341,28 +341,28 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { this.loadFiles(); } - 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(); + // } ngOnDestroy() { window.removeEventListener('scroll', this.scrollChangeCallback, true); diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal-routing.module.ts b/src/app/pages/events/event-detail-modal/event-detail-modal-routing.module.ts deleted file mode 100644 index bebfe4ea1..000000000 --- a/src/app/pages/events/event-detail-modal/event-detail-modal-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { EventDetailModalPage } from './event-detail-modal.page'; - -const routes: Routes = [ - { - path: '', - component: EventDetailModalPage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class EventDetailModalPageRoutingModule {} diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal.module.ts b/src/app/pages/events/event-detail-modal/event-detail-modal.module.ts deleted file mode 100644 index 5472c8c36..000000000 --- a/src/app/pages/events/event-detail-modal/event-detail-modal.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { EventDetailModalPageRoutingModule } from './event-detail-modal-routing.module'; - -import { EventDetailModalPage } from './event-detail-modal.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - EventDetailModalPageRoutingModule - ], - declarations: [EventDetailModalPage] -}) -export class EventDetailModalPageModule {} diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal.page.html b/src/app/pages/events/event-detail-modal/event-detail-modal.page.html deleted file mode 100644 index 0f1d3d08a..000000000 --- a/src/app/pages/events/event-detail-modal/event-detail-modal.page.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - Visualizar Evento - - - - - - - -
- - - - - Descrição - - - - Localização - - - - Calendário - - Pessoal - Oficial - - - - Tipo do evento - - Reunião - Viagem - Conferência - Encontro - - - - Data Início - - - - Data Fim - - - -
- - - Editar - - Intervenientes - -
-
-
- - - - {{attendee.Name}} - - -
- -
-
- -
-
-
-
- - - Editar - - Anexos - -
-
-
- - - - - -

{{ att.Description }}

-

{{ att.CreateDate }}

-
-
-
-
-
-
- -
-
- - - - - -

-

-
-
-
- - - - - Sem anexos - - - -
-
-
-
- -
-
- - - - - -
- - - - - - - - - - - - -

- -

-

- -

-

- -

-
-
- - - - - -

- -

-

- -

-

- -

-
-
- - - -

- -

-

- -

-

- -

-
-
-
-
- -
- - -
- Enviar -
-
-
- diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal.page.scss b/src/app/pages/events/event-detail-modal/event-detail-modal.page.scss deleted file mode 100644 index 0d2783cd0..000000000 --- a/src/app/pages/events/event-detail-modal/event-detail-modal.page.scss +++ /dev/null @@ -1,97 +0,0 @@ -@import '~src/function.scss'; - -ion-item-group{ - margin: 15px; -} -.div-item{ - width: 100%; - overflow: auto; - border-bottom: 1px solid #ccc; - margin: 10px 0 5px 0; -} -.div-up{ - width: 100%; - overflow: auto; -} -.div-up h3{ - margin: 0; - padding: 0; - font-size: rem(17); - width: 100%; -} -.div-icon{ - width: 10%; - font-size: rem(22); - float: left; - color: #808080; -} -.div-icon ion-icon{ - display: block; - margin: 0 auto; - -} -.div-content-attachment{ - width: 85%; - float: left; - padding: 0 0 0 12px; -} -.ion-icon-attach{ - color: #666666; - font-size: rem(20); -} - -.btn-attach{ - margin: 15px 0 0 0; - --color: #333; - --border-color:#333; -} -.div-card-button{ - width: 100%; - overflow: auto; - padding: 0 !important; -} -ion-card{ - margin: 2.5% !important; - width: 45%; - float: left; -} -.center{ - text-align: center; - float: center; -} - -/* FFOTER */ -.event-detail-buttons{ - width: 90%; - margin: 10px auto; -} -.event-detail-buttons ion-button{ - width: 90%; - margin: 0 auto; - display: block; - margin-bottom: 25px; -} -.ion-icon-delete{ - font-size: rem(22); - color: red; - background-color: white; - padding-right: 5px; -} -.error{ - color:red; - font-size: rem(12); - font-weight: bold; - padding-bottom: 20px; -} -/* .event-detail-buttons{ - margin-bottom: 80px; - margin-top: 10px; -} */ -.attendees-icon{ - font-size: rem(14); -} -.see-more-button{ - text-transform: initial; - font-size: rem(16); -} - diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal.page.spec.ts b/src/app/pages/events/event-detail-modal/event-detail-modal.page.spec.ts deleted file mode 100644 index 76c8032a4..000000000 --- a/src/app/pages/events/event-detail-modal/event-detail-modal.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { EventDetailModalPage } from './event-detail-modal.page'; - -describe('EventDetailModalPage', () => { - let component: EventDetailModalPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ EventDetailModalPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(EventDetailModalPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts b/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts deleted file mode 100644 index 12136919e..000000000 --- a/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts +++ /dev/null @@ -1,250 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; -import { AlertController, ModalController } from '@ionic/angular'; -import { Attachment } from 'src/app/models/attachment.model'; -import { Event } from 'src/app/models/event.model'; -import { EventBody } from 'src/app/models/eventbody.model'; -import { EventPerson } from 'src/app/models/eventperson.model'; -import { AlertService } from 'src/app/services/alert.service'; -import { AttachmentsService } from 'src/app/services/attachments.service'; -import { EventsService } from 'src/app/services/events.service'; -import { AttachmentsPage } from '../attachments/attachments.page'; -import { AttendeesPageModal } from '../attendees/attendees.page'; - -@Component({ - selector: 'app-event-detail-modal', - templateUrl: './event-detail-modal.page.html', - styleUrls: ['./event-detail-modal.page.scss'], -}) -export class EventDetailModalPage implements OnInit { - - loadedEvent: Event; - loadedEventAttachments: Attachment[]; - pageId: string; - showLoader: boolean; - backURL: string; - ionicForm: FormGroup; - isSubmitted = false; - - minDate: Date; - - profile:string; - - constructor( - public formBuilder: FormBuilder, - public alertController: AlertController, - private router: Router, - private activatedRoute: ActivatedRoute, - private eventsService: EventsService, - private modalCtrl: ModalController, - private alertService: AlertService, - private attachamentsService: AttachmentsService, - private route: Router,) { - this.loadedEvent = new Event(); - this.loadedEvent.Body = new EventBody(); - } - - ngOnInit() { - this.loadEvent(); - this.loadAttachments(); - this.ionicForm = this.formBuilder.group({ - subject: ['', [Validators.required]] - }) - - // this.setDefaultTime() - } - - // setDefaultTime() { - // this.loadedEvent.StartDate = new Date() - // this.loadedEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000)) - // } - - get errorControl() { - return this.ionicForm.controls; - } - - loadEvent(){ - let eventid: string; - this.activatedRoute.paramMap.subscribe(paramMap => - { - if (!paramMap.has("eventId")){ - return; - } - else{ - this.pageId = paramMap.get('eventId'); - eventid = paramMap.get('eventId'); - - - } - if (paramMap.has("caller")){ - this.backURL = "/home/" + paramMap.get('caller'); - } - } - ); - this.eventsService.getEvent(eventid).subscribe(response => { - this.loadedEvent = response; - }); - } - - async openAttendees(){ - const modal = await this.modalCtrl.create({ - component: AttendeesPageModal, - componentProps: { - eventAttendees: this.loadedEvent.Attendees - }, - cssClass: 'attendee modal-desktop', - backdropDismiss: false - }); - - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - await modal.present(); -} - - getEventAttendees(): EventPerson[] - { - return this.loadedEvent.Attendees; - } - - setEventAttendees(newattendes: EventPerson[]) - { - this.loadedEvent.Attendees = newattendes; - } - - async deleteConfirm() - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Apagar evento!', - message: 'Deseja apagar o evento da agenda ' + this.loadedEvent.CalendarName + '?', - buttons: [ - { - text: 'Não', - role: 'cancel', - cssClass: 'secondary', - handler: () => { } - }, { - text: 'Sim', - handler: () => { - this.Delete(); - } - } - ] - }); - - await alert.present(); - } - - Delete() - { - this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Evento removido', - buttons: ['OK'] - }); - - setTimeout(()=>{ - alert.dismiss(); - }, 1500); - - this.router.navigate(['/home/events']); - }); - } - - Save() - { - if (this.ionicForm.valid) - { - - this.eventsService.putEvent(this.loadedEvent, 2, 3, "md").subscribe(async () => - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Evento actualizado', - buttons: ['OK'] - }); - - setTimeout(()=>{ - alert.dismiss(); - }, 1500); - }); - } - } - - showAlert(){ - this.alertService.presentAlert("Funcionalidade em desenvolvimento"); - } - - loadAttachments() - { - /* this.attachamentsService.getEventAttachments(this.pageId).subscribe(attachments => { - this.loadedEventAttachments = attachments; - }); */ - this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { - - - },((erro) => { - console.error('loadAttchament', erro) - })); - } - async viewDocument(documenturl:string) - { - const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); - /* const browser = this.iab.create(url,"_blank"); - browser.show(); */ - } - - back() - { - //this.back(); - } - doRefresh(event){ - /* this.RefreshEvents(); */ - try { - event?.target?.complete(); -} catch(error) {} - setTimeout(() => { - try { - event?.target?.complete(); -} catch(error) {} - }, 2000); - - } - navigateTo(ev){ - this.route.navigate(['/home/events',ev]); - } - async openAttachments() { - const modal = await this.modalCtrl.create({ - component: AttachmentsPage, - componentProps: { - eventId: this.pageId, - attachments: this.loadedEventAttachments - }, - cssClass: 'attachments', - backdropDismiss: false - }); - - await modal.present(); - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - } - -} diff --git a/src/app/pages/events/event-detail/event-detail-routing.module.ts b/src/app/pages/events/event-detail/event-detail-routing.module.ts deleted file mode 100644 index a2b625fd8..000000000 --- a/src/app/pages/events/event-detail/event-detail-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { EventDetailPage } from './event-detail.page'; - -const routes: Routes = [ - { - path: '', - component: EventDetailPage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class EventDetailPageRoutingModule {} diff --git a/src/app/pages/events/event-detail/event-detail.module.ts b/src/app/pages/events/event-detail/event-detail.module.ts deleted file mode 100644 index 96baa24e9..000000000 --- a/src/app/pages/events/event-detail/event-detail.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { EventDetailPageRoutingModule } from './event-detail-routing.module'; - -import { EventDetailPage } from './event-detail.page'; - - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - ReactiveFormsModule, - EventDetailPageRoutingModule - ], - declarations: [EventDetailPage] -}) -export class EventDetailPageModule {} diff --git a/src/app/pages/events/event-detail/event-detail.page.html b/src/app/pages/events/event-detail/event-detail.page.html deleted file mode 100644 index dd67d33a2..000000000 --- a/src/app/pages/events/event-detail/event-detail.page.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - Visualizar Evento - - - - - - - -
- - -
- - Assunto - - - - - Campo obrigatório - -
- - Descrição - - - - Localização - - - - Calendário - - Pessoal - Oficial - - - - Tipo do evento - - Reunião - Viagem - Conferência - Encontro - - - - Data Início - - - - Data Fim - - - -
- - - Editar - - Intervenientes - -
-
-
- - - - {{attendee.Name}} - - -
- -
-
- -
-
-
-
- - - Editar - - Anexos - -
-
-
- - - - - -

{{ att.Description }}

-

{{ att.CreateDate }}

-
-
-
-
-
-
- -
-
- - - - - - - Sem anexos - - - -
-
-
-
- -
-
- - - - - -
- - - - - - - - - - - - -

- -

-

- -

-

- -

-
-
- - - - - -

- -

-

- -

-

- -

-
-
- - - -

- -

-

- -

-

- -

-
-
-
-
- -
- - -
- -
-
-
- diff --git a/src/app/pages/events/event-detail/event-detail.page.scss b/src/app/pages/events/event-detail/event-detail.page.scss deleted file mode 100644 index 5e735ad92..000000000 --- a/src/app/pages/events/event-detail/event-detail.page.scss +++ /dev/null @@ -1,119 +0,0 @@ -@import '~src/function.scss'; - -ion-item-group{ - margin: 15px; -} -.div-item{ - width: 100%; - overflow: auto; - border-bottom: 1px solid #ccc; - margin: 10px 0 5px 0; -} -.div-up{ - width: 100%; - overflow: auto; -} -.div-up h3{ - margin: 0; - padding: 0; - font-size: rem(17); - width: 100%; -} -.div-icon{ - width: 10%; - font-size: rem(22); - float: left; - color: #808080; -} -.div-icon ion-icon{ - display: block; - margin: 0 auto; - -} -.div-content-attachment{ - width: 85%; - float: left; - padding: 0 0 0 12px; -} -.ion-icon-attach{ - color: #666666; - font-size: rem(20); -} - -.btn-attach{ - margin: 15px 0 0 0; - --color: #333; - --border-color:#333; -} -.div-card-button{ - width: 100%; - overflow: auto; - padding: 0 !important; -} -ion-card{ - margin: 2.5% !important; - width: 45%; - float: left; -} -.center{ - text-align: center; - float: center; -} - -/* FFOTER */ -.event-detail-buttons{ - width: 90%; - margin: 10px auto; -} -.event-detail-buttons ion-button{ - width: 90%; - margin: 0 auto; - display: block; - margin-bottom: 25px; -} -.ion-icon-delete{ - font-size: rem(22); - color: red; - background-color: white; - padding-right: 5px; -} -.error{ - color:red; - font-size: rem(12); - font-weight: bold; - padding-bottom: 20px; -} -/* .event-detail-buttons{ - margin-bottom: 80px; - margin-top: 10px; -} */ -.attendees-icon{ - font-size: rem(14); -} -.see-more-button{ - text-transform: initial; - font-size: rem(16); -} - -.header-content{ - overflow: auto; - margin: 0 auto; - padding-top: 25px; -} -.header-icon-left{ - width: 36px; - font-size: rem(33); - color: #42b9fe; - float: left; - border: 1px solid red; -} -.header-title{ - width: 300px; - font-family: Roboto; - font-size: rem(25); - margin: 0 5px 0 5px; - padding: 0; - color:#000; - float: left; -} - diff --git a/src/app/pages/events/event-detail/event-detail.page.spec.ts b/src/app/pages/events/event-detail/event-detail.page.spec.ts deleted file mode 100644 index a3f346841..000000000 --- a/src/app/pages/events/event-detail/event-detail.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { EventDetailPage } from './event-detail.page'; - -describe('EventDetailPage', () => { - let component: EventDetailPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ EventDetailPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(EventDetailPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/events/event-detail/event-detail.page.ts b/src/app/pages/events/event-detail/event-detail.page.ts deleted file mode 100644 index d2b709dff..000000000 --- a/src/app/pages/events/event-detail/event-detail.page.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { EventsService } from 'src/app/services/events.service'; -import { Router } from '@angular/router'; -import { Event } from '../../../models/event.model'; -import { EventBody } from 'src/app/models/eventbody.model'; -import { AlertController, ModalController } from '@ionic/angular'; -import { EventPerson } from 'src/app/models/eventperson.model'; -import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page'; -import { AlertService } from 'src/app/services/alert.service'; -import { Attachment } from 'src/app/models/attachment.model'; -import { AttachmentsService } from 'src/app/services/attachments.service'; -import { FormGroup, FormBuilder, Validators } from "@angular/forms"; -import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -import { AttachmentsPage } from '../attachments/attachments.page'; -import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; - - -@Component({ - selector: 'app-event-detail', - templateUrl: './event-detail.page.html', - styleUrls: ['./event-detail.page.scss'], -}) -export class EventDetailPage implements OnInit { - - loadedEvent: Event; - loadedEventAttachments: Attachment[]; - pageId: string; - showLoader: boolean; - backURL: string; - ionicForm: FormGroup; - isSubmitted = false; - - minDate: Date; - - profile:string; - - - constructor( - public formBuilder: FormBuilder, - public alertController: AlertController, - private router: Router, - private activatedRoute: ActivatedRoute, - private eventsService: EventsService, - private modalCtrl: ModalController, - private alertService: AlertService, - private attachamentsService: AttachmentsService, - private route: Router, - private iab: InAppBrowser, - private httpErrorHandle: HttpErrorHandle) { - this.loadedEvent = new Event(); - this.loadedEvent.Body = new EventBody(); - } - - - ngOnInit() { - this.loadEvent(); - this.loadAttachments(); - this.ionicForm = this.formBuilder.group({ - subject: ['', [Validators.required]] - }) - } - - get errorControl() { - return this.ionicForm.controls; - } - - loadEvent(){ - let eventid: string; - this.activatedRoute.paramMap.subscribe(paramMap => - { - if (!paramMap.has("eventId")){ - return; - } - else{ - this.pageId = paramMap.get('eventId'); - eventid = paramMap.get('eventId'); - - } - if (paramMap.has("caller")){ - this.backURL = "/home/" + paramMap.get('caller'); - } - } - ); - this.eventsService.getEvent(eventid).subscribe(response => { - this.loadedEvent = response; - },(error) => { - this.httpErrorHandle.httpStatusHandle(error) - }); - } - - async openAttendees(){ - const modal = await this.modalCtrl.create({ - component: AttendeesPageModal, - componentProps: { - eventAttendees: this.loadedEvent.Attendees - }, - cssClass: 'attendee modal-desktop', - backdropDismiss: false - }); - - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - await modal.present(); -} - - getEventAttendees(): EventPerson[] - { - return this.loadedEvent.Attendees; - } - - setEventAttendees(newattendes: EventPerson[]) - { - this.loadedEvent.Attendees = newattendes; - } - - async deleteConfirm() - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Apagar evento!', - message: 'Deseja apagar o evento da agenda ' + this.loadedEvent.CalendarName + '?', - buttons: [ - { - text: 'Não', - role: 'cancel', - cssClass: 'secondary', - handler: () => { } - }, { - text: 'Sim', - handler: () => { - this.Delete(); - } - } - ] - }); - - await alert.present(); - } - - Delete() - { - this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => - { - /* const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Evento removido', - buttons: ['OK'] - }); - - await alert.present(); */ - - this.router.navigate(['/home/events']); - }); - } - - Save() - { - // if (this.ionicForm.valid){ - - // this.activatedRoute.paramMap.subscribe(paramMap =>{ - // if (paramMap.has("profile")){ - - // } - // }); - - // this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () => - // { - // const alert = await this.alertController.create({ - // cssClass: 'my-custom-class', - // header: 'Evento actualizado', - // buttons: ['OK'] - // }); - - // setTimeout(()=>{ - // alert.dismiss(); - // }, 1500); - // }); - // } - } - - showAlert(){ - this.alertService.presentAlert("Funcionalidade em desenvolvimento"); - } - - loadAttachments() - { - - this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { - this.loadedEventAttachments = res; - - },((erro) => { - console.error('loadAttchament', erro) - })); - } - async viewDocument(documenturl:string) - { - const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); - const browser = this.iab.create(url,"_blank"); - browser.show(); - } - - back() - { - //this.back(); - } - doRefresh(event){ - /* this.RefreshEvents(); */ - try { - event?.target?.complete(); -} catch(error) {} - setTimeout(() => { - try { - event?.target?.complete(); -} catch(error) {} - }, 2000); - - } - navigateTo(ev){ - this.route.navigate(['/home/events',ev]); - } - async openAttachments(){ - const modal = await this.modalCtrl.create({ - component: AttachmentsPage, - componentProps: { - eventId: this.pageId, - attachments: this.loadedEventAttachments - }, - cssClass: 'attachments', - backdropDismiss: false - }); - - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - await modal.present(); - - } - -} diff --git a/src/app/pages/events/events-routing.module.ts b/src/app/pages/events/events-routing.module.ts index 5b2cbdb3c..9f1364e0b 100644 --- a/src/app/pages/events/events-routing.module.ts +++ b/src/app/pages/events/events-routing.module.ts @@ -8,10 +8,6 @@ const routes: Routes = [ path: '', component: EventsPage }, - { - path: 'event-detail', - loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule) - }, { path: 'attachments', loadChildren: () => import('./attachments/attachments.module').then( m => m.AttachmentsPageModule) @@ -20,10 +16,6 @@ const routes: Routes = [ path: 'attendees', loadChildren: () => import('./attendees/attendees.module').then( m => m.AttendeesPageModule) }, - { - path: 'event-detail-modal', - loadChildren: () => import('./event-detail-modal/event-detail-modal.module').then( m => m.EventDetailModalPageModule) - }, { path: 'edit-event', loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule) diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index a105ee791..23c07f86e 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -3,7 +3,6 @@ import { EventsService } from 'src/app/services/events.service'; import { NavigationExtras, Router } from '@angular/router'; import { ActivatedRoute, NavigationEnd } from '@angular/router'; import { ModalController, Platform } from '@ionic/angular'; -import { EventDetailPage } from './event-detail/event-detail.page'; import { ProcessesService } from '../../services/processes.service'; import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service'; import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe'; @@ -324,22 +323,6 @@ export class EventsPage implements OnInit { } } - async openEventDetail1(id: any) { - // - - const modal = await this.modalController.create({ - component: EventDetailPage, - componentProps: { - eventId: id, - }, - cssClass: 'event-detail', - backdropDismiss: false - }); - - modal.onDidDismiss(); - await modal.present(); - - } async openEventDetail(id: any) { // diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index ec24414d6..afb01d3da 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -443,79 +443,79 @@ export class EventsService { } - getAllPrOficialEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/pr'; - geturl = geturl.replace('/V4/', '/V5/') + // getAllPrOficialEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/pr'; + // geturl = geturl.replace('/V4/', '/V5/') - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("Start", startdate); - params = params.set("End", enddate); + // params = params.set("Start", startdate); + // params = params.set("End", enddate); - let options = { - headers: this.headersPrOficial, - params: params - }; - return this.http.get(`${geturl}`, options); - } + // let options = { + // headers: this.headersPrOficial, + // params: params + // }; + // return this.http.get(`${geturl}`, options); + // } - getAllPrPessoalEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/pr'; - geturl = geturl.replace('/V4/', '/V5/') + // getAllPrPessoalEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/pr'; + // geturl = geturl.replace('/V4/', '/V5/') - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("Start", startdate); - params = params.set("End", enddate); + // params = params.set("Start", startdate); + // params = params.set("End", enddate); - let options = { - headers: this.headersPrPessoal, - params: params - }; - return this.http.get(`${geturl}`, options); - } + // let options = { + // headers: this.headersPrPessoal, + // params: params + // }; + // return this.http.get(`${geturl}`, options); + // } - async getAllPrEvents(startdate: string, enddate: string): Promise { + // async getAllPrEvents(startdate: string, enddate: string): Promise { - let prO = [], prP = []; + // let prO = [], prP = []; - prO = await this.getAllPrOficialEvents(startdate, enddate).toPromise(); - prP = await this.getAllPrPessoalEvents(startdate, enddate).toPromise(); - const resFinal = prO.concat(prP); - return new Promise(resolve => { - return resolve(resFinal) - }) - } + // prO = await this.getAllPrOficialEvents(startdate, enddate).toPromise(); + // prP = await this.getAllPrPessoalEvents(startdate, enddate).toPromise(); + // const resFinal = prO.concat(prP); + // return new Promise(resolve => { + // return resolve(resFinal) + // }) + // } - getAllMdOficialEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/md'; + // getAllMdOficialEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/md'; - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("Start", startdate); - params = params.set("End", enddate); + // params = params.set("Start", startdate); + // params = params.set("End", enddate); - let options = { - headers: this.headersMdOficial, - params: params - }; - return this.http.get(`${geturl}`, options); - } + // let options = { + // headers: this.headersMdOficial, + // params: params + // }; + // return this.http.get(`${geturl}`, options); + // } - getAllMdPessoalEvents(startdate: string, enddate: string): any { - let geturl = environment.apiURL + 'calendar/md'; + // getAllMdPessoalEvents(startdate: string, enddate: string): any { + // let geturl = environment.apiURL + 'calendar/md'; - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("Start", startdate); - params = params.set("End", enddate); + // params = params.set("Start", startdate); + // params = params.set("End", enddate); - let options = { - headers: this.headersMdPessoal, - params: params - }; - return this.http.get(`${geturl}`, options) - } + // let options = { + // headers: this.headersMdPessoal, + // params: params + // }; + // return this.http.get(`${geturl}`, options) + // } GetCalendarName(userid:string) { @@ -534,271 +534,271 @@ export class EventsService { return this.http.get(`${geturl}`, options) } - async getAllMdEvents(startdate: string, enddate: string) { + // async getAllMdEvents(startdate: string, enddate: string) { - let prO = [], prP = []; + // let prO = [], prP = []; - for (let calendar of SessionStore.user.OwnerCalendars) { - if (calendar.CalendarName == 'Oficial') { - prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise(); - if(!Array.isArray(prO)) { - prO = [] - } - } - if(calendar.CalendarName == 'Pessoal') { - prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise(); - if(!Array.isArray(prP)) { - prP = [] - } - } - } + // for (let calendar of SessionStore.user.OwnerCalendars) { + // if (calendar.CalendarName == 'Oficial') { + // prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise(); + // if(!Array.isArray(prO)) { + // prO = [] + // } + // } + // if(calendar.CalendarName == 'Pessoal') { + // prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise(); + // if(!Array.isArray(prP)) { + // prP = [] + // } + // } + // } - const resFinal = prO.concat(prP); - return new Promise(resolve => { - return resolve(resFinal) - }); - } + // const resFinal = prO.concat(prP); + // return new Promise(resolve => { + // return resolve(resFinal) + // }); + // } - async getAllOwnEvents(startdate: string, enddate: string) { + // async getAllOwnEvents(startdate: string, enddate: string) { - let ownO = [], ownP = []; + // let ownO = [], ownP = []; - if(this.hasOwnOficial) { - ownO = await this.getAllOwnOficialEvents(startdate, enddate).toPromise(); - if(!Array.isArray(ownO)) { - ownO = [] - } - } + // if(this.hasOwnOficial) { + // ownO = await this.getAllOwnOficialEvents(startdate, enddate).toPromise(); + // if(!Array.isArray(ownO)) { + // ownO = [] + // } + // } - if(this.hasOwnPessoal) { - ownP = await this.getAllOwnPessoalEvents(startdate, enddate).toPromise(); - if(!Array.isArray(ownP)) { - ownP = [] - } - } + // if(this.hasOwnPessoal) { + // ownP = await this.getAllOwnPessoalEvents(startdate, enddate).toPromise(); + // if(!Array.isArray(ownP)) { + // ownP = [] + // } + // } - const resFinal = ownO.concat(ownP); - return new Promise(resolve => { - return resolve(resFinal) - }); - } + // const resFinal = ownO.concat(ownP); + // return new Promise(resolve => { + // return resolve(resFinal) + // }); + // } - getAllOwnOficialEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/GetEvents'; + // getAllOwnOficialEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/GetEvents'; - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("StartDate", startdate); - params = params.set("EndDate", enddate); + // params = params.set("StartDate", startdate); + // params = params.set("EndDate", enddate); - let options = { - headers: this.headerOwnOficial, - params: params - }; - return this.http.get(`${geturl}`, options); - } + // let options = { + // headers: this.headerOwnOficial, + // params: params + // }; + // return this.http.get(`${geturl}`, options); + // } - getAllOwnPessoalEvents(startdate: string, enddate: string): any { - let geturl = environment.apiURL + 'calendar/GetEvents'; + // getAllOwnPessoalEvents(startdate: string, enddate: string): any { + // let geturl = environment.apiURL + 'calendar/GetEvents'; - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("StartDate", startdate); - params = params.set("EndDate", enddate); + // params = params.set("StartDate", startdate); + // params = params.set("EndDate", enddate); - let options = { - headers: this.headerOwnPessoal, - params: params - }; - return this.http.get(`${geturl}`, options) - } + // let options = { + // headers: this.headerOwnPessoal, + // params: params + // }; + // return this.http.get(`${geturl}`, options) + // } - private deferenceBetweenDays(start: any, end: any) { - const diffTime = Math.abs(end - start); - return Math.ceil(diffTime / (1000 * 60 * 60 * 24)); - } + // private deferenceBetweenDays(start: any, end: any) { + // const diffTime = Math.abs(end - start); + // return Math.ceil(diffTime / (1000 * 60 * 60 * 24)); + // } - async getEventsByCalendarId( startdate: string, enddate: string, calendarId: any) { - const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars) - const agendasCalendars = calendars.filter( e => e.CalendarId == calendarId) + // async getEventsByCalendarId( startdate: string, enddate: string, calendarId: any) { + // const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars) + // const agendasCalendars = calendars.filter( e => e.CalendarId == calendarId) - let result = [] + // let result = [] - for(let agendasCalendar of agendasCalendars) { - var header = new HttpHeaders();; - header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization); - header = header.set('CalendarId', agendasCalendar.CalendarId); - header = header.set('CalendarRoleId', agendasCalendar.CalendarRoleId); - header = header.set('CalendarName', agendasCalendar.CalendarName); + // for(let agendasCalendar of agendasCalendars) { + // var header = new HttpHeaders();; + // header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization); + // header = header.set('CalendarId', agendasCalendar.CalendarId); + // header = header.set('CalendarRoleId', agendasCalendar.CalendarRoleId); + // header = header.set('CalendarName', agendasCalendar.CalendarName); - let geturl = environment.apiURL + 'calendar/GetEvents'; + // let geturl = environment.apiURL + 'calendar/GetEvents'; - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("StartDate", startdate); - params = params.set("EndDate", enddate); + // params = params.set("StartDate", startdate); + // params = params.set("EndDate", enddate); - let options = { - headers: header, - params: params - }; + // let options = { + // headers: header, + // params: params + // }; - let calendar = await this.http.get(`${geturl}`, options).toPromise() + // let calendar = await this.http.get(`${geturl}`, options).toPromise() - calendar = calendar.map(e => { - if(e.IsAllDayEvent && this.deferenceBetweenDays(new Date(e.StartDate), new Date(e.EndDate)) >= 1) { + // calendar = calendar.map(e => { + // if(e.IsAllDayEvent && this.deferenceBetweenDays(new Date(e.StartDate), new Date(e.EndDate)) >= 1) { - const date = new Date(e.EndDate); + // const date = new Date(e.EndDate); - date.setDate(date.getDate() -1); + // date.setDate(date.getDate() -1); - const _date = String(date.getDate()).padStart(2,'0'); - const month = String(date.getMonth() + 1).padStart(2,'0'); - const fullYear = date.getFullYear(); + // const _date = String(date.getDate()).padStart(2,'0'); + // const month = String(date.getMonth() + 1).padStart(2,'0'); + // const fullYear = date.getFullYear(); - console.log({_date, month}) - const formattedDate = `${fullYear}-${month}-${_date} 23:59`; - e.EndDate = formattedDate - } + // console.log({_date, month}) + // const formattedDate = `${fullYear}-${month}-${_date} 23:59`; + // e.EndDate = formattedDate + // } - return e - }) - result = result.concat(calendar) - } + // return e + // }) + // result = result.concat(calendar) + // } - return result - } + // return result + // } - async genericGetAllSharedEvents(startdate: string, enddate: string) { + // async genericGetAllSharedEvents(startdate: string, enddate: string) { - let result = [] + // let result = [] - for (let sharedCalendar of SessionStore.user.SharedCalendars) { + // for (let sharedCalendar of SessionStore.user.SharedCalendars) { - var header = new HttpHeaders();; - header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization); - header = header.set('CalendarId', sharedCalendar.CalendarId); - header = header.set('CalendarRoleId', sharedCalendar.CalendarRoleId); - header = header.set('CalendarName', sharedCalendar.CalendarName); + // var header = new HttpHeaders();; + // header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization); + // header = header.set('CalendarId', sharedCalendar.CalendarId); + // header = header.set('CalendarRoleId', sharedCalendar.CalendarRoleId); + // header = header.set('CalendarName', sharedCalendar.CalendarName); - let geturl = environment.apiURL + 'calendar/GetEvents'; + // let geturl = environment.apiURL + 'calendar/GetEvents'; - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("StartDate", startdate); - params = params.set("EndDate", enddate); + // params = params.set("StartDate", startdate); + // params = params.set("EndDate", enddate); - let options = { - headers: header, - params: params - }; + // let options = { + // headers: header, + // params: params + // }; - const calendar = await this.http.get(`${geturl}`, options).toPromise() + // const calendar = await this.http.get(`${geturl}`, options).toPromise() - result = result.concat(calendar) + // result = result.concat(calendar) - } + // } - return new Promise(resolve => { - return resolve(result) - }); - } + // return new Promise(resolve => { + // return resolve(result) + // }); + // } - genericGetAllSharedOficialEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/GetEvents'; - geturl = geturl.replace('/V4/', '/V5/') + // genericGetAllSharedOficialEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/GetEvents'; + // geturl = geturl.replace('/V4/', '/V5/') - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("StartDate", startdate); - params = params.set("EndDate", enddate); + // params = params.set("StartDate", startdate); + // params = params.set("EndDate", enddate); - let options = { - headers: this.headerSharedOficial, - params: params - }; + // let options = { + // headers: this.headerSharedOficial, + // params: params + // }; - return this.http.get(`${geturl}`, options); - } + // return this.http.get(`${geturl}`, options); + // } - genericGetAllSharedPessoalEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/GetEvents'; - geturl = geturl.replace('/V4/', '/V5/') + // genericGetAllSharedPessoalEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/GetEvents'; + // geturl = geturl.replace('/V4/', '/V5/') - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("StartDate", startdate); - params = params.set("EndDate", enddate); + // params = params.set("StartDate", startdate); + // params = params.set("EndDate", enddate); - let options = { - headers: this.headerSharedPessoal, - params: params - }; - return this.http.get(`${geturl}`, options); - } + // let options = { + // headers: this.headerSharedPessoal, + // params: params + // }; + // return this.http.get(`${geturl}`, options); + // } - async getAllSharedEvents(startdate: string, enddate: string) { + // async getAllSharedEvents(startdate: string, enddate: string) { - let prO = [], prP = []; + // let prO = [], prP = []; - for(let calendar of SessionStore.user.SharedCalendars) { - if (calendar.CalendarName == 'Oficial') { - prO = await this.getAllSharedOficialEvents(startdate, enddate).toPromise(); - } - if(calendar.CalendarName == 'Pessoal') { - prP = await this.getAllSharedPessoalEvents(startdate, enddate).toPromise(); - } + // for(let calendar of SessionStore.user.SharedCalendars) { + // if (calendar.CalendarName == 'Oficial') { + // prO = await this.getAllSharedOficialEvents(startdate, enddate).toPromise(); + // } + // if(calendar.CalendarName == 'Pessoal') { + // prP = await this.getAllSharedPessoalEvents(startdate, enddate).toPromise(); + // } - } + // } - const resFinal = prO.concat(prP); + // const resFinal = prO.concat(prP); - return new Promise(resolve => { - return resolve(resFinal) - }); - } + // return new Promise(resolve => { + // return resolve(resFinal) + // }); + // } - getAllSharedOficialEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/pr'; - geturl = geturl.replace('/V4/', '/V5/') + // getAllSharedOficialEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/pr'; + // geturl = geturl.replace('/V4/', '/V5/') - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("Start", startdate); - params = params.set("End", enddate); + // params = params.set("Start", startdate); + // params = params.set("End", enddate); - let options = { - headers: this.headersSharedOficial, - params: params - }; + // let options = { + // headers: this.headersSharedOficial, + // params: params + // }; - return this.http.get(`${geturl}`, options); - } + // return this.http.get(`${geturl}`, options); + // } - getAllSharedPessoalEvents(startdate: string, enddate: string): Observable { - let geturl = environment.apiURL + 'calendar/pr'; - geturl = geturl.replace('/V4/', '/V5/') + // getAllSharedPessoalEvents(startdate: string, enddate: string): Observable { + // let geturl = environment.apiURL + 'calendar/pr'; + // geturl = geturl.replace('/V4/', '/V5/') - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("Start", startdate); - params = params.set("End", enddate); + // params = params.set("Start", startdate); + // params = params.set("End", enddate); - let options = { - headers: this.headersSharedPessoal, - params: params - }; - return this.http.get(`${geturl}`, options); - } + // let options = { + // headers: this.headersSharedPessoal, + // params: params + // }; + // return this.http.get(`${geturl}`, options); + // } getRecurrenceTypes(): any { @@ -810,20 +810,20 @@ export class EventsService { } - getEvents(calendarname: string, startdate: string, enddate: string): Observable { - const geturl = environment.apiURL + 'calendar/GetEvents'; - let params = new HttpParams(); + // getEvents(calendarname: string, startdate: string, enddate: string): Observable { + // const geturl = environment.apiURL + 'calendar/GetEvents'; + // let params = new HttpParams(); - params = params.set("CalendarName", calendarname); - params = params.set("StartDate", startdate); - params = params.set("EndDate", enddate); + // params = params.set("CalendarName", calendarname); + // params = params.set("StartDate", startdate); + // params = params.set("EndDate", enddate); - let options = { - headers: this.headers, - params: params - }; - return this.http.get(`${geturl}`, options); - } + // let options = { + // headers: this.headers, + // params: params + // }; + // return this.http.get(`${geturl}`, options); + // } getEvent(eventid: string): Observable { let geturl = environment.apiURL + 'calendar/GetEvent'; @@ -862,147 +862,147 @@ export class EventsService { throw('error') } - putEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, sharedagenda: string): Observable { - const puturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'PutEvent'); + // putEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, sharedagenda: string): Observable { + // const puturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'PutEvent'); - let params = new HttpParams(); + // let params = new HttpParams(); - params = params.set("conflictResolutionMode", conflictResolutionMode.toString()); - params = params.set("sendInvitationsOrCancellationsMode", sendInvitationsOrCancellationsMode.toString()); + // params = params.set("conflictResolutionMode", conflictResolutionMode.toString()); + // params = params.set("sendInvitationsOrCancellationsMode", sendInvitationsOrCancellationsMode.toString()); - let options = { - headers: this.headers, - params: params - }; + // let options = { + // headers: this.headers, + // params: params + // }; - return this.http.put(`${puturl}`, event, options) - } + // return this.http.put(`${puturl}`, event, options) + // } - editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId ): Observable { - let arrayReq = []; - arrayReq.push(event); - const puturl = environment.apiURL + 'calendar/PutEvent'; - let params = new HttpParams(); + // editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId ): Observable { + // let arrayReq = []; + // arrayReq.push(event); + // const puturl = environment.apiURL + 'calendar/PutEvent'; + // let params = new HttpParams(); - // event.Organizer = { - // "Id": SessionStore.user.UserId, - // "EmailAddress": SessionStore.user.Email, - // "Name": SessionStore.user.UserName, - // "IsRequired": true, - // "UserType": "GD" - // } - // params = params.set("notifyUsers", true) + // // event.Organizer = { + // // "Id": SessionStore.user.UserId, + // // "EmailAddress": SessionStore.user.Email, + // // "Name": SessionStore.user.UserName, + // // "IsRequired": true, + // // "UserType": "GD" + // // } + // // params = params.set("notifyUsers", true) - params = params.set("conflictResolutionMode", conflictResolutionMode.toString()); - params = params.set("sendInvitationsOrCancellationsMode", sendInvitationsOrCancellationsMode.toString()); - params.set('CalendarId', event.CalendarId) - params.set('CalendarName', event.CalendarName) - this.headers['CalendarId'] = event.CalendarId - this.headers['CalendarName'] = event.CalendarName - //params = params.set("CalendarName", event.CalendarName); + // params = params.set("conflictResolutionMode", conflictResolutionMode.toString()); + // params = params.set("sendInvitationsOrCancellationsMode", sendInvitationsOrCancellationsMode.toString()); + // params.set('CalendarId', event.CalendarId) + // params.set('CalendarName', event.CalendarName) + // this.headers['CalendarId'] = event.CalendarId + // this.headers['CalendarName'] = event.CalendarName + // //params = params.set("CalendarName", event.CalendarName); - if (event.CalendarName == 'Oficial') { - if (SessionStore.user.Profile == 'MDGPR') { - this.headers = this.headersMdOficial; - } - else if (SessionStore.user.Profile == 'PR') { - this.headers = this.headersPrOficial; - } else { + // if (event.CalendarName == 'Oficial') { + // if (SessionStore.user.Profile == 'MDGPR') { + // this.headers = this.headersMdOficial; + // } + // else if (SessionStore.user.Profile == 'PR') { + // this.headers = this.headersPrOficial; + // } else { - if(CalendarId) { + // if(CalendarId) { - const headers = [ - this.headerSharedOficial, - this.headerSharedPessoal, - this.headerOwnPessoal, - this.headerOwnOficial - ] + // const headers = [ + // this.headerSharedOficial, + // this.headerSharedPessoal, + // this.headerOwnPessoal, + // this.headerOwnOficial + // ] - const calendar = this.DetectCalendars(CalendarId) - const header = this.makeHeader(calendar) + // const calendar = this.DetectCalendars(CalendarId) + // const header = this.makeHeader(calendar) - this.headers = header - } else { - const headers = [ - this.headerSharedOficial, - this.headerSharedPessoal, - this.headerOwnPessoal, - this.headerOwnOficial - ] + // this.headers = header + // } else { + // const headers = [ + // this.headerSharedOficial, + // this.headerSharedPessoal, + // this.headerOwnPessoal, + // this.headerOwnOficial + // ] - const header = headers.find((header)=> { - return header?.get('CalendarId')?.includes(CalendarId) - }) + // const header = headers.find((header)=> { + // return header?.get('CalendarId')?.includes(CalendarId) + // }) - this.headers = header - } + // this.headers = header + // } - } - } - else { - if (SessionStore.user.Profile == 'MDGPR') { - this.headers = this.headersMdPessoal; - } - else if (SessionStore.user.Profile == 'PR') { - this.headers = this.headersPrPessoal; - } - else { + // } + // } + // else { + // if (SessionStore.user.Profile == 'MDGPR') { + // this.headers = this.headersMdPessoal; + // } + // else if (SessionStore.user.Profile == 'PR') { + // this.headers = this.headersPrPessoal; + // } + // else { - if(CalendarId) { + // if(CalendarId) { - const headers = [ - this.headerSharedOficial, - this.headerSharedPessoal, - this.headerOwnPessoal, - this.headerOwnOficial - ] + // const headers = [ + // this.headerSharedOficial, + // this.headerSharedPessoal, + // this.headerOwnPessoal, + // this.headerOwnOficial + // ] - const calendar = this.DetectCalendars(CalendarId) - const header = this.makeHeader(calendar) + // const calendar = this.DetectCalendars(CalendarId) + // const header = this.makeHeader(calendar) - this.headers = header - } else { - const headers = [ - this.headerSharedOficial, - this.headerSharedPessoal, - this.headerOwnPessoal, - this.headerOwnOficial - ] + // this.headers = header + // } else { + // const headers = [ + // this.headerSharedOficial, + // this.headerSharedPessoal, + // this.headerOwnPessoal, + // this.headerOwnOficial + // ] - const header = headers.find((header)=> { - return header?.get('CalendarId')?.includes(CalendarId) - }) + // const header = headers.find((header)=> { + // return header?.get('CalendarId')?.includes(CalendarId) + // }) - this.headers = header - } - } - } + // this.headers = header + // } + // } + // } - let options = { - headers: this.headers, - params: params - }; + // let options = { + // headers: this.headers, + // params: params + // }; - return this.http.put(`${puturl}`, event, options).pipe( - catchError(err => { + // return this.http.put(`${puturl}`, event, options).pipe( + // catchError(err => { - this.offlinemanager.storeRequestData('eventEdit', arrayReq); - throw new Error(err); - }) - ) - } + // this.offlinemanager.storeRequestData('eventEdit', arrayReq); + // throw new Error(err); + // }) + // ) + // } - changeAgenda(body: any) { - const puturl = environment.apiURL + 'Calendar/MoveEvent'; - let options = { - headers: this.headers, - }; - return this.http.post(`${puturl}`, body, options); - } + // changeAgenda(body: any) { + // const puturl = environment.apiURL + 'Calendar/MoveEvent'; + // let options = { + // headers: this.headers, + // }; + // return this.http.post(`${puturl}`, body, options); + // } postEventMd(event: Event, calendarName: string) { const puturl = environment.apiURL + 'calendar/md'; @@ -1150,154 +1150,148 @@ export class EventsService { break; } - return this.http.delete(`${puturl}`, options).pipe( - catchError(err => { - - this.offlinemanager.storeRequestData('eventDelete', arrayReq); - throw new Error(err); - }) - ) + return this.http.delete(`${puturl}`, options) } - genericDeleteEvent(eventid: string, eventDeleteType: number, calendarName: string, calendarId: string) { - let arrayReq = []; - let Object = { - eventid: eventid, - eventDeleteType: eventDeleteType, - calendarName: calendarName - } - arrayReq.push(Object) - const puturl = environment.apiURL + 'calendar/DeleteEvent'; - let params = new HttpParams(); + // genericDeleteEvent(eventid: string, eventDeleteType: number, calendarName: string, calendarId: string) { + // let arrayReq = []; + // let Object = { + // eventid: eventid, + // eventDeleteType: eventDeleteType, + // calendarName: calendarName + // } + // arrayReq.push(Object) + // const puturl = environment.apiURL + 'calendar/DeleteEvent'; + // let params = new HttpParams(); - params = params.set("EventId", eventid); - // 0 for occurence and 1 for serie (delete all events) - params = params.set("eventDeleteType", eventDeleteType.toString()); + // params = params.set("EventId", eventid); + // // 0 for occurence and 1 for serie (delete all events) + // params = params.set("eventDeleteType", eventDeleteType.toString()); - let options; + // let options; - if(SessionStore.user.Profile == 'MDGPR') { - if (calendarName == 'Pessoal') { - options = { - headers: this.headersMdPessoal, - params: params - }; - } - else if (calendarName == 'Oficial') { - options = { - headers: this.headersMdOficial, - params: params - }; - } - } - else if (SessionStore.user.Profile == 'PR') { - if (calendarName == 'Pessoal') { - options = { - headers: this.headersPrPessoal, - params: params - }; - } - else if (calendarName == 'Oficial') { - options = { - headers: this.headersPrOficial, - params: params - }; - } - } - else { - const headers = [ - this.headerSharedOficial, - this.headerSharedPessoal, - this.headerOwnPessoal, - this.headerOwnOficial - ] + // if(SessionStore.user.Profile == 'MDGPR') { + // if (calendarName == 'Pessoal') { + // options = { + // headers: this.headersMdPessoal, + // params: params + // }; + // } + // else if (calendarName == 'Oficial') { + // options = { + // headers: this.headersMdOficial, + // params: params + // }; + // } + // } + // else if (SessionStore.user.Profile == 'PR') { + // if (calendarName == 'Pessoal') { + // options = { + // headers: this.headersPrPessoal, + // params: params + // }; + // } + // else if (calendarName == 'Oficial') { + // options = { + // headers: this.headersPrOficial, + // params: params + // }; + // } + // } + // else { + // const headers = [ + // this.headerSharedOficial, + // this.headerSharedPessoal, + // this.headerOwnPessoal, + // this.headerOwnOficial + // ] - const header = headers.find((header)=> { - return header?.get('CalendarId')?.includes(calendarId) - }) + // const header = headers.find((header)=> { + // return header?.get('CalendarId')?.includes(calendarId) + // }) - if (header) { + // if (header) { - options = { - headers: header, - params: params - }; + // options = { + // headers: header, + // params: params + // }; - return this.http.delete(`${puturl}`, options).pipe( - catchError(err => { + // return this.http.delete(`${puturl}`, options).pipe( + // catchError(err => { - this.offlinemanager.storeRequestData('eventDelete', arrayReq); - throw new Error(err); - }) - ) - } else { - const calendar = this.DetectCalendars(calendarId) - const header = this.makeHeader(calendar) + // this.offlinemanager.storeRequestData('eventDelete', arrayReq); + // throw new Error(err); + // }) + // ) + // } else { + // const calendar = this.DetectCalendars(calendarId) + // const header = this.makeHeader(calendar) - options = { - headers: header, - params: params - }; + // options = { + // headers: header, + // params: params + // }; - return this.http.delete(`${puturl}`, options).pipe( - catchError(err => { + // return this.http.delete(`${puturl}`, options).pipe( + // catchError(err => { - this.offlinemanager.storeRequestData('eventDelete', arrayReq); - throw new Error(err); - }) - ) - } + // this.offlinemanager.storeRequestData('eventDelete', arrayReq); + // throw new Error(err); + // }) + // ) + // } - } + // } - } + // } - postExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any) { - const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/event'; - let params = new HttpParams(); - let options; + // postExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any) { + // const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/event'; + // let params = new HttpParams(); + // let options; - params = params.set("DocId", docId); - params = params.set("SerialNumber", serialNumber); - params = params.set("applicationID", applicationID); - params = params.set("notifyUsers", true) + // params = params.set("DocId", docId); + // params = params.set("SerialNumber", serialNumber); + // params = params.set("applicationID", applicationID); + // params = params.set("notifyUsers", true) - switch (SessionStore.user.Profile) { - case 'MDGPR': - if (body.CalendarName == 'Pessoal') { - options = { - headers: this.headersMdPessoal, - params: params - }; - } - else if (body.CalendarName == 'Oficial') { - options = { - headers: this.headersMdOficial, - params: params - }; - } - break; - case 'PR': - if (body.CalendarName == 'Pessoal') { - options = { - headers: this.headersPrPessoal, - params: params - }; - } - else if (body.CalendarName == 'Oficial') { - options = { - headers: this.headersPrOficial, - params: params - }; - } - break; - } - return this.http.post(`${geturl}`, body, options) - } + // switch (SessionStore.user.Profile) { + // case 'MDGPR': + // if (body.CalendarName == 'Pessoal') { + // options = { + // headers: this.headersMdPessoal, + // params: params + // }; + // } + // else if (body.CalendarName == 'Oficial') { + // options = { + // headers: this.headersMdOficial, + // params: params + // }; + // } + // break; + // case 'PR': + // if (body.CalendarName == 'Pessoal') { + // options = { + // headers: this.headersPrPessoal, + // params: params + // }; + // } + // else if (body.CalendarName == 'Oficial') { + // options = { + // headers: this.headersPrOficial, + // params: params + // }; + // } + // break; + // } + // return this.http.post(`${geturl}`, body, options) + // } genericPostExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, CalendarId) { const geturl = environment.apiURL + 'calendar/expediente'; @@ -1318,48 +1312,48 @@ export class EventsService { return this.http.post(`${geturl}`, body, options) } - createTaskEvent(folderId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any) { - const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/dispatch'; - let params = new HttpParams(); - let options; + // createTaskEvent(folderId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any) { + // const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/dispatch'; + // let params = new HttpParams(); + // let options; - params = params.set("FolderId", folderId); - params = params.set("SerialNumber", serialNumber); - params = params.set("applicationID", applicationID); + // params = params.set("FolderId", folderId); + // params = params.set("SerialNumber", serialNumber); + // params = params.set("applicationID", applicationID); - switch (SessionStore.user.Profile) { - case 'MDGPR': - if (body.CalendarName == 'Pessoal') { - options = { - headers: this.headersMdPessoal, - params: params - }; - } - else if (body.CalendarName == 'Oficial') { - options = { - headers: this.headersMdOficial, - params: params - }; - } - break; - case 'PR': - if (body.CalendarName == 'Pessoal') { - options = { - headers: this.headersPrPessoal, - params: params - }; - } - else if (body.CalendarName == 'Oficial') { - options = { - headers: this.headersPrOficial, - params: params - }; - } - break; - } + // switch (SessionStore.user.Profile) { + // case 'MDGPR': + // if (body.CalendarName == 'Pessoal') { + // options = { + // headers: this.headersMdPessoal, + // params: params + // }; + // } + // else if (body.CalendarName == 'Oficial') { + // options = { + // headers: this.headersMdOficial, + // params: params + // }; + // } + // break; + // case 'PR': + // if (body.CalendarName == 'Pessoal') { + // options = { + // headers: this.headersPrPessoal, + // params: params + // }; + // } + // else if (body.CalendarName == 'Oficial') { + // options = { + // headers: this.headersPrOficial, + // params: params + // }; + // } + // break; + // } - return this.http.post(`${geturl}`, body, options) - } + // return this.http.post(`${geturl}`, body, options) + // } @@ -1387,15 +1381,15 @@ export class EventsService { - postEventToApproveEdit(body: EventToApproveEdit) { - const geturl = environment.apiURL + 'Tasks/EditEventTask'; + // postEventToApproveEdit(body: EventToApproveEdit) { + // const geturl = environment.apiURL + 'Tasks/EditEventTask'; - let options = { - headers: this.headers, - }; + // let options = { + // headers: this.headers, + // }; - return this.http.post(`${geturl}`, body, options) - } + // return this.http.post(`${geturl}`, body, options) + // } } const token = { diff --git a/src/app/services/events/11edit-event/edit-event-routing.module.ts b/src/app/services/events/11edit-event/edit-event-routing.module.ts deleted file mode 100644 index 3616b2106..000000000 --- a/src/app/services/events/11edit-event/edit-event-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { EditEventPage } from './edit-event.page'; - -const routes: Routes = [ - { - path: '', - component: EditEventPage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class EditEventPageRoutingModule {} diff --git a/src/app/services/events/11edit-event/edit-event.module.ts b/src/app/services/events/11edit-event/edit-event.module.ts deleted file mode 100644 index bcd1dc3e4..000000000 --- a/src/app/services/events/11edit-event/edit-event.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { EditEventPageRoutingModule } from './edit-event-routing.module'; - -import { EditEventPage } from './edit-event.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - EditEventPageRoutingModule - ], - declarations: [EditEventPage], - exports: [EditEventPage] -}) -export class EditEventPageModule {} diff --git a/src/app/services/events/11edit-event/edit-event.page.html b/src/app/services/events/11edit-event/edit-event.page.html deleted file mode 100644 index 00931590b..000000000 --- a/src/app/services/events/11edit-event/edit-event.page.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Visualizar Evento - - - - - - - -
- - - - Assunto - - - - - Campo obrigatório - - - Descrição - - - - Localização - - - - Calendário - - Pessoal - Oficial - - - - Tipo do evento - - Reunião - Viagem - Conferência - Encontro - - - - Data Início - - - - Data Fim - - - -
- - - Editar - - Intervenientes - -
-
-
- - - - {{attendee.Name}} - - -
- -
-
- -
-
-
-
- - - Editar - - Anexos - -
-
-
- - - - - -

{{ att.Description }}

-

{{ att.CreateDate }}

-
-
-
-
-
-
- -
-
- - - - Sem anexos - - - -
-
-
-
- -
-
- - - - - -
- - - - - - - - - - - - -

- -

-

- -

-

- -

-
-
- - - - - -

- -

-

- -

-

- -

-
-
- - - -

- -

-

- -

-

- -

-
-
-
-
- -
- - -
- -
-
-
- diff --git a/src/app/services/events/11edit-event/edit-event.page.scss b/src/app/services/events/11edit-event/edit-event.page.scss deleted file mode 100644 index caaf95436..000000000 --- a/src/app/services/events/11edit-event/edit-event.page.scss +++ /dev/null @@ -1,166 +0,0 @@ -@import '~src/function.scss'; -.content{ - padding: 30px 20px 0 20px !important; - margin: 0; - float: left; - border-left: 1px solid #d8d8d8 !important; - } - .main-header{ - font-family: Roboto; - background-color: #fff; - overflow:hidden; - color:#000; - transform: translate3d(0, 1px, 0); - - .title-content{ - margin: 0px auto; - overflow: auto; - padding: 0 !important; - background: #fff; - .middle{ - padding: 0!important; - float: left; - } - } - - .title{ - font-size: rem(25); - } - - } - .ion-item-container{ - margin: rem(15) auto; - border: 1px solid #ebebeb; - border-radius: 5px; - padding-left: 10px; - } - .ion-item-container-no-border{ - width: 100%; - margin: 0px auto; - padding: 0 !important; - overflow: auto; - } - .container-div{ - margin-bottom: 15px; - float: left; - overflow: auto; - } - .ion-item-class-2{ - margin: 0px auto; - } - .ion-icon-class{ - width: rem(45); - height: rem(45); - float: left; - padding: 10px; - font-size: rem(25); - } - ion-select{ - padding-left: 5px; - margin-left: 0; - } - .ion-input-class{ - width: calc(100% - 45px); - height: rem(45); - border: 1px solid #ebebeb; - border-radius: 5px; - padding-left: 5px; - padding-right: 10px; - float: left; - } - .ion-input-class-no-height{ - border: 1px solid #ebebeb; - border-radius: 5px; - overflow: auto; - } - .list-people{ - //width: 256px; - float: left; - - } - .add-people{ - width: rem(45); - float: right; - overflow: auto; - font-size: rem(25); - height: rem(45); - display: flex; - } - .list-people-title{ - /* font-size: rem(13); */ - color: #797979; - } - .attach-document{ - font-size: rem(15); - color: var(--title-text-color); - margin: 5px 5px 5px 10px; - padding: 5px; - float: left; - } - .attach-icon{ - width: 37px; - font-size: rem(35); - float: left; - } - .attach-title-item{ - width: 100%; - font-size: rem(15); - color:var(--title-text-color); - } - /* SPAN */ - .span-left{ - float: left; - font-size: rem(15); - } - .span-right{ - text-align: right; - float: right; - font-size: rem(13); - } - .container-footer{ - margin:0 auto; - overflow: auto; - } - .button-cancel { - width: rem(170); - height: rem(44); - border-radius: 22.5px; - --background: #e0e9ee; - --color: #061b52; - margin:10px; - } - .button-save { - width: rem(170); - height: rem(44); - border-radius: 22.5px; - --background: #42b9fe; - --color:#ffffff; - margin:10px; - } - - .text-input{ - width: 100%; - border: 1px solid #ebebeb; - margin: 0px 15px 15px 0px; - padding: 0 !important; - border-radius: 5px; - } - - /* Error Messages */ - .error{ - color:red; - font-size: rem(12); - font-weight: bold; - padding-bottom: 20px; - } - .span-color{ - color:red; - } - - - .buttons{ - display: flex; - justify-content: space-between; - padding: 20px; - overflow: auto; - } \ No newline at end of file diff --git a/src/app/services/events/11edit-event/edit-event.page.spec.ts b/src/app/services/events/11edit-event/edit-event.page.spec.ts deleted file mode 100644 index f63e92e8d..000000000 --- a/src/app/services/events/11edit-event/edit-event.page.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { HttpClientModule } from '@angular/common/http'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { EditEventPage } from './edit-event.page'; - -describe('EditEventPage', () => { - let component: EditEventPage; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ EditEventPage ], - imports: [ - IonicModule.forRoot(), - HttpClientModule - ] - }).compileComponents(); - - fixture = TestBed.createComponent(EditEventPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/services/events/11edit-event/edit-event.page.ts b/src/app/services/events/11edit-event/edit-event.page.ts deleted file mode 100644 index 51743da43..000000000 --- a/src/app/services/events/11edit-event/edit-event.page.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { EventsService } from 'src/app/services/events.service'; -import { Router } from '@angular/router'; -import { Event } from '../../../models/event.model'; -import { EventBody } from 'src/app/models/eventbody.model'; -import { AlertController, ModalController } from '@ionic/angular'; -import { EventPerson } from 'src/app/models/eventperson.model'; -import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page'; -import { Attachment } from 'src/app/models/attachment.model'; -import { AttachmentsService } from 'src/app/services/attachments.service'; -import { FormGroup, FormBuilder, Validators } from "@angular/forms"; -import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -import { AttachmentsPage } from '../attachments/attachments.page'; - -@Component({ - selector: 'app-edit-event', - templateUrl: './edit-event.page.html', - styleUrls: ['./edit-event.page.scss'], -}) - -export class EditEventPage implements OnInit { - - loadedEvent: Event; - loadedEventAttachments: Attachment[]; - pageId: string; - showLoader: boolean; - backURL: string; - ionicForm: FormGroup; - isSubmitted = false; - - minDate: Date; - - profile:string; - - constructor( - public formBuilder: FormBuilder, - public alertController: AlertController, - private router: Router, - private activatedRoute: ActivatedRoute, - private eventsService: EventsService, - private modalCtrl: ModalController, - private attachamentsService: AttachmentsService, - private route: Router, - private iab: InAppBrowser) { - this.loadedEvent = new Event(); - this.loadedEvent.Body = new EventBody(); - - } - - ngOnInit() { - this.loadEvent(); - this.loadAttachments(); - this.ionicForm = this.formBuilder.group({ - subject: ['', [Validators.required]] - }) - } - - get errorControl() { - return this.ionicForm.controls; - } - - loadEvent(){ - let eventid: string; - this.activatedRoute.paramMap.subscribe(paramMap => - { - if (!paramMap.has("eventId")){ - return; - } - else{ - this.pageId = paramMap.get('eventId'); - eventid = paramMap.get('eventId'); - - - } - if (paramMap.has("caller")){ - this.backURL = "/home/" + paramMap.get('caller'); - } - } - ); - this.eventsService.getEvent(eventid).subscribe(response => { - this.loadedEvent = response; - }); - } - - async openAttendees(){ - const modal = await this.modalCtrl.create({ - component: AttendeesPageModal, - componentProps: { - eventAttendees: this.loadedEvent.Attendees - }, - cssClass: 'attendee modal-desktop', - backdropDismiss: false - }); - - await modal.present(); - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - } - - getEventAttendees(): EventPerson[] - { - return this.loadedEvent.Attendees; - } - - setEventAttendees(newattendes: EventPerson[]) - { - this.loadedEvent.Attendees = newattendes; - } - - async deleteConfirm() - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Apagar evento!', - message: 'Deseja apagar o evento da agenda ' + this.loadedEvent.CalendarName + '?', - buttons: [ - { - text: 'Não', - role: 'cancel', - cssClass: 'secondary', - handler: () => { } - }, { - text: 'Sim', - handler: () => { - this.Delete(); - } - } - ] - }); - - await alert.present(); - } - - Delete() - { - this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Evento removido', - buttons: ['OK'] - }); - - setTimeout(()=>{ - alert.dismiss(); - }, 1500); - - this.router.navigate(['/home/events']); - }); - } - - Save() - { - // if (this.ionicForm.valid){ - - // this.activatedRoute.paramMap.subscribe(paramMap =>{ - // if (paramMap.has("profile")){ - - - // } - // }); - - // this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () => - // { - // const alert = await this.alertController.create({ - // cssClass: 'my-custom-class', - // header: 'Evento actualizado', - // buttons: ['OK'] - // }); - - // setTimeout(()=>{ - // alert.dismiss(); - // }, 1500); - // }); - // } - } - - loadAttachments() - { - - this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { - this.loadedEventAttachments = res; - - - },((erro) => { - console.error('loadAttchament', erro) - })); - } - async viewDocument(documenturl:string) - { - const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); - const browser = this.iab.create(url,"_blank"); - browser.show(); - } - - back() - { - //this.back(); - } - doRefresh(event){ - /* this.RefreshEvents(); */ - try { - event?.target?.complete(); -} catch(error) {} - setTimeout(() => { - try { - event?.target?.complete(); -} catch(error) {} - }, 2000); - - } - navigateTo(ev){ - this.route.navigate(['/home/events',ev]); - } - async openAttachments(){ - const modal = await this.modalCtrl.create({ - component: AttachmentsPage, - componentProps: { - eventId: this.pageId, - attachments: this.loadedEventAttachments - }, - cssClass: 'attachments', - backdropDismiss: false - }); - - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - await modal.present(); - - } -} diff --git a/src/app/services/events/11event-detail/event-detail-routing.module.ts b/src/app/services/events/11event-detail/event-detail-routing.module.ts deleted file mode 100644 index a2b625fd8..000000000 --- a/src/app/services/events/11event-detail/event-detail-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { EventDetailPage } from './event-detail.page'; - -const routes: Routes = [ - { - path: '', - component: EventDetailPage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class EventDetailPageRoutingModule {} diff --git a/src/app/services/events/11event-detail/event-detail.module.ts b/src/app/services/events/11event-detail/event-detail.module.ts deleted file mode 100644 index 96baa24e9..000000000 --- a/src/app/services/events/11event-detail/event-detail.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { EventDetailPageRoutingModule } from './event-detail-routing.module'; - -import { EventDetailPage } from './event-detail.page'; - - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - ReactiveFormsModule, - EventDetailPageRoutingModule - ], - declarations: [EventDetailPage] -}) -export class EventDetailPageModule {} diff --git a/src/app/services/events/11event-detail/event-detail.page.html b/src/app/services/events/11event-detail/event-detail.page.html deleted file mode 100644 index 9957a8d82..000000000 --- a/src/app/services/events/11event-detail/event-detail.page.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - Visualizar Evento - - - - - - - -
- - -
- - Assunto - - - - - Campo obrigatório - -
- - Descrição - - - - Localização - - - - Calendário - - Pessoal - Oficial - - - - Tipo do evento - - Reunião - Viagem - Conferência - Encontro - - - - Data Início - - - - Data Fim - - - -
- - - Editar - - Intervenientes - -
-
-
- - - - {{attendee.Name}} - - -
- -
-
- -
-
-
-
- - - Editar - - Anexos - -
-
-
- - - - - -

{{ att.Description }}

-

{{ att.CreateDate }}

-
-
-
-
-
-
- -
-
- - - - - - - Sem anexos - - - -
-
-
-
- -
-
- - - - - -
- - - - - - - - - - - - -

- -

-

- -

-

- -

-
-
- - - - - -

- -

-

- -

-

- -

-
-
- - - -

- -

-

- -

-

- -

-
-
-
-
- -
- - -
- -
-
-
- diff --git a/src/app/services/events/11event-detail/event-detail.page.scss b/src/app/services/events/11event-detail/event-detail.page.scss deleted file mode 100644 index 65ee76935..000000000 --- a/src/app/services/events/11event-detail/event-detail.page.scss +++ /dev/null @@ -1,117 +0,0 @@ -ion-item-group{ - margin: 15px; -} -.div-item{ - width: 100%; - overflow: auto; - border-bottom: 1px solid #ccc; - margin: 10px 0 5px 0; -} -.div-up{ - width: 100%; - overflow: auto; -} -.div-up h3{ - margin: 0; - padding: 0; - font-size: rem(17); - width: 100%; -} -.div-icon{ - width: 10%; - font-size: rem(22); - float: left; - color: #808080; -} -.div-icon ion-icon{ - display: block; - margin: 0 auto; - -} -.div-content-attachment{ - width: 85%; - float: left; - padding: 0 0 0 12px; -} -.ion-icon-attach{ - color: #666666; - font-size: rem(20); -} - -.btn-attach{ - margin: 15px 0 0 0; - --color: #333; - --border-color:#333; -} -.div-card-button{ - width: 100%; - overflow: auto; - padding: 0 !important; -} -ion-card{ - margin: 2.5% !important; - width: 45%; - float: left; -} -.center{ - text-align: center; - float: center; -} - -/* FFOTER */ -.event-detail-buttons{ - width: 90%; - margin: 10px auto; -} -.event-detail-buttons ion-button{ - width: 90%; - margin: 0 auto; - display: block; - margin-bottom: 25px; -} -.ion-icon-delete{ - font-size: rem(22); - color: red; - background-color: white; - padding-right: 5px; -} -.error{ - color:red; - font-size: rem(12); - font-weight: bold; - padding-bottom: 20px; -} -/* .event-detail-buttons{ - margin-bottom: 80px; - margin-top: 10px; -} */ -.attendees-icon{ - font-size: 14px; -} -.see-more-button{ - text-transform: initial; - font-size: rem(16); -} - -.header-content{ - overflow: auto; - margin: 0 auto; - padding-top: 25px; -} -.header-icon-left{ - width: 36px; - font-size: rem(33); - color: #42b9fe; - float: left; - border: 1px solid red; -} -.header-title{ - width: 300px; - font-family: Roboto; - font-size: rem(25); - margin: 0 5px 0 5px; - padding: 0; - color:#000; - float: left; -} - diff --git a/src/app/services/events/11event-detail/event-detail.page.spec.ts b/src/app/services/events/11event-detail/event-detail.page.spec.ts deleted file mode 100644 index a3f346841..000000000 --- a/src/app/services/events/11event-detail/event-detail.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { EventDetailPage } from './event-detail.page'; - -describe('EventDetailPage', () => { - let component: EventDetailPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ EventDetailPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(EventDetailPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/services/events/11event-detail/event-detail.page.ts b/src/app/services/events/11event-detail/event-detail.page.ts deleted file mode 100644 index 7da123b0d..000000000 --- a/src/app/services/events/11event-detail/event-detail.page.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { EventsService } from 'src/app/services/events.service'; -import { Router } from '@angular/router'; -import { Event } from '../../../models/event.model'; -import { EventBody } from 'src/app/models/eventbody.model'; -import { AlertController, ModalController } from '@ionic/angular'; -import { EventPerson } from 'src/app/models/eventperson.model'; -import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page'; -import { Attachment } from 'src/app/models/attachment.model'; -import { AttachmentsService } from 'src/app/services/attachments.service'; -import { FormGroup, FormBuilder, Validators } from "@angular/forms"; -import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -import { AttachmentsPage } from '../attachments/attachments.page'; - - -@Component({ - selector: 'app-event-detail', - templateUrl: './event-detail.page.html', - styleUrls: ['./event-detail.page.scss'], -}) -export class EventDetailPage implements OnInit { - - loadedEvent: Event; - loadedEventAttachments: Attachment[]; - pageId: string; - showLoader: boolean; - backURL: string; - ionicForm: FormGroup; - isSubmitted = false; - - minDate: Date; - - profile:string; - - - constructor( - public formBuilder: FormBuilder, - public alertController: AlertController, - private router: Router, - private activatedRoute: ActivatedRoute, - private eventsService: EventsService, - private modalCtrl: ModalController, - private attachamentsService: AttachmentsService, - private route: Router, - private iab: InAppBrowser) { - this.loadedEvent = new Event(); - this.loadedEvent.Body = new EventBody(); - } - - ngOnInit() { - this.loadEvent(); - this.loadAttachments(); - this.ionicForm = this.formBuilder.group({ - subject: ['', [Validators.required]] - }) - } - - get errorControl() { - return this.ionicForm.controls; - } - - loadEvent(){ - let eventid: string; - this.activatedRoute.paramMap.subscribe(paramMap => - { - if (!paramMap.has("eventId")){ - return; - } - else{ - this.pageId = paramMap.get('eventId'); - eventid = paramMap.get('eventId'); - - - } - if (paramMap.has("caller")){ - this.backURL = "/home/" + paramMap.get('caller'); - } - } - ); - this.eventsService.getEvent(eventid).subscribe(response => { - this.loadedEvent = response; - }); - } - - async openAttendees(){ - const modal = await this.modalCtrl.create({ - component: AttendeesPageModal, - componentProps: { - eventAttendees: this.loadedEvent.Attendees - }, - cssClass: 'attendee modal-desktop', - backdropDismiss: false - }); - - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - await modal.present(); -} - - getEventAttendees(): EventPerson[] - { - return this.loadedEvent.Attendees; - } - - setEventAttendees(newattendes: EventPerson[]) - { - this.loadedEvent.Attendees = newattendes; - } - - async deleteConfirm() - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Apagar evento!', - message: 'Deseja apagar o evento da agenda ' + this.loadedEvent.CalendarName + '?', - buttons: [ - { - text: 'Não', - role: 'cancel', - cssClass: 'secondary', - handler: () => { } - }, { - text: 'Sim', - handler: () => { - this.Delete(); - } - } - ] - }); - - await alert.present(); - } - - Delete() - { - this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => - { - /* const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Evento removido', - buttons: ['OK'] - }); - - await alert.present(); */ - - this.router.navigate(['/home/events']); - }); - } - - Save() - { - // if (this.ionicForm.valid){ - - // this.activatedRoute.paramMap.subscribe(paramMap =>{ - // if (paramMap.has("profile")){ - - - // } - // }); - - // this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () => - // { - // const alert = await this.alertController.create({ - // cssClass: 'my-custom-class', - // header: 'Evento actualizado', - // buttons: ['OK'] - // }); - - // setTimeout(()=>{ - // alert.dismiss(); - // }, 1500); - // }); - // } - } - - loadAttachments() - { - - this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { - this.loadedEventAttachments = res; - - - },((erro) => { - console.error('loadAttchament', erro) - })); - } - async viewDocument(documenturl:string) - { - const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); - const browser = this.iab.create(url,"_blank"); - browser.show(); - } - - back() - { - //this.back(); - } - doRefresh(event){ - /* this.RefreshEvents(); */ - try { - event?.target?.complete(); -} catch(error) {} - setTimeout(() => { - try { - event?.target?.complete(); -} catch(error) {} - }, 2000); - - } - navigateTo(ev){ - this.route.navigate(['/home/events',ev]); - } - async openAttachments(){ - const modal = await this.modalCtrl.create({ - component: AttachmentsPage, - componentProps: { - eventId: this.pageId, - attachments: this.loadedEventAttachments - }, - cssClass: 'attachments', - backdropDismiss: false - }); - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - await modal.present(); - - } - -} diff --git a/src/app/services/events/attachments/attachments-routing.module.ts b/src/app/services/events/attachments/attachments-routing.module.ts deleted file mode 100644 index 4ea13a050..000000000 --- a/src/app/services/events/attachments/attachments-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { AttachmentsPage } from './attachments.page'; - -const routes: Routes = [ - { - path: '', - component: AttachmentsPage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class AttachmentsPageRoutingModule {} diff --git a/src/app/services/events/attachments/attachments.module.ts b/src/app/services/events/attachments/attachments.module.ts deleted file mode 100644 index 95c52664a..000000000 --- a/src/app/services/events/attachments/attachments.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { AttachmentsPageRoutingModule } from './attachments-routing.module'; - -import { AttachmentsPage } from './attachments.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - AttachmentsPageRoutingModule - ], - declarations: [AttachmentsPage] -}) -export class AttachmentsPageModule {} diff --git a/src/app/services/events/attachments/attachments.page.html b/src/app/services/events/attachments/attachments.page.html deleted file mode 100644 index 93a33398e..000000000 --- a/src/app/services/events/attachments/attachments.page.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - Anexos do evento - - - -
- - - - - -

{{ att.SourceName }}

-

{{ att.Description }}

-

{{ att.CreateDate }}

-

{{ att.Stakeholders }}

-
-
-
-
-
- -
- - - - - - -

- -

-

- -

-

- -

-
-
- - - - - -

- -

-

- -

-

- -

-
-
-
-
-
diff --git a/src/app/services/events/attachments/attachments.page.scss b/src/app/services/events/attachments/attachments.page.scss deleted file mode 100644 index 7285fe589..000000000 --- a/src/app/services/events/attachments/attachments.page.scss +++ /dev/null @@ -1,57 +0,0 @@ -ion-back-button { - display: block; -} - -/* CONTENT */ -ion-content{ - --background: #f2f2f2; -} -.div-attach-results{ - background: none; -} -ion-list, ion-item-sliding{ - background: none; - -} -.item-list-small{ - font-size: rem(14); - overflow: auto; - } - .ion-item-class{ - padding: 0; - - } - .label-text{ - width: 100%; - padding: 0; - margin: 0; - } - -//DIV -.main-item{ - margin: 15px; - /* border: 1px solid #ccc; */ - border-radius: 5px; - box-shadow: 0 4px 8px 0 #ccc, 0 6px 20px 0 #f2f2f2; -} - .div-content-attachment{ - margin:0; - padding: 10px; - } - .div-content-attachment h3{ - font-size: rem(18); - font-weight: 700; - padding-bottom: 5px; - } - ion-item ion-icon{ - --border-color: red; - } - - /* Custom Skeleton Line Height and Margin */ -.custom-skeleton ion-skeleton-text { - line-height: 13px; -} - -.custom-skeleton ion-skeleton-text:last-child { - margin-bottom: 5px; -} \ No newline at end of file diff --git a/src/app/services/events/attachments/attachments.page.spec.ts b/src/app/services/events/attachments/attachments.page.spec.ts deleted file mode 100644 index 881e11b1a..000000000 --- a/src/app/services/events/attachments/attachments.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { AttachmentsPage } from './attachments.page'; - -describe('AttachmentsPage', () => { - let component: AttachmentsPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ AttachmentsPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(AttachmentsPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/services/events/attachments/attachments.page.ts b/src/app/services/events/attachments/attachments.page.ts deleted file mode 100644 index f5debd1a8..000000000 --- a/src/app/services/events/attachments/attachments.page.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { AttachmentsService } from 'src/app/services/attachments.service'; -import { Attachment } from 'src/app/models/attachment.model'; -import { ActivatedRoute, Router } from '@angular/router'; -import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -import { ModalController, NavParams } from '@ionic/angular'; - -@Component({ - selector: 'app-attachments', - templateUrl: './attachments.page.html', - styleUrls: ['./attachments.page.scss'], -}) -export class AttachmentsPage implements OnInit { - - loadedEventAttachments: Attachment[]; - pageId: string; - - constructor( - private attachamentsService: AttachmentsService, - private iab: InAppBrowser, - private modalCtrl: ModalController, - private navParams: NavParams) { } - - ngOnInit() { - this.loadAttachments(this.navParams.get('eventId')); - } - - loadAttachments(eventid:string) - { - this.attachamentsService.getAttachmentsById(eventid).subscribe(attachments => { - this.loadedEventAttachments = attachments; - this.pageId = eventid; - },((erro) => { - console.error('loadAttchament', erro) - })); - } - - async viewDocument(documenturl:string) - { - const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); - const browser = this.iab.create(url,"_blank"); - browser.show(); - } - close(){ - this.modalCtrl.dismiss(null); - } - - -} diff --git a/src/app/services/events/attendees/attendees-routing.module.ts b/src/app/services/events/attendees/attendees-routing.module.ts deleted file mode 100644 index 00f6f262b..000000000 --- a/src/app/services/events/attendees/attendees-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { AttendeesPageModal } from './attendees.page'; - -const routes: Routes = [ - { - path: '', - component: AttendeesPageModal - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class AttendeesPageRoutingModule {} diff --git a/src/app/services/events/attendees/attendees.module.ts b/src/app/services/events/attendees/attendees.module.ts deleted file mode 100644 index f21feadb2..000000000 --- a/src/app/services/events/attendees/attendees.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { AttendeesPageRoutingModule } from './attendees-routing.module'; - -import { AttendeesPageModal } from './attendees.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - AttendeesPageRoutingModule - ], - declarations: [AttendeesPageModal], - exports: [AttendeesPageModal] -}) -export class AttendeesPageModule {} diff --git a/src/app/services/events/attendees/attendees.page.html b/src/app/services/events/attendees/attendees.page.html deleted file mode 100644 index fdb4748e0..000000000 --- a/src/app/services/events/attendees/attendees.page.html +++ /dev/null @@ -1,94 +0,0 @@ - - - Pesquisar contactos - - - - - - - - - - -
- -
- - - -
- -

{{ attendee.Name }}

-

{{ attendee.EmailAddress }}

-
-
- -
-
-
- -
-
-
- - -
Destinatário
- - -
- - - -
- -

{{ attendee.Name }}

-

{{ attendee.EmailAddress }}

-
-
- -
-
-
-
- -
Destinatário
- - - -
- - - -
- -

{{ attendee.Name }}

-

{{ attendee.EmailAddress }}

-
-
- -
-
-
-
-
- -
- - - - - - - - - - - - diff --git a/src/app/services/events/attendees/attendees.page.scss b/src/app/services/events/attendees/attendees.page.scss deleted file mode 100644 index 7cb035cfa..000000000 --- a/src/app/services/events/attendees/attendees.page.scss +++ /dev/null @@ -1,3 +0,0 @@ -ion-item{ - border-bottom:1px solid #ccc; -} diff --git a/src/app/services/events/attendees/attendees.page.spec.ts b/src/app/services/events/attendees/attendees.page.spec.ts deleted file mode 100644 index f8fb83e19..000000000 --- a/src/app/services/events/attendees/attendees.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { AttendeesPageModal } from './attendees.page'; - -describe('AttendeesPage', () => { - let component: AttendeesPageModal; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ AttendeesPageModal ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(AttendeesPageModal); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/services/events/attendees/attendees.page.ts b/src/app/services/events/attendees/attendees.page.ts deleted file mode 100644 index 1d79c6b31..000000000 --- a/src/app/services/events/attendees/attendees.page.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { EventPerson } from 'src/app/models/eventperson.model'; -import { ModalController, NavParams } from '@ionic/angular'; -import { ContactsService } from 'src/app/services/contacts.service'; -import { ThemeService } from 'src/app/services/theme.service' -import { LoginUserRespose } from 'src/app/models/user.model'; -import { SessionStore } from 'src/app/store/session.service'; -import { Router } from '@angular/router'; - -@Component({ - selector: 'app-attendees', - templateUrl: './attendees.page.html', - styleUrls: ['./attendees.page.scss'], -}) -export class AttendeesPageModal implements OnInit { - - // Defined by the API - contacts: EventPerson[]; - showLoader: boolean = false; - selectedContact: EventPerson[] =[]; - eventPersons: EventPerson[]; - adding: "intervenient" | "CC"; - currentPath = window.location.pathname; - - taskParticipants:EventPerson[] = []; - taskParticipantsCc:EventPerson[] = []; - loggeduser: LoginUserRespose; - @Input() loggedAttendSon: boolean; - @Input() hideExternalDomain = true; - taskType: any; - - - constructor( - private modalCtrl: ModalController, - private contactsService: ContactsService, - private navParams: NavParams, - private modalController: ModalController, - public ThemeService: ThemeService, - private router: Router,) { - - this.adding = this.navParams.get('adding'); - this.taskParticipants = this.navParams.get('taskParticipants'); - this.taskParticipantsCc = this.navParams.get('taskParticipantsCc'); - this.taskType = this.navParams.get('taskType'); - this.loggeduser = SessionStore.user; - - } - - ngOnInit() { - console.log('Pesquisa de contactos current path2',this.router.url) - this.fetchContacts(""); - - if(this.taskParticipants == null || this.taskParticipants == undefined){ - this.taskParticipants = []; - } - - if(this.taskParticipantsCc == null || this.taskParticipantsCc == undefined){ - this.taskParticipantsCc = []; - } - - } - - ngOnChanges(event) {} - - save(){ - - this.modalController.dismiss({ - 'taskParticipants': this.taskParticipants, - 'taskParticipantsCc': this.taskParticipantsCc - }); - } - - close() { - this.modalController.dismiss(false); - } - - onChange(evt: any) { - this.fetchContacts(evt.detail.value); - } - - filterSearchList(itm: EventPerson): boolean { - - const result = this.taskParticipants.concat( this.taskParticipantsCc).find((contact, index)=>{ - - if(contact.Name.toLocaleLowerCase() == itm.Name.toLocaleLowerCase() && contact.EmailAddress.toLocaleLowerCase() == itm.EmailAddress.toLocaleLowerCase()){ - index = index; - return contact; - } - - }) - - return undefined == result; - - } - - remove(itm: EventPerson){ - - if(this.adding == "intervenient"){ - - this.taskParticipants = this.taskParticipants.filter((contact, index) =>{ - - if(contact.Name.toLocaleLowerCase() != itm.Name.toLocaleLowerCase() && contact.EmailAddress.toLocaleLowerCase() != itm.EmailAddress.toLocaleLowerCase()){ - return contact; - } - return false; - - }); - - } else if (this.adding == "CC") { - - this.taskParticipantsCc = this.taskParticipantsCc.filter((contact, index) =>{ - - if(contact.Name.toLocaleLowerCase() != itm.Name.toLocaleLowerCase() && contact.EmailAddress.toLocaleLowerCase() != itm.EmailAddress.toLocaleLowerCase()){ - return contact; - } - return false; - - }); - } - - } - - async selectContact(itm: EventPerson){ - if(this.adding == "intervenient"){ - itm.IsRequired = true; - this.taskParticipants.push(itm); - - } else if (this.adding == "CC") { - itm.IsRequired = false; - this.taskParticipantsCc.push(itm); - } - } - - async fetchContacts(filter: string) { - this.showLoader = true; - - this.contactsService.getContacts(filter).subscribe(_result => - { - - let result - if(this.hideExternalDomain) { - result = _result.filter( e => e.UserType == 'GD') - } else { - result = _result - } - - - if (this.eventPersons != null) - { - this.eventPersons.forEach(attendee => { - const index: number = result.findIndex((cont) => { - return cont.EmailAddress.toLocaleLowerCase() == attendee.EmailAddress.toLocaleLowerCase() - }); - - result.splice(index, 1); - }); - } - - if(this.loggedAttendSon) { - this.contacts = result; - this.showLoader = false; - } else { - this.contacts = result; - // console.log('Attendes Email',this.loggeduser.Email) - let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase()) - // console.log('Attendes Email', filterLoggedUserEmail) - let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "") - this.contacts = filterEmptyEmail; - // console.log('Attendes Email', this.contacts) - this.showLoader = false; - - } - } - ); - } - -} diff --git a/src/app/services/events/event-detail-modal/event-detail-modal-routing.module.ts b/src/app/services/events/event-detail-modal/event-detail-modal-routing.module.ts deleted file mode 100644 index bebfe4ea1..000000000 --- a/src/app/services/events/event-detail-modal/event-detail-modal-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { EventDetailModalPage } from './event-detail-modal.page'; - -const routes: Routes = [ - { - path: '', - component: EventDetailModalPage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class EventDetailModalPageRoutingModule {} diff --git a/src/app/services/events/event-detail-modal/event-detail-modal.module.ts b/src/app/services/events/event-detail-modal/event-detail-modal.module.ts deleted file mode 100644 index 5472c8c36..000000000 --- a/src/app/services/events/event-detail-modal/event-detail-modal.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { EventDetailModalPageRoutingModule } from './event-detail-modal-routing.module'; - -import { EventDetailModalPage } from './event-detail-modal.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - EventDetailModalPageRoutingModule - ], - declarations: [EventDetailModalPage] -}) -export class EventDetailModalPageModule {} diff --git a/src/app/services/events/event-detail-modal/event-detail-modal.page.html b/src/app/services/events/event-detail-modal/event-detail-modal.page.html deleted file mode 100644 index 92a252fae..000000000 --- a/src/app/services/events/event-detail-modal/event-detail-modal.page.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - Visualizar Evento - - - - - - - -
- - - - - Descrição - - - - Localização - - - - Calendário - - Pessoal - Oficial - - - - Tipo do evento - - Reunião - Viagem - Conferência - Encontro - - - - Data Início - - - - Data Fim - - - -
- - - Editar - - Intervenientes - -
-
-
- - - - {{attendee.Name}} - - -
- -
-
- -
-
-
-
- - - Editar - - Anexos - -
-
-
- - - - - -

{{ att.Description }}

-

{{ att.CreateDate }}

-
-
-
-
-
-
- -
-
- - - - - -

-

-
-
-
- - - - - Sem anexos - - - -
-
-
-
- -
-
- - - - - -
- - - - - - - - - - - - -

- -

-

- -

-

- -

-
-
- - - - - -

- -

-

- -

-

- -

-
-
- - - -

- -

-

- -

-

- -

-
-
-
-
- -
- - -
- Enviar -
-
-
- diff --git a/src/app/services/events/event-detail-modal/event-detail-modal.page.scss b/src/app/services/events/event-detail-modal/event-detail-modal.page.scss deleted file mode 100644 index cbc68cc6b..000000000 --- a/src/app/services/events/event-detail-modal/event-detail-modal.page.scss +++ /dev/null @@ -1,95 +0,0 @@ -ion-item-group{ - margin: 15px; -} -.div-item{ - width: 100%; - overflow: auto; - border-bottom: 1px solid #ccc; - margin: 10px 0 5px 0; -} -.div-up{ - width: 100%; - overflow: auto; -} -.div-up h3{ - margin: 0; - padding: 0; - font-size: rem(17); - width: 100%; -} -.div-icon{ - width: 10%; - font-size: rem(22); - float: left; - color: #808080; -} -.div-icon ion-icon{ - display: block; - margin: 0 auto; - -} -.div-content-attachment{ - width: 85%; - float: left; - padding: 0 0 0 12px; -} -.ion-icon-attach{ - color: #666666; - font-size: rem(20); -} - -.btn-attach{ - margin: 15px 0 0 0; - --color: #333; - --border-color:#333; -} -.div-card-button{ - width: 100%; - overflow: auto; - padding: 0 !important; -} -ion-card{ - margin: 2.5% !important; - width: 45%; - float: left; -} -.center{ - text-align: center; - float: center; -} - -/* FFOTER */ -.event-detail-buttons{ - width: 90%; - margin: 10px auto; -} -.event-detail-buttons ion-button{ - width: 90%; - margin: 0 auto; - display: block; - margin-bottom: 25px; -} -.ion-icon-delete{ - font-size: rem(22); - color: red; - background-color: white; - padding-right: 5px; -} -.error{ - color:red; - font-size: rem(12); - font-weight: bold; - padding-bottom: 20px; -} -/* .event-detail-buttons{ - margin-bottom: 80px; - margin-top: 10px; -} */ -.attendees-icon{ - font-size: rem(14); -} -.see-more-button{ - text-transform: initial; - font-size: rem(16); -} - diff --git a/src/app/services/events/event-detail-modal/event-detail-modal.page.spec.ts b/src/app/services/events/event-detail-modal/event-detail-modal.page.spec.ts deleted file mode 100644 index 76c8032a4..000000000 --- a/src/app/services/events/event-detail-modal/event-detail-modal.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { EventDetailModalPage } from './event-detail-modal.page'; - -describe('EventDetailModalPage', () => { - let component: EventDetailModalPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ EventDetailModalPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(EventDetailModalPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/services/events/event-detail-modal/event-detail-modal.page.ts b/src/app/services/events/event-detail-modal/event-detail-modal.page.ts deleted file mode 100644 index 7ddf885a0..000000000 --- a/src/app/services/events/event-detail-modal/event-detail-modal.page.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; -import { AlertController, ModalController, NavParams } from '@ionic/angular'; -import { Attachment } from 'src/app/models/attachment.model'; -import { Event } from 'src/app/models/event.model'; -import { EventBody } from 'src/app/models/eventbody.model'; -import { EventPerson } from 'src/app/models/eventperson.model'; -import { AttachmentsService } from 'src/app/services/attachments.service'; -import { EventsService } from 'src/app/services/events.service'; -import { AttachmentsPage } from '../attachments/attachments.page'; -import { AttendeesPageModal } from '../attendees/attendees.page'; - -@Component({ - selector: 'app-event-detail-modal', - templateUrl: './event-detail-modal.page.html', - styleUrls: ['./event-detail-modal.page.scss'], -}) -export class EventDetailModalPage implements OnInit { - - loadedEvent: Event; - loadedEventAttachments: Attachment[]; - pageId: string; - showLoader: boolean; - backURL: string; - ionicForm: FormGroup; - isSubmitted = false; - - minDate: Date; - - profile:string; - - constructor( - public formBuilder: FormBuilder, - public alertController: AlertController, - private router: Router, - private activatedRoute: ActivatedRoute, - private eventsService: EventsService, - private modalCtrl: ModalController, - private attachamentsService: AttachmentsService, - private route: Router,) { - this.loadedEvent = new Event(); - this.loadedEvent.Body = new EventBody(); - } - - ngOnInit() { - this.loadEvent(); - this.loadAttachments(); - this.ionicForm = this.formBuilder.group({ - subject: ['', [Validators.required]] - }) - - // this.setDefaultTime() - } - - // setDefaultTime() { - // this.loadedEvent.StartDate = new Date() - // this.loadedEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000)) - // } - - get errorControl() { - return this.ionicForm.controls; - } - - loadEvent(){ - let eventid: string; - this.activatedRoute.paramMap.subscribe(paramMap => - { - if (!paramMap.has("eventId")){ - return; - } - else{ - this.pageId = paramMap.get('eventId'); - eventid = paramMap.get('eventId'); - - - } - if (paramMap.has("caller")){ - this.backURL = "/home/" + paramMap.get('caller'); - } - } - ); - this.eventsService.getEvent(eventid).subscribe(response => { - this.loadedEvent = response; - }); - } - - async openAttendees(){ - const modal = await this.modalCtrl.create({ - component: AttendeesPageModal, - componentProps: { - eventAttendees: this.loadedEvent.Attendees - }, - cssClass: 'attendee modal-desktop', - backdropDismiss: false - }); - - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - await modal.present(); -} - - getEventAttendees(): EventPerson[] - { - return this.loadedEvent.Attendees; - } - - setEventAttendees(newattendes: EventPerson[]) - { - this.loadedEvent.Attendees = newattendes; - } - - async deleteConfirm() - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Apagar evento!', - message: 'Deseja apagar o evento da agenda ' + this.loadedEvent.CalendarName + '?', - buttons: [ - { - text: 'Não', - role: 'cancel', - cssClass: 'secondary', - handler: () => { } - }, { - text: 'Sim', - handler: () => { - this.Delete(); - } - } - ] - }); - - await alert.present(); - } - - Delete() - { - this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Evento removido', - buttons: ['OK'] - }); - - setTimeout(()=>{ - alert.dismiss(); - }, 1500); - - this.router.navigate(['/home/events']); - }); - } - - Save() - { - if (this.ionicForm.valid) - { - - this.eventsService.putEvent(this.loadedEvent, 2, 3, "md").subscribe(async () => - { - const alert = await this.alertController.create({ - cssClass: 'my-custom-class', - header: 'Evento actualizado', - buttons: ['OK'] - }); - - setTimeout(()=>{ - alert.dismiss(); - }, 1500); - }); - } - } - - loadAttachments() - { - /* this.attachamentsService.getEventAttachments(this.pageId).subscribe(attachments => { - this.loadedEventAttachments = attachments; - }); */ - this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { - - - },((erro) => { - console.error('loadAttchament', erro) - })); - } - async viewDocument(documenturl:string) - { - const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); - /* const browser = this.iab.create(url,"_blank"); - browser.show(); */ - } - - back() - { - //this.back(); - } - doRefresh(event){ - /* this.RefreshEvents(); */ - try { - event?.target?.complete(); -} catch(error) {} - setTimeout(() => { - try { - event?.target?.complete(); -} catch(error) {} - }, 2000); - - } - navigateTo(ev){ - this.route.navigate(['/home/events',ev]); - } - async openAttachments() { - const modal = await this.modalCtrl.create({ - component: AttachmentsPage, - componentProps: { - eventId: this.pageId, - attachments: this.loadedEventAttachments - }, - cssClass: 'attachments', - backdropDismiss: false - }); - - - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.loadedEvent.Attendees = newattendees; - } - }); - - await modal.present(); - - } - -} diff --git a/src/app/services/events/events-routing.module.ts b/src/app/services/events/events-routing.module.ts deleted file mode 100644 index bca181043..000000000 --- a/src/app/services/events/events-routing.module.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { EventsPage } from './events.page'; - -const routes: Routes = [ - { - path: '', - component: EventsPage - }, - // { - // path: 'event-detail', - // loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule) - // }, - { - path: 'attachments', - loadChildren: () => import('./attachments/attachments.module').then( m => m.AttachmentsPageModule) - }, - { - path: 'attendees', - loadChildren: () => import('./attendees/attendees.module').then( m => m.AttendeesPageModule) - }, - { - path: 'event-detail-modal', - loadChildren: () => import('./event-detail-modal/event-detail-modal.module').then( m => m.EventDetailModalPageModule) - }, - // { - // path: 'edit-event', - // loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule) - // } - - -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class EventsPageRoutingModule {} diff --git a/src/app/services/events/events.module.ts b/src/app/services/events/events.module.ts deleted file mode 100644 index 79a44a790..000000000 --- a/src/app/services/events/events.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { IonicModule } from '@ionic/angular'; -import { EventsPageRoutingModule } from './events-routing.module'; -import { EventsPage } from './events.page'; -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - EventsPageRoutingModule, - // - ], - declarations: [EventsPage], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class EventsPageModule {} diff --git a/src/app/services/events/events.page.html b/src/app/services/events/events.page.html deleted file mode 100644 index 53fb13c1a..000000000 --- a/src/app/services/events/events.page.html +++ /dev/null @@ -1,120 +0,0 @@ - - -

{{customDate}}

-
- -

{{totalEvent}} evento agendado para hoje

-

{{totalEvent}} eventos agendados para hoje

-
-
-
{{currentHoursMinutes | date: 'HH:mm'}}
-
"{{currentEvent}}"
-
- -
- - - - - - - - - - - -
-
-
-
- -
A sua Agenda
-
- -
-
- - - - - -
- -
-
{{event.StartDate | date: 'HH:mm'}}
-
{{event.EndDate | date: 'HH:mm'}}
- -
Todo
-
o dia
-
-
-
-
{{event.Location}}
-
-

{{event.Subject}}

-
-
-
-
- -
- -
-
- -
-
-
- -
Correspondência por ler
-
- -
-
- - -
-
-
{{task.TaskStartDate | date: 'dd-MM-yyyy'}}
-
{{task.TaskStartDate | date: 'HH:mm'}}
-
-
-
{{ task.Subject }}
-
{{ task.Senders }}
-
-
-
- -
-
-
-
- -
diff --git a/src/app/services/events/events.page.scss b/src/app/services/events/events.page.scss deleted file mode 100644 index f1cd8a967..000000000 --- a/src/app/services/events/events.page.scss +++ /dev/null @@ -1,526 +0,0 @@ -@import '~src/function.scss'; - -/* HEADER */ -.bg-blue{ - --background:#0782c9; - background:#0782c9; - --background-color:#0782c9; - background-color:#0782c9; - color: #ffffff; - --color: #ffffff; -} -ion-toolbar{ - --background: white; -} -.ion-text-header-top{ - width: 100%; - --background: transparent; - text-align: center; - padding-top: 15px; - color: #ffffff; - - /* border: 1px solid red; */ - } - .div-top-header{ - width: 400px; - margin: 0 auto; - background-color: #0782c9; - overflow: auto; - padding-top: 15px; - border: 0!important; - - .div-search{ - font-size: rem(45); - float: left; - margin: 0 0 0 10px - } - .div-logo{ - background: transparent; - width: 140px; - margin: 5px 0 0px 71px; - float: left; - } - .div-logo img{ - width: 100%; - } - .div-profile{ - font-size: rem(45); - float: right; - margin-right: 10px; - } - } - .ion-text-header-top p{ - --background: transparent; - color: #ffffff; - } - .ion-text-right{ - --background: transparent; - color: #ffffff; - } - .header-large{ - font-family: Arial, Helvetica, sans-serif; - font-size: rem(17); - /* font-weight: 600; */ - background: transparent; - color: #ffffff; - } - .header-xsmall{ - font-family: Arial, Helvetica, sans-serif; - font-size: rem(13); - font-weight: bold; - padding-bottom: 3.5px; - margin-bottom: 3.5px; - border-bottom: 1px solid #ccc; - background: transparent; - } - .header-medium{ - font-size: rem(16); - text-align: left; - font-family: roboto; - background: transparent; - margin-right: 5px; - line-height: rem(25); - } - - .p-small{ - font-size: rem(17); - margin-top: 13px; - color:#000; - margin-right: 25px !important; - text-align: right; - /* color: #ffffff; */ - } - - /* CONTENT */ - .item-list-small{ - font-size: rem(14); - overflow: auto; - } - .ion-item-class{ - padding: 0; - - } - .label-text{ - width: 100%; - padding: 0; - margin: 0; - } - - //DIV - .div-item-Oficial{ - width: 100%; - overflow: auto; - /* border-bottom: 1px solid #ccc; */ - margin: 10px 0 5px 0; - background: #cab0dc; - border-radius: 20px; - padding: 10px; - /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ - } - .div-item-Pessoal{ - width: 100%; - overflow: auto; - /* border-bottom: 1px solid #ccc; */ - margin: 10px 0 5px 0; - background: #cbeecb; - border-radius: 20px; - padding: 10px; - /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ - } - .div-up{ - width: 100%; - overflow: auto; - } - .div-up h3{ - margin: 0; - padding: 0; - font-size: rem(17); - width: 100%; - } - .div-icon{ - width: 10%; - font-size: rem(22); - float: left; - color: #808080; - } - .div-icon ion-icon{ - display: block; - margin: 0 auto; - - } - .div-content-Oficial{ - width: 85%; - float: left; - border-left: 4px solid #cab0dc; - padding: 0 0 0 12px; - } - .div-content-Pessoal{ - width: 85%; - float: left; - border-left: 4px solid #cbeecb; - padding: 0 0 0 12px; - } - .div-content-Oficial h3, .div-content-Pessoal h3{ - font-size: rem(19); - /* border: 1px solid red; */ - } - .div-content-Oficial p, .div-content-Pessoal p{ - font-size: rem(16); - color: rgb(94, 92, 92); - padding: 0 !important; - margin: 0 !important; - } - .div-botton{ - width: 100%; - overflow: auto; - margin: 10px 0 5px 0; - } - .div-botton-left{ - width: 10%; - float: left; - } - .ion-icon-location{ - text-align: center; - display: block; - color: #000; - font-size: rem(16); - margin: 0 auto; - } - .div-botton-middle{ - width: 75%; - float: left; - margin-top: 0.5px; - } - .div-botton-middle p{ - padding: 0; - margin: 0; - } - .div-botton-right{ - width: 10%; - float: left; - margin: 0; - padding: 0; - } - .ion-icon-attach{ - color: #666666; - font-size: rem(20); - } - /* NEW CSS FOR TOGGLE BUTTON */ - .toggleBox{ - margin:20px 20px 0 0; - } - input[type="checkbox"]{ - position: relative; - width: 96px; - height: 34px; - background: #ffffff; - -webkit-appearance: none; - border-radius: 20px; - outline: none; - transition: .4s; - /* box-shadow: inset 0 0 5px rgba(0,0,0,0.2); */ - cursor: pointer; - border:1px solid #e16817; - } - input:checked[type="checkbox"]{ - background: #e16817; - } - input[type="checkbox"]::before{ - z-index: 2; - position: absolute; - content: ""; - left: 0; - width: rem(30); - height: 30px; - background: #fff; - border-radius: 50%; - /* transform: scale(1.1); */ - box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); - border:1px solid #e16817; - } - input:checked[type="checkbox"]::before{ - left: 65px; - - } - .toggle{ - position: relative; - display: inline; - font-family: 'Montserrat', sans-serif; - display: grid; - text-align: center; - } - label{ - position: absolute; - color: #fff; - font-weight: 600; - font-size: rem(12); - pointer-events: none; - } - .onbtn{ - top:10px; - bottom: 15px; - left: 15px; - /* padding-top: 10px; - border: 1px solid red; */ - } - .ofbtn{ - top:10px; - bottom: 15px; - right: 14px; - color: #e16817; - } - - - -// new -.main{ - padding: 0px em(20px); -} - -.event-number{ - color: white; - font-family: Roboto; - font-size: rem(15); - color: var(--white); - - bold{ - font-family: Roboto; - font-size: rem(25); - text-align: right; - color: var(--white); - } -} -.time{ - font-family: Roboto; - font-size: rem(30); - text-align: center; - color: var(--white); - line-height: unset; - margin-top: 10px; -} - -.next-meeting{ - display: flex; - justify-content: center; - margin: 0px 20px; - margin-top: 15px; - - .meeting-time { - font-size: em(25); - font-family: Roboto; - font-weight: 300; - color: var(--white); - margin-right: 7px; - } - - .meeting-description { - margin-top: 2px; - font-family: Roboto; - font-size: rem(15); - color: var(--white); - } -} - -.conteiner-box { - display: flex; - flex-wrap: wrap; - justify-content: center; - padding-bottom: 20px; -} -.schedule { - max-width: 400px; - font-family: Roboto; - background-color: white; - box-shadow: 0 0 10px 0 rgb(0 0 0 / 7%); - border: solid 1px #e9e9e9; - margin-bottom: 20px; - border-radius: 25px; - display: flex; - flex-direction: column; - max-height: 100%; - overflow: auto; - padding-bottom: 25px; - - .schedule-header{ - display: flex; - margin-bottom: 20px; - justify-content: space-between; - padding: 20px 20px 0px 20px; - - .title { - display: flex; - align-items: center; - - .icon{ - color: #e8e8e8; - height: rem(35); - width: rem(35); - margin-right: 10px; - } - .text{ - font-family: Roboto; - font-size: rem(20); - color: black; - } - } - .icon-next { - color: #e8e8e8; - height: rem(35); - width: rem(35); - font-size: rem(35); - font-size: rem(35); - } - } - .content{ - //padding: 0px 20px 20px 20px; - overflow: auto; - - .item-exp{ - overflow: auto; - //padding-top: 5px; - //padding-bottom: 5px; - padding: 5px 20px 5px 20px; - background-color: transparent !important; - } - ion-list{ - padding: 0px; - margin: 0px; - .d-flex{ - width: 100%; - display: flex; - justify-content: space-between; - align-items: center; - } - ion-item{ - padding-bottom: 5px; - margin-top: 5px; - border-bottom: 1px solid #ebebeb; - display: flex; - justify-content: space-between; - align-items: center; - --background: transparent !important; - - .schedule-time{ - margin-right: 10px; - .time-start{ - color: #797979 !important; - font-family: Roboto; - font-size: rem(13); - } - .time-end{ - color: #797979 !important; - font-family: Roboto; - font-size: rem(13); - } - } - .schedule-date{ - margin-right: 10px; - width: 22%; - color: #797979 !important; - font-size: rem(13); - } - .schedule-details{ - display: flex; - flex-wrap: wrap; - align-items: center; - width: 78%; - .location{ - font-family: Roboto; - font-size: rem(13); - color: black; - width: 100%; - - } - .description{ - width: 100%; - font-family: Roboto; - font-size: rem(15); - font-weight: bold; - color: #0d89d1; - } - .description p{ - white-space: nowrap; - overflow: hidden !important; - text-overflow: ellipsis !important; - } - } - .color{ - width: 5px; - height: rem(40); - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - background-color: #f05d5e; - } - } - ion-item:last-child{ - border-bottom: unset !important; - padding-bottom: unset !important; - } - } - - } - - .resume{ - .title{ - font-family: Roboto; - font-size: rem(15); - font-weight: 500; - color: #797979; - margin-bottom: 5px; - margin-top: 10px; - } - .event-num, .first-event-time{ - font-family: Roboto; - font-size: rem(15); - display: block; - color: black; - } - } - -} - -.d-flex { - display: flex; -} - -.pointer{ - cursor: pointer; -} - - - - -@media only screen and (max-width: 856px) { - - .content, .conteiner-box{ - height: unset !important; - max-height: unset !important; - } - -} - - -@media only screen and (min-width: 804px) { - - .schedule:first-child { - margin-right: 2%; - - } -} - -@media only screen and (min-width: 478px) { - .schedule{ - width: 400px; - } -} - - -@media only screen and (max-width: 478px) { - .schedule{ - width: 360px; - } -} -ion-title{ - border: 1px solid red; - text-overflow: ellipsis; -} diff --git a/src/app/services/events/events.page.spec.ts b/src/app/services/events/events.page.spec.ts deleted file mode 100644 index d9ee95a07..000000000 --- a/src/app/services/events/events.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { EventsPage } from './events.page'; - -describe('EventsPage', () => { - let component: EventsPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ EventsPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(EventsPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/services/events/events.page.ts b/src/app/services/events/events.page.ts deleted file mode 100644 index 72d212440..000000000 --- a/src/app/services/events/events.page.ts +++ /dev/null @@ -1,373 +0,0 @@ -import { Component, OnInit, EventEmitter, Output } from '@angular/core'; - -import { Event } from '../../models/event.model'; -import { EventsService } from 'src/app/services/events.service'; -import { NavigationExtras, Router } from '@angular/router'; -import { ActivatedRoute, NavigationEnd } from '@angular/router'; -import { ModalController, Platform } from '@ionic/angular'; -// import { EventDetailPage } from './event-detail/event-detail.page'; -import { ProcessesService } from '../../services/processes.service'; -import { DailyWorkTask } from '../../models/dailyworktask.model'; -import { LoginUserRespose } from 'src/app/models/user.model'; -import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service'; -import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx'; -import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe'; -import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service'; -import { SessionStore } from 'src/app/store/session.service'; -import { ThemeService } from 'src/app/services/theme.service'; - -@Component({ - selector: 'app-events', - templateUrl: './events.page.html', - styleUrls: ['./events.page.scss'], -}) -export class EventsPage implements OnInit { - /* Get current system date */ - today = new Date(); - - months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; - days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"]; - - customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); - - /* Setting appropriate greeting according to the time */ - grettings = ["Bom dia", "Boa tarde", "Boa noite"]; - greetting=''; - - timeDate = this.today.getHours() + ":" + this.today.getMinutes(); - /* Set segment variable */ - segment:string; - public profile:string; - currentEvent: any; - - eventsList: Event[]; - maxSubjectLength = 30; - officialeventsList: Event[]; - personaleventsList: Event[]; - - prEventList: Event[]; - mdEventList: Event[]; - - combinedEvents: Event[]; - - customText = false; - totalEvent=0; - currentHoursMinutes: Date | string; - - showLoader: boolean; - - taskslist:DailyWorkTask[] = []; - expedientList:any; - hideSearchBtn: boolean=false; - - // shared data - toDayEventStorage = ToDayEventStorage - expedienteGdStore = ExpedienteGdStore - - expedienteTaskPipe = new ExpedienteTaskPipe() - - @Output() openExpedientListPage:EventEmitter = new EventEmitter(); - - loggeduser: LoginUserRespose; - - existingScreenOrientation: string; - - constructor( - private eventService: EventsService, - private router: Router, - public activatedRoute: ActivatedRoute, - private processes:ProcessesService, - /* private gabineteService: GabineteDigitalPage, */ - private modalController:ModalController, - private screenOrientation: ScreenOrientation, - public platform: Platform, - public ThemeService: ThemeService, - ) { - this.existingScreenOrientation = this.screenOrientation.type; - - - this.loggeduser = SessionStore.user; - - this.prEventList = null; - - this.platform.resize.subscribe(async () => { - // - // - - }); - - } - - ngOnInit() { - - this.segment = "Combinada"; - this.profile = "mdgpr"; - - this.showGreeting(); - - this.router.events.forEach((event) => { - if(event instanceof NavigationEnd && event.url == '/home/events') { - this.RefreshEvents(); - this.LoadList(); - } - }); - this.hideSearch(); - - //this.checkScreenOrientation(); - } - - hideSearch(){ - if(this.router.url == '/home/events'){ - this.hideSearchBtn = true; - } - } - - doRefresh(event) { - this.RefreshEvents(); - this.LoadList(); - try { - event?.target?.complete(); -} catch(error) {} - } - - onSegmentChange() { - this.RefreshEvents(); - } - - // Lock to portrait - lockToPortrait(){ - this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT); - - } - - // Lock to landscape - lockToLandscape(){ - this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE); - } - - // Unlock screen orientation - unlockScreenOrientation(){ - this.screenOrientation.unlock(); - } - - checkScreenOrientation(){ - if( window.innerWidth < 701) { - this.lockToPortrait(); - - - } - else{ - this.unlockScreenOrientation(); - } - } - - async RefreshEvents() { - this.currentEvent = ""; - this.showLoader = true; - - let date = new Date(); - date.setMonth(date.getMonth() + 1); - let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds(); - let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59"; - - - if(this.loggeduser.Profile == 'MDGPR') { - - let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise(); - let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise(); - - const list = mdOficialEvents.concat(mdPessoalEvents); - - this.toDayEventStorage.reset(list) - - if(this.toDayEventStorage.eventsList.length > 0){ - this.currentEvent = this.toDayEventStorage.eventsList[0].Subject; - this.currentHoursMinutes = this.toDayEventStorage.eventsList[0].StartDate; - } - - this.totalEvent = this.toDayEventStorage.eventsList.length; - this.showLoader = false; - - } - else if (this.loggeduser.Profile == 'PR') { - - let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise(); - let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise(); - - const list = prOficialEvents.concat(prPessoalEvents); - - this.toDayEventStorage.reset(list) - - if(this.toDayEventStorage.eventsList.length > 0) { - this.currentEvent = this.toDayEventStorage.eventsList[0].Subject; - this.currentHoursMinutes = this.toDayEventStorage.eventsList[0].StartDate; - } - - this.totalEvent = this.toDayEventStorage.eventsList.length; - this.showLoader = false; - - } - - - /* switch (this.segment) - { - case "Combinada": - if(this.loggeduser.Profile == 'MDGPR'){ - - let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise(); - let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise(); - - this.eventsList = mdOficialEvents.concat(mdPessoalEvents); - - if(this.eventsList.length > 0){ - this.currentEvent = this.eventsList[0].Subject; - this.currentHoursMinutes = this.eventsList[0].StartDate; - } - - this.totalEvent = this.eventsList.length; - this.showLoader = false; - - } - else{ - - let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise(); - let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise(); - this.eventsList = prOficialEvents.concat(prPessoalEvents); - - - - if(this.eventsList.length > 0){ - this.currentEvent = this.eventsList[0].Subject; - this.currentHoursMinutes = this.eventsList[0].StartDate; - } - - this.totalEvent = this.eventsList.length; - this.showLoader = false; - - } - - break; - case "Pessoal": - if(this.loggeduser.Profile == 'MDGPR'){ - this.eventService.getAllMdPessoalEvents(start, end).subscribe(res => { - this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal"); - this.showLoader = false; - }); - } - else{ - this.eventService.getAllPrPessoalEvents(start, end).subscribe(res => { - this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal"); - this.showLoader = false; - }); - } - - break; - case "Oficial": - if(this.loggeduser.Profile == 'MDGPR'){ - this.eventService.getAllMdOficialEvents(start, end).subscribe(res => { - this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");; - this.showLoader = false; - }); - } - else{ - this.eventService.getAllPrOficialEvents(start, end).subscribe(res => { - this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");; - this.showLoader = false; - }); - } - break; - } */ - } - - showGreeting(){ - if(this.today.getHours() >= 6 && this.today.getHours() < 12){ - this.greetting = this.grettings[0]; - } - else if(this.today.getHours() >= 12 && this.today.getHours() < 18){ - this.greetting = this.grettings[1]; - } - else /* if(this.today.getHours() < 6 && this.today.getHours() >= 18) */{ - this.greetting = this.grettings[2]; - } - } - - gotTo(){ - this.router.navigate(['/home/events']); - } - - changeProfile(){ - if(this.profile == "mdgpr"){ - - this.profile ="pr"; - this.RefreshEvents(); - } - else{ - - this.profile ="mdgpr"; - this.RefreshEvents(); - } - } - - logout() - { - - SessionStore.user.BasicAuthKey = "" - this.router.navigate(['/home/login']); - } - - - - LoadList() { - this.processes.GetTaskListExpediente(false).subscribe(result => { - - - const ExpedienteTask = result.map( e=> this.expedienteTaskPipe.transform(e)) - - this.expedienteGdStore.reset(ExpedienteTask) - }); - } - - sortArrayISODate(myArray: any){ - return myArray.sort(function(a, b) { - return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0); - }); - } - - goToEvent(eventId:any){ - this.router.navigate(['/home/events', eventId, 'events']); - } - - goToExpediente(SerialNumber:any) { - this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); - /* if(this.loggeduser.Profile == 'MDGPR'){ - this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); - } - else if(this.loggeduser.Profile == 'PR'){ - this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']); - } */ - } - - viewExpedientListPage(){ - if(this.loggeduser.Profile == 'MDGPR'){ - if( window.innerWidth < 801){ - this.router.navigate(['/home/gabinete-digital/expediente']); - } - else{ - let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,} }; - this.router.navigate(['/home/gabinete-digital'], navigationExtras); - } - } - else if(this.loggeduser.Profile == 'PR'){ - if( window.innerWidth < 801){ - this.router.navigate(['/home/gabinete-digital/expedientes-pr']); - } - else{ - let navigationExtras: NavigationExtras = { queryParams: {"expedientes-pr": true,} }; - this.router.navigate(['/home/gabinete-digital'], navigationExtras); - } - } - } - - -} - diff --git a/src/app/shared/agenda/edit-event/edit-event.page.ts b/src/app/shared/agenda/edit-event/edit-event.page.ts index fdaf28021..4e7d0ff7d 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.ts +++ b/src/app/shared/agenda/edit-event/edit-event.page.ts @@ -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() { diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts index 1bff30f13..127d716af 100644 --- a/src/app/shared/agenda/view-event/view-event.page.ts +++ b/src/app/shared/agenda/view-event/view-event.page.ts @@ -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() { diff --git a/src/app/shared/chat/group-messages/group-messages.page.html b/src/app/shared/chat/group-messages/group-messages.page.html index 667241f4e..2b1e8cd95 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.html +++ b/src/app/shared/chat/group-messages/group-messages.page.html @@ -182,7 +182,7 @@
{{msg.u.name}} criou esta reunião
-
+ De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
{{msg.file.venue}}
diff --git a/src/app/shared/chat/group-messages/group-messages.page.ts b/src/app/shared/chat/group-messages/group-messages.page.ts index 041ae5845..3ac80c888 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.ts +++ b/src/app/shared/chat/group-messages/group-messages.page.ts @@ -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); diff --git a/src/app/shared/chat/messages/messages.page.html b/src/app/shared/chat/messages/messages.page.html index ab8a5091d..fd28d70e8 100644 --- a/src/app/shared/chat/messages/messages.page.html +++ b/src/app/shared/chat/messages/messages.page.html @@ -196,9 +196,9 @@ {{msg.u.name}} criou esta reunião
-