diff --git a/src/app/guards/inactivity.guard.ts b/src/app/guards/inactivity.guard.ts index 31daa8ec9..e4cd3f7a8 100644 --- a/src/app/guards/inactivity.guard.ts +++ b/src/app/guards/inactivity.guard.ts @@ -24,22 +24,14 @@ export class InactivityGuard implements CanActivate { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ - //When user has got access to Agenda but does not have their own calendar, goes to Agenda - if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){ - this.router.navigate(['/home/agenda']); - } - else{ - this.router.navigate(['/home/events']); - } + this.router.navigate(['/home/events']); } - //If user has access permission to both Chat and Action, goes to Chat by default. - else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ + else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){ this.router.navigate(['/home/chat']); } else if(this.p.userPermission(this.p.permissionList.Actions.access)) { this.router.navigate(['/home/publications']); - } - else { + } else { this.alertController.create({ cssClass: 'my-custom-class', @@ -65,22 +57,14 @@ export class InactivityGuard implements CanActivate { else { if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ - //When user has got access to Agenda but does not have their own calendar, goes to Agenda - if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){ - this.router.navigate(['/home/agenda']); - } - else{ - this.router.navigate(['/home/events']); - } + this.router.navigate(['/home/events']); } - //If user has access permission to both Chat and Action, goes to Chat by default. - else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ + else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){ this.router.navigate(['/home/chat']); } else if(this.p.userPermission(this.p.permissionList.Actions.access)){ this.router.navigate(['/home/publications']); - } - else { + } else { this.alertController.create({ cssClass: 'my-custom-class', header: 'Utilizador sem acesso a aplicação', diff --git a/src/app/modals/chat-options-features/chat-options-features.page.ts b/src/app/modals/chat-options-features/chat-options-features.page.ts index 353c38aa2..f22b859c0 100644 --- a/src/app/modals/chat-options-features/chat-options-features.page.ts +++ b/src/app/modals/chat-options-features/chat-options-features.page.ts @@ -50,15 +50,15 @@ export class ChatOptionsFeaturesPage implements OnInit { } - notImplemented(){ + notImplemented() { this.alertService.presentAlert('Funcionalidade em desenvolvimento'); } - close(){ - if( window.innerWidth < 701){ + close() { + if( window.innerWidth < 701) { this.popoverController.dismiss(); } - else{ + else { this.modalController.dismiss(); } } 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 241e22819..0ded75400 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -131,7 +131,7 @@ export class NewEventPage implements OnInit { this.getRecurrenceTypes(); if(this.selectedSegment != "Combinada"){ - this.postEvent ={ + this.postEvent = { EventId: '', Subject: '', Body: this.eventBody, @@ -153,7 +153,7 @@ export class NewEventPage implements OnInit { }; } else{ - this.postEvent ={ + this.postEvent = { EventId: '', Subject: '', Body: this.eventBody, @@ -176,7 +176,6 @@ export class NewEventPage implements OnInit { } window.onresize = (event) => { - // if not mobile remove all component if( window.innerWidth >= 1024){ this.modalController.dismiss(); } @@ -187,25 +186,25 @@ export class NewEventPage implements OnInit { } - close(){ + close() { this.modalController.dismiss(); } getRecurrenceTypes() { - this.eventService.getRecurrenceTypes().subscribe(res=>{ + this.eventService.getRecurrenceTypes().subscribe( res => { this.recurringTypes = res; }); } - onSelectedRecurringChanged(ev:any){ + onSelectedRecurringChanged(ev:any) { - if(ev.length > 1){ + if(ev.length > 1) { this.selectedRecurringType = ev.filter(data => data != '-1'); } - if(ev.length == 0){ + if(ev.length == 0) { this.selectedRecurringType = "-1"; } } @@ -286,7 +285,7 @@ export class NewEventPage implements OnInit { if(this.documents.length >= 0) { this.postEvent.HasAttachments = true; } - if(this.selectedRecurringType != '-1'){ + if(this.selectedRecurringType != '-1') { this.postEvent.EventRecurrence.Type = this.selectedRecurringType; } diff --git a/src/app/pages/chat/new-group/new-group.page.ts b/src/app/pages/chat/new-group/new-group.page.ts index d3e904aab..e1c5889df 100644 --- a/src/app/pages/chat/new-group/new-group.page.ts +++ b/src/app/pages/chat/new-group/new-group.page.ts @@ -120,7 +120,7 @@ export class NewGroupPage implements OnInit { return await popover.present(); } - async showPicker(){ + async showPicker() { const picker = await this.pickerController.create({ cssClass: '', buttons: [ diff --git a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts index 0ba668386..99941db31 100644 --- a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts +++ b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts @@ -569,9 +569,6 @@ export class DespachoPrPage implements OnInit { modal.onDidDismiss().then(res => { if (res['data'] == 'close') { this.close(); - /* - this.close(); - this.openMenu(); */ } }); } diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html index 19ddea156..5c69099f7 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html @@ -12,7 +12,7 @@
- {{ task.Folio}} + {{ task.Folio }}
@@ -62,7 +62,7 @@
Documentos Anexados
-

{{ Document.Assunto }}

+

{{ Document.Assunto || "Sem assunto" }}

{{ Document.Sender}}{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}

diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts index 0edc3c97b..0b8d7066c 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts @@ -305,10 +305,10 @@ export class DespachoPage implements OnInit { try { await this.despachoService.executado(note, documents, this.serialnumber).toPromise(); - this.toastService.successMessage('Processo criado') + this.toastService._successMessage('Processo criado') this.close(); } catch (error) { - this.toastService.badRequest("Processo não criado") + this.toastService._badRequest("Processo não criado") } finally { loader.remove() @@ -347,11 +347,11 @@ export class DespachoPage implements OnInit { try { await this.processes.CompleteTask(body).toPromise() - this.toastService.successMessage() + this.toastService._successMessage() this.close(); } catch (error) { - this.toastService.badRequest() + this.toastService._badRequest() } finally { loader.remove() diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index c4294377e..db03f7f29 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -324,7 +324,7 @@ export class BookMeetingModalPage implements OnInit { loader.remove() } } - else{ + else { this.toastService._successMessage('Não é possível marcar a reunião de momento'); } @@ -409,7 +409,7 @@ export class BookMeetingModalPage implements OnInit { modal.onDidDismiss().then((data) => { - if(data){ + if(data) { data = data['data']; const newAttendees: EventPerson[] = data['taskParticipants']; diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html index 28d912dca..3989b4955 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html @@ -59,7 +59,7 @@
Documentos Anexados
-

{{ Document.Assunto }}

+

{{ Document.Assunto || "Sem assunto" }}

{{ Document.Sender}}{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}

@@ -166,6 +166,8 @@
- +
+ +
diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts index ae4354548..da80cfbcb 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts @@ -320,42 +320,7 @@ export class ExpedienteDetailPage implements OnInit { goBack() { this.RouteService.goBack(); - /* if(this.task.Status == "Pending" && this.caller != 'events'){ - if (window.innerWidth <= 800) { - this.router.navigate(['/home/gabinete-digital/pendentes']); - } - else { - let navigationExtras: NavigationExtras = { - queryParams: { - "pendentes": true, - } - } - this.router.navigate(['/home/gabinete-digital'], navigationExtras); - } - } - else{ - this.activatedRoute.paramMap.subscribe(params => { - switch (params["params"].caller) { - case 'events': - this.router.navigate(['/home',params["params"].caller]); - break; - case 'gabinete-digital': - let navigationExtras: NavigationExtras = { - queryParams: { - "expedientes": true, - } - } - if( window.innerWidth < 801) { - this.router.navigate(['/home/gabinete-digital/expediente']); - } else { - this.router.navigate(['/home/gabinete-digital'], navigationExtras); - } - break; - - } - }); - } */ } sendExpedienteToPending() { @@ -383,7 +348,7 @@ export class ExpedienteDetailPage implements OnInit { "Remetente": res.workflowInstanceDataFields.Sender, "Note": res.workflowInstanceDataFields.TaskMessage || res.workflowInstanceDataFields.Note, "FolderId": res.workflowInstanceDataFields.FolderID, - "FsId": res.workflowInstanceDataFields.FsId, + "FsId": res.workflowInstanceDataFields.FsId || res.workflowInstanceDataFields.ApplicationID, "DocId": res.workflowInstanceDataFields.DocID, "WorkflowName": res.workflowDisplayName, "Status": res.workflowInstanceDataFields.Status, diff --git a/src/app/pages/gabinete-digital/expediente/expediente.page.ts b/src/app/pages/gabinete-digital/expediente/expediente.page.ts index 2a557ff6b..2e04cc42b 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente.page.ts @@ -83,7 +83,7 @@ export class ExpedientePage implements OnInit { }); this.taskslist = this.taskslist.filter(function(item) { return item.activityInstanceName != 'Retificar Expediente' - }) + }) this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate') diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.html b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.html index a829e8d9c..6f023e836 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.html +++ b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.html @@ -68,7 +68,7 @@
Documentos Anexados
-

{{ Document.Assunto }}

+

{{ Document.Assunto || "Sem assunto" }}

{{ Document.Sender}}{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}

diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index 58b7d79ad..b8566f650 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -36,7 +36,7 @@
- +
@@ -97,7 +97,7 @@ - + diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index d74ddca4f..5b37105c1 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -383,8 +383,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck { goToProcess(serialNumber: string, workflowName: string, activityName: string) { - alert('nice!!!') - if (workflowName == 'Despacho') { if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') { this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']); diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index 998dc8932..dc6ca5916 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -717,7 +717,7 @@ export class SearchPage implements OnInit { if(ApplicationType == '8' || ApplicationType == '361') { - alert('view!!') + // alert('view!!') this.viewDocumentDetail(Id, ApplicationType); } } diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index f30eedaf4..9ce709473 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -152,7 +152,11 @@ export class NewEventPage implements OnInit { ngOnInit() { - this.CalendarName = this.loggeduser.Profile; + + + if(!this.CalendarName) { + this.CalendarName = this.loggeduser.Profile; + } this.getRecurrenceTypes(); if(!this.restoreTemporaryData()){ @@ -475,7 +479,7 @@ export class NewEventPage implements OnInit { if(DocumentToSave.length == 0){ this.afterSave(); } - this.toastService.successMessage('Evento criado') + this.toastService._successMessage('Evento criado') }); } else { @@ -513,7 +517,7 @@ export class NewEventPage implements OnInit { if(DocumentToSave.length == 0){ this.afterSave(); } - this.toastService.successMessage('Evento criado') + this.toastService._successMessage('Evento criado') }); } @@ -574,7 +578,8 @@ export class NewEventPage implements OnInit { window['temp.path:/home/agenda/new-event.component.ts'] = { postEvent: this.postEvent, eventBody: this.eventBody, - segment: this.segment + segment: this.segment, + CalendarName: this.CalendarName } } @@ -591,6 +596,7 @@ export class NewEventPage implements OnInit { this.postEvent = restoredData.postEvent this.eventBody = restoredData.eventBody this.segment = restoredData.segment + this.CalendarName = restoredData.CalendarName // restore dater for date and hours picker diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts index a5ed538a2..d73b88d6b 100644 --- a/src/app/shared/chat/messages/messages.page.ts +++ b/src/app/shared/chat/messages/messages.page.ts @@ -299,11 +299,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy this.calculateDuration(); //} } - else{ + else { this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.'); } } - else{ + else { this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!'); } } diff --git a/src/app/shared/gabinete-digital/generic/task-details/task-details.page.html b/src/app/shared/gabinete-digital/generic/task-details/task-details.page.html index 2d2699ca0..6b49a086f 100644 --- a/src/app/shared/gabinete-digital/generic/task-details/task-details.page.html +++ b/src/app/shared/gabinete-digital/generic/task-details/task-details.page.html @@ -58,7 +58,7 @@
Documentos Anexados
-

{{ Document.Assunto }}

+

{{ Document.Assunto || "Sem assunto" }}

{{ Document.Sender}}{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}