mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
merge
This commit is contained in:
+223
-218
@@ -1,197 +1,198 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
import { ChatPage } from './pages/chat/chat.page';
|
||||
import { MessagesPage } from './pages/chat/messages/messages.page';
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule)
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-chat',
|
||||
loadChildren: () => import('./shared/chat/empty-chat/empty-chat.module').then( m => m.EmptyChatPageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-container',
|
||||
loadChildren: () => import('./shared/empty-container/empty-container.module').then( m => m.EmptyContainerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'events-to-approve',
|
||||
loadChildren: () => import('./shared/gabinete-digital/events-to-approve/events-to-approve.module').then( m => m.EventsToApprovePageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedients',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedients/expedients.module').then( m => m.ExpedientsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'document-detail',
|
||||
loadChildren: () => import('./modals/document-detail/document-detail.module').then( m => m.DocumentDetailPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-group',
|
||||
loadChildren: () => import('./shared/chat/edit-group/edit-group.module').then( m => m.EditGroupPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pedidos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pedidos/pedidos.module').then( m => m.PedidosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./pages/gabinete-digital/event-list/event-list.module').then(m =>m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'create-process',
|
||||
loadChildren: () => import('./modals/create-process/create-process.module').then( m => m.CreateProcessPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pendentes',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pendentes/pendentes.module').then( m => m.PendentesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'delegar',
|
||||
loadChildren: () => import('./modals/delegar/delegar.module').then( m => m.DelegarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'add-note',
|
||||
loadChildren: () => import('./modals/add-note/add-note.module').then( m => m.AddNotePageModule)
|
||||
},
|
||||
{
|
||||
path: 'dar-parecer',
|
||||
loadChildren: () => import('./modals/dar-parecer/dar-parecer.module').then( m => m.DarParecerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente/opts-expediente.module').then( m => m.OptsExpedientePageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos-pr/despachos-pr.module').then( m => m.DespachosPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas/diplomas.module').then( m => m.DiplomasPageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedientes-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedientes-pr/expedientes-pr.module').then( m => m.ExpedientesPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas-assinar',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then( m => m.DiplomasAssinarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente-pr',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente-pr/opts-expediente-pr.module').then( m => m.OptsExpedientePrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-options/despachos-options.module').then( m => m.DespachosOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-pr-options/despachos-pr-options.module').then( m => m.DespachosPrOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'deploma-options',
|
||||
loadChildren: () => import('./shared/popover/deploma-options/deploma-options.module').then( m => m.DeplomaOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pin',
|
||||
loadChildren: () => import('./shared/pin/pin.module').then( m => m.PinPageModule)
|
||||
},
|
||||
{
|
||||
path: 'fingerprint',
|
||||
loadChildren: () => import('./shared/fingerprint/fingerprint.module').then( m => m.FingerprintPageModule)
|
||||
},
|
||||
{
|
||||
path: 'new-event',
|
||||
loadChildren: () => import('./shared/agenda/new-event/new-event.module').then( m => m.NewEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./shared/agenda/event-list/event-list.module').then( m => m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'approve-event',
|
||||
loadChildren: () => import('./shared/agenda/approve-event/approve-event.module').then( m => m.ApproveEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'bad-request',
|
||||
loadChildren: () => import('./shared/popover/bad-request/bad-request.module').then( m => m.BadRequestPageModule)
|
||||
},
|
||||
{
|
||||
path: 'success-message',
|
||||
loadChildren: () => import('./shared/popover/success-message/success-message.module').then( m => m.SuccessMessagePageModule)
|
||||
},
|
||||
{
|
||||
path: 'forward',
|
||||
loadChildren: () => import('./modals/forward/forward.module').then( m => m.ForwardPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-event-to-approve',
|
||||
loadChildren: () => import('./shared/agenda/edit-event-to-approve/edit-event-to-approve.module').then( m => m.EditEventToApprovePageModule)
|
||||
},
|
||||
{
|
||||
path: 'actions-options',
|
||||
loadChildren: () => import('./shared/popover/actions-options/actions-options.module').then( m => m.ActionsOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-action',
|
||||
loadChildren: () => import('./shared/publication/edit-action/edit-action.module').then( m => m.EditActionPageModule)
|
||||
},
|
||||
{
|
||||
path: 'eliminate-event',
|
||||
loadChildren: () => import('./modals/eliminate-event/eliminate-event.module').then( m => m.EliminateEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'inactivity',
|
||||
loadChildren: () => import('./pages/inactivity/inactivity.module').then( m => m.InactivityPageModule)
|
||||
},
|
||||
{
|
||||
path: 'document-set-up-meeting',
|
||||
loadChildren: () => import('./modals/document-set-up-meeting/document-set-up-meeting.module').then( m => m.DocumentSetUpMeetingPageModule)
|
||||
},
|
||||
{
|
||||
path: 'profile',
|
||||
loadChildren: () => import('./modals/profile/profile.module').then( m => m.ProfilePageModule)
|
||||
},
|
||||
{
|
||||
path: 'all-processes',
|
||||
loadChildren: () => import('./shared/gabinete-digital/all-processes/all-processes.module').then( m => m.AllProcessesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'searched-document-options',
|
||||
loadChildren: () => import('./shared/popover/searched-document-options/searched-document-options.module').then( m => m.SearchedDocumentOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-list',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-list/task-list.module').then( m => m.TaskListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-list',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-list/task-list.module').then( m => m.TaskListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-detailde',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-detailde/task-detailde.module').then( m => m.TaskDetaildePageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-details',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-details/task-details.module').then( m => m.TaskDetailsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'chat-options-features',
|
||||
loadChildren: () => import('./modals/chat-options-features/chat-options-features.module').then( m => m.ChatOptionsFeaturesPageModule)
|
||||
},
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
import { ChatPage } from './pages/chat/chat.page';
|
||||
import { MessagesPage } from './pages/chat/messages/messages.page';
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule)
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-chat',
|
||||
loadChildren: () => import('./shared/chat/empty-chat/empty-chat.module').then( m => m.EmptyChatPageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-container',
|
||||
loadChildren: () => import('./shared/empty-container/empty-container.module').then( m => m.EmptyContainerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'events-to-approve',
|
||||
loadChildren: () => import('./shared/gabinete-digital/events-to-approve/events-to-approve.module').then( m => m.EventsToApprovePageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedients',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedients/expedients.module').then( m => m.ExpedientsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'document-detail',
|
||||
loadChildren: () => import('./modals/document-detail/document-detail.module').then( m => m.DocumentDetailPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-group',
|
||||
loadChildren: () => import('./shared/chat/edit-group/edit-group.module').then( m => m.EditGroupPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pedidos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pedidos/pedidos.module').then( m => m.PedidosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./pages/gabinete-digital/event-list/event-list.module').then(m =>m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'create-process',
|
||||
loadChildren: () => import('./modals/create-process/create-process.module').then( m => m.CreateProcessPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pendentes',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pendentes/pendentes.module').then( m => m.PendentesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'delegar',
|
||||
loadChildren: () => import('./modals/delegar/delegar.module').then( m => m.DelegarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'add-note',
|
||||
loadChildren: () => import('./modals/add-note/add-note.module').then( m => m.AddNotePageModule)
|
||||
},
|
||||
{
|
||||
path: 'dar-parecer',
|
||||
loadChildren: () => import('./modals/dar-parecer/dar-parecer.module').then( m => m.DarParecerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente/opts-expediente.module').then( m => m.OptsExpedientePageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos-pr/despachos-pr.module').then( m => m.DespachosPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas/diplomas.module').then( m => m.DiplomasPageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedientes-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedientes-pr/expedientes-pr.module').then( m => m.ExpedientesPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas-assinar',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then( m => m.DiplomasAssinarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente-pr',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente-pr/opts-expediente-pr.module').then( m => m.OptsExpedientePrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-options/despachos-options.module').then( m => m.DespachosOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-pr-options/despachos-pr-options.module').then( m => m.DespachosPrOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'deploma-options',
|
||||
loadChildren: () => import('./shared/popover/deploma-options/deploma-options.module').then( m => m.DeplomaOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pin',
|
||||
loadChildren: () => import('./shared/pin/pin.module').then( m => m.PinPageModule)
|
||||
},
|
||||
{
|
||||
path: 'fingerprint',
|
||||
loadChildren: () => import('./shared/fingerprint/fingerprint.module').then( m => m.FingerprintPageModule)
|
||||
},
|
||||
{
|
||||
path: 'new-event',
|
||||
loadChildren: () => import('./shared/agenda/new-event/new-event.module').then( m => m.NewEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./shared/agenda/event-list/event-list.module').then( m => m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'approve-event',
|
||||
loadChildren: () => import('./shared/agenda/approve-event/approve-event.module').then( m => m.ApproveEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'bad-request',
|
||||
loadChildren: () => import('./shared/popover/bad-request/bad-request.module').then( m => m.BadRequestPageModule)
|
||||
},
|
||||
{
|
||||
path: 'success-message',
|
||||
loadChildren: () => import('./shared/popover/success-message/success-message.module').then( m => m.SuccessMessagePageModule)
|
||||
},
|
||||
{
|
||||
path: 'forward',
|
||||
loadChildren: () => import('./modals/forward/forward.module').then( m => m.ForwardPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-event-to-approve',
|
||||
loadChildren: () => import('./shared/agenda/edit-event-to-approve/edit-event-to-approve.module').then( m => m.EditEventToApprovePageModule)
|
||||
},
|
||||
{
|
||||
path: 'actions-options',
|
||||
loadChildren: () => import('./shared/popover/actions-options/actions-options.module').then( m => m.ActionsOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-action',
|
||||
loadChildren: () => import('./shared/publication/edit-action/edit-action.module').then( m => m.EditActionPageModule)
|
||||
},
|
||||
{
|
||||
path: 'eliminate-event',
|
||||
loadChildren: () => import('./modals/eliminate-event/eliminate-event.module').then( m => m.EliminateEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'inactivity',
|
||||
loadChildren: () => import('./pages/inactivity/inactivity.module').then( m => m.InactivityPageModule)
|
||||
},
|
||||
{
|
||||
path: 'document-set-up-meeting',
|
||||
loadChildren: () => import('./modals/document-set-up-meeting/document-set-up-meeting.module').then( m => m.DocumentSetUpMeetingPageModule)
|
||||
},
|
||||
{
|
||||
path: 'profile',
|
||||
loadChildren: () => import('./modals/profile/profile.module').then( m => m.ProfilePageModule)
|
||||
},
|
||||
{
|
||||
path: 'all-processes',
|
||||
loadChildren: () => import('./shared/gabinete-digital/all-processes/all-processes.module').then( m => m.AllProcessesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'searched-document-options',
|
||||
loadChildren: () => import('./shared/popover/searched-document-options/searched-document-options.module').then( m => m.SearchedDocumentOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-list',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-list/task-list.module').then( m => m.TaskListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-list',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-list/task-list.module').then( m => m.TaskListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-detailde',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-detailde/task-detailde.module').then( m => m.TaskDetaildePageModule)
|
||||
},
|
||||
{
|
||||
path: 'task-details',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-details/task-details.module').then( m => m.TaskDetailsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'chat-options-features',
|
||||
loadChildren: () => import('./modals/chat-options-features/chat-options-features.module').then( m => m.ChatOptionsFeaturesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'document-viewer',
|
||||
loadChildren: () => import('./modals/document-viewer/document-viewer.module').then( m => m.DocumentViewerPageModule)
|
||||
},
|
||||
@@ -231,28 +232,32 @@ const routes = [
|
||||
path: 'view-event',
|
||||
loadChildren: () => import('./modals/view-event/view-event.module').then( m => m.ViewEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'previewer',
|
||||
loadChildren: () => import('./modals/previewer/previewer.module').then( m => m.PreviewerPageModule)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
path: 'chat',
|
||||
component: ChatPage
|
||||
} */
|
||||
|
||||
/*
|
||||
path: 'chat',
|
||||
component: ChatPage
|
||||
} */
|
||||
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes,
|
||||
{ preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
path: 'chat',
|
||||
component: ChatPage
|
||||
} */
|
||||
|
||||
/*
|
||||
path: 'chat',
|
||||
component: ChatPage
|
||||
} */
|
||||
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes,
|
||||
{ preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
|
||||
+18
-17
@@ -1,35 +1,36 @@
|
||||
<ion-tabs class="tab">
|
||||
<ion-tab-bar class="bottoms" slot="bottom">
|
||||
<ion-tab-button tab="events" (click)="selectedTab('/home/events')">
|
||||
<ion-icon *ngIf="tabButton.home" class="nav-icon" src="assets/icon/tab/icons-nav-home-selected.svg"></ion-icon>
|
||||
<ion-icon *ngIf="!tabButton.home" class="nav-icon" src="assets/icon/tab/icons-nav-home.svg"></ion-icon>
|
||||
<ion-tab-button tab="events" [class.active]="pathname === '/home/events' ">
|
||||
<!-- <ion-icon name="home"></ion-icon> -->
|
||||
<ion-icon *ngIf="pathname != '/home/events'" class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
|
||||
<ion-icon *ngIf="pathname == '/home/events'" class="nav-icon" src="assets/images/nav-hover/icons-nav-home-active.svg"></ion-icon>
|
||||
<!-- <ion-badge color="danger">{{toDayEventStorage.eventsList.length + expedienteGdStore.count}}</ion-badge> -->
|
||||
<ion-label>Início</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="agenda" (click)="selectedTab('/home/agenda')">
|
||||
<ion-icon *ngIf="tabButton.agenda" class="nav-icon" src="assets/icon/tab/icons-nav-agenda-selected.svg"></ion-icon>
|
||||
<ion-icon *ngIf="!tabButton.agenda" class="nav-icon" src="assets/icon/tab/icons-nav-agenda.svg"></ion-icon>
|
||||
<ion-tab-button tab="agenda" [class.active]="pathname === '/home/agenda' ">
|
||||
<!-- <ion-icon name="calendar"></ion-icon> -->
|
||||
<ion-icon *ngIf="pathname != '/home/agenda'" class="nav-icon" src="assets/images/icons-nav-calendar.svg"></ion-icon>
|
||||
<ion-icon *ngIf="pathname == '/home/agenda'" class="nav-icon" src="assets/images/nav-hover/icons-nav-calendar-active.svg"></ion-icon>
|
||||
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Agenda</ion-label>
|
||||
</ion-tab-button>
|
||||
<!-- (click)="goto('/home/gabinete-digital')" -->
|
||||
<ion-tab-button tab="gabinete-digital" (click)="selectedTab('/home/gabinete-digital')">
|
||||
<ion-icon *ngIf="tabButton.gabinete" class="nav-icon" src="assets/icon/tab/icons-nav-gabinete-selected.svg"></ion-icon>
|
||||
<ion-icon *ngIf="!tabButton.gabinete" class="nav-icon" src="assets/icon/tab/icons-nav-gabinete.svg"></ion-icon>
|
||||
<ion-tab-button (click)="goto('/home/gabinete-digital')" [class.active]="pathname === '/home/gabinete-digital' ">
|
||||
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
||||
<ion-icon *ngIf="pathname != '/home/gabinete-digital'" class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
|
||||
<ion-icon *ngIf="pathname == '/home/gabinete-digital'" class="nav-icon" src="assets/images/nav-hover/icons-nav-gabinete-active.svg"></ion-icon>
|
||||
<!-- <ion-badge color="danger" *ngIf="!p.userRole(['PR'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge> -->
|
||||
<ion-label>Gabinete</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="publications" (click)="selectedTab('/home/publications')">
|
||||
<ion-icon *ngIf="tabButton.actions" class="nav-icon" src="assets/icon/tab/icons-nav-actions-selected.svg"></ion-icon>
|
||||
<ion-icon *ngIf="!tabButton.actions" class="nav-icon" src="assets/icon/tab/icons-nav-actions.svg"></ion-icon>
|
||||
<ion-tab-button tab="publications" [class.active]="pathname === '/home/publications' ">
|
||||
<ion-icon *ngIf="pathname != '/home/publications'" class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
|
||||
<ion-icon *ngIf="pathname == '/home/publications'" class="nav-icon" src="assets/images/nav-hover/icons-nav-actions.svg"></ion-icon>
|
||||
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Ações</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="chat" (click)="selectedTab('/home/chat')">
|
||||
<ion-icon *ngIf="tabButton.chat" class="nav-icon" src="assets/icon/tab/icons-nav-chat-selected.svg"></ion-icon>
|
||||
<ion-icon *ngIf="!tabButton.chat" class="nav-icon" src="assets/icon/tab/icons-nav-chat.svg"></ion-icon>
|
||||
<ion-tab-button tab="chat" [class.active]="pathname === '/home/chat' ">
|
||||
<ion-icon *ngIf="pathname != '/home/chat'" class="nav-icon" src="assets/images/icons-nav-chat-inactive.svg"></ion-icon>
|
||||
<ion-icon *ngIf="pathname == '/home/chat'" class="nav-icon" src="assets/images/nav-hover/icons-nav-chat-active.svg"></ion-icon>
|
||||
<ion-label>Chat</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ ion-tab-bar{
|
||||
--color: #797979;
|
||||
}
|
||||
|
||||
ion-tab-button{
|
||||
--color-selected: #061b52;
|
||||
}
|
||||
// ion-tab-button{
|
||||
// --color-selected: #061b52;
|
||||
// }
|
||||
|
||||
// Badge
|
||||
// --------------------------------------------------
|
||||
@@ -46,3 +46,8 @@ ion-badge {/* */
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ion-tab-button.active{
|
||||
color: #061b52;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Device } from '@capacitor/device';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -94,7 +96,8 @@ export class HomePage implements OnInit {
|
||||
private eventservice: EventsService,
|
||||
private processservice: ProcessesService,
|
||||
private screenOrientation: ScreenOrientation,
|
||||
private sqliteservice: SqliteService) {
|
||||
private sqliteservice: SqliteService,
|
||||
private RouteService: RouteService) {
|
||||
|
||||
/* this.webNotificationPopupService.askNotificationPermission() */
|
||||
|
||||
@@ -196,6 +199,14 @@ export class HomePage implements OnInit {
|
||||
console.log('Device info',info);
|
||||
};
|
||||
|
||||
get pathname(){
|
||||
return window.location.pathname
|
||||
}
|
||||
|
||||
get color() {
|
||||
return '#797979'
|
||||
}
|
||||
|
||||
updateList() {
|
||||
|
||||
/* this.notificationsService.registerCallback(
|
||||
@@ -214,7 +225,7 @@ export class HomePage implements OnInit {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
async synchWhenOnline() {
|
||||
try {
|
||||
await this.storage.get('eventEdit').then((req) => {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-doc
|
||||
import { Location } from '@angular/common';
|
||||
import { ViewDocumentPage } from '../view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -225,7 +226,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
//this.location.back();
|
||||
//this.RouteService.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -248,7 +249,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
});
|
||||
} */
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { PreviewerPage } from './previewer.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PreviewerPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class PreviewerPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PreviewerPageRoutingModule } from './previewer-routing.module';
|
||||
|
||||
import { PreviewerPage } from './previewer.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
PreviewerPageRoutingModule
|
||||
],
|
||||
declarations: [PreviewerPage]
|
||||
})
|
||||
export class PreviewerPageModule {}
|
||||
@@ -0,0 +1,8 @@
|
||||
<ion-header>
|
||||
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<h1>.../..</h1>
|
||||
|
||||
</ion-content>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PreviewerPage } from './previewer.page';
|
||||
|
||||
describe('PreviewerPage', () => {
|
||||
let component: PreviewerPage;
|
||||
let fixture: ComponentFixture<PreviewerPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PreviewerPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(PreviewerPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-previewer',
|
||||
templateUrl: './previewer.page.html',
|
||||
styleUrls: ['./previewer.page.scss'],
|
||||
})
|
||||
export class PreviewerPage implements OnInit {
|
||||
|
||||
imageUrl;
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
// this.imageUrl = this.navParams.get('imageUrl')
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,9 @@ import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expedient
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
|
||||
8
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-document',
|
||||
templateUrl: './view-document.page.html',
|
||||
@@ -103,7 +105,7 @@ export class ViewDocumentPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
//this.location.back();
|
||||
//this.RouteService.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { Event } from '../../models/event.model';
|
||||
import { EditEventPage } from 'src/app/pages/agenda/edit-event/edit-event.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -65,7 +66,7 @@ export class ViewEventPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public platform: Platform,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
@@ -145,7 +146,7 @@ export class ViewEventPage implements OnInit {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
@@ -327,7 +328,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
//this.location.back();
|
||||
//this.RouteService.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,15 @@
|
||||
<ion-content fullscreen>
|
||||
<div class="media d-flex align-items-center justify-center">
|
||||
<div class="media-content w-100 d-flex align-items-center justify-center">
|
||||
<img src="{{image}}"/>
|
||||
|
||||
<ion-slides style="width: 100%; height: 100%;" [options]="sliderOpts">
|
||||
<ion-slide>
|
||||
<div class="swiper-zoom-container">
|
||||
<img src="{{image}}">
|
||||
</div>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -12,6 +12,11 @@ export class ViewMediaPage implements OnInit {
|
||||
name: string
|
||||
_updatedAt: string
|
||||
|
||||
sliderOpts = {
|
||||
zoom: true,
|
||||
maxRation: 2
|
||||
};
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams:NavParams,
|
||||
|
||||
@@ -9,6 +9,8 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-actions-popover',
|
||||
@@ -27,7 +29,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
private popoverController: PopoverController,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
@@ -44,7 +46,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
goBack() {
|
||||
this.closePopover();
|
||||
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
closePopover() {
|
||||
|
||||
@@ -19,6 +19,27 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="container-div" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione agenda*"
|
||||
selectedText="{{postEvent.CalendarName}}"
|
||||
[(ngModel)]="CalendarName"
|
||||
interface="action-sheet" Cancel-text="Cancelar"
|
||||
required>
|
||||
<ion-select-option value="PR"> Calendário do Presidente da República</ion-select-option>
|
||||
<ion-select-option value="MDGPR"> Meu calendário</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Subject').errors?.required">
|
||||
|
||||
@@ -59,6 +59,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
members:any;
|
||||
CalendarName;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -86,6 +87,8 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.CalendarName = this.loggeduser.Profile;
|
||||
this.selectedRecurringType = "-1";
|
||||
console.log(this.postEvent);
|
||||
|
||||
@@ -246,7 +249,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
if(this.CalendarName == 'MDGPR') {
|
||||
console.log(this.loggeduser.Profile);
|
||||
|
||||
console.log(this.postEvent);
|
||||
@@ -255,7 +258,7 @@ export class NewEventPage implements OnInit {
|
||||
console.log(eventId);
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR'){
|
||||
else if(this.CalendarName == 'PR'){
|
||||
console.log(this.loggeduser.Profile);
|
||||
|
||||
eventId = await this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
|
||||
@@ -20,6 +20,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -71,7 +72,8 @@ export class ViewEventPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private storage: StorageService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -179,7 +181,7 @@ export class ViewEventPage implements OnInit {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
@@ -361,7 +363,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
//this.location.back();
|
||||
//this.RouteService.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import { Platform } from '@ionic/angular';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho-pr',
|
||||
@@ -60,7 +61,8 @@ export class DespachoPrPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private platform: Platform,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if (params["params"].SerialNumber) {
|
||||
@@ -99,7 +101,7 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -57,7 +58,7 @@ export class DespachoPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private despachoService: DespachoService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,
|
||||
private sqliteservice: SqliteService,
|
||||
private platform: Platform,
|
||||
@@ -97,7 +98,7 @@ export class DespachoPage implements OnInit {
|
||||
goBack() {
|
||||
|
||||
//this.navigationService.back()
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
|
||||
// if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
// if (window.innerWidth < 801) {
|
||||
@@ -173,7 +174,7 @@ export class DespachoPage implements OnInit {
|
||||
try {
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
|
||||
+3
-2
@@ -10,6 +10,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma-assinar',
|
||||
@@ -39,7 +40,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
private router: Router,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
@@ -59,7 +60,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Platform } from '@ionic/angular';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -47,7 +48,7 @@ export class DiplomaPage implements OnInit {
|
||||
private router: Router,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private platform: Platform,
|
||||
@@ -76,7 +77,7 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
/* if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
|
||||
@@ -18,7 +18,7 @@ import { BackgroundService } from '../../../../services/background.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -58,7 +58,7 @@ export class ApproveEventPage implements OnInit {
|
||||
private iab: InAppBrowser,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
private sqliteservice: SqliteService,
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService,
|
||||
@@ -94,7 +94,7 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
/* let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"eventos": true,
|
||||
|
||||
@@ -13,6 +13,7 @@ import { BackgroundService } from '../../../services/background.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -44,7 +45,8 @@ export class EventListPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private sortService: SortService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -216,7 +218,7 @@ export class EventListPage implements OnInit {
|
||||
// this.router.navigate(['/home/gabinete-digital']);
|
||||
// }
|
||||
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -32,6 +32,7 @@ import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -71,7 +72,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
public p: PermissionService,
|
||||
private taskService: TaskService,
|
||||
@@ -269,7 +270,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
/* if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
|
||||
@@ -21,6 +21,7 @@ import { Location } from '@angular/common';
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-pr',
|
||||
@@ -58,7 +59,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService
|
||||
|
||||
) {
|
||||
@@ -94,7 +95,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
/* if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedientes-pr',
|
||||
@@ -40,7 +41,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) {
|
||||
@@ -131,7 +132,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
// };
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedido',
|
||||
@@ -63,7 +63,7 @@ export class PedidoPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
private pedidoService: PedidoService,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservices: BackgroundService,
|
||||
@@ -670,7 +670,7 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
// if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
// if (window.innerWidth <= 700) {
|
||||
// this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
convertBlobToBase64 = (blob) => new Promise((resolve, reject) => {
|
||||
const reader = new FileReader;
|
||||
reader.onerror = reject;
|
||||
reader.onload = () => {
|
||||
resolve(reader.result);
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
});
|
||||
|
||||
onmessage = async function(oEvent) {
|
||||
const result = await convertBlobToBase64(oEvent.data);
|
||||
postMessage(result);
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, Platform, LoadingController } from '@ionic/angular';
|
||||
import { ModalController, NavParams, Platform, LoadingController, PopoverController } from '@ionic/angular';
|
||||
|
||||
/* import {Plugins, CameraResultType, CameraSource} from '@capacitor/core'; */
|
||||
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
||||
@@ -20,6 +20,7 @@ import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera
|
||||
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
import { NgxImageCompressService } from "ngx-image-compress";
|
||||
import { PreviewerPage } from 'src/app/modals/previewer/previewer.page';
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
interface LocalFile {
|
||||
@@ -74,9 +75,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
imgResultBeforeCompress: string;
|
||||
imgResultAfterCompress: string;
|
||||
convertBlobToBase64Worker;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private popoverController: PopoverController,
|
||||
public photoService: PhotoService,
|
||||
private navParams: NavParams,
|
||||
private publications: PublicationsService,
|
||||
@@ -92,6 +95,10 @@ export class NewPublicationPage implements OnInit {
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
this.folderId = this.navParams.get('folderId');
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
|
||||
|
||||
this.convertBlobToBase64Worker = new Worker(new URL('./convertBlobToBase64.worker.js', import.meta.url));
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -106,25 +113,28 @@ export class NewPublicationPage implements OnInit {
|
||||
// this.takePicture();
|
||||
}
|
||||
|
||||
imageUrl;
|
||||
|
||||
async takePicture() {
|
||||
|
||||
const capturedImage = await Camera.getPhoto({
|
||||
quality: 90,
|
||||
// allowEditing: true,
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera
|
||||
});
|
||||
|
||||
const response = await fetch(capturedImage.webPath!);
|
||||
this.imageUrl = capturedImage.webPath
|
||||
const blob = await response.blob();
|
||||
|
||||
this.photos.unshift({
|
||||
filepath: "soon...",
|
||||
webviewPath: capturedImage.webPath
|
||||
});
|
||||
this.capturedImage = await this.convertBlobToBase64(blob);
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
//console.log(this.capturedImage);
|
||||
}
|
||||
|
||||
this.convertBlobToBase64Worker.postMessage(blob);
|
||||
this.convertBlobToBase64Worker.onmessage = async (oEvent)=> {
|
||||
this.capturedImage = oEvent.data
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
imageSize(image) {
|
||||
var canvas = document.createElement('canvas');
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Location } from '@angular/common';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail',
|
||||
@@ -28,7 +28,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private publications:PublicationsService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService ) {
|
||||
@@ -88,7 +88,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ import { NewPublicationPage } from '../../new-publication/new-publication.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail',
|
||||
@@ -30,7 +30,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
@@ -100,7 +100,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
this.close()
|
||||
} else {
|
||||
// alert('go back')
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -177,10 +177,10 @@
|
||||
<ul>
|
||||
<li *ngFor="let searchDocument of showSearchDocuments" (click)="viewDetail( searchDocument); selectItem(searchDocument)" class="d-flex cursor-pointer">
|
||||
<div class="icon">
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' && ThemeService.currentTheme == 'default' "
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'default' "
|
||||
src="assets/images/icons-search-document.svg"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' && ThemeService.currentTheme == 'gov'"
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'gov'"
|
||||
src="assets/images/theme/gov/icons-search-document.svg"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="itemIcons() == 'Agenda' "
|
||||
|
||||
@@ -6,7 +6,10 @@ import { Router, NavigationEnd } from '@angular/router'
|
||||
export class NavigationService {
|
||||
private history: string[] = []
|
||||
|
||||
constructor(private router: Router, private location: Location) {
|
||||
constructor(
|
||||
private router: Router,
|
||||
private location: Location
|
||||
) {
|
||||
this.router.events.subscribe((event) => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
this.history.push(event.urlAfterRedirects)
|
||||
|
||||
@@ -80,92 +80,92 @@ export class NotificationsService {
|
||||
}
|
||||
|
||||
getTokenByUserIdAndId(user, userID) {
|
||||
const geturl = environment.apiURL + 'notifications/user/' + userID;
|
||||
// const geturl = environment.apiURL + 'notifications/user/' + userID;
|
||||
|
||||
return this.http.get<Tokenn[]>(`${geturl}`);
|
||||
// return this.http.get<Tokenn[]>(`${geturl}`);
|
||||
}
|
||||
|
||||
requestPermissions() {
|
||||
PushNotifications.requestPermissions().then(result => {
|
||||
if (result.receive === 'granted') {
|
||||
// Register with Apple / Google to receive push via APNS/FCM
|
||||
PushNotifications.register();
|
||||
} else {
|
||||
// Show some error
|
||||
}
|
||||
});
|
||||
// PushNotifications.requestPermissions().then(result => {
|
||||
// if (result.receive === 'granted') {
|
||||
// // Register with Apple / Google to receive push via APNS/FCM
|
||||
// PushNotifications.register();
|
||||
// } else {
|
||||
// // Show some error
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
getAndpostToken(username) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
} else {
|
||||
const geturl = environment.apiURL + 'notifications/token';
|
||||
PushNotifications.addListener('registration',
|
||||
(token: Token) => {
|
||||
console.log('token: ', token.value)
|
||||
this.storageService.store(username, token.value);
|
||||
this.storageService.get(username).then(value => {
|
||||
console.log('STORAGE TOKEN', value)
|
||||
this.storageService.get(AuthConnstants.USER).then(res => {
|
||||
console.log('USERID', res);
|
||||
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
|
||||
const body = {
|
||||
UserId: res.UserId,
|
||||
TokenId: token.value,
|
||||
Status: 1,
|
||||
Service: 1
|
||||
};
|
||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
// console.log('Notifications not supported')
|
||||
// } else {
|
||||
// const geturl = environment.apiURL + 'notifications/token';
|
||||
// PushNotifications.addListener('registration',
|
||||
// (token: Token) => {
|
||||
// console.log('token: ', token.value)
|
||||
// this.storageService.store(username, token.value);
|
||||
// this.storageService.get(username).then(value => {
|
||||
// console.log('STORAGE TOKEN', value)
|
||||
// this.storageService.get(AuthConnstants.USER).then(res => {
|
||||
// console.log('USERID', res);
|
||||
// const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
|
||||
// const body = {
|
||||
// UserId: res.UserId,
|
||||
// TokenId: token.value,
|
||||
// Status: 1,
|
||||
// Service: 1
|
||||
// };
|
||||
|
||||
this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
|
||||
console.log('TOKEN USER MIDLE', data);
|
||||
}, (error) => {
|
||||
console.log('Post token to backend', error)
|
||||
})
|
||||
});
|
||||
// this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
|
||||
// console.log('TOKEN USER MIDLE', data);
|
||||
// }, (error) => {
|
||||
// console.log('Post token to backend', error)
|
||||
// })
|
||||
// });
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
// });
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
registrationError() {
|
||||
PushNotifications.addListener('registrationError',
|
||||
(error: any) => {
|
||||
console.log('Error on registration: ' + JSON.stringify(error));
|
||||
}
|
||||
);
|
||||
// PushNotifications.addListener('registrationError',
|
||||
// (error: any) => {
|
||||
// console.log('Error on registration: ' + JSON.stringify(error));
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
||||
onReciveForeground() {
|
||||
PushNotifications.addListener('pushNotificationReceived',
|
||||
(notification: PushNotificationSchema) => {
|
||||
console.log('Push received: ' + JSON.stringify(notification));
|
||||
this.DataArray.push(notification)
|
||||
console.log("On ReceiveNotification", this.DataArray)
|
||||
this.storageService.store("Notifications", this.DataArray)
|
||||
this.eventtrigger.publishSomeData({
|
||||
notification: "recive"
|
||||
})
|
||||
}
|
||||
);
|
||||
// PushNotifications.addListener('pushNotificationReceived',
|
||||
// (notification: PushNotificationSchema) => {
|
||||
// console.log('Push received: ' + JSON.stringify(notification));
|
||||
// this.DataArray.push(notification)
|
||||
// console.log("On ReceiveNotification", this.DataArray)
|
||||
// this.storageService.store("Notifications", this.DataArray)
|
||||
// this.eventtrigger.publishSomeData({
|
||||
// notification: "recive"
|
||||
// })
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
||||
onReciveBackground() {
|
||||
PushNotifications.addListener('pushNotificationActionPerformed',
|
||||
(notification: ActionPerformed) => {
|
||||
console.log('Push action performed: ' + JSON.stringify(notification));
|
||||
/* this.DataArray.push(notification.notification)
|
||||
console.log("On ReceiveNotification", this.DataArray)
|
||||
this.storageService.store("Notifications", this.DataArray)
|
||||
this.eventtrigger.publishSomeData({
|
||||
notification: "recive"
|
||||
}) */
|
||||
this.notificatinsRoutes(notification)
|
||||
}
|
||||
);
|
||||
// PushNotifications.addListener('pushNotificationActionPerformed',
|
||||
// (notification: ActionPerformed) => {
|
||||
// console.log('Push action performed: ' + JSON.stringify(notification));
|
||||
// /* this.DataArray.push(notification.notification)
|
||||
// console.log("On ReceiveNotification", this.DataArray)
|
||||
// this.storageService.store("Notifications", this.DataArray)
|
||||
// this.eventtrigger.publishSomeData({
|
||||
// notification: "recive"
|
||||
// }) */
|
||||
// this.notificatinsRoutes(notification)
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
||||
tempClearArray() {
|
||||
@@ -175,51 +175,51 @@ export class NotificationsService {
|
||||
|
||||
notificatinsRoutes = (notification) => {
|
||||
|
||||
console.log('Push action performed 2222: ' + JSON.stringify(notification.data));
|
||||
// console.log('Push action performed 2222: ' + JSON.stringify(notification.data));
|
||||
|
||||
if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) {
|
||||
console.log("Id Lenght", notification.notification.data.IdObject.length)
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda']));
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (notification.notification.data.Service === "agenda" && notification.notification.data.Object === "event-list") {
|
||||
//this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.notification.data.IdObject, 'agenda']));
|
||||
// if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) {
|
||||
// console.log("Id Lenght", notification.notification.data.IdObject.length)
|
||||
// this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda']));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "agenda" && notification.notification.data.Object === "event-list") {
|
||||
// //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
|
||||
// this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.notification.data.IdObject, 'agenda']));
|
||||
|
||||
} else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos") {
|
||||
// } else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true }));
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "parecer") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true }));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "parecer") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "deferimento") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "deferimento") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos-pr") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos-pr") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject]));
|
||||
}
|
||||
else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.notification.data.FolderId, notification.data.IdObject]));
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas-assinar") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject]));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.notification.data.FolderId, notification.data.IdObject]));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas-assinar") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
// }
|
||||
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") {
|
||||
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RouteService } from './route.service';
|
||||
|
||||
describe('RouteService', () => {
|
||||
let service: RouteService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(RouteService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NavigationEnd, Router, NavigationStart } from '@angular/router';
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RouteService {
|
||||
|
||||
history: any = [];
|
||||
isGoBack = false;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
) {
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
|
||||
const lastRoute = this.history.slice(-1)
|
||||
|
||||
if(event.url != lastRoute) {
|
||||
this.history.push(event.url)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
window['RouteService'] = this
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param url [string] incase no history to go back
|
||||
* @param option [Object] some options to the url
|
||||
*/
|
||||
goBack(url = null, option: object = {}) {
|
||||
if(this.history.length >= 2) {
|
||||
this.history.pop();
|
||||
const goTo = this.history.pop();
|
||||
this.isGoBack = true;
|
||||
this.router.navigate([goTo]);
|
||||
} else if(url) {
|
||||
this.goTo({url})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
goTo({url}) {
|
||||
this.router.navigate([url]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,6 +29,30 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" >
|
||||
<!-- <mat-select [(value)]="postEvent.CalendarName" > -->
|
||||
<mat-option value="PR">
|
||||
Calendário do Presidente da República
|
||||
</mat-option>
|
||||
<mat-option value="MDGPR">
|
||||
Meu calendário
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
|
||||
@@ -27,7 +27,6 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
||||
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -111,9 +110,9 @@ export class NewEventPage implements OnInit {
|
||||
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||
|
||||
|
||||
showLoader = false
|
||||
|
||||
CalendarName;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -136,13 +135,15 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.CalendarName = this.loggeduser.Profile;
|
||||
|
||||
this.getRecurrenceTypes();
|
||||
if(!this.restoreTemporaryData()){
|
||||
// clear
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postEvent.Body = this.eventBody;
|
||||
|
||||
/* console.log(this.profile); */
|
||||
/* console.log(this.profile); */
|
||||
|
||||
let selectedStartdDate = this.selectedDate;
|
||||
let selectedEndDate = new Date(this.selectedDate);
|
||||
@@ -404,7 +405,7 @@ export class NewEventPage implements OnInit {
|
||||
});
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
else if(this.CalendarName == 'PR') {
|
||||
console.log('PR - Aqui');
|
||||
console.log(this.postEvent);
|
||||
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe(
|
||||
|
||||
@@ -13,6 +13,7 @@ import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -234,7 +235,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
//this.location.back();
|
||||
//this.RouteService.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import { DeplomaService } from 'src/app/Rules/deploma.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-deploma-options',
|
||||
@@ -30,7 +31,7 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
private deplomaService: DeplomaService,
|
||||
private location: Location) {
|
||||
private RouteService: RouteService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
@@ -216,7 +217,7 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { Location } from '@angular/common'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-options',
|
||||
@@ -33,7 +34,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
public ThemeService: ThemeService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
) {
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
@@ -316,7 +317,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-pr-options',
|
||||
@@ -33,7 +33,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,
|
||||
public ThemeService: ThemeService,
|
||||
|
||||
@@ -373,7 +373,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
cancle() {
|
||||
|
||||
@@ -14,7 +14,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente-pr',
|
||||
@@ -50,7 +50,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService
|
||||
|
||||
) {
|
||||
@@ -329,7 +329,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
getAttachments(serialNumber){
|
||||
|
||||
@@ -18,7 +18,7 @@ import { ExpedienteService } from 'src/app/Rules/expediente.service';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente',
|
||||
@@ -46,7 +46,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
public p: PermissionService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
private TaskService: TaskService,
|
||||
private expedienteService: ExpedienteService,
|
||||
public ThemeService: ThemeService
|
||||
@@ -107,7 +107,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
|
||||
|
||||
/* this.activatedRoute.paramMap.subscribe(params => {
|
||||
|
||||
Reference in New Issue
Block a user