diff --git a/config.xml b/config.xml index 815386583..7a4d9177f 100644 --- a/config.xml +++ b/config.xml @@ -46,8 +46,6 @@ -<<<<<<< HEAD -<<<<<<< HEAD 3077110622 3619450036 @@ -91,10 +89,6 @@ en /adapters/MobileAPIProxy 2 -======= ->>>>>>> d9593fa592ca58a1f04e3fcd0aaf596f9a54cd3a -======= ->>>>>>> 562e405f192af623ae8d2ac244c729b150b0cf99 diff --git a/firebase-messaging-sw.js b/firebase-messaging-sw.js index 138a7fd1c..423e3a38f 100644 --- a/firebase-messaging-sw.js +++ b/firebase-messaging-sw.js @@ -1,29 +1,29 @@ -if ("serviceWorker" in navigator) { - navigator.serviceWorker - .register("./firebase-messaging-sw.js") - .then(function(registration) { - console.log("Registration successful, scope is:", registration.scope); - messaging.getToken({vapidKey: 'BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw', serviceWorkerRegistration : registration }) - .then((currentToken) => { - if (currentToken) { - console.log('current token for client: ', currentToken); +// if ("serviceWorker" in navigator) { +// navigator.serviceWorker +// .register("./firebase-messaging-sw.js") +// .then(function(registration) { +// console.log("Registration successful, scope is:", registration.scope); +// messaging.getToken({vapidKey: 'BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw', serviceWorkerRegistration : registration }) +// .then((currentToken) => { +// if (currentToken) { +// console.log('current token for client: ', currentToken); - // Track the token -> client mapping, by sending to backend server - // show on the UI that permission is secured - } else { - console.log('No registration token available. Request permission to generate one.'); +// // Track the token -> client mapping, by sending to backend server +// // show on the UI that permission is secured +// } else { +// console.log('No registration token available. Request permission to generate one.'); - // shows on the UI that permission is required - } - }).catch((err) => { - console.log('An error occurred while retrieving token. ', err); - // catch error while creating client token - }); - }) - .catch(function(err) { - console.log("Service worker registration failed, error:" , err ); - }); - } +// // shows on the UI that permission is required +// } +// }).catch((err) => { +// console.log('An error occurred while retrieving token. ', err); +// // catch error while creating client token +// }); +// }) +// .catch(function(err) { +// console.log("Service worker registration failed, error:" , err ); +// }); +// } // Scripts for firebase and firebase messaging diff --git a/package-lock.json b/package-lock.json index 7340f71ad..1c6a2eac5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2057,9 +2057,9 @@ } }, "@capacitor/android": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.2.tgz", - "integrity": "sha512-TG+tGz0KxkT/BgvSLQfbQwQ9c4Budub5TRijIGdmMbB1ZYB76TFhwvVuwWZ52HFSlKS3sx/UYLlbULL7UQ2aug==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.3.tgz", + "integrity": "sha512-YfLW8gh/b3ZifmhQPFS9ybAnPp4MutQWGFYiAVecRh3O5nJD/UgZAmUmqpSoWRAOWbNGLX4lhWUIs+cCf552fg==" }, "@capacitor/app": { "version": "1.0.5", @@ -6282,12 +6282,12 @@ "dev": true }, "browser-sync": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.5.tgz", - "integrity": "sha512-0GMEPDqccbTxwYOUGCk5AZloDj9I/1eDZCLXUKXu7iBJPznGGOnMHs88mrhaFL0fTA0R23EmsXX9nLZP+k5YzA==", + "version": "2.27.7", + "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.7.tgz", + "integrity": "sha512-9ElnnA/u+s2Jd+IgY+2SImB+sAEIteHsMG0NR96m7Ph/wztpvJCUpyC2on1KqmG9iAp941j+5jfmd34tEguGbg==", "requires": { - "browser-sync-client": "^2.27.5", - "browser-sync-ui": "^2.27.5", + "browser-sync-client": "^2.27.7", + "browser-sync-ui": "^2.27.7", "bs-recipes": "1.3.4", "bs-snippet-injector": "^2.0.1", "chokidar": "^3.5.1", @@ -6314,7 +6314,7 @@ "serve-static": "1.13.2", "server-destroy": "1.0.1", "socket.io": "2.4.0", - "ua-parser-js": "^0.7.28", + "ua-parser-js": "1.0.2", "yargs": "^15.4.1" }, "dependencies": { @@ -6469,6 +6469,11 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" }, + "ua-parser-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.2.tgz", + "integrity": "sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg==" + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -6519,9 +6524,9 @@ } }, "browser-sync-client": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.5.tgz", - "integrity": "sha512-l2jtf60/exv0fQiZkhi3z8RgexYYLGS7DVDnyepkrp+oFAPlKW69daL6NrVSgrwu6lzSTCCTAiPXnUSrQ57e/Q==", + "version": "2.27.7", + "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.7.tgz", + "integrity": "sha512-wKg9UP9a4sCIkBBAXUdbkdWFJzfSAQizGh+nC19W9y9zOo9s5jqeYRFUUbs7x5WKhjtspT+xetVp9AtBJ6BmWg==", "requires": { "etag": "1.8.1", "fresh": "0.5.2", @@ -6540,9 +6545,9 @@ } }, "browser-sync-ui": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.5.tgz", - "integrity": "sha512-KxBJhQ6XNbQ8w8UlkPa9/J5R0nBHgHuJUtDpEXQx1jBapDy32WGzD0NENDozP4zGNvJUgZk3N80hqB7YCieC3g==", + "version": "2.27.7", + "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.7.tgz", + "integrity": "sha512-Bt4OQpx9p18OIzk0KKyu7jqlvmjacasUlk8ARY3uuIyiFWSBiRgr2i6XY8dEMF14DtbooaEBOpHEu9VCYvMcCw==", "requires": { "async-each-series": "0.1.1", "connect-history-api-fallback": "^1", @@ -7927,12 +7932,6 @@ "recursive-readdir": "^2.2.2" } }, - "cordova-plugin-compat": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-compat/-/cordova-plugin-compat-1.2.0.tgz", - "integrity": "sha1-C8ZXVyduvZIMASzpIOJ0F3V2Nz4=", - "dev": true - }, "cordova-plugin-crop": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cordova-plugin-crop/-/cordova-plugin-crop-0.4.0.tgz", @@ -7983,18 +7982,6 @@ "integrity": "sha512-jPvcwDx2/L5ZbVG69NT2xmlG1E+MljRxkdsFpgj/5aoaF4oPqxg44J/bYxJNWgQtGnRSRWoqCRmU7FgmmMNMxA==", "dev": true }, - "cordova-plugin-ionic-keyboard": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-keyboard/-/cordova-plugin-ionic-keyboard-2.2.0.tgz", - "integrity": "sha512-yDUG+9ieKVRitq5mGlNxjaZh/MgEhFFIgTIPhqSbUaQ8UuZbawy5mhJAVClqY97q8/rcQtL6dCDa7x2sEtCLcA==", - "dev": true - }, - "cordova-plugin-ionic-webview": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-5.0.0.tgz", - "integrity": "sha512-Wq0kCanxubK/JroTW4Mp5soayScnRyiY1eCkbwiz1Dyt1xHOiOW/v+1miqtBHtnZhcXw25TulCKAVJzkNBdmyg==", - "dev": true - }, "cordova-plugin-media": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.3.tgz", @@ -8023,12 +8010,6 @@ "resolved": "https://registry.npmjs.org/cordova-plugin-screen-orientation/-/cordova-plugin-screen-orientation-3.0.2.tgz", "integrity": "sha512-2w6CMC+HGvbhogJetalwGurL2Fx8DQCCPy3wlSZHN1/W7WoQ5n9ujVozcoKrY4VaagK6bxrPFih+ElkO8Uqfzg==" }, - "cordova-plugin-splashscreen": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.4.tgz", - "integrity": "sha512-zmyhBrObNuwDH4KB4zuZrJ9IKC113EM6KJpqC0/2f3o9GRznPk1S4j9O9rosJT4EASg4X3hdssv9XkAH3D5ZYg==", - "dev": true - }, "cordova-plugin-statusbar": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/cordova-plugin-statusbar/-/cordova-plugin-statusbar-2.4.3.tgz", @@ -10488,6 +10469,11 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "g": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/g/-/g-2.0.1.tgz", + "integrity": "sha1-C1lj69DKcOO8jGdmk0oCGCHIuFc=" + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -22957,7 +22943,8 @@ "ua-parser-js": { "version": "0.7.28", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", - "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==" + "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==", + "dev": true }, "uglify-js": { "version": "1.3.5", diff --git a/package.json b/package.json index e1e480761..e36bb460a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@angular/router": "~12.1.2", "@byteowls/capacitor-filesharer": "^3.0.0", "@capacitor-community/camera-preview": "^1.2.1", - "@capacitor/android": "^3.3.2", + "@capacitor/android": "3.3.3", "@capacitor/app": "^1.0.5", "@capacitor/browser": "1.0.6", "@capacitor/camera": "^1.2.0", @@ -114,6 +114,7 @@ "duration": "^0.2.2", "faker": "^5.5.3", "firebase": "^9.3.0", + "g": "^2.0.1", "global": "^4.4.0", "hammerjs": "^2.0.8", "http-server": "^0.12.3", @@ -166,19 +167,15 @@ "cordova-browser": "^6.0.0", "cordova-plugin-androidx": "^3.0.0", "cordova-plugin-androidx-adapter": "^1.1.3", - "cordova-plugin-compat": "^1.2.0", "cordova-plugin-device": "^2.0.2", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-file": "^6.0.2", "cordova-plugin-fingerprint-aio": "^4.0.2", "cordova-plugin-globalization": "^1.11.0", "cordova-plugin-inappbrowser": "^4.0.0", - "cordova-plugin-ionic-keyboard": "^2.2.0", - "cordova-plugin-ionic-webview": "^5.0.0", "cordova-plugin-media": "^5.0.3", "cordova-plugin-media-capture": "^3.0.3", "cordova-plugin-network-information": "^3.0.0", - "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-whitelist": "^1.3.4", "es6-promise-plugin": "^4.2.2", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index fd22251dd..3c8e02f23 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -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] -}) -export class AppRoutingModule {} + + + + + + /* + path: 'chat', + component: ChatPage + } */ + + /* + path: 'chat', + component: ChatPage + } */ + +]; +@NgModule({ + imports: [ + RouterModule.forRoot(routes, + { preloadingStrategy: PreloadAllModules }) + ], + exports: [RouterModule] +}) +export class AppRoutingModule {} diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 159253fb0..06f92a11e 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -1,35 +1,36 @@ - - - + + + + Início - - - + + + + Agenda - - - - + + + + Gabinete - - - + + + Ações - - - - + + + Chat diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss index 7210b1585..0fb5539e4 100644 --- a/src/app/home/home.page.scss +++ b/src/app/home/home.page.scss @@ -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; +} diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 999b9592b..dfe6a9a2a 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -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) => { diff --git a/src/app/modals/document-detail/document-detail.page.ts b/src/app/modals/document-detail/document-detail.page.ts index feea81af0..aaa8c1b9a 100644 --- a/src/app/modals/document-detail/document-detail.page.ts +++ b/src/app/modals/document-detail/document-detail.page.ts @@ -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(); }); } */ diff --git a/src/app/modals/previewer/previewer-routing.module.ts b/src/app/modals/previewer/previewer-routing.module.ts new file mode 100644 index 000000000..e6cbe50c0 --- /dev/null +++ b/src/app/modals/previewer/previewer-routing.module.ts @@ -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 {} diff --git a/src/app/modals/previewer/previewer.module.ts b/src/app/modals/previewer/previewer.module.ts new file mode 100644 index 000000000..1244f845b --- /dev/null +++ b/src/app/modals/previewer/previewer.module.ts @@ -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 {} diff --git a/src/app/modals/previewer/previewer.page.html b/src/app/modals/previewer/previewer.page.html new file mode 100644 index 000000000..0f962eacd --- /dev/null +++ b/src/app/modals/previewer/previewer.page.html @@ -0,0 +1,8 @@ + + + + + +

.../..

+ +
diff --git a/src/app/modals/previewer/previewer.page.scss b/src/app/modals/previewer/previewer.page.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/modals/previewer/previewer.page.spec.ts b/src/app/modals/previewer/previewer.page.spec.ts new file mode 100644 index 000000000..be8d06c7c --- /dev/null +++ b/src/app/modals/previewer/previewer.page.spec.ts @@ -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; + + 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(); + }); +}); diff --git a/src/app/modals/previewer/previewer.page.ts b/src/app/modals/previewer/previewer.page.ts new file mode 100644 index 000000000..6ab9e3866 --- /dev/null +++ b/src/app/modals/previewer/previewer.page.ts @@ -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() { + } + +} diff --git a/src/app/modals/view-document/view-document.page.ts b/src/app/modals/view-document/view-document.page.ts index ff385dd90..a49b3c45b 100644 --- a/src/app/modals/view-document/view-document.page.ts +++ b/src/app/modals/view-document/view-document.page.ts @@ -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(); }); } diff --git a/src/app/modals/view-event/view-event.page.ts b/src/app/modals/view-event/view-event.page.ts index 04b31ebbb..2404be7c9 100644 --- a/src/app/modals/view-event/view-event.page.ts +++ b/src/app/modals/view-event/view-event.page.ts @@ -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(); }); } diff --git a/src/app/modals/view-media/view-media.page.html b/src/app/modals/view-media/view-media.page.html index 75b8f918e..ddbfc30d6 100644 --- a/src/app/modals/view-media/view-media.page.html +++ b/src/app/modals/view-media/view-media.page.html @@ -16,7 +16,15 @@
- + + + +
+ +
+
+
+
diff --git a/src/app/modals/view-media/view-media.page.ts b/src/app/modals/view-media/view-media.page.ts index a5754085b..d9b316c3d 100644 --- a/src/app/modals/view-media/view-media.page.ts +++ b/src/app/modals/view-media/view-media.page.ts @@ -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, diff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts index 0153fbd95..7cd6a5914 100644 --- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts +++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts @@ -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() { diff --git a/src/app/pages/agenda/new-event/new-event.page.html b/src/app/pages/agenda/new-event/new-event.page.html index 9fc9309f4..81d39f838 100644 --- a/src/app/pages/agenda/new-event/new-event.page.html +++ b/src/app/pages/agenda/new-event/new-event.page.html @@ -19,6 +19,27 @@ + +
+
+
+ +
+
+ + Calendário do Presidente da República + Meu calendário + +
+
+
+ + + +
+ + + + + + + {{file.title}} +
+ +
+ + {{file.description}} + + {{msg.file.type.replace('application/','').toUpperCase()}} + +
+ + + + + {{last ? scrollToBottom() : ''}} + + + +
Alterou o nome do grupo para "{{msg.msg.split('-').join(' ')}}"
{{last ? scrollToBottom() : ''}} @@ -119,8 +160,8 @@
{{last ? scrollToBottom() : ''}} -
-
+
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/pages/chat/messages/messages.page.html b/src/app/pages/chat/messages/messages.page.html index 463efb4a9..f6ebd7ae4 100644 --- a/src/app/pages/chat/messages/messages.page.html +++ b/src/app/pages/chat/messages/messages.page.html @@ -91,8 +91,60 @@ {{last ? scrollToBottom() : ''}}
-
-
+ +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+ {{msg.msg}} + {{last ? scrollToBottom() : ''}} +
+
+ +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+
+
+
+ image +
+
+
+
+ +
+ + + + + + + {{file.title}} +
+
+
+ + {{file.description}} + + {{msg.file.type.replace('application/','').toUpperCase()}} + +
+
+
+
+
+ {{last ? scrollToBottom() : ''}} +
+
+ +
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/pages/chat/messages/messages.page.ts b/src/app/pages/chat/messages/messages.page.ts index cfacfe5cd..7a37e6a84 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -367,10 +367,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { if (file.type == "application/webtrix") { this.openViewDocumentModal(file); } - else { - let fullUrl = "https://www.tabularium.pt" + url; - this.fileService.viewDocumentByUrl(fullUrl); - } } docIndex(index: number) { 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 d295e2e60..56971f1d4 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 @@ -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(); } 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 92edda048..7eec5849f 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts @@ -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') } diff --git a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts index e4eb59fc6..25f82ab0f 100644 --- a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts +++ b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts @@ -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) { diff --git a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts index 914df88d3..108167cf0 100644 --- a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts +++ b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts @@ -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']); diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts index c1d208921..96efa78ed 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts @@ -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, diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts index 9344d7087..d4c6f126d 100644 --- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts +++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts @@ -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() } 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 7152230da..c1a167d21 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 @@ -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']); diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts index a23d40c14..2fb23be15 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts +++ b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts @@ -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']); diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts b/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts index 9ce1fd431..4be65aa5a 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts +++ b/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts @@ -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(); } diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index a06ecb331..0152cfd80 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -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']); diff --git a/src/app/pages/publications/new-publication/convertBlobToBase64.worker.js b/src/app/pages/publications/new-publication/convertBlobToBase64.worker.js new file mode 100644 index 000000000..62fc746e8 --- /dev/null +++ b/src/app/pages/publications/new-publication/convertBlobToBase64.worker.js @@ -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); +}; \ No newline at end of file diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index 7c4620165..5d562fdde 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -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'); diff --git a/src/app/pages/publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/publication-detail/publication-detail.page.ts index 57f5da6c1..17681b2cc 100644 --- a/src/app/pages/publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/publication-detail/publication-detail.page.ts @@ -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() } diff --git a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts index 7fb0feba0..15afbe6e2 100644 --- a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts @@ -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(); } } diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html index e30d9294a..10a12fac7 100644 --- a/src/app/pages/search/search.page.html +++ b/src/app/pages/search/search.page.html @@ -177,10 +177,10 @@
  • - - { if (event instanceof NavigationEnd) { this.history.push(event.urlAfterRedirects) diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index d05b89b07..f2c3d780d 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -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(`${geturl}`); + // return this.http.get(`${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(`${geturl}`, body, { headers }).subscribe(data => { - console.log('TOKEN USER MIDLE', data); - }, (error) => { - console.log('Post token to backend', error) - }) - }); + // this.http.post(`${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'])); + // } } diff --git a/src/app/services/route.service.spec.ts b/src/app/services/route.service.spec.ts new file mode 100644 index 000000000..521b710d6 --- /dev/null +++ b/src/app/services/route.service.spec.ts @@ -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(); + }); +}); diff --git a/src/app/services/route.service.ts b/src/app/services/route.service.ts new file mode 100644 index 000000000..d1531e0e6 --- /dev/null +++ b/src/app/services/route.service.ts @@ -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]); + } + +} diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html index b7ecf060c..d7e9a5d7f 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -29,6 +29,30 @@
+
+
+
+ +
+
+ + + + + + Calendário do Presidente da República + + + Meu calendário + + + + + +
+
+
+
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 4b2778ded..9617957b1 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -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( diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts index 2de4d89da..d321f7939 100644 --- a/src/app/shared/agenda/view-event/view-event.page.ts +++ b/src/app/shared/agenda/view-event/view-event.page.ts @@ -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(); }); } diff --git a/src/app/shared/chat/group-messages/group-messages.page.html b/src/app/shared/chat/group-messages/group-messages.page.html index 9c5c70923..012e8c8fc 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.html +++ b/src/app/shared/chat/group-messages/group-messages.page.html @@ -91,6 +91,57 @@ {{last ? scrollToBottom() : ''}}
+ + +
+
+ + + + +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+ {{msg.msg}} +
+
+
+ image +
+
+
+
+ +
+ + + + + + + {{file.title}} +
+
+
+ + {{file.description}} + + {{msg.file.type.replace('application/','').toUpperCase()}} + +
+
+
+
+
+ {{last ? scrollToBottom() : ''}} +
+
+ + +
Alterou o nome do grupo para "{{msg.msg.split('-').join(' ')}}"
{{last ? scrollToBottom() : ''}} @@ -111,8 +162,8 @@
{{last ? scrollToBottom() : ''}}
-
-
+
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/shared/chat/messages/messages.page.html b/src/app/shared/chat/messages/messages.page.html index fcf56a6a3..e2bcdf702 100644 --- a/src/app/shared/chat/messages/messages.page.html +++ b/src/app/shared/chat/messages/messages.page.html @@ -9,7 +9,7 @@
@@ -51,14 +51,32 @@
{{msg.msg}} + {{last ? scrollToBottom() : ''}} +
+
+
+
+ + + + +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+
-
+
image +
- +
{{last ? scrollToBottom() : ''}}
+
-
-
+
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts index 7238bde6c..4b5328704 100644 --- a/src/app/shared/chat/messages/messages.page.ts +++ b/src/app/shared/chat/messages/messages.page.ts @@ -261,7 +261,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy getMessageDB() { - this.storageservice.get('chatmsg').then((msg) => { + this.storage.get('chatmsg').then((msg) => { console.log('FROM DB WEB', msg) let msgArray = []; msgArray = msg; @@ -276,7 +276,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy let image; if (typeof element.file != 'undefined') { if (typeof element.file.guid != 'undefined') { - let imageguid = this.storageservice.get(element.file.guid); + let imageguid = this.storage.get(element.file.guid); if (imageguid) { image = imageguid; console.log('IMAGE STORAGE', image) @@ -315,10 +315,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }); console.log('Web TRANSFORM MSG', mgsArray) - this.storageservice.remove('chatmsg').then(() => { + this.storage.remove('chatmsg').then(() => { console.log('MSG REMOVE FROM STORAGE') }); - this.storageservice.store('chatmsg', mgsArray).then(() => { + this.storage.set('chatmsg', mgsArray).then(() => { console.log('MSG SAVED ON STORAGE') this.getMessageDB(); }); @@ -380,7 +380,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy console.log('GET FILE WEB', foo) }); - this.storageservice.get('chatmsg').then(async (msg) => { + this.storage.get('chatmsg').then(async (msg) => { let msgArray = []; msgArray = msg; msgArray.filter(data => data._id != this.roomId); @@ -411,8 +411,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy } }); - await this.storageservice.remove('chatmsg'); - await this.storageservice.store('chatmsg', newmgsArray); + await this.storage.remove('chatmsg'); + await this.storage.set('chatmsg', newmgsArray); }) } @@ -797,7 +797,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy console.log('TRY ARRAY BUFFER NAME', name); console.log('TRY ARRAY BUFFER', this.downloadFile); - this.storageservice.store(msg.file.guid, this.downloadFile); + this.storage.set(msg.file.guid, this.downloadFile); await Filesystem.writeFile({ path: `${IMAGE_DIR}/${name}`, diff --git a/src/app/shared/popover/chat-popover/chat-popover.page.scss b/src/app/shared/popover/chat-popover/chat-popover.page.scss index 738f71a16..2f6033257 100644 --- a/src/app/shared/popover/chat-popover/chat-popover.page.scss +++ b/src/app/shared/popover/chat-popover/chat-popover.page.scss @@ -14,6 +14,7 @@ overflow: hidden; } } + .buttons{ display: flex; flex-wrap: wrap; diff --git a/src/app/shared/popover/deploma-options/deploma-options.page.ts b/src/app/shared/popover/deploma-options/deploma-options.page.ts index 0ad15f77b..f388b9636 100644 --- a/src/app/shared/popover/deploma-options/deploma-options.page.ts +++ b/src/app/shared/popover/deploma-options/deploma-options.page.ts @@ -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() } diff --git a/src/app/shared/popover/despachos-options/despachos-options.page.ts b/src/app/shared/popover/despachos-options/despachos-options.page.ts index b87751e16..8d3fa6e25 100644 --- a/src/app/shared/popover/despachos-options/despachos-options.page.ts +++ b/src/app/shared/popover/despachos-options/despachos-options.page.ts @@ -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(); } } diff --git a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts index 070c98772..f77c7996e 100644 --- a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts +++ b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts @@ -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() { diff --git a/src/app/shared/popover/messages-options/messages-options.page.html b/src/app/shared/popover/messages-options/messages-options.page.html index 7150aa3fd..85018456f 100644 --- a/src/app/shared/popover/messages-options/messages-options.page.html +++ b/src/app/shared/popover/messages-options/messages-options.page.html @@ -1,13 +1,10 @@ -
-
- -
- +
diff --git a/src/app/shared/popover/messages-options/messages-options.page.scss b/src/app/shared/popover/messages-options/messages-options.page.scss index 29fe1e464..b07cb0e9b 100644 --- a/src/app/shared/popover/messages-options/messages-options.page.scss +++ b/src/app/shared/popover/messages-options/messages-options.page.scss @@ -1,50 +1,58 @@ .container{ - --padding-top:20px !important; - --padding-bottom:20px !important; - --padding-start:20px !important; - --padding-end:20px !important; + --padding-top:20px !important; + --padding-bottom:20px !important; + --padding-start:20px !important; + --padding-end:20px !important; } .arrow-right{ - display: none; - margin-bottom: 20px; - .arrow-right-icon{ - width: 37px; - float: right; - font-size: 35px; - overflow: hidden; - } + display: none; + margin-bottom: 20px; + .arrow-right-icon{ + width: 37px; + float: right; + font-size: 35px; + overflow: hidden; + } } + .buttons{ - display: flex; - flex-wrap: wrap; - justify-content: space-around; + display: flex; + flex-wrap: wrap; + justify-content: space-around; } .solid { - display: none; - width: 90%; - border-top: 1px solid #bbb; - margin: 0 auto !important; - } - /* .btn-ok, .btn-cancel, .btn-delete{ - width: calc(50% - 10px) !important; - margin: 5px 5px 5px 5px !important; - } */ -@media only screen and (min-width: 701px) { - .arrow-right{ - display: flex; - justify-content: flex-end; - } - .btn-cancel{ - display: none; - width: 100% !important; - margin-bottom: 10px !important; - } - .btn-delete{ - width: 100% !important; - margin-bottom: 10px !important; - margin-top: 10px !important; - } - /* .solid{ - display: block; - } */ + display: block; + width: 90%; + border-top: 1px solid #bbb; + margin: 10px auto !important; +} + +@media only screen and (min-width: 701px) { + .arrow-right{ + display: flex; + justify-content: flex-end; + } + .btn-cancel{ + //display: none; + width: 100% !important; + margin-bottom: 10px !important; + } + .btn-cancel:hover, .btn-delete:hover{ + background-color: var(--button-hover); + color: #fff !important; + } + .btn-ok{ + width: 100% !important; + } + .btn-delete{ + width: 100% !important; + margin-bottom: 10px !important; + } + .solid{ + display: block; + } + .mobile-only{ + display: none !important; + } + } diff --git a/src/app/shared/popover/messages-options/messages-options.page.ts b/src/app/shared/popover/messages-options/messages-options.page.ts index 2de44a93d..07e37d951 100644 --- a/src/app/shared/popover/messages-options/messages-options.page.ts +++ b/src/app/shared/popover/messages-options/messages-options.page.ts @@ -1,8 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ModalController, NavParams, PopoverController } from '@ionic/angular'; import { ChatService } from 'src/app/services/chat.service'; -import { ThemeService } from 'src/app/services/theme.service' - +import { ThemeService } from 'src/app/services/theme.service'; @Component({ selector: 'app-messages-options', @@ -18,7 +17,7 @@ export class MessagesOptionsPage implements OnInit { private modalController: ModalController, private chatService: ChatService, private navParams: NavParams, - public ThemeService: ThemeService + public ThemeService: ThemeService, ) { this.roomId = this.navParams.get('roomId'); diff --git a/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts b/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts index 8fd55d91f..fb91e2029 100644 --- a/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts +++ b/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts @@ -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){ diff --git a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts index da24ec370..bf2c55c37 100644 --- a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts +++ b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts @@ -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 => { diff --git a/src/assets/images/Gabinete Digital_files/vendor.js.download b/src/assets/images/Gabinete Digital_files/vendor.js.download index e6ddf4b47..1218a996a 100644 --- a/src/assets/images/Gabinete Digital_files/vendor.js.download +++ b/src/assets/images/Gabinete Digital_files/vendor.js.download @@ -105274,7 +105274,7 @@ let NavController = class NavController { */ back(options = { animated: true, animationDirection: 'back' }) { this.setDirection('back', options.animated, options.animationDirection, options.animation); - return this.location.back(); + return this.RouteService.goBack(); } /** * This methods goes back in the context of Ionic's stack navigation. diff --git a/src/assets/images/nav-hover/icons-nav-actions.svg b/src/assets/images/nav-hover/icons-nav-actions.svg new file mode 100644 index 000000000..b3cff32ad --- /dev/null +++ b/src/assets/images/nav-hover/icons-nav-actions.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/images/nav-hover/icons-nav-agenda-inactive.svg b/src/assets/images/nav-hover/icons-nav-agenda-inactive.svg new file mode 100644 index 000000000..07bb69f11 --- /dev/null +++ b/src/assets/images/nav-hover/icons-nav-agenda-inactive.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/images/nav-hover/icons-nav-calendar-active.svg b/src/assets/images/nav-hover/icons-nav-calendar-active.svg new file mode 100644 index 000000000..09ce7870f --- /dev/null +++ b/src/assets/images/nav-hover/icons-nav-calendar-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/images/nav-hover/icons-nav-chat-active.svg b/src/assets/images/nav-hover/icons-nav-chat-active.svg new file mode 100644 index 000000000..54f038f34 --- /dev/null +++ b/src/assets/images/nav-hover/icons-nav-chat-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/images/nav-hover/icons-nav-gabinete-active.svg b/src/assets/images/nav-hover/icons-nav-gabinete-active.svg new file mode 100644 index 000000000..09ce7870f --- /dev/null +++ b/src/assets/images/nav-hover/icons-nav-gabinete-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/images/nav-hover/icons-nav-grupos-inactive-dk-white.svg b/src/assets/images/nav-hover/icons-nav-grupos-inactive-dk-white.svg new file mode 100644 index 000000000..54f038f34 --- /dev/null +++ b/src/assets/images/nav-hover/icons-nav-grupos-inactive-dk-white.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/images/nav-hover/icons-nav-home-active.svg b/src/assets/images/nav-hover/icons-nav-home-active.svg new file mode 100644 index 000000000..fa2b1fd71 --- /dev/null +++ b/src/assets/images/nav-hover/icons-nav-home-active.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/js/index.js b/src/assets/js/index.js index 40ff5e409..09bc8c224 100644 --- a/src/assets/js/index.js +++ b/src/assets/js/index.js @@ -1,28 +1,28 @@ -// Import the functions you need from the SDKs you need -import { initializeApp } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js";; -import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-analytics.js"; -import { getMessaging, getToken } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-messaging.js"; +// // Import the functions you need from the SDKs you need +// import { initializeApp } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js";; +// import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-analytics.js"; +// import { getMessaging, getToken } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-messaging.js"; -// TODO: Add SDKs for Firebase products that you want to use -// https://firebase.google.com/docs/web/setup#available-libraries +// // TODO: Add SDKs for Firebase products that you want to use +// // https://firebase.google.com/docs/web/setup#available-libraries -// Your web app's Firebase configuration -// For Firebase JS SDK v7.20.0 and later, measurementId is optional -const firebaseConfig = { - apiKey: "AIzaSyAAdHmTFznCMerdT99nrewJgISRvtxPqoY", - authDomain: "gabinete-digital-2020.firebaseapp.com", - databaseURL: "https://gabinete-digital-2020.firebaseio.com", - projectId: "gabinete-digital-2020", - storageBucket: "gabinete-digital-2020.appspot.com", - messagingSenderId: "800733765231", - appId: "1:800733765231:web:28e7792ab150006513779a", - measurementId: "G-8QN4BLZ8XK" -}; +// // Your web app's Firebase configuration +// // For Firebase JS SDK v7.20.0 and later, measurementId is optional +// const firebaseConfig = { +// apiKey: "AIzaSyAAdHmTFznCMerdT99nrewJgISRvtxPqoY", +// authDomain: "gabinete-digital-2020.firebaseapp.com", +// databaseURL: "https://gabinete-digital-2020.firebaseio.com", +// projectId: "gabinete-digital-2020", +// storageBucket: "gabinete-digital-2020.appspot.com", +// messagingSenderId: "800733765231", +// appId: "1:800733765231:web:28e7792ab150006513779a", +// measurementId: "G-8QN4BLZ8XK" +// }; -// Initialize Firebase -const app = initializeApp(firebaseConfig); -const analytics = getAnalytics(app); -const messaging = getMessaging(app); +// // Initialize Firebase +// const app = initializeApp(firebaseConfig); +// const analytics = getAnalytics(app); +// const messaging = getMessaging(app); -getToken({vapidKey: "BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw"}); \ No newline at end of file +// getToken({vapidKey: "BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw"}); \ No newline at end of file diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 39a448aa0..9e3681dcb 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -3,6 +3,6 @@ export const environment = { apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', domain: 'gabinetedigital.local', - defaultuser: '', - defaultuserpwd: '' + defaultuser: '',//paulo.pinto paulo.pinto@gabinetedigital.local + defaultuserpwd: '', //tabteste@006, }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6b3c2fb1d..a7de6b222 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -15,7 +15,7 @@ export const environment = { }; /* - * For easier debugging in development mode, you can import the following file + * For easier debugging in dev elopment mode, you can import the following file * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. * * This import should be commented out in production mode because it will have a negative impact