This commit is contained in:
Peter Maquiran
2023-01-24 15:56:47 +01:00
parent 0748612054
commit fbd50137f3
153 changed files with 5997 additions and 953 deletions
+465
View File
@@ -0,0 +1,465 @@
{
"header": {
"reportVersion": 1,
"event": "Allocation failed - JavaScript heap out of memory",
"trigger": "FatalError",
"filename": "report.20230116.142547.31280.0.001.json",
"dumpEventTime": "2023-01-16T14:25:47Z",
"dumpEventTimeStamp": "1673875547220",
"processId": 31280,
"cwd": "C:\\Users\\peter.maquiran\\Documents\\project\\gabinete-digital-fo",
"commandLine": [
"node",
"C:\\Users\\peter.maquiran\\Documents\\project\\gabinete-digital-fo\\node_modules\\.bin\\\\..\\@angular\\cli\\bin\\ng",
"run",
"app:serve:production",
"--host=localhost",
"--port=8101"
],
"nodejsVersion": "v12.14.1",
"wordSize": 64,
"arch": "x64",
"platform": "win32",
"componentVersions": {
"node": "12.14.1",
"v8": "7.7.299.13-node.16",
"uv": "1.33.1",
"zlib": "1.2.11",
"brotli": "1.0.7",
"ares": "1.15.0",
"modules": "72",
"nghttp2": "1.40.0",
"napi": "5",
"llhttp": "2.0.1",
"http_parser": "2.8.0",
"openssl": "1.1.1d",
"cldr": "35.1",
"icu": "64.2",
"tz": "2019c",
"unicode": "12.1"
},
"release": {
"name": "node",
"lts": "Erbium",
"headersUrl": "https://nodejs.org/download/release/v12.14.1/node-v12.14.1-headers.tar.gz",
"sourceUrl": "https://nodejs.org/download/release/v12.14.1/node-v12.14.1.tar.gz",
"libUrl": "https://nodejs.org/download/release/v12.14.1/win-x64/node.lib"
},
"osName": "Windows_NT",
"osRelease": "10.0.18363",
"osVersion": "Windows 10 Pro",
"osMachine": "x86_64",
"cpus": [
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 11330625,
"nice": 0,
"sys": 14678953,
"idle": 150967375,
"irq": 5472781
},
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 7800796,
"nice": 0,
"sys": 5484906,
"idle": 163690671,
"irq": 306109
},
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 12714203,
"nice": 0,
"sys": 8063375,
"idle": 156198781,
"irq": 161593
},
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 9228578,
"nice": 0,
"sys": 5652046,
"idle": 162095734,
"irq": 117578
},
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 11003906,
"nice": 0,
"sys": 7387171,
"idle": 158585281,
"irq": 182406
},
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 7991453,
"nice": 0,
"sys": 5380921,
"idle": 163603984,
"irq": 125500
},
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 11477265,
"nice": 0,
"sys": 7271046,
"idle": 158228046,
"irq": 171921
},
{
"model": "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz",
"speed": 1992,
"user": 8419921,
"nice": 0,
"sys": 5617531,
"idle": 162938906,
"irq": 116265
}
],
"networkInterfaces": [
{
"name": "vEthernet (Wifi)",
"internal": false,
"mac": "74:d8:3e:d0:3c:bb",
"address": "fe80::2c4a:fffd:f4ea:f439",
"netmask": "ffff:ffff:ffff:ffff::",
"family": "IPv6",
"scopeid": 23
},
{
"name": "vEthernet (Wifi)",
"internal": false,
"mac": "74:d8:3e:d0:3c:bb",
"address": "192.168.0.58",
"netmask": "255.255.255.0",
"family": "IPv4"
},
{
"name": "Loopback Pseudo-Interface 1",
"internal": true,
"mac": "00:00:00:00:00:00",
"address": "::1",
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"family": "IPv6",
"scopeid": 0
},
{
"name": "Loopback Pseudo-Interface 1",
"internal": true,
"mac": "00:00:00:00:00:00",
"address": "127.0.0.1",
"netmask": "255.0.0.0",
"family": "IPv4"
},
{
"name": "vEthernet (Default Switch)",
"internal": false,
"mac": "00:15:5d:0a:6a:e5",
"address": "fe80::a5a5:d9f3:9284:7c1c",
"netmask": "ffff:ffff:ffff:ffff::",
"family": "IPv6",
"scopeid": 36
},
{
"name": "vEthernet (Default Switch)",
"internal": false,
"mac": "00:15:5d:0a:6a:e5",
"address": "192.168.188.97",
"netmask": "255.255.255.240",
"family": "IPv4"
}
],
"host": "LAPTOP-66"
},
"javascriptStack": {
"message": "No stack.",
"stack": [
"Unavailable."
]
},
"nativeStack": [
{
"pc": "0x00007ff6d4561759",
"symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+10873"
},
{
"pc": "0x00007ff6d4565b7c",
"symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+28316"
},
{
"pc": "0x00007ff6d4564b38",
"symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+24152"
},
{
"pc": "0x00007ff6d465433b",
"symbol": "v8::base::CPU::has_sse+37723"
},
{
"pc": "0x00007ff6d4e58c5e",
"symbol": "v8::Isolate::ReportExternalAllocationLimitReached+94"
},
{
"pc": "0x00007ff6d4e40ca1",
"symbol": "v8::SharedArrayBuffer::Externalize+833"
},
{
"pc": "0x00007ff6d4d0e56c",
"symbol": "v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436"
},
{
"pc": "0x00007ff6d4d19910",
"symbol": "v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312"
},
{
"pc": "0x00007ff6d4d16444",
"symbol": "v8::internal::Heap::PageFlagsAreConsistent+3204"
},
{
"pc": "0x00007ff6d4d0bcd3",
"symbol": "v8::internal::Heap::CollectGarbage+1283"
},
{
"pc": "0x00007ff6d4d0a4a4",
"symbol": "v8::internal::Heap::AddRetainedMap+2356"
},
{
"pc": "0x00007ff6d4d2b775",
"symbol": "v8::internal::Factory::NewFillerObject+53"
},
{
"pc": "0x00007ff6d4a97a49",
"symbol": "v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+4057"
},
{
"pc": "0x00007ff6d528463d",
"symbol": "v8::internal::SetupIsolateDelegate::SetupHeap+567949"
},
{
"pc": "0x000002be85bcfe95",
"symbol": ""
}
],
"javascriptHeap": {
"totalMemory": 2167566336,
"totalCommittedMemory": 2167566336,
"usedMemory": 2064602904,
"availableMemory": 72200776,
"memoryLimit": 2197815296,
"heapSpaces": {
"read_only_space": {
"memorySize": 262144,
"committedMemory": 262144,
"capacity": 261872,
"used": 32296,
"available": 229576
},
"new_space": {
"memorySize": 33554432,
"committedMemory": 33554432,
"capacity": 16759808,
"used": 3605840,
"available": 13153968
},
"old_space": {
"memorySize": 1884401664,
"committedMemory": 1884401664,
"capacity": 1839520176,
"used": 1829345824,
"available": 10174352
},
"code_space": {
"memorySize": 15892480,
"committedMemory": 15892480,
"capacity": 15142912,
"used": 13508800,
"available": 1634112
},
"map_space": {
"memorySize": 19402752,
"committedMemory": 19402752,
"capacity": 5107360,
"used": 5107360,
"available": 0
},
"large_object_space": {
"memorySize": 213430272,
"committedMemory": 213430272,
"capacity": 212452384,
"used": 212452384,
"available": 0
},
"code_large_object_space": {
"memorySize": 622592,
"committedMemory": 622592,
"capacity": 550400,
"used": 550400,
"available": 0
},
"new_large_object_space": {
"memorySize": 0,
"committedMemory": 0,
"capacity": 16759808,
"used": 0,
"available": 16759808
}
}
},
"resourceUsage": {
"userCpuSeconds": 1784.05,
"kernelCpuSeconds": 125.39,
"cpuConsumptionPercent": 29.3579,
"maxRss": 2669527040,
"pageFaults": {
"IORequired": 3606280,
"IONotRequired": 0
},
"fsActivity": {
"reads": 48626,
"writes": 7136
}
},
"libuv": [
],
"environmentVariables": {
" c:\\program files\\nodejs\\node_modules\\npm": "npm",
"=C:": "C:\\Users\\peter.maquiran\\Documents\\project\\gabinete-digital-fo",
"allusersprofile": "C:\\ProgramData",
"android_sdk_root": "C:\\Users\\peter.maquiran\\Documents\\android-sdk",
"appdata": "C:\\Users\\peter.maquiran\\AppData\\Roaming",
"asl.log": "Destination=file",
"brb": "C:\\Program Files\\HP\\Sure Click\\bin",
"BROWSERSLIST_IGNORE_OLD_DATA": "1",
"brs": "C:\\Program Files\\HP\\Sure Click\\servers",
"chocolateyinstall": "C:\\ProgramData\\chocolatey",
"chocolateylastpathupdate": "132689116989769711",
"chrome_crashpad_pipe_name": "\\\\.\\pipe\\LOCAL\\crashpad_456_JCFUHUHYVFNGTFZP",
"colorterm": "truecolor",
"commonprogramfiles": "C:\\Program Files\\Common Files",
"commonprogramfiles(x86)": "C:\\Program Files (x86)\\Common Files",
"commonprogramw6432": "C:\\Program Files\\Common Files",
"computername": "LAPTOP-66",
"comspec": "C:\\windows\\system32\\cmd.exe",
"dp0": "C:\\Users\\peter.maquiran\\Documents\\project\\gabinete-digital-fo\\node_modules\\.bin\\",
"driverdata": "C:\\Windows\\System32\\Drivers\\DriverData",
"exepath": "C:\\Program Files\\Git\\bin",
"force_color": "1",
"fps_browser_app_profile_string": "Internet Explorer",
"fps_browser_user_profile_string": "Default",
"grandle_home": "C:\\Gradle\\gradle-7.6\\bin",
"home": "C:\\Users\\peter.maquiran",
"homedrive": "C:",
"homepath": "\\Users\\peter.maquiran",
"ionic_cli_bin": "C:\\Users\\peter.maquiran\\AppData\\Roaming\\npm\\node_modules\\@ionic\\cli\\bin\\ionic",
"ionic_cli_lib": "C:\\Users\\peter.maquiran\\AppData\\Roaming\\npm\\node_modules\\@ionic\\cli",
"ionic_cli_local_error": "LOCAL_CLI_NOT_FOUND",
"java_home": "C:\\Program Files\\Java\\jdk-11.0.8",
"jre_home": "C:\\Program Files\\Java\\jre-11.0.8.10-hotspot",
"lang": "en_US.UTF-8",
"localappdata": "C:\\Users\\peter.maquiran\\AppData\\Local",
"logonserver": "\\\\VM-SRV-01",
"msystem": "MINGW64",
"number_of_processors": "8",
"nvm_home": "C:\\Users\\peter.maquiran\\AppData\\Roaming\\nvm",
"nvm_symlink": "C:\\Program Files\\nodejs",
"onedrive": "C:\\Users\\peter.maquiran\\OneDrive",
"onlineservices": "Online Services",
"original_xdg_current_desktop": "undefined",
"os": "Windows_NT",
"path": "C:\\Users\\peter.maquiran\\Documents\\project\\gabinete-digital-fo\\node_modules\\.bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Users\\peter.maquiran\\bin;C:\\Program Files\\java\\jre-11.0.8.10-hotspot\\bin;C:\\Users\\peter.maquiran\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Users\\peter.maquiran\\AppData\\Local\\Programs\\Python\\Python39\\Scripts;C:\\Users\\peter.maquiran\\AppData\\Local\\Programs\\Python\\Python39;C:\\Users\\peter.maquiran\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\peter.maquiran\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\wkhtmltopdf\\bin;C:\\Program Files\\heroku\\bin;C:\\Program Files\\TestProject Agent;C:\\Program Files (x86)\\Android\\android-sdk;C:\\Users\\peter.maquiran\\Documents\\flutter_windows_2.2.3-stable\\flutter\\bin;C:\\Program Files\\php-7.3.33;C:\\Users\\peter.maquiran\\AppData\\Local\\ComposerSetup\\bin;C:\\Users\\peter.maquiran\\AppData\\Roaming\\Composer\\vendor\\bin;C:\\Users\\peter.maquiran\\.dotnet\\tools;C:\\Program Files\\Azure Data Studio\\bin;C:\\Gradle\\gradle-7.6\\bin;C:\\Users\\peter.maquiran\\AppData\\Roaming\\npm;C:\\Users\\peter.maquiran\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Program Files\\Java\\jdk-11.0.8\\bin",
"pathext": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JSE;.WSF;.WSH;.MSC;.PY;.PYW",
"platformcode": "AN",
"plink_protocol": "ssh",
"processor_architecture": "AMD64",
"processor_identifier": "Intel64 Family 6 Model 142 Stepping 12, GenuineIntel",
"processor_level": "6",
"processor_revision": "8e0c",
"programdata": "C:\\ProgramData",
"programfiles": "C:\\Program Files",
"programfiles(x86)": "C:\\Program Files (x86)",
"programw6432": "C:\\Program Files",
"PROMPT": "$P$G",
"psmodulepath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\Tools\\PowerShell\\Modules\\;C:\\Program Files\\Veeam\\Backup and Replication\\Explorers\\Exchange\\;C:\\Program Files\\Veeam\\Backup and Replication\\Explorers\\SQL\\;C:\\Program Files\\Veeam\\Backup and Replication\\Explorers\\ActiveDirectory\\;C:\\Program Files\\Veeam\\Backup and Replication\\Explorers\\Oracle\\;C:\\Program Files\\Veeam\\Backup and Replication\\Explorers\\SharePoint\\",
"ptsminstallpath": "c:\\Program Files\\HP\\HP ProtectTools Security Manager\\Bin\\",
"ptsminstallpath_x86": "c:\\Program Files (x86)\\HP\\HP ProtectTools Security Manager\\Bin\\",
"public": "C:\\Users\\Public",
"pwd": "C:/Users/peter.maquiran/Documents/project/gabinete-digital-fo",
"regioncode": "EMEA",
"sessionname": "Console",
"shlvl": "1",
"systemdrive": "C:",
"systemroot": "C:\\windows",
"temp": "C:\\Users\\PETER~1.MAQ\\AppData\\Local\\Temp",
"term": "xterm-256color",
"term_program": "vscode",
"term_program_version": "1.74.3",
"tmp": "C:\\Users\\PETER~1.MAQ\\AppData\\Local\\Temp",
"userdnsdomain": "EQUILIBRIUM.LOCAL",
"userdomain": "EQUILIBRIUM",
"userdomain_roamingprofile": "EQUILIBRIUM",
"username": "peter.maquiran",
"userprofile": "C:\\Users\\peter.maquiran",
"vs110comntools": "C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\Tools\\",
"vs120comntools": "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\",
"vs140comntools": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\",
"vscode_git_ipc_handle": "\\\\.\\pipe\\vscode-git-763e312aff-sock",
"WEBPACK_DEV_SERVER": "true",
"windir": "C:\\windows",
"_prog": "node"
},
"sharedObjects": [
"C:\\Program Files\\nodejs\\node.exe",
"C:\\windows\\SYSTEM32\\ntdll.dll",
"C:\\windows\\System32\\KERNEL32.DLL",
"C:\\windows\\System32\\KERNELBASE.dll",
"C:\\windows\\System32\\WS2_32.dll",
"C:\\windows\\System32\\RPCRT4.dll",
"C:\\windows\\SYSTEM32\\dbghelp.dll",
"C:\\windows\\System32\\ADVAPI32.dll",
"C:\\windows\\System32\\msvcrt.dll",
"C:\\windows\\System32\\ucrtbase.dll",
"C:\\windows\\System32\\sechost.dll",
"C:\\windows\\System32\\USER32.dll",
"C:\\windows\\System32\\win32u.dll",
"C:\\windows\\System32\\GDI32.dll",
"C:\\windows\\System32\\gdi32full.dll",
"C:\\windows\\System32\\msvcp_win.dll",
"C:\\windows\\System32\\PSAPI.DLL",
"C:\\windows\\System32\\CRYPT32.dll",
"C:\\windows\\System32\\MSASN1.dll",
"C:\\windows\\System32\\bcrypt.dll",
"C:\\windows\\SYSTEM32\\IPHLPAPI.DLL",
"C:\\windows\\SYSTEM32\\USERENV.dll",
"C:\\windows\\System32\\profapi.dll",
"C:\\windows\\SYSTEM32\\WINMM.dll",
"C:\\windows\\SYSTEM32\\winmmbase.dll",
"C:\\windows\\System32\\cfgmgr32.dll",
"C:\\windows\\System32\\bcryptPrimitives.dll",
"C:\\windows\\System32\\IMM32.DLL",
"C:\\windows\\System32\\powrprof.dll",
"C:\\windows\\System32\\UMPDC.dll",
"C:\\windows\\SYSTEM32\\CRYPTBASE.DLL",
"C:\\windows\\system32\\uxtheme.dll",
"C:\\windows\\System32\\combase.dll",
"C:\\windows\\system32\\mswsock.dll",
"C:\\windows\\System32\\kernel.appcore.dll",
"C:\\windows\\System32\\NSI.dll",
"C:\\windows\\SYSTEM32\\dhcpcsvc6.DLL",
"C:\\windows\\SYSTEM32\\dhcpcsvc.DLL",
"C:\\windows\\SYSTEM32\\DNSAPI.dll",
"C:\\Windows\\System32\\rasadhlp.dll",
"C:\\windows\\System32\\fwpuclnt.dll",
"C:\\windows\\system32\\napinsp.dll",
"C:\\windows\\system32\\pnrpnsp.dll",
"C:\\windows\\System32\\winrnr.dll",
"C:\\windows\\system32\\NLAapi.dll",
"C:\\windows\\system32\\wshbth.dll"
]
}
+277 -272
View File
@@ -1,255 +1,256 @@
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
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)
},
{
path: 'view-document',
loadChildren: () => import('./modals/view-document/view-document.module').then( m => m.ViewDocumentPageModule)
},
{
path: 'event-details-documents-options',
loadChildren: () => import('./shared/popover/event-details-documents-options/event-details-documents-options.module').then( m => m.EventDetailsDocumentsOptionsPageModule)
},
{
path: 'preview-camera',
loadChildren: () => import('./modals/preview-camera/preview-camera.module').then( m => m.PreviewCameraPageModule)
},
{
path: 'group-icons',
loadChildren: () => import('./modals/group-icons/group-icons.module').then( m => m.GroupIconsPageModule)
},
{
path: 'video-allowed',
loadChildren: () => import('./modals/video-allowed/video-allowed.module').then( m => m.VideoAllowedPageModule)
},
{
path: 'preview-photo',
loadChildren: () => import('./modals/preview-photo/preview-photo.module').then( m => m.PreviewPhotoPageModule)
},
{
path: 'custom-image-cache',
loadChildren: () => import('./services/file/custom-image-cache/custom-image-cache.module').then( m => m.CustomImageCachePageModule)
},
{
path: 'view-media',
loadChildren: () => import('./modals/view-media/view-media.module').then( m => m.ViewMediaPageModule)
},
{
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: 'set-room-owner',
loadChildren: () => import('./modals/set-room-owner/set-room-owner.module').then( m => m.SetRoomOwnerPageModule)
},
{
path: 'diplomas-gerar',
loadChildren: () => import('./shared/gabinete-digital/diplomas-gerar/diplomas-gerar.module').then( m => m.DiplomasGerarPageModule)
},
{
path: 'diplomas-gerar-options',
loadChildren: () => import('./shared/popover/diplomas-gerar-options/diplomas-gerar-options.module').then( m => m.DiplomasGerarOptionsPageModule)
},
{
path: 'chat-debugging',
loadChildren: () => import('./shared/popover/chat-debugging/chat-debugging.module').then( m => m.ChatDebuggingPageModule)
},
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
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)
},
{
path: 'view-document',
loadChildren: () => import('./modals/view-document/view-document.module').then( m => m.ViewDocumentPageModule)
},
{
path: 'event-details-documents-options',
loadChildren: () => import('./shared/popover/event-details-documents-options/event-details-documents-options.module').then( m => m.EventDetailsDocumentsOptionsPageModule)
},
{
path: 'preview-camera',
loadChildren: () => import('./modals/preview-camera/preview-camera.module').then( m => m.PreviewCameraPageModule)
},
{
path: 'group-icons',
loadChildren: () => import('./modals/group-icons/group-icons.module').then( m => m.GroupIconsPageModule)
},
{
path: 'video-allowed',
loadChildren: () => import('./modals/video-allowed/video-allowed.module').then( m => m.VideoAllowedPageModule)
},
{
path: 'preview-photo',
loadChildren: () => import('./modals/preview-photo/preview-photo.module').then( m => m.PreviewPhotoPageModule)
},
{
path: 'custom-image-cache',
loadChildren: () => import('./services/file/custom-image-cache/custom-image-cache.module').then( m => m.CustomImageCachePageModule)
},
{
path: 'view-media',
loadChildren: () => import('./modals/view-media/view-media.module').then( m => m.ViewMediaPageModule)
},
{
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: 'set-room-owner',
loadChildren: () => import('./modals/set-room-owner/set-room-owner.module').then( m => m.SetRoomOwnerPageModule)
},
{
path: 'diplomas-gerar',
loadChildren: () => import('./shared/gabinete-digital/diplomas-gerar/diplomas-gerar.module').then( m => m.DiplomasGerarPageModule)
},
{
path: 'diplomas-gerar-options',
loadChildren: () => import('./shared/popover/diplomas-gerar-options/diplomas-gerar-options.module').then( m => m.DiplomasGerarOptionsPageModule)
},
{
path: 'chat-debugging',
loadChildren: () => import('./shared/popover/chat-debugging/chat-debugging.module').then( m => m.ChatDebuggingPageModule)
},
{
path: 'chat-message-debugging',
loadChildren: () => import('./shared/popover/chat-message-debugging/chat-message-debugging.module').then( m => m.ChatMessageDebuggingPageModule)
},
@@ -260,25 +261,29 @@ const routes = [
{
path: 'information',
loadChildren: () => import('./modals/information/information.module').then( m => m.InformationPageModule)
},
{
path: 'chat-options-popover',
loadChildren:() => import('./shared/popover/chat-options-popover/chat-options-popover.module').then( m => m.ChatOptionsPopoverPageModule)
}
/*
path: 'chat',
component: ChatPage
} */
/*
path: 'chat',
component: ChatPage
} */
];
@NgModule({
imports: [
RouterModule.forRoot(routes,
{ preloadingStrategy: PreloadAllModules })
],
exports: [RouterModule]
})
/*
path: 'chat',
component: ChatPage
} */
/*
path: 'chat',
component: ChatPage
} */
];
@NgModule({
imports: [
RouterModule.forRoot(routes,
{ preloadingStrategy: PreloadAllModules })
],
exports: [RouterModule]
})
export class AppRoutingModule {}
+4 -2
View File
@@ -4,6 +4,7 @@ import { Observable } from 'rxjs';
import { SessionStore } from '../store/session.service';
import { Platform } from '@ionic/angular';
import { RouteService } from 'src/app/services/route.service'
import { FirstEnterService } from 'src/app/services/first-enter.service'
@Injectable({
providedIn: 'root'
@@ -12,7 +13,8 @@ export class LoginGuard implements CanActivate {
constructor(
private router:Router,
private platform: Platform,
private RouteService: RouteService ) {
private RouteService: RouteService,
private FirstEnterService: FirstEnterService ) {
}
canActivate(
@@ -24,7 +26,7 @@ export class LoginGuard implements CanActivate {
if(SessionStore.exist && SessionStore.user.Inactivity && SessionStore.user.LoginPreference != 'Pin' ) {
// enter app
this.router.navigate(['/home/events']);
this.FirstEnterService.enter()
return false
} else if(SessionStore.exist && !SessionStore.user.Inactivity && SessionStore.user.LoginPreference == 'Pin' && SessionStore.forceToLoginWithForceToLogInWithPassword && this.platform.is('mobile')) {
// login with password while has pin
+1 -1
View File
@@ -27,7 +27,7 @@
<ion-tab-button *ngIf="p.userPermission([permissionList.Actions.access])" tab="publications" [class.active]="pathname === '/home/publications' ">
<ion-icon *ngIf="pathname != '/home/publications'" class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
<ion-icon *ngIf="pathname == '/home/publications'" class="nav-icon" src="assets/images/nav-hover/icons-nav-actions-active.svg"></ion-icon>
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Ações</ion-label>
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Acções</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="p.userPermission([permissionList.Chat.access])" tab="chat" [class.active]="pathname === '/home/chat' ">
-1
View File
@@ -39,7 +39,6 @@ export class HomePage implements OnInit {
toDayEventStorage = ToDayEventStorage
totalDocumentStore = TotalDocumentStore
expedienteGdStore = ExpedienteGdStore
adding: "intervenient" | "CC" = "intervenient";
mobileComponent = {
showAddNewEvent: false,
@@ -171,7 +171,7 @@
[(ngModel)]="postData.StartDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -207,7 +207,7 @@
[(ngModel)]="postData.EndDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -52,7 +52,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
public minDate = new Date();
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
p: any = {}
@@ -117,6 +117,24 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.postData.CalendarName = "Oficial";
this.postData.Category = 'Reunião'
if(!this.CalendarName) {
if(this._eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
console.log(this._eventService.calendarNamesAry)
} else {
this.CalendarName = this._eventService.calendarNamesAry[0]
}
}
if(this.taskParticipants.length == 0) {
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
ngOnInit() {
@@ -132,8 +150,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
}
setDefaultTime() {
this.postData.StartDate = new Date()
this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
// this.postData.StartDate = new Date()
// this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
}
close() {
@@ -384,4 +402,46 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.taskParticipantsCc = data;
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.postData.StartDate = this.roundTimeQuarterHour();
}
setEndDate(){
this.postData.EndDate = this.postData.StartDate;
}
}
@@ -3,14 +3,14 @@
<div class="profile-header width-100">
<div class="div-logo width-40">
<div class="logo-icon">
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'> -->
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'>
</div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5">Presidente da República</p>
<p class="logo-description-text tp-5">doneIT</p>
<div class="add-line"></div>
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
</div>
@@ -18,7 +18,7 @@
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5 color-white">Presidente da República</p>
<p class="logo-description-text tp-5 color-white">doneIT</p>
<div class="add-line-white"></div>
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
</div>
+4 -5
View File
@@ -2,14 +2,13 @@
<div class="profile-header width-100">
<div class="div-logo d-md-none width-40">
<div class="logo-icon" *ngIf="hideImage">
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'> -->
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'>
</div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5">Presidente da República</p>
<p class="logo-description-text tp-5">doneIT</p>
<div class="add-line"></div>
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
</div>
@@ -17,7 +16,7 @@
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5 color-white">Presidente da República</p>
<p class="logo-description-text tp-5 color-white">doneIT</p>
<div class="add-line-white"></div>
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
</div>
+7 -5
View File
@@ -9,6 +9,7 @@ import { NotificationsService } from '../../services/notifications.service';
import { SessionStore } from 'src/app/store/session.service';
import { EventTrigger } from '../../services/eventTrigger.service';
import { ThemeService } from 'src/app/services/theme.service'
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-profile',
@@ -218,11 +219,12 @@ export class ProfilePage implements OnInit {
SessionStore.setUrlBeforeInactivity(this.router.url);
this.logoutOut == false
setTimeout(() => {
if(environment.production) {
window.location.pathname = '/auth'
} else {
const pathBeforeGoOut = window.location.pathname
this.router.navigateByUrl('/auth', { replaceUrl: true });
setTimeout(() => {
if(this.logoutOut == false || pathBeforeGoOut == window.location.pathname) {
window.location.pathname = '/auth'
@@ -230,8 +232,8 @@ export class ProfilePage implements OnInit {
console.log('refresh')
}
}, 500)
}, 100)
}
}
async editProfile() {
@@ -1,13 +1,13 @@
import { Component, OnInit } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { ModalController, NavParams } from '@ionic/angular';
import { NavParams } from '@ionic/angular';
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
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';
import { AlertService } from 'src/app/services/alert.service';
import { AlertController, ModalController } from '@ionic/angular';
@Component({
selector: 'app-view-document',
templateUrl: './view-document.page.html',
@@ -27,6 +27,7 @@ export class ViewDocumentPage implements OnInit {
private navParams: NavParams,
private sanitazer: DomSanitizer,
private processes: ProcessesService,
private alertController: AlertController,
) {
this.file = this.navParams.get('file');
this.applicationId = this.navParams.get('applicationId');
@@ -44,9 +45,27 @@ export class ViewDocumentPage implements OnInit {
ngOnInit() {
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> {
const link: string = res;
this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> {
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
if(res == "") {
const alert = await this.alertController.create({
cssClass: 'my-custom-class',
//header: 'Apagar evento!',
message: 'Sem imagem',
buttons: [
{
text: 'Sim',
handler: () => {
this.close();
}
}
]
});
}
}, ()=>{
this.close();
});
+3 -1
View File
@@ -153,8 +153,8 @@ export class ViewEventPage implements OnInit {
});
} else {
if(this.CalendarId) {
console.log('calendar id')
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
this.loadedEvent = res;
this.addEventToDb(res);
@@ -172,6 +172,8 @@ export class ViewEventPage implements OnInit {
}
loader.remove()
});
} else {
console.log('no calendar id')
}
}
+2 -1
View File
@@ -11,6 +11,7 @@ export class MessageModel extends models.Model {
ts = JsonField({blank:true})
u = JsonField()
_id = models.CharField({blank:true})
origin = models.CharField({blank:true})
_updatedAt = models.IntegerField()
messageSend = models.BooleanField()
offline = models.BooleanField()
@@ -41,7 +42,7 @@ export class DeleteMessageModel extends models.Model {
models.register({
databaseName: 'chat-storage'+environment.version.lastCommitNumber,
type: 'indexedDB',
version: 10,
version: 11,
models: [MessageModel, DeleteMessageModel, attachments]
})
+1
View File
@@ -75,6 +75,7 @@ export interface Message {
u: U;
from: 'Offline'|'History'|'stream'| 'send'
t: string;
origin: 'history' | 'stream' | 'local'
_updatedAt: '';
mentions: any[];
channels: any[];
+1
View File
@@ -43,6 +43,7 @@ export interface ChatMessageInterface {
_updatedAt: number;
mentions: any[];
channels: any[];
origin?: 'history' | 'stream' | 'local'
};
+2 -1
View File
@@ -13,6 +13,7 @@ const object = [
'diplomas',
'expedientes-pr',
'despachos',
'*',
] as const;
export type IdObject = typeof object[number];
export type notificationObject = typeof object[number];
+13 -14
View File
@@ -93,7 +93,6 @@
</div>
<!-- Move forward one screen of the slides -->
<div (click)="next()" class="arrow cursor-pointer resize">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
@@ -103,7 +102,7 @@
</ion-row>
<ion-row class="ion-align-items-center">
<div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.hasSharedCalendar && eventService.hasOwnCalendar" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="text" *ngIf="profile == 'mdgpr'">
MC
</div>
@@ -114,11 +113,11 @@
</div>
<button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') && eventService.hasSharedCalendar " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
</button>
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') && eventService.hasSharedCalendar" (click)="changeProfile()" class="btn-no-color resize">
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
</button>
@@ -279,13 +278,12 @@
<div class="time-end text-center">o dia</div>
</div>
<div class="schedule-details">
{{ event.event.CalendarName }}
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -322,11 +320,11 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -366,11 +364,12 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
<p class="m-0">{{event.event.Subject}} ....</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -417,7 +416,7 @@
[eventAttendees]="contacts"
(clearContact)="clearContact()"
(setContact)="setContact($event)"
[CalendarDate]="viewDate"
(setIntervenient)="setIntervenient($event)"
(setIntervenientCC)="setIntervenientCC($event)"
></app-new-event>
+8 -3
View File
@@ -509,17 +509,21 @@ td.monthview-primary-with-event {
width: 100%;
overflow: auto;
.location{
.location {
width: 100%;
font-family: Roboto;
font-size: 13px;
color: black;
font-size: 14px;
}
.calendar-owner {
font-size: 14px;
}
.description{
width: 100%;
font-family: Roboto;
font-size: 15px;
font-weight: bold;
color: var(--title-text-color);
}
@@ -528,6 +532,7 @@ td.monthview-primary-with-event {
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
font-size: 17px;
}
}
+15 -3
View File
@@ -108,8 +108,8 @@ export class AgendaPage implements OnInit {
postEvent: any;
// temporary data
taskParticipants: any[] = [];
taskParticipantsCc: any[] = [];
taskParticipants: EventPerson[] = [];
taskParticipantsCc: EventPerson[] = [];
adding: "intervenient" | "CC" = "intervenient";
@ViewChild(CalendarComponent) myCal: CalendarComponent;
@@ -1225,12 +1225,19 @@ export class AgendaPage implements OnInit {
this.IsEvent = 'add';
if (window.innerWidth <= 1024) {
let taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
const modal = await this.modalCtrl.create({
component: NewEventPage,
componentProps: {
segment: this.segment,
profile: this.profile,
eventSelectedDate: this.eventSelectedDate
eventSelectedDate: this.eventSelectedDate,
attendees: taskParticipants,
CalendarDate: this.viewDate
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
@@ -1244,6 +1251,11 @@ export class AgendaPage implements OnInit {
});
} else {
this.mobileComponent.showAddNewEvent = true;
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
@@ -30,7 +30,7 @@
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars}}">
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
</mat-option>
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { ModalController, NavParams, Platform } from '@ionic/angular';
import { EventAttachment } from 'src/app/models/attachment.model';
import { EventBody } from 'src/app/models/eventbody.model';
import { EventPerson } from 'src/app/models/eventperson.model';
@@ -17,6 +17,7 @@ import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { SessionStore } from 'src/app/store/session.service';
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -62,6 +63,7 @@ export class NewEventPage implements OnInit {
eventAttendees: EventPerson[];
selectedSegment: string;
selectedDate: Date;
CalendarDate: Date;
recurringTypes: any;
selectedRecurringType: any;
@@ -84,6 +86,7 @@ export class NewEventPage implements OnInit {
autoStartTime;
autoEndTime;
CalendarNamesOptions = ['Oficial', 'Pessoal']
roomId:string;
constructor(
private modalController: ModalController,
@@ -91,7 +94,9 @@ export class NewEventPage implements OnInit {
public eventService: EventsService,
private attachmentsService: AttachmentsService,
private toastService: ToastService,
public ThemeService: ThemeService
public ThemeService: ThemeService,
private platform: Platform,
private chatMethodService: ChatMethodsService,
) {
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
@@ -99,27 +104,29 @@ export class NewEventPage implements OnInit {
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
this.roomId = this.navParams.get('roomId');
this.selectedSegment = this.navParams.get('segment');
this.selectedDate = this.navParams.get('eventSelectedDate');
this.taskParticipants = this.navParams.get('attendees');
this.CalendarDate = this.navParams.get('CalendarDate')
}
ngOnInit() {
if (this.platform.is('desktop')) {
// this.taskParticipants = [];
}
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
} else if(this.eventService.calendarNamesAry.length == 1 ) {
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
}
ngOnInit() {
this.CalendarName = this.loggeduser.Profile;
this.selectedRecurringType = "-1";
this.getRecurrenceTypes();
@@ -174,14 +181,23 @@ export class NewEventPage implements OnInit {
}
};
this.setDefaultTime()
}
setDefaultTime() {
console.log(this.CalendarDate)
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
this.postEvent.EndDate = this.postEvent.StartDate;
}
close() {
this.modalController.dismiss();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
roundTimeQuarterHour(timeToReturn?) {
var timeToReturn = timeToReturn || new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
@@ -412,8 +428,22 @@ export class NewEventPage implements OnInit {
});
let data1 = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
"end": this.postEvent.EndDate,
"venue": this.postEvent.Location,
"id": eventId,
"calendarId": CalendarId
}
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId, data1);
}
this.toastService._successMessage()
this.modalController.dismiss(this.postEvent);
let data = Object.assign(this.postEvent,{id:eventId})
this.modalController.dismiss(data);
} catch (error) {
this.toastService._badRequest()
@@ -485,12 +515,8 @@ export class NewEventPage implements OnInit {
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
if(newAttendees.length) {
this.setIntervenient(newAttendees);
}
if(newAttendeesCC) {
this.setIntervenientCC(newAttendeesCC);
}
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
@@ -499,11 +525,13 @@ export class NewEventPage implements OnInit {
}
setIntervenient(data) {
this.taskParticipants = [];
this.taskParticipants = data;
this.postEvent.Attendees = data;
}
setIntervenientCC(data){
this.taskParticipantsCc = [];
this.taskParticipantsCc = data;
}
+3 -9
View File
@@ -1,4 +1,4 @@
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
import { HttpHeaders, HttpParams } from '@angular/common/http';
import {
Component,
OnInit,
@@ -115,7 +115,6 @@ export class ChatPage implements OnInit {
public ChatSystemService: ChatSystemService,
) {
this.loggedUserChat = SessionStore.user.ChatData?.data;
this.headers = new HttpHeaders();
window.onresize = (event) => {
if (window.innerWidth > 701) {
@@ -187,6 +186,8 @@ export class ChatPage implements OnInit {
if (window.innerWidth < 701) {
this.idSelected = '';
this.hideRefreshBtn = false;
this.closeAllDesktopComponents()
this.ChatSystemService.getRoomById(this.roomId).roomLeave()
}
else {
this.hideRefreshBtn = true;
@@ -352,8 +353,6 @@ export class ChatPage implements OnInit {
async closeNewEventComponentAndOpenChat({roomId}) {
this.closeAllDesktopComponents();
console.log(roomId)
this.ChatSystemService._group.forEach((room)=>{
if(room.id == roomId) {
@@ -591,11 +590,8 @@ export class ChatPage implements OnInit {
return dateB - dateA;
});
//
})
}
}
@@ -617,7 +613,6 @@ export class ChatPage implements OnInit {
_updatedAt: element._updatedAt
}
groupsArray.push(roomList)
});
@@ -636,7 +631,6 @@ export class ChatPage implements OnInit {
updatedat: element._updatedAt
}
this.sqlservice.addChatListRoom(roomList);
});
}
@@ -62,11 +62,12 @@
<ion-label *ngIf="msg.delate == true">{{msg.msg}}</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
{{last ? scrollToBottom() : ''}}
@@ -102,10 +103,12 @@
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image" >
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
@@ -155,12 +158,14 @@
</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()"> Tentar</div>
</ion-label>
</div>
</div>
+19 -33
View File
@@ -60,10 +60,12 @@
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
@@ -97,10 +99,12 @@
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
@@ -160,13 +164,13 @@
</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
@@ -194,24 +198,6 @@
</div>
<div *ngIf="msg.file && msg.delate == false">
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal">
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
</button><br />
<ion-label class="info-meeting-medium">
<ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a
{{showDateDuration(msg.file.end_date)}}
</ion-label><br />
<ion-label class="info-meeting-medium">
<ion-icon></ion-icon>
<ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}
</ion-label><br />
</div>
{{last ? scrollToBottom() : ''}}
</div>
<div *ngIf="msg.file && msg.delate == true">
Apagou a mensagem
</div>
+21 -4
View File
@@ -11,7 +11,6 @@ import { ChatService } from 'src/app/services/chat.service';
import { FileService } from 'src/app/services/functions/file.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { NewEventPage } from 'src/app/shared/agenda/new-event/new-event.page';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page';
import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
@@ -41,6 +40,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { NewEventPage } from '../../agenda/new-event/new-event.page';
const IMAGE_DIR = 'stored-images';
@@ -331,6 +331,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
async goToEvent(event: any) {
// console.log(event)
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
@@ -584,7 +586,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
async bookMeeting() {
this.attendees = this.members.map((val) => {
let attendees = this.ChatSystemService.getDmRoom(this.roomId).members.map((val) => {
return {
Name: val.name,
EmailAddress: val.username + "@" + environment.domain,
@@ -597,15 +599,30 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const modal = await this.modalController.create({
component: NewEventPage,
componentProps: {
attendees: this.attendees,
attendees: attendees,
roomId: this.roomId
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if (data) {
if (data?.data && data.data.id) {
// const roomId = this.roomId
// this.ChatSystemService.getDmRoom(roomId).send({
// file: {
// "type": "application/meeting",
// "subject": data.data.Subject,
// "start_date": data.data.StartDate,
// "end_date": data.data.EndDate,
// "venue": data.data.venue,
// "id": data.data.id,
// "calendarId": data.data.CalendarId
// },
// temporaryData: {}
// })
}
});
}
@@ -81,9 +81,9 @@ export class AttendeesPageModal implements OnInit {
}
remove(itm: EventPerson){
remove(itm: EventPerson) {
if(this.adding == "intervenient"){
if(this.adding == "intervenient") {
this.taskParticipants = this.taskParticipants.filter((contact, index) =>{
@@ -135,10 +135,23 @@ export class AttendeesPageModal implements OnInit {
});
}
this.contacts = result;
this.contacts = this.sort(result as any);
this.showLoader = false;
}
);
}
sort(data: []) {
return data.sort(function (a: any, b: any) {
if (a.Name > b.Name) {
return -1;
}
if (b.Name > a.Name) {
return 1;
}
return 0;
}).reverse()
}
}
+1 -1
View File
@@ -125,7 +125,7 @@
(click)="goToExpediente(task.SerialNumber)">
<div class="item-exp d-flex">
<div class="schedule-date">
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yyyy'}}</div>
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yy'}}</div>
<div class="time-start">{{task.taskStartDate | date: 'HH:mm'}}</div>
</div>
<div class="schedule-details pointer">
@@ -147,7 +147,7 @@
[min]="minDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -186,7 +186,7 @@
[min]="endMinDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -59,7 +59,7 @@ export class BookMeetingModalPage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
@@ -130,6 +130,8 @@ export class BookMeetingModalPage implements OnInit {
authService: AuthService,
private toastService: ToastService,
public ThemeService: ThemeService,
public eventService: EventsService,
) {
this.taskParticipants = [];
@@ -148,6 +150,23 @@ export class BookMeetingModalPage implements OnInit {
this.postData.Category = 'Reunião'
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
if(this.taskParticipants.length == 0) {
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
ngOnInit() {
@@ -481,4 +500,46 @@ export class BookMeetingModalPage implements OnInit {
this.taskParticipantsCc = data;
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.postData.StartDate = this.roundTimeQuarterHour();
}
setEndDate(){
this.postData.EndDate = this.postData.StartDate;
}
}
@@ -71,7 +71,8 @@
<div *ngIf="task.Agenda" class="item-middle-detail-extra">
<div class="item-middle-detail-extra-text">
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial PR' || task.WorkflowName == 'Agenda Pessoal PR'">
Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Presidente da República
<!-- Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Presidente da República -->
Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Titular
</ion-label>
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial MDGPR' || task.WorkflowName == 'Agenda Pessoal MDGPR'">
A sua agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}}
@@ -227,14 +228,15 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon>
</div>
<div class="exp-card-text">
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p>
<!-- <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p> -->
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Titular</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && !p.userPermission([p.permissionList.Gabinete.md_tasks])">Despachos criados por mim</p>
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
</div>
</div>
</div>
<!-- <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
@@ -259,7 +261,7 @@
</div>
<div (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
<div *ngIf="deplomasStore.countDiplomasAssinadoListCount >= 1" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon>
@@ -280,7 +282,7 @@
</div>
<p class="text-center exp-card-title">Diplomas para Assinar</p>
<p class="text-center exp-card-content">{{ deplomasStore.diplomasParaAssinartCount }} <span class="title1">Documentos</span></p>
</div> -->
</div>
</div>
<div *ngIf="!loadCount" class="width-100">
@@ -372,7 +374,6 @@
</div>
</div>
</div>
@@ -106,6 +106,8 @@ export class GabineteDigitalPage implements OnInit {
AllProcess = []
// workerList : Worker
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
@ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage;
@@ -126,6 +128,12 @@ export class GabineteDigitalPage implements OnInit {
public NotificationsService: NotificationsService
) {
// this.workerList = new Worker(new URL('./list.worker.js', import.meta.url));
// this.workerList.onmessage = (oEvent) => {
// this.AllProcess = oEvent.data
// }
window.onresize = (event) => {
// if not mobile remove all component
if (window.innerWidth < 701) {
@@ -157,8 +165,8 @@ export class GabineteDigitalPage implements OnInit {
}
const pathname = window.location.pathname
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == pathname) {
//this.router.events.forEach((event) => {
//if (event instanceof NavigationEnd && event.url == pathname) {
this.waitForDomService.selector({
selector: 'app-gabinete-digital ion-content .aside-wrapper',
callback: () => {
@@ -171,88 +179,96 @@ export class GabineteDigitalPage implements OnInit {
}
}
})
}
});
//}
//});
this.hideRefreshButton();
this.waitForDomService.selector({
selector: 'app-gabinete-digital ion-content .aside-wrapper',
callback: () => {
// console.log('SECOND CALL')
this.loadAllProcesses();
}
})
// this.waitForDomService.selector({
// selector: 'app-gabinete-digital ion-content .aside-wrapper',
// callback: () => {
// // console.log('SECOND CALL')
// this.loadAllProcesses();
// }
// })
this.backgroundservice.registerBackService('Online', () => {
// this.loadAllProcesses();
});
this.NotificationsService.registerCallback(
'despachos',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'despachos-pr',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'expediente',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'gabinete-digital',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'parecer',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'deferimento',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'diplomas-assinar',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'diplomas',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'expedientes-pr',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
// this.NotificationsService.registerCallback({
// type:'despachos',
// funx:() => {
// // this.loadCount();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'*',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification *')
// }
// })
// this.NotificationsService.registerCallback({
// type:'despachos-pr',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'expediente',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'gabinete-digital',
// funx:() => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'parecer',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'deferimento',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas-assinar',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'expedientes-pr',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
}
@@ -570,7 +586,19 @@ export class GabineteDigitalPage implements OnInit {
updateAllProcess() {
this.AllProcess = this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr).concat(this.despachoStore.list)
// .concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList)
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList).concat(this.pendentesstore.list)
// try{
// this.workerList.postMessage([
// this.expedientegbstore.list,this.pedidosstore.listparecer,this.pedidosstore.listdeferimento,
// this.despachoprstore.list, this.eventoaprovacaostore.listmd, this.eventoaprovacaostore.listpr, this.despachoStore.list,
// this.deplomasStore.diplomasParaAssinarList, this.deplomasStore.diplomasAssinadoList, this.deplomasStore.DiplomaGerarList
// ])
// } catch (e) {
// this.AllProcess = this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
// .concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr).concat(this.despachoStore.list)
// .concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList)
// }
}
get getAllProcessCount() {
@@ -0,0 +1,10 @@
onmessage = function(oEvent) {
const list = Event.data
var a = []
postMessage(
a.concat.apply([], [list])
);
};
@@ -7,8 +7,8 @@
<div class="div-top-header">
<div class="div-logo">
<!-- <img style="max-width: 90px;" *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-bg-removebg-preview.png' alt='logo'>
<img style="max-width: 80px;" *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'> -->
<img style="max-width: 90px;" *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-bg-removebg-preview.png' alt='logo'>
<img style="max-width: 80px;" *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
</div>
</div>
+2 -2
View File
@@ -7,9 +7,9 @@
<div class="bg-4 d-flex justify-center align-center">
<div class="div-logo">
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/fullLogo-no-g.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/fullLogo-no-g.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'> -->
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'>
</div>
</div>
+1
View File
@@ -123,6 +123,7 @@ export class LoginPage implements OnInit {
if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt);
this.changeProfileService.run();
if(attempt.ChatData) {
@@ -25,7 +25,7 @@ export class EditActionPage implements OnInit {
public minDate = new Date().toISOString()
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -44,7 +44,7 @@
[formControl]="dateControlStart"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -83,7 +83,7 @@
[min]="endMinDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -46,7 +46,7 @@ export class NewActionPage implements OnInit {
public minDate = new Date().toISOString()
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -98,9 +98,9 @@ export class NewActionPage implements OnInit {
var validado: boolean;
if (window.innerWidth <= 800) {
if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) {
if ((this.folder.DateBegin < this.folder.DateEnd)) {
validado = true;
}else{
} else {
validado = false;
}
return validado == true ? ['ok']: [];
@@ -111,8 +111,8 @@ export class NewActionPage implements OnInit {
runValidation() {
this.validateFrom = true;
if(new Date(this.folder.DateBegin).toISOString() > new Date(this.folder.DateEnd).toISOString()){
this.toastService.badRequest("A data de início não pode ser superior a data de fim");
if(new Date(this.folder.DateBegin).getTime() > new Date(this.folder.DateEnd).getTime()){
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
}
}
@@ -171,4 +171,42 @@ export class NewActionPage implements OnInit {
this.modalController.dismiss();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m) {
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
return timeToReturn;
}
setStartDate(){
this.dateControlStart = new FormControl(moment(this.roundTimeQuarterHour()));
}
setEndDate(){
this.dateControlEnd = this.dateControlStart;
}
}
@@ -44,7 +44,7 @@ export class NewPublicationPage implements OnInit {
public minDate = new Date().toISOString().slice(0, 10)
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public color: ThemePalette = 'primary';
@@ -15,7 +15,7 @@
<!-- Left -->
<div class="aside-left app-default-padding d-flex flex-grow-1 flex-column width-30 ">
<!-- Header -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader || skeletonLoader"></ion-progress-bar>
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-toolbar >
<div class="main-header">
@@ -24,7 +24,7 @@ import { PermissionService } from 'src/app/services/permission.service';
styleUrls: ['./publications.page.scss'],
})
export class PublicationsPage implements OnInit {
showLoader: boolean;
showLoader: boolean = false
publicationFolder: PublicationFolder;
publication: Publication;
@@ -57,7 +57,6 @@ export class PublicationsPage implements OnInit {
hideRefreshBtn = true;
showSlidingOptions = true;
idSelected: string;
skeletonLoader: boolean;
constructor(
private router: Router,
@@ -138,13 +137,10 @@ export class PublicationsPage implements OnInit {
return this.theDate.getDate() + " de " + (this.months[this.theDate.getMonth()]) + " de " + this.theDate.getFullYear()
}
loadList = false
getActions() {
if(this.loadList == false) {
this.loadList = true
if(this.showLoader == false) {
this.showLoader = true;
this.skeletonLoader = true;
this.publications.GetPublicationFolderList().subscribe(async res => {
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
@@ -162,13 +158,9 @@ export class PublicationsPage implements OnInit {
}
this.showLoader = false;
this.skeletonLoader = false;
this.loadList = false
}, (error) => {
this.showLoader = false;
this.skeletonLoader = false;
this.loadList = false
});
}
@@ -268,8 +260,9 @@ export class PublicationsPage implements OnInit {
}
finally {
loader.remove()
this.refreshing()
}
this.refreshing()
}
async AddPublicationFolder(item?: any) {
+22 -9
View File
@@ -27,29 +27,35 @@
<div class="btn-modal-dismiss" *ngIf="showSearchInput">
<button class="btn-no-color" (click)="close()">
<ion-icon c*ngIf="ThemeService.currentTheme == 'default' " lass="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</button>
</div>
</div>
<!-- Search drop down -->
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1" >
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1" >
<ion-form [class.d-none]="!showSearchInput">
<div class="d-flex search-input-container ion-justify-content-between" >
<div class="icon">
<!-- <div class="icon">
<button class="btn-no-color" (click)="basicSearch()">
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</button>
</div>
<div class="input-text d-flex ion-align-items-center">
</div> -->
<div class="input-text d-flex ion-align-items-center pm-10">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input" type="search" placeholder="Pesquisar"></ion-input>
</div>
<div (click)="clearSearchInput()" class="d-flex align-center icon">
<!-- <div (click)="clearSearchInput()" class="d-flex align-center icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> -->
<div (click)="basicSearch()" class="d-flex align-center icon">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</div>
</div>
</ion-form>
@@ -102,7 +108,14 @@
<div class="container ">
<div class="d-flex overflow-x-auto">
<!-- SLIDE -->
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="filterDocList(category.Name)" (click)="activeCategoty(i)">
<div class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': TodosCategory}" class="button cursor-pointer" (click)="noFilter()">
<span>Todos</span>
<ion-label class="label">{{ searchDocuments.length }}</ion-label>
</div>
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="activeCategoty(i); filterDocList(category.Name)">
<span>{{ category.Name }}</span>
<ion-label class="label">{{ category.Qtd }}</ion-label>
+169 -32
View File
@@ -11,6 +11,7 @@ import { DocumentDetailPage } from 'src/app/modals/document-detail/document-deta
import { SearchCategory, SearchList } from 'src/app/models/search-document';
import { ThemeService } from 'src/app/services/theme.service'
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { Router } from '@angular/router';
@Component({
selector: 'app-search',
@@ -62,7 +63,8 @@ export class SearchPage implements OnInit {
private search: SearchService,
private modalCtrl: ModalController,
private navParams: NavParams,
public ThemeService: ThemeService)
public ThemeService: ThemeService,
private router: Router)
{
this.ordinance = "recent";
this.currentPath= window.location.pathname;
@@ -166,9 +168,7 @@ export class SearchPage implements OnInit {
wordCloud() {
this.search.mostSeachWord("15").subscribe(res=>{
console.log('LOAD LIST');
this.search.mostSeachWord("15").subscribe( res => {
const highest= res[0].Hits;
const lowest = res[res.length-1].Hits;
@@ -191,7 +191,6 @@ export class SearchPage implements OnInit {
});
this.list = list
console.log('set list')
const elem = document.documentElement.querySelector('.most-searched-word-container');
@@ -213,7 +212,7 @@ export class SearchPage implements OnInit {
loadWordCloud() {
setTimeout(()=>{
setTimeout(() => {
const elem = document.documentElement.querySelector('.most-searched-word-container');
WordCloud(
@@ -386,7 +385,7 @@ export class SearchPage implements OnInit {
let counter = 0;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => {
res.Categories.forEach( e => {
e['Active'] = false;
this.searchCategories.push(e)
@@ -426,7 +425,7 @@ export class SearchPage implements OnInit {
});
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res => {
res.Categories.forEach( e => {
e['Active'] = false;
@@ -442,7 +441,7 @@ export class SearchPage implements OnInit {
this.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1){
if(this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false
@@ -544,7 +543,7 @@ export class SearchPage implements OnInit {
counter++;
if(counter ==2){
if(counter ==2) {
this.showLoader = false;
}
@@ -552,7 +551,7 @@ export class SearchPage implements OnInit {
},error => {
counter++;
if(counter ==2){
if(counter ==2) {
this.showLoader = false;
}
this.searchResult = "Registo não encontrado"
@@ -561,9 +560,13 @@ export class SearchPage implements OnInit {
}
}
else if (this.type == "AccoesPresidenciais"){
else if (this.type == "AccoesPresidenciais") {
let counter = 0;
this.showLoader = true;
this.searchCategories = []
this.searchDocuments = []
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{
@@ -571,12 +574,18 @@ export class SearchPage implements OnInit {
res.Categories.forEach( e => {
e['Active'] = false;
e['Name'] = "Publicações"
});
// bind respose
this.searchCategories = res.Categories;
for ( const a of res.Categories) {
this.searchCategories.push(a);
}
this.searchDocuments = this.sortArrayISODate(res.Documents);
for ( const a of this.sortArrayISODate(res.Documents)) {
a.DocTypeDesc = "Publicações"
this.searchDocuments.push(a);
}
this.reorderList(this.ordinance);
@@ -587,13 +596,71 @@ export class SearchPage implements OnInit {
this.showDocuments = false
}
this.showLoader = false;
counter++;
if(counter ==2){
this.showLoader = false;
}
this.loadWordCloud();
},error => {
this.showLoader = false;
counter++;
if(counter ==2){
this.showLoader = false;
}
this.searchResult = "Registo não encontrado"
console.log(error)
});
this.search.basicSearchPublication(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res => {
res.Categories.forEach( e => {
e['Active'] = false;
e['Name'] = "Acções"
});
// bind respose
for ( const a of res.Categories) {
this.searchCategories.push(a);
}
for ( const a of this.sortArrayISODate(res.Documents)) {
a.DocTypeDesc = "Acções"
this.searchDocuments.push(a);
}
this.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false
}
counter++;
if(counter ==2) {
this.showLoader = false;
}
this.loadWordCloud();
}, error => {
counter++;
if(counter ==2) {
this.showLoader = false;
}
this.searchResult = "Registo não encontrado"
console.log(error)
});
}
}
@@ -636,7 +703,7 @@ export class SearchPage implements OnInit {
}
}
clearInputRemetente(){
clearInputRemetente() {
this.searchSender = "";
}
@@ -704,6 +771,7 @@ export class SearchPage implements OnInit {
}
TodosCategory = true
async filterDocList(categoryName:string){
// show all category
@@ -716,6 +784,27 @@ export class SearchPage implements OnInit {
}
this.showCategory = categoryName;
for(let category of this.searchCategories) {
if(category['Active']) {
this.TodosCategory = false
return false
}
}
this.TodosCategory = true
}
noFilter() {
this.TodosCategory = true
let n = 0
for(let category of this.searchCategories) {
this.searchCategories[n]['Active'] = false
n++
}
this.showSearchDocuments = this.searchDocuments;
}
@@ -735,6 +824,7 @@ export class SearchPage implements OnInit {
const ApplicationType = searchDocument.ApplicationType.toString()
const Id = searchDocument.Id
const CalendarId = searchDocument.ApplicationName.split(':')[1]
const DocTypeDesc = searchDocument.DocTypeDesc
if(this.select == false) {
if(this.type == "Agenda") {
@@ -754,31 +844,41 @@ export class SearchPage implements OnInit {
} else if(this.type == "AccoesPresidenciais") {
this.viewPublicationDetail(Id);
this.viewPublicationDetail(Id, DocTypeDesc);
}
else if(this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
if(ApplicationType == '8' || ApplicationType == '361') {
// 361
if(ApplicationType == '8') {
this.viewDocumentDetail(Id, ApplicationType);
} else if (ApplicationType == '361') {
this.viewDocumentModal(searchDocument)
}
}
}
}
async viewPublicationDetail(publicationId:string) {
const modal = await this.modalController.create({
component: PublicationDetailPage,
componentProps:{
publicationId: publicationId,
isModal: true
},
cssClass: 'publication-detail modal modal-desktop ',
//backdropDismiss: false
});
async viewPublicationDetail(publicationId:string, DocTypeDesc) {
// validation my friend
if(DocTypeDesc == 'Acções') {
this.router.navigate(['/home/publications', publicationId]);
} else if( DocTypeDesc == 'Publicações') {
const modal = await this.modalController.create({
component: PublicationDetailPage,
componentProps:{
publicationId: publicationId,
isModal: true
},
cssClass: 'publication-detail modal modal-desktop ',
//backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(()=>{});
}
await modal.present();
modal.onDidDismiss().then(()=>{});
}
@@ -805,4 +905,41 @@ export class SearchPage implements OnInit {
}
async viewDocumentModal(LoadedDocument) {
let task = {
serialNumber: '',
taskStartDate: '',
isEvent: true,
workflowInstanceDataFields: {
FolderID: '',
Subject: LoadedDocument.SourceName || LoadedDocument.Assunto,
SourceSecFsID: LoadedDocument.ApplicationId || LoadedDocument.ApplicationType,
SourceType: 'DOC',
SourceID: LoadedDocument.Id || LoadedDocument.Id,
DispatchNumber: ''
}
}
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: task.workflowInstanceDataFields.Subject,
url: '',
title_link: '',
},
Document: LoadedDocument,
applicationId: task.workflowInstanceDataFields.SourceSecFsID,
docId: task.workflowInstanceDataFields.SourceID ,
folderId: '',
task: task
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ export class ExpedienteTaskPipe implements PipeTransform {
transform(fullTask: ExpedienteFullTask): ExpedienteTask {
let date = new Date(fullTask.taskStartDate);
date.setMonth(date.getMonth() + 1);
date.setMonth(date.getMonth());
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
return {
+6 -12
View File
@@ -24,22 +24,16 @@ export class AttachmentsService {
private changeProfileService: ChangeProfileService) {
this.changeProfileService.registerCallback(() => {
this.loggeduser = SessionStore.user
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
})
this.changeProfileService.registerLoginCallback(() => {
this.loggeduser = SessionStore.user
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
})
this.setHeader()
});
this.setHeader()
}
setHeader() {
this.loggeduser = SessionStore.user
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
}
uploadFile(formData:any) {
+4 -4
View File
@@ -25,7 +25,7 @@ import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
export class AuthService {
userData$ = new BehaviorSubject<any>('');
userId$ = new BehaviorSubject<any>('');
headers: HttpHeaders;
headers: HttpHeaders = new HttpHeaders();
public wsValidatedUserChat:any;
public isWsAuthenticated: boolean = false;
opts:any;
@@ -43,9 +43,7 @@ export class AuthService {
private storage: Storage,
private initialsService: InitialsService,
public p: PermissionService,
public ChatSystemService: ChatSystemService, ) {
this.headers = new HttpHeaders();
public ChatSystemService: ChatSystemService) {
if (SessionStore.exist) {
if(this.p.userPermission(this.p.permissionList.Chat.access) == true ) {
@@ -82,6 +80,8 @@ export class AuthService {
}
// async UpdateLogin() {}
SetSession(response: LoginUserRespose, user:UserForm) {
const session: UserSession = Object.assign(SessionStore.user, response)
@@ -25,6 +25,7 @@ export class ChatMethodsService {
"end_date": data.end,
"venue": data.venue,
"id": data.id,
"calendarId": data.calendarId
}
}
}
+20 -13
View File
@@ -18,7 +18,6 @@ import { ChatMethodsService } from './chat-methods.service';
import { AESEncrypt } from '../aesencrypt.service'
import { AttachmentsService } from 'src/app/services/attachments.service';
import { NetworkServiceService} from 'src/app/services/network-service.service';
import { JsonStore } from '../jsonStore.service';
import { ViewedMessageService } from './viewed-message.service'
@Injectable({
providedIn: 'root'
@@ -97,7 +96,7 @@ export class ChatSystemService {
}
loadChat() {
if(SessionStore.user.ChatData) {
if(SessionStore.user?.ChatData?.data) {
this.ReLoadChat()
}
}
@@ -185,14 +184,18 @@ export class ChatSystemService {
async getAllRooms () {
this.loadingWholeList = true
var rooms;
try {
rooms = await this.RochetChatConnectorService.getRooms();
} catch (error) {
console.error('chatgetrooms',error)
}
if(this.RochetChatConnectorService.isLogin) {
try {
await this.storage.remove('Rooms');
} catch(e) {}
rooms = await this.RochetChatConnectorService.getRooms();
} catch (error) {
this.loadingWholeList = false
console.error('chatgetrooms',error)
}
try {
await this.storage.remove('Rooms');
} catch(e) {}
}
let index = 0
@@ -317,8 +320,12 @@ export class ChatSystemService {
this.defaultSubtribe(id)
}
this.RochetChatConnectorService.streamNotifyLogged().then((subscription=>{
this.RochetChatConnectorService.streamNotifyLogged().then((subscription => {
console.log(subscription)
}))
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => {
console.log(subscription)
}))
}
@@ -407,7 +414,7 @@ export class ChatSystemService {
let roomId = this.getRoomId(roomData);
if (setData.name != 'Rocket Cat') {
if (setData.name != 'Rocket Cat' && setData.name != 'general' ) {
// create room
if(!this.roomExist(roomId)) {
let room:RoomService = new RoomService(this.RochetChatConnectorService, new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this, this.ViewedMessageService)
@@ -615,7 +622,7 @@ export class ChatSystemService {
return !roomData.fname
}
getUsers = () =>{
getUsers = () => {
return this.users
}
+35 -9
View File
@@ -61,6 +61,9 @@ export class MessageService {
downloadAttachmentsTemp = 0;
UploadAttachmentsTemp = 0;
manualRetry = false
origin: 'history' | 'stream' | 'local'
rowInstance: MessageModel
constructor(
private NfService: NfService,
@@ -72,7 +75,7 @@ export class MessageService {
private ChatSystemService: ChatSystemService) {
}
setData({customFields = {}, channels, mentions, msg ,rid ,ts, u, t, _id, id, _updatedAt, file, attachments, temporaryData, localReference = 'out-'+uuidv4() , viewed = [], received = [], delate = false, delateRequest =false, from, sendAttempt = 0 }:Message) {
setData({customFields = {}, channels, mentions, msg ,rid ,ts, u, t, _id, id, _updatedAt, file, attachments, temporaryData, localReference = 'out-'+uuidv4() , viewed = [], received = [], delate = false, delateRequest =false, from, sendAttempt = 0, origin }:Message) {
this.channels = channels || []
this.mentions = mentions || []
@@ -90,6 +93,7 @@ export class MessageService {
this.delate = delate
this.delateRequest = delateRequest
this.sendAttempt = 0
this.origin = origin
if(this.attachments?.length >= 1 && attachments?.length >= 1) {
this.attachments[0] = Object.assign(this.attachments[0], attachments[0])
@@ -257,6 +261,7 @@ export class MessageService {
} catch (error) {
this.uploadingFile = false
this.errorUploadingAttachment = true
this.UploadAttachmentsTemp++
console.error('beforeSendAttachment error:', error)
}
@@ -441,9 +446,11 @@ export class MessageService {
async delateDB() {
const message = await MessageModel.get({id: this.id})
await message.delete()
if(!this.rowInstance) {
this.rowInstance = await this.getRowInstance()
}
await this.rowInstance.delete()
}
@@ -467,6 +474,7 @@ export class MessageService {
u: this.u,
_id: this._id,
id: this.id,
origin: this.origin,
_updatedAt: this._updatedAt,
messageSend: this.messageSend,
offline: this.offline,
@@ -489,6 +497,7 @@ export class MessageService {
delete message.id
const createdMessage = await MessageModel.create(message)
this.rowInstance = createdMessage
this.id = createdMessage.id
if(this.earlySave) {
@@ -497,8 +506,8 @@ export class MessageService {
}
}
async saveChanges() {
async getRowInstance () {
if(this.save) {
const message = this.getChatObj()
@@ -516,12 +525,29 @@ export class MessageService {
a = await MessageModel.get({id: this.id})
}
if(a) {
for( const [name, value] of Object.entries(message)) {
a[name] = value
}
await a.save()
return a
}
}
async saveChanges() {
if(!this.rowInstance) {
this.rowInstance = await this.getRowInstance()
}
if(this.save && this.rowInstance) {
const message = this.getChatObj()
if(!message.id) {
delete message.id
}
for( const [name, value] of Object.entries(message)) {
this.rowInstance[name] = value
}
await this.rowInstance.save()
} else {
this.earlySave = true
@@ -437,6 +437,63 @@ export class RochetChatConnectorService {
}
subStreamNotifyUser(param?: any) {
const requestId = uuidv4()
let message = {
msg: "sub",
id: requestId,
name: "stream-notify-user",
params:[
`${SessionStore.user.ChatData.data.userId}/notification`,
param
]
}
this.ws.send({message, requestId})
return new Promise((resolve, reject) => {
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
if(message.id == requestId ) { // same request send
resolve(message)
return true
}
}})
});
}
subStreamMessageUser(param?: any) {
const requestId = uuidv4()
let message = {
msg: "sub",
id: requestId,
name: "stream-notify-user",
params:[
`${SessionStore.user.ChatData.data.userId}/message`,
param
]
}
this.ws.send({message, requestId})
return new Promise((resolve, reject) => {
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
if(message.id == requestId ) { // same request send
resolve(message)
return true
}
}})
});
}
receiveStreamNotifyRoom(funx: Function) {
this.ws.registerCallback({
+23 -7
View File
@@ -275,18 +275,25 @@ export class RoomService {
if(message.fields.eventName == this.id+'/'+'typing') {
const args = message.fields.args
if (typeof args[1] != 'object') {
this.userThatIsTyping = this.usernameToDisplayName(args[0])
this.isTyping = args[1]
this.otherUserType = args[1]
this.readAllMessage()
const user = args[0]
if(SessionStore.user.UserName != user) {
this.readAllMessage()
}
} else if(args[0]?.method == 'viewMessage' || args[1]?.method == 'viewMessage') {
this.readAllMessage()
const user = args[0]
if(SessionStore.user.UserName != user) {
this.readAllMessage()
}
} else if(args[0]?.method == 'deleteMessage' || args[1]?.method == 'deleteMessage') {
this.deleteMessage(args[1]?.method?._id)
@@ -295,7 +302,6 @@ export class RoomService {
}
} else if (message.fields.eventName == this.id+'/'+'deleteMessage') {}
})
@@ -313,6 +319,7 @@ export class RoomService {
if(!found) {
ChatMessage.origin = 'stream'
const message = await this.prepareCreate({message: ChatMessage, save: true});
this.registerSendMessage(message)
@@ -445,7 +452,13 @@ export class RoomService {
"stream-notify-room",
async (ChatMessage) => {
const DeletedMessageId = ChatMessage.fields.args[0]._id;
this.deleteMessage(DeletedMessageId)
const message = this.messages.find((e) => e._id == DeletedMessageId)
if(message.delate == false) {
this.deleteMessage(DeletedMessageId)
}
}
)
}
@@ -556,7 +569,8 @@ export class RoomService {
attachments,
file,
temporaryData,
localReference
localReference,
origin: 'local'
}
this.message= ''
@@ -657,6 +671,7 @@ export class RoomService {
// this.typing(this.message)
this.chatOpen = true
this.messageUnread = false
this.sendReadMessage()
}
@@ -737,6 +752,7 @@ export class RoomService {
for(let message of chatHistory.result.messages.reverse()) {
if (!messagesId.includes(message._id)) {
message.origin = 'history'
const messagesToSave = await this.prepareMessageCreateIfNotExist({message: message});
if(messagesToSave != null) {
@@ -27,9 +27,9 @@ export class ViewedMessageService {
for(let id of membersIds) {
if(message.addReceived(id)) {
n++
setTimeout(async() => {
// setTimeout(async() => {
await message.saveChanges()
}, 100 * n)
// }, 100 * n)
}
}
}
@@ -56,9 +56,9 @@ export class ViewedMessageService {
if(message.addViewed(id)) {
message.addReceived(id)
n++
setTimeout(async() => {
// setTimeout(async() => {
await message.saveChanges()
}, 100 * n)
// }, 100 * n)
}
}
+13 -1
View File
@@ -6,6 +6,7 @@ import { environment } from 'src/environments/environment';
import { AuthService } from '../services/auth.service';
import { LoginUserRespose } from '../models/user.model';
import { SessionStore } from '../store/session.service';
import { ChangeProfileService } from './change-profile.service';
@Injectable({
providedIn: 'root'
@@ -16,7 +17,18 @@ export class ContactsService {
loggeduser: LoginUserRespose;
headers: HttpHeaders;
constructor(private http: HttpClient, user: AuthService) {
constructor(
private http: HttpClient,
user: AuthService,
private changeProfileService: ChangeProfileService) {
this.setHeader()
this.changeProfileService.registerCallback(() => {
this.setHeader()
})
}
setHeader() {
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
+66 -82
View File
@@ -4,7 +4,6 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Observable, from } from 'rxjs';
import { environment } from 'src/environments/environment';
import { AuthService } from '../services/auth.service';
import { UserSession } from '../models/user.model';
import { EventList } from '../models/agenda/AgendaEventList';
import { ChangeProfileService } from './change-profile.service';
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
@@ -20,7 +19,6 @@ import { SessionStore } from '../store/session.service';
export class EventsService {
authheader = {};
loggeduser: UserSession;
headers: HttpHeaders;
headersPrOficial: HttpHeaders;
@@ -37,25 +35,17 @@ export class EventsService {
headersSharedOficial: HttpHeaders;
headersSharedPessoal: HttpHeaders;
hasSharedCalendar = false
hasOwnCalendar = false
calendarIds = []
usersCalendarIds = []
hasSharedCalendar = false;
hasSharedOficial: boolean = false;
hasSharedPessoal: boolean = false;
hasOwnOficial: boolean = false;
hasOwnPessoal: boolean = false;
userCalendarNameSharedOficial = '';
userCalendarNameSharedPessoal = '';
userCalendarNameOwnOficial = '';
userCalendarNameOwnPessoal = '';
hasOwnCalendar = false
calendarNames = {}
@@ -73,7 +63,14 @@ export class EventsService {
private storage: Storage,
private backgroundservice: BackgroundService) {
this.loggeduser = SessionStore.user;
this.setHeader()
this.changeProfileService.registerCallback(() => {
this.setHeader()
})
}
async setHeader () {
this.headers = new HttpHeaders();
this.headersMdOficial = new HttpHeaders();
@@ -92,16 +89,14 @@ export class EventsService {
this.headerSharedOficial= new HttpHeaders();
this.headerSharedPessoal= new HttpHeaders();
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
this.setHeader()
this.changeProfileService.registerCallback(() => {
this.loggeduser = SessionStore.user;
this.setHeader()
})
}
async setHeader () {
this.usersCalendarIds = [];
this.calendarNames = {}
this.calendarIds = []
this.calendarNamesAry = []
this.calendarNamesType = {}
this.hasSharedCalendar = false
this.hasSharedOficial = false
@@ -110,32 +105,11 @@ export class EventsService {
this.hasOwnCalendar = false
this.hasOwnOficial = false
this.hasOwnPessoal = false
this.headers = new HttpHeaders();
this.headerOwnOficial= new HttpHeaders();
this.headerOwnPessoal= new HttpHeaders();
this.headerSharedOficial= new HttpHeaders();
this.headerSharedPessoal= new HttpHeaders();
if (SessionStore.user) {
if (SessionStore.user.Profile == 'MDGPR') {
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
this.userCalendarNameSharedOficial = '';
this.userCalendarNameSharedPessoal = '';
this.userCalendarNameOwnOficial = '';
this.userCalendarNameOwnPessoal = '';
this.usersCalendarIds = [];
this.calendarNames = {}
this.calendarNamesAry = []
this.calendarNamesType = {}
if (this.loggeduser) {
if (this.loggeduser.Profile == 'MDGPR') {
for (let calendar of this.loggeduser.OwnerCalendars) {
for (let calendar of SessionStore.user.OwnerCalendars) {
this.hasAnyCalendar = false
if (calendar.CalendarName == 'Oficial') {
@@ -143,7 +117,7 @@ export class EventsService {
this.hasOwnOficial = true
this.headersMdOficial = this.headersMdOficial.set('Authorization', this.loggeduser.BasicAuthKey);
this.headersMdOficial = this.headersMdOficial.set('Authorization', SessionStore.user.BasicAuthKey);
this.headersMdOficial = this.headersMdOficial.set('CalendarId', calendar.CalendarId);
this.headersMdOficial = this.headersMdOficial.set('CalendarRoleId', calendar.CalendarRoleId);
}
@@ -151,21 +125,21 @@ export class EventsService {
this.hasOwnPessoal = true
this.headersMdPessoal = this.headersMdPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
this.headersMdPessoal = this.headersMdPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
this.headersMdPessoal = this.headersMdPessoal.set('CalendarId', calendar.CalendarId);
this.headersMdPessoal = this.headersMdPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
}
}
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
this.hasAnyCalendar = false
if (sharedCalendar.CalendarName == 'Oficial') {
this.hasSharedOficial = true
this.headersSharedOficial = this.headersSharedOficial.set('Authorization', this.loggeduser.BasicAuthKey);
this.headersSharedOficial = this.headersSharedOficial.set('Authorization', SessionStore.user.BasicAuthKey);
this.headersSharedOficial = this.headersSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
this.headersSharedOficial = this.headersSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
}
@@ -173,7 +147,7 @@ export class EventsService {
this.hasSharedPessoal = true
this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
}
@@ -181,15 +155,15 @@ export class EventsService {
}
else if (this.loggeduser.Profile == 'PR') {
else if (SessionStore.user.Profile == 'PR') {
for (let calendar of this.loggeduser.OwnerCalendars) {
for (let calendar of SessionStore.user.OwnerCalendars) {
this.hasAnyCalendar = false
if (calendar.CalendarName == 'Oficial') {
this.hasOwnOficial = true
this.headersPrOficial = this.headersPrOficial.set('Authorization', this.loggeduser.BasicAuthKey);
this.headersPrOficial = this.headersPrOficial.set('Authorization', SessionStore.user.BasicAuthKey);
this.headersPrOficial = this.headersPrOficial.set('CalendarId', calendar.CalendarId);
this.headersPrOficial = this.headersPrOficial.set('CalendarRoleId', calendar.CalendarRoleId);
}
@@ -197,7 +171,7 @@ export class EventsService {
this.hasOwnPessoal = true
this.headersPrPessoal = this.headersPrPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
this.headersPrPessoal = this.headersPrPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
this.headersPrPessoal = this.headersPrPessoal.set('CalendarId', calendar.CalendarId);
this.headersPrPessoal = this.headersPrPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
@@ -206,7 +180,7 @@ export class EventsService {
}
for (let calendar of this.loggeduser.OwnerCalendars) {
for (let calendar of SessionStore.user.OwnerCalendars) {
this.hasAnyCalendar = false
if(!this.usersCalendarIds.includes(calendar.OwnerUserId)) {
this.usersCalendarIds.push(calendar.OwnerUserId)
@@ -222,7 +196,7 @@ export class EventsService {
this.hasOwnOficial = true
this.headerOwnOficial = this.headerOwnOficial.set('Authorization', this.loggeduser.BasicAuthKey);
this.headerOwnOficial = this.headerOwnOficial.set('Authorization', SessionStore.user.BasicAuthKey);
this.headerOwnOficial = this.headerOwnOficial.set('CalendarId', calendar.CalendarId);
this.headerOwnOficial = this.headerOwnOficial.set('CalendarRoleId', calendar.CalendarRoleId);
this.headerOwnOficial = this.headerOwnOficial.set('CalendarName', calendar.CalendarName);
@@ -231,14 +205,14 @@ export class EventsService {
this.hasOwnPessoal = true
this.headerOwnPessoal = this.headerOwnPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
this.headerOwnPessoal = this.headerOwnPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
this.headerOwnPessoal =this.headerOwnPessoal.set('CalendarId', calendar.CalendarId);
this.headerOwnPessoal =this.headerOwnPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
this.headerOwnPessoal = this.headerOwnPessoal.set('CalendarName', calendar.CalendarName);
}
}
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
this.hasAnyCalendar = false
if(!this.usersCalendarIds.includes(sharedCalendar.OwnerUserId)) {
@@ -254,7 +228,7 @@ export class EventsService {
if (sharedCalendar.CalendarName == 'Oficial') {
this.hasSharedOficial = true
this.headerSharedOficial = this.headerSharedOficial.set('Authorization',this.loggeduser.BasicAuthKey);
this.headerSharedOficial = this.headerSharedOficial.set('Authorization',SessionStore.user.BasicAuthKey);
this.headerSharedOficial = this.headerSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
this.headerSharedOficial = this.headerSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
this.headerSharedOficial = this.headerSharedOficial.set('CalendarName', sharedCalendar.CalendarName);
@@ -263,7 +237,7 @@ export class EventsService {
this.hasSharedPessoal = true
this.headerSharedPessoal = this.headerSharedPessoal.set('Authorization',this.loggeduser.BasicAuthKey);
this.headerSharedPessoal = this.headerSharedPessoal.set('Authorization',SessionStore.user.BasicAuthKey);
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarName', sharedCalendar.CalendarName);
@@ -271,7 +245,7 @@ export class EventsService {
}
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
this.hasAnyCalendar = false
if(sharedCalendar?.OwnerUserId) {
this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> {
@@ -291,7 +265,7 @@ export class EventsService {
}
for (let sharedCalendar of this.loggeduser.OwnerCalendars) {
for (let sharedCalendar of SessionStore.user.OwnerCalendars) {
this.hasAnyCalendar = false
this.calendarNames[sharedCalendar.CalendarId] = 'Meu calendario'
@@ -326,13 +300,13 @@ export class EventsService {
isMyEvent(event: any) {
for (let calendar of this.loggeduser.OwnerCalendars) {
for (let calendar of SessionStore.user.OwnerCalendars) {
if(event.CalendarId == calendar.CalendarId) {
return true
}
}
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
if(event.CalendarId == sharedCalendar.CalendarId) {
return false
}
@@ -438,12 +412,18 @@ export class EventsService {
let prO = [], prP = [];
for (let calendar of this.loggeduser.OwnerCalendars) {
for (let calendar of SessionStore.user.OwnerCalendars) {
if (calendar.CalendarName == 'Oficial') {
prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise();
if(!Array.isArray(prO)) {
prO = []
}
}
if(calendar.CalendarName == 'Pessoal') {
prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise();
if(!Array.isArray(prP)) {
prP = []
}
}
}
@@ -462,10 +442,16 @@ export class EventsService {
if(this.hasOwnOficial) {
ownO = await this.getAllOwnOficialEvents(startdate, enddate).toPromise();
if(!Array.isArray(ownO)) {
ownO = []
}
}
if(this.hasOwnPessoal) {
ownP = await this.getAllOwnPessoalEvents(startdate, enddate).toPromise();
if(!Array.isArray(ownP)) {
ownP = []
}
}
const resFinal = ownO.concat(ownP);
@@ -509,10 +495,10 @@ export class EventsService {
let result = []
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
var header = new HttpHeaders();
header = header.set('Authorization', this.loggeduser.BasicAuthKey);
header = header.set('Authorization', SessionStore.user.BasicAuthKey);
header = header.set('CalendarId', sharedCalendar.CalendarId);
header = header.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
header = header.set('CalendarName', sharedCalendar.CalendarName);
@@ -579,7 +565,7 @@ export class EventsService {
let prO = [], prP = [];
for(let calendar of this.loggeduser.SharedCalendars) {
for(let calendar of SessionStore.user.SharedCalendars) {
if (calendar.CalendarName == 'Oficial') {
prO = await this.getAllSharedOficialEvents(startdate, enddate).toPromise();
}
@@ -596,8 +582,6 @@ export class EventsService {
});
}
getAllSharedOficialEvents(startdate: string, enddate: string): Observable<Event[]> {
let geturl = environment.apiURL + 'calendar/pr';
geturl = geturl.replace('/V4/', '/V5/')
@@ -733,10 +717,10 @@ export class EventsService {
this.headers['CalendarName'] = event.CalendarName
if (event.CalendarName == 'Oficial') {
if (this.loggeduser.Profile == 'MDGPR') {
if (SessionStore.user.Profile == 'MDGPR') {
this.headers = this.headersMdOficial;
}
else if (this.loggeduser.Profile == 'PR') {
else if (SessionStore.user.Profile == 'PR') {
this.headers = this.headersPrOficial;
} else {
@@ -755,10 +739,10 @@ export class EventsService {
}
}
else {
if (this.loggeduser.Profile == 'MDGPR') {
if (SessionStore.user.Profile == 'MDGPR') {
this.headers = this.headersMdPessoal;
}
else if (this.loggeduser.Profile == 'PR') {
else if (SessionStore.user.Profile == 'PR') {
this.headers = this.headersPrPessoal;
}
else {
@@ -904,7 +888,7 @@ export class EventsService {
let options;
switch (this.loggeduser.Profile) {
switch (SessionStore.user.Profile) {
case 'MDGPR':
if (calendarName == 'Pessoal') {
options = {
@@ -962,7 +946,7 @@ export class EventsService {
let options;
if(this.loggeduser.Profile == 'MDGPR') {
if(SessionStore.user.Profile == 'MDGPR') {
if (calendarName == 'Pessoal') {
options = {
headers: this.headersMdPessoal,
@@ -976,7 +960,7 @@ export class EventsService {
};
}
}
else if (this.loggeduser.Profile == 'PR') {
else if (SessionStore.user.Profile == 'PR') {
if (calendarName == 'Pessoal') {
options = {
headers: this.headersPrPessoal,
@@ -1038,7 +1022,7 @@ export class EventsService {
params = params.set("SerialNumber", serialNumber);
params = params.set("applicationID", applicationID);
switch (this.loggeduser.Profile) {
switch (SessionStore.user.Profile) {
case 'MDGPR':
if (body.CalendarName == 'Pessoal') {
options = {
@@ -1109,7 +1093,7 @@ export class EventsService {
params = params.set("SerialNumber", serialNumber);
params = params.set("applicationID", applicationID);
switch (this.loggeduser.Profile) {
switch (SessionStore.user.Profile) {
case 'MDGPR':
if (body.CalendarName == 'Pessoal') {
options = {
-1
View File
@@ -11,7 +11,6 @@ import { SessionStore } from '../store/session.service';
export class FirstEnterService {
constructor(private router:Router,
private platform: Platform,
public p: PermissionService,
private alertController: AlertController) { }
+103 -110
View File
@@ -1,22 +1,17 @@
/* eslint-disable */
/* tslint:disable */
import { Injectable, NgZone } from '@angular/core';
import { ActivatedRoute } from '@angular/router'
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
import { StorageService } from 'src/app/services/storage.service';
import { AuthConnstants } from 'src/app/config/auth-constants';
import { Tokenn } from '../models/token.model';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras, Router } from '@angular/router';
import { ToastService } from '../services/toast.service';
import { BackgroundService } from './background.service';
import { v4 as uuidv4 } from 'uuid';
import { AlertController, Platform } from '@ionic/angular';
import { Router } from '@angular/router';
import { EventTrigger } from '../services/eventTrigger.service';
import { SessionStore } from '../store/session.service';
// import { ActionPerformed, PushNotificationSchema, PushNotifications, Token, } from '@capacitor/push-notifications';
import { IdObject } from '../models/notifications';
/* import { Events } from 'ionic-angular' */
import { ActionPerformed, PushNotificationSchema, PushNotifications, Token, } from '@capacitor/push-notifications';
import { notificationObject } from '../models/notifications';
@Injectable({
providedIn: 'root'
@@ -27,52 +22,59 @@ export class NotificationsService {
folderId: string;
DataArray = new Array();
callbacks: {
type: string,
callbacks: {[key: string]: {
type: notificationObject,
funx: Function
id: string
}[] = []
}} = {}
active = false
constructor(
private http: HttpClient,
private storageService: StorageService,
private modalController: ModalController,
public modalCtrl: AlertController,
private animationController: AnimationController,
private platform: Platform,
private router: Router,
private toastService: ToastService,
private zone: NgZone,
private activeroute: ActivatedRoute,
private eventtrigger: EventTrigger,
private backgroundservice: BackgroundService,
/* private eventTriger: Events, */
/* private fcm: FCM */) {
private eventtrigger: EventTrigger,) {
}
registerCallback(type: IdObject, funx: Function, object: any = {}) {
const id = uuidv4()
this.callbacks.push({ type, funx, id })
if (!object.hasOwnProperty('desktop') && object['desktop'] != false) {
this.backgroundservice.registerBackService('Notification', funx, type)
}
return id;
}
// registerCallback({type, funx, id = uuidv4()} : {
// type: notificationObject,
// funx: Function
// id?: string
// }) {
// this.callbacks[id] = { funx, id, type}
// return id;
// }
deleteCallback(id) {
this.callbacks.forEach((e, index) => {
if (e.id == id) {
if (index > -1) {
this.callbacks.splice(index, 1);
}
}
})
}
// private async runNotificationCallback(notification) {
// for (const [key, value] of Object.entries(this.callbacks)) {
// if(value.type == notification.data.Object) {
// const dontRepeat = await value.funx(notification)
// if(dontRepeat) {
// delete this.callbacks[key]
// }
// } else if (value.type == '*') {
// const dontRepeat = await value.funx(notification)
// if(dontRepeat) {
// delete this.callbacks[key]
// }
// }
// }
// }
getTokenByUserIdAndId(user, userID) {
// const geturl = environment.apiURL + 'notifications/user/' + userID;
@@ -81,14 +83,14 @@ export class NotificationsService {
}
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) {
@@ -96,86 +98,77 @@ export class NotificationsService {
} else {
const geturl = environment.apiURL + 'notifications/token';
// PushNotifications.addListener('registration',
// (token: Token) => {
PushNotifications.addListener('registration',
(token: Token) => {
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const body = {
UserId: SessionStore.user.UserId,
TokenId: token.value,
Status: 1,
Service: 1
};
// this.active = false
// this.storageService.store(username, token.value);
// this.storageService.get(username).then(value => {
// this.storageService.get(AuthConnstants.USER).then(res => {
// const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
// const body = {
// UserId: res.UserId,
// TokenId: token.value,
// Status: 1,
// Service: 1
// };
// this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
// //console.log(data)
// }, (error) => {
// //console.log(error)
// })
// }).catch((error) => {
// console.error('storage authorization', error)
// });;
// }).catch((error) => {
// console.error('storage getAndPostToken', error)
// });
// }
// );
this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
this.active = true
console.log(data)
}, (error) => {
console.log(error)
})
}
);
}
}
registrationError() {
// PushNotifications.addListener('registrationError',
// (error: any) => {
// this.active = false
// }
// );
PushNotifications.addListener('registrationError',
(error: any) => {
this.active = false
}
);
}
onReciveForeground() {
// PushNotifications.addListener('pushNotificationReceived',
// (notification: PushNotificationSchema) => {
// console.log(notification)
// //this.DataArray.push(notification)
// //console.log(this.DataArray)
PushNotifications.addListener('pushNotificationReceived',
(notification: PushNotificationSchema) => {
this.active = true
console.log(notification)
//this.DataArray.push(notification)
//console.log(this.DataArray)
// this.storageService.get("Notifications").then((store) => {
// store.push(notification)
// this.storageService.store("Notifications", store)
// }).catch((error) => {
// if(!error) {
// this.storageService.store("Notifications", [notification])
// }
// })
this.storageService.get("Notifications").then((store) => {
store.push(notification)
this.storageService.store("Notifications", store)
}).catch((error) => {
if(!error) {
this.storageService.store("Notifications", [notification])
}
})
// /* this.eventTriger.publish('notificatioRecive') */
// this.eventtrigger.publishSomeData({
// notification: "recive"
// })
// }
// );
// this.runNotificationCallback(notification)
/* this.eventTriger.publish('notificatioRecive') */
this.eventtrigger.publishSomeData({
notification: "recive"
})
}
);
}
onReciveBackground() {
// PushNotifications.addListener('pushNotificationActionPerformed',
// (notification: ActionPerformed) => {
// console.log(notification)
// /* this.DataArray.push(notification.notification)
PushNotifications.addListener('pushNotificationActionPerformed',
(notification: ActionPerformed) => {
this.active = true
console.log(notification)
/* this.DataArray.push(notification.notification)
// this.storageService.store("Notifications", this.DataArray)
// this.eventtrigger.publishSomeData({
// notification: "recive"
// }) */
// this.notificatinsRoutes(notification)
// }
// );
this.storageService.store("Notifications", this.DataArray)
this.eventtrigger.publishSomeData({
notification: "recive"
}) */
this.notificatinsRoutes(notification)
// this.runNotificationCallback(notification)
}
);
}
tempClearArray(data) {
+13 -1
View File
@@ -7,6 +7,7 @@ import { AuthService } from '../services/auth.service';
import { LoginUserRespose } from '../models/user.model';
import { OrganicEntity } from 'src/app/models/organic-entity.model';
import { SessionStore } from '../store/session.service';
import { ChangeProfileService } from './change-profile.service';
@Injectable({
providedIn: 'root'
@@ -17,7 +18,18 @@ export class OrganicEntityService {
loggeduser: LoginUserRespose;
headers: HttpHeaders;
constructor(private http: HttpClient, user: AuthService) {
constructor(
private http: HttpClient,
user: AuthService,
private changeProfileService: ChangeProfileService) {
this.setHeader()
this.changeProfileService.registerCallback(() => {
this.setHeader()
})
}
setHeader() {
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
+12 -2
View File
@@ -9,6 +9,7 @@ import { Publication } from '../models/publication';
import { getUrl } from 'ionicons/dist/types/components/icon/utils';
import { ActivatedRoute, Router } from '@angular/router';
import { SessionStore } from '../store/session.service';
import { ChangeProfileService } from './change-profile.service';
@Injectable({
providedIn: 'root'
@@ -23,11 +24,20 @@ export class PublicationsService {
constructor(private http: HttpClient, user: AuthService,
private activatedRoute: ActivatedRoute,
private router: Router) {
private router: Router,
private changeProfileService: ChangeProfileService,) {
this.setHeader()
this.changeProfileService.registerCallback(() => {
this.setHeader()
})
}
setHeader () {
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
}
GetPublicationFolderList(){
+41 -1
View File
@@ -8,6 +8,7 @@ import { LoginUserRespose } from '../models/user.model';
import { EventSearch } from "src/app/models/event-search";
import { TopSearch } from 'src/app/models/top-search';
import { SessionStore } from '../store/session.service';
import { ChangeProfileService } from './change-profile.service';
@Injectable({
providedIn: 'root'
@@ -21,7 +22,20 @@ export class SearchService {
categories= Array;
// setup
constructor(private http: HttpClient, user: AuthService) {
constructor(
private http: HttpClient,
user: AuthService,
private changeProfileService: ChangeProfileService) {
this.setHeader();
this.changeProfileService.registerCallback(() => {
this.setHeader()
})
}
setHeader() {
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
@@ -52,6 +66,32 @@ export class SearchService {
return this.http.get<EventSearch>(`${geturl}`, options);
}
basicSearchPublication(subject:string, date:string = null, sender:string = null, organicEntity:string = null, docTypeId:string = null, applicationType:string): Observable<EventSearch>{
// Endpoint
const geturl = environment.apiURL + 'search';
// store params
let params = new HttpParams();
// set https params
params = params.set("assunto", subject);
params = params.set("data", date);
params = params.set("remetente", sender);
params = params.set("entidadeOrganica", organicEntity);
params = params.set("docTypeId", docTypeId);
params = params.set("applicationType", applicationType);
params = params.set("listOnlyFolders", true)
const options = {
headers: this.headers,
params: params
};
return this.http.get<EventSearch>(`${geturl}`, options);
}
mostSeachWord(size:string):Observable<any>{
// Endpoint
@@ -45,7 +45,7 @@ export class EditEventToApprovePage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -41,7 +41,7 @@
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars}}">
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
</mat-option>
</mat-select>
@@ -68,10 +68,12 @@ export class NewEventPage implements OnInit {
recurringTypes = []
selectedRecurringType: any;
@Input() attendees: []
@Input() profile:string;
@Input() roomId:string;
@Input() selectedSegment: string;
@Input() selectedDate: Date;
@Input() CalendarDate: Date;
@Input() taskParticipants: EventPerson[] = [];
@Input() taskParticipantsCc: any = [];
@@ -140,13 +142,13 @@ export class NewEventPage implements OnInit {
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
} else if(this.eventService.calendarNamesAry.length == 1 ) {
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
this.getRecurrenceTypes();
if(!this.restoreTemporaryData()){
if(!this.restoreTemporaryData()) {
// clear
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
@@ -162,7 +164,7 @@ export class NewEventPage implements OnInit {
StartDate: this.autoStartTime,
EndDate: this.autoEndTime,
EventType: 'Reunião',
Attendees: null,
Attendees: this.attendees || null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
@@ -184,7 +186,7 @@ export class NewEventPage implements OnInit {
StartDate: this.autoStartTime,
EndDate: this.autoEndTime,
EventType: 'Reunião',
Attendees: null,
Attendees: this.attendees || null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
@@ -217,11 +219,18 @@ export class NewEventPage implements OnInit {
this.date = new Date(2021,9,4,5,6,7);
this.injectValidation();
this.setDefaultTime();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
setDefaultTime() {
console.log(this.CalendarDate)
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
this.postEvent.EndDate = this.postEvent.StartDate;
}
roundTimeQuarterHour(timeToReturn?) {
var timeToReturn = timeToReturn || new Date();
// var minutes = timeToReturn.getMinutes();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
@@ -259,11 +268,11 @@ export class NewEventPage implements OnInit {
}
setStartDate(){
this.postEvent.StartDate = this.roundTimeQuarterHour();
// this.postEvent.StartDate = this.roundTimeQuarterHour();
}
setEndDate(){
this.postEvent.EndDate = this.postEvent.StartDate;
// this.postEvent.EndDate = this.postEvent.StartDate;
}
runValidation() {
@@ -361,7 +370,7 @@ export class NewEventPage implements OnInit {
}
}
async getDoc(){
async getDoc() {
const modal = await this.modalController.create({
component: SearchPage,
cssClass: 'modal-width-100-width-background modal',
@@ -372,7 +381,7 @@ export class NewEventPage implements OnInit {
}
});
await modal.present();
modal.onDidDismiss().then((res)=>{
modal.onDidDismiss().then((res) => {
if(res){
const data = res.data;
this.documents.push(data.selected);
@@ -496,12 +505,12 @@ export class NewEventPage implements OnInit {
});
await DocumentToSave.forEach((attachments, i) => {
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) =>{
if(DocumentToSave.length == (i+1)){
if(DocumentToSave.length == (i+1)) {
this.afterSave();
}
});
});
if(DocumentToSave.length == 0){
if(DocumentToSave.length == 0) {
this.afterSave();
}
this.toastService._successMessage('Evento criado');
@@ -585,7 +594,6 @@ export class NewEventPage implements OnInit {
this.postEvent.CalendarName
const CalendarId = this.selectedCalendarId()
let loader = this.toastService.loading();
@@ -645,13 +653,15 @@ export class NewEventPage implements OnInit {
selectedCalendarId () {
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.postEvent.CalendarName == 'Oficial') {
console.log('1')
return this.eventService.calendarNamesType[this.CalendarName]['OficialId']
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal'] && this.postEvent.CalendarName == 'Pessoal') {
console.log('2')
return this.eventService.calendarNamesType[this.CalendarName]['PessoalId']
} else {
console.log('1:1',this.eventService.calendarNamesType,'2', this.CalendarName)
return '11:11'
}
}
@@ -59,10 +59,12 @@
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
{{last ? scrollToBottom() : ''}}
@@ -105,11 +107,14 @@
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" >Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()"> Tentar</div>
</ion-label>
</div>
@@ -160,10 +165,12 @@
</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
@@ -265,7 +272,7 @@
<ion-icon name="add"></ion-icon>
</ion-fab-button>
<ion-fab-list side="top">
<ion-fab-button title="Nova Reunião" (click)="bookMeeting()" color="light">
<ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon>
</ion-fab-button>
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
@@ -28,6 +28,7 @@ import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { SessionStore } from 'src/app/store/session.service';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { PermissionService } from 'src/app/services/permission.service';
@Component({
selector: 'app-group-messages',
@@ -103,6 +104,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
private file: File,
private platform: Platform,
private fileOpener: FileOpener,
public p: PermissionService,
) {
this.loggedUserChat = SessionStore.user.ChatData['data'];
+21 -16
View File
@@ -60,11 +60,12 @@
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
{{last ? scrollToBottom() : ''}}
@@ -104,11 +105,13 @@
</div>
<img *ngIf="msg.attachments[0].image_url" src={{msg.attachments[0].image_url}} alt="image">
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
{{ msg.viewed }}
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
@@ -170,11 +173,13 @@
</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
{{ msg.viewed }}
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<span *ngIf="msg.online == true && !msg.manualRetry && msg.viewed == 0" class="enviado"> Enviado</span>
<!-- <ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0 && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon> -->
<!-- <ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon> -->
<span class="lido" *ngIf="msg.viewed.length >= 1" > Lido</span>
<div *ngIf="msg.manualRetry" class="try" (click)="msg.send()">Tentar</div>
</ion-label>
</div>
@@ -248,7 +253,7 @@
<ion-icon name="add"></ion-icon>
</ion-fab-button>
<ion-fab-list side="top">
<ion-fab-button title="Nova Reunião" (click)="bookMeeting()" color="light">
<ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon>
</ion-fab-button>
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
@@ -404,4 +404,9 @@ ion-footer {
}
.red {
color: red !important;
}
.lido, .enviado {
font-size: 11px;
}
@@ -34,6 +34,7 @@ import { SessionStore } from 'src/app/store/session.service';
import { Howl } from 'howler';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { ChatMessageDebuggingPage } from 'src/app/shared/popover/chat-message-debugging/chat-message-debugging.page';
import { PermissionService } from 'src/app/services/permission.service';
const IMAGE_DIR = 'stored-images';
@@ -121,6 +122,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private file: File,
private platform: Platform,
private fileOpener: FileOpener,
public p: PermissionService,
) {
// update
this.checkAudioPermission()
@@ -385,6 +387,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async goToEvent(event: any) {
console.log(event.id)
console.log(event.calendarId)
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
@@ -2,7 +2,7 @@
<ion-toolbar class="px-10">
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
</ion-toolbar>
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
<ion-searchbar #Searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
</ion-header>
@@ -4,6 +4,8 @@ import { ContactsService } from 'src/app/services/contacts.service';
import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { ThemeService } from 'src/app/services/theme.service'
import { ViewChild } from '@angular/core';
import { Searchbar } from 'ionic-angular';
@Component({
selector: 'app-attendee-modal',
@@ -31,6 +33,8 @@ export class AttendeePage implements OnInit {
@Input() footer: boolean;
@ViewChild('Searchbar') searchbar: Searchbar;
LtaskParticipants: EventPerson[] = [];
LtaskParticipantsCc: EventPerson[] = [];
@@ -70,6 +74,7 @@ export class AttendeePage implements OnInit {
this.setIntervenient.emit(removeDuplicate(this.LtaskParticipants));
this.setIntervenientCC.emit(removeDuplicate(this.LtaskParticipantsCc));
this.searchbar.value = null;
this.closeComponent.emit();
}
@@ -87,7 +92,7 @@ export class AttendeePage implements OnInit {
}
async selectContact(itm: EventPerson){
async selectContact(itm: EventPerson) {
if(this.adding == "intervenient") {
@@ -1,5 +1,5 @@
<ion-header class="ion-no-border">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<!-- <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> -->
<div class="title">
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
<div class="theicon">
@@ -61,7 +61,8 @@
<div *ngIf="task.Agenda" class="item-middle-detail-extra">
<div class="item-middle-detail-extra-text">
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial PR' || task.WorkflowName == 'Agenda Pessoal PR'">
Agenda {{task.Agenda}} do Presidente da República
<!-- Agenda {{task.Agenda}} do Presidente da República -->
Agenda {{task.Agenda}} do Titular
</ion-label>
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial MDGPR' || task.WorkflowName == 'Agenda Pessoal MDGPR'">
A sua agenda {{task.Agenda}}
@@ -119,6 +120,4 @@
</div>
</ion-content>
</ion-content>
@@ -20,7 +20,7 @@ import { SessionStore } from 'src/app/store/session.service';
})
export class AllProcessesPage implements OnInit {
skeletonLoader = true;
skeletonLoader = false;
allProcessesList: any[] = [];
loggeduser: LoginUserRespose;
@@ -34,7 +34,8 @@ export class AllProcessesPage implements OnInit {
totalDocumentStore = TotalDocumentStore
deplomasStore = DeplomasStore
AllProcess = []
constructor(
private router: Router,
public ThemeService: ThemeService
@@ -45,10 +46,11 @@ export class AllProcessesPage implements OnInit {
ngOnInit() {
// this.loadAllProcesses();
this.updateAllProcess()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital')) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
if (window.location.pathname.startsWith('/home/gabinete-digital')) {
this.refreshing();
} else {
// this.loadAllProcesses();
@@ -60,25 +62,21 @@ export class AllProcessesPage implements OnInit {
doRefresh() {
setTimeout(() => {
this.updateAllProcess();
}, 1000);
}
refreshing() {
setTimeout(() => {
// this.loadAllProcesses();
this.updateAllProcess();
}, 1000);
}
get AllProcess() {
setTimeout(() => {
this.skeletonLoader = false;
}, 5000);
return this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr)
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list)
updateAllProcess() {
this.AllProcess = this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr).concat(this.despachoStore.list)
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList).concat(this.pendentesstore.list)
}
get getAllProcessCount() {
@@ -47,7 +47,7 @@ export class EditEventToApproveComponent implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
recurringTypes: any;
selectedRecurringType: any;
@@ -364,12 +364,8 @@ export class EditEventToApproveComponent implements OnInit {
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
if(newAttendees.length) {
this.setIntervenient(newAttendees);
}
if(newAttendeesCC) {
this.setIntervenientCC(newAttendeesCC);
}
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
});
+18 -12
View File
@@ -5,28 +5,29 @@
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="div-search">
<div (click)="openSearch()">
<!-- <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-45" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-45" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
<ion-icon *ngIf=" ThemeService.currentTheme == 'default' " class="font-45" src='assets/images/icons-search.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon> -->
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-45" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
</div>
</div>
<div class="div-logo align-center justify-center">
<div class="logo-icon">
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'doneIt'" src="assets/images/theme/doneIt/governoangola_A1.png" alt='logo'/> -->
<img *ngIf="ThemeService.currentTheme == 'doneIt'" src="assets/images/theme/doneIt/governoangola_A1.png" alt='logo'/>
</div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<p class="logo-description-text tp-5" ></p>
<p class="logo-description-text tp-5" >doneIT</p>
<div class="add-line"></div>
<p class="logo-description-text tp-5" >GABINETE DIGITAL</p>
</div>
</div>
<div *ngIf="ThemeService.currentTheme == 'default' " class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<p class="logo-description-text tp-5 color-white" ></p>
<p class="logo-description-text tp-5 color-white" >doneIT</p>
<div class="add-line-white"></div>
<p class="logo-description-text tp-5 color-white" >GABINETE DIGITAL</p>
</div>
@@ -45,9 +46,9 @@
<div class="d-flex justify-space-between align-center">
<div tab="events" class="div-logo height-fit-content">
<div class="logo-icon">
<!-- <img *ngIf="ThemeService.currentTheme == 'default'" src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'default'" src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'> -->
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'>
</div>
<div class="logo-description d-flex align-center justify-content-center">
@@ -55,7 +56,7 @@
<div *ngIf="ThemeService.currentTheme == 'gov' " class="logo-description-content">
<p *ngIf="environment.presidencia" class="logo-description-text">Calendário Partilhado</p>
<p *ngIf="!environment.presidencia" class="logo-description-text" ></p>
<p *ngIf="!environment.presidencia" class="logo-description-text" >doneIT</p>
<div class="add-line"></div>
<p *ngIf="!environment.presidencia" class="logo-description-text" >GABINETE DIGITAL</p>
</div>
@@ -126,18 +127,23 @@
<div *ngIf="showSearch">
<div class="d-flex search-input-container ml-10 justify-between" *ngIf="showSearch">
<div class="icon" (click)="basicSearch()">
<!-- <div class="icon" (click)="basicSearch()">
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
</div>
</div> -->
<div class="input-text d-flex ion-align-items-center">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' (ngModelChange)="dynamicSearch()"
class="search-input text-black" type="search" placeholder="Pesquisar"></ion-input>
</div>
<div class="icon" (click)="clearSearchInput()">
<!-- <div class="icon" (click)="clearSearchInput()">
<ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'doneIt' "name="restaurant-outline" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
<ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> -->
<div (click)="basicSearch()" class="d-flex align-center icon">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</div>
</div>
</div>
@@ -11,7 +11,8 @@
<button (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
<button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Gestão Documental</button>
<div class="solid"></div>
<button (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access]) == true " (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
</div>
@@ -6,6 +6,7 @@ import { NewEventPage } from 'src/app/pages/agenda/new-event/new-event.page';
import { SearchPage } from 'src/app/pages/search/search.page';
import { environment } from 'src/environments/environment';
import { ThemeService } from 'src/app/services/theme.service'
import { PermissionService } from 'src/app/services/permission.service';
@Component({
selector: 'app-chat-options-popover',
@@ -22,7 +23,8 @@ export class ChatOptionsPopoverPage implements OnInit {
private popoverController: PopoverController,
private modalController: ModalController,
private navParams: NavParams,
public ThemeService: ThemeService
public ThemeService: ThemeService,
public p: PermissionService,
) {
this.members = this.navParams.get('members');
@@ -118,22 +120,11 @@ export class ChatOptionsPopoverPage implements OnInit {
async bookMeeting() {
this.popoverController.dismiss();
if( window.innerWidth <= 1024){
const modal = await this.modalController.create({
component: NewEventPage,
componentProps:{
attendees: this.attendees,
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if(data){
}
});
if( window.innerWidth < 701){
this.popoverController.dismiss('meeting');
}
else{
this.modalController.dismiss('meeting');
}
}
@@ -3,7 +3,7 @@
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openExpedientActionsModal('1')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
@@ -15,8 +15,6 @@
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round">Outras opções </button>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<!-- <button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button> -->
</div>
<div class="flex-grow-1">
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
@@ -51,21 +51,11 @@ export class OptsExpedientePage implements OnInit {
private expedienteService: ExpedienteService,
public ThemeService: ThemeService
) {
this.loggeduser = SessionStore.user
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
if(this.task.Status != 'Pending') {
this.showEnviarPendentes = true;
}
}
ngOnInit() {
window.onresize = (event) => {
if( window.innerWidth >= 800){
this.popoverController.dismiss();
}
};
}
async openNewGroupPage(){
@@ -25,7 +25,7 @@ export class EditActionPage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -47,7 +47,7 @@
[(ngModel)]="folder.DateBegin"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -83,7 +83,7 @@
[(ngModel)]="folder.DateEnd"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="picker2"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="picker2" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker2
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -23,7 +23,7 @@ export class NewActionPage implements OnInit {
public touchUi = false;
public enableMeridian = false;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
currentDate = new Date();
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
@@ -134,7 +134,7 @@ export class NewActionPage implements OnInit {
this.getActions.emit()
} catch (error) {
this.toastService._badRequest('Não foi possivel criar a acção presidencial')
} finally {
} finally {
loader.remove()
}
@@ -144,4 +144,45 @@ export class NewActionPage implements OnInit {
this.closeDesktopComponent.emit();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.dateControlStart = new FormControl(moment(this.roundTimeQuarterHour()));
}
setEndDate(){
this.dateControlEnd = this.dateControlStart;
}
}
+22
View File
@@ -10,6 +10,12 @@ export class LocalstoreService {
private prefix = environment.version.lastCommitNumber+"-";
private previewPrefix = 'v17-';
callbacks: {[key: string]: {
path: string,
funx: Function,
id: string
}} = {}
constructor() {
const key = SHA1('version').toString()
@@ -68,6 +74,22 @@ export class LocalstoreService {
localStorage.removeItem(keyName)
}
private async change(changeType: 'set' | 'delete') {
const currentPath = window.location.pathname
for (const [key, value] of Object.entries(this.callbacks)) {
if(currentPath.startsWith(value.path)) {}
const dontRepeat = await value.funx({event:{type: changeType}})
if(dontRepeat) {
delete this.callbacks[key]
}
}
}
listener() {}
}
export const localstoreService = new LocalstoreService()
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon s-ion-icon" viewBox="0 0 512 512"><title>Search</title><path d="M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"></path></svg>

After

Width:  |  Height:  |  Size: 408 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon s-ion-icon" viewBox="0 0 512 512"><title>Search</title><path d="M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"></path></svg>

After

Width:  |  Height:  |  Size: 408 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon s-ion-icon" viewBox="0 0 512 512"><title>Search</title><path d="M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"></path></svg>

After

Width:  |  Height:  |  Size: 408 B

+6 -4
View File
@@ -1,19 +1,21 @@
import { versionData } from '../../version/git-version'
export const environment = {
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
apiURL: 'https://API.DONEIT.CO.AO/api/',
//apiURL: 'https://gd-api.oapr.gov.ao/api/',
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
// apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
/* apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', */
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
// apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
production: true,
domain: 'evandre.dasilva@equilibrium.co.ao',
domain: 'equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao',//paulo.pinto@gabinetedigital.local
defaultuserpwd: 'Luand@1219', //tabteste@006,06,
chatOffline: true,
+6 -4
View File
@@ -11,10 +11,12 @@ export const environment = {
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
apiChatUrl: 'https://CHAT.DONEIT.CO.AO/api/v1/',
apiWsChatUrl: 'wss://CHAT.DONEIT.CO.AO/websocket',
production: true,
domain: 'evandre.dasilva@equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao',//paulo.pinto@gabinetedigital.local
defaultuserpwd: 'Luand@1219', //tabteste@006,
/* apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', */
production: false,
domain: 'equilibrium.co.ao',
defaultuser: 'evandre.dasilva@equilibrium.co.ao',//evandre.dasilva@equilibrium.co.ao
defaultuserpwd: 'Luand@1219', //Luand@1219,
chatOffline: true,
presidencia: false,
version: versionData,
+8
View File
@@ -1419,3 +1419,11 @@ $font-size: 11pt;
}
.mat-form-field {
width: 100%;
}
ngx-mat-datetime-content button.mat-stroked-button {
top: -56px;
margin-bottom: -35px;
}
+1 -1
View File
@@ -56,7 +56,7 @@
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<!-- <link rel="icon" type="image/x-icon" href="assets/icon/governoangola_A.png" /> -->
<link rel="icon" type="image/x-icon" href="assets/icon/governoangola_A.png" />
<!-- <link rel="manifest" href="assets/json/manifest.json"> -->
<!-- add to homescreen for ios -->
-7
View File
@@ -8,13 +8,6 @@ import { defineCustomElements } from '@ionic/pwa-elements/loader';
import "hammerjs"; // HAMMER TIME
/* import * as Sentry from '@sentry/capacitor';
// The example is using Angular, Import '@sentry/vue' or '@sentry/react' when using a Sibling different than Angular.
import * as SentrySibling from '@sentry/angular';
// For automatic instrumentation (highly recommended)
import { Integration } from '@sentry/types';
import { BrowserTracing } from '@sentry/tracing'; */
if (environment.production) {
enableProdMode();
}
+5
View File
@@ -0,0 +1,5 @@
import { DatabaseSchema, TableSchema } from '../models/register-modal.interface.js';
import { actionParam, dbType } from './intreface.js';
export declare class DBSwitch {
static requestHandler(TableSchema: TableSchema, DBconfig: DatabaseSchema, dbType: dbType, action: actionParam, arg: any, queryId: any): Promise<any>;
}
+29
View File
@@ -0,0 +1,29 @@
import { indexedDB } from './indexedDb/indexedb.js';
import { IndexedDBWorkerQueue } from './worker.queue.js';
export class DBSwitch {
static async requestHandler(TableSchema, DBconfig, dbType, action, arg, queryId) {
if (typeof (Worker) !== "undefined" && IndexedDBWorkerQueue.webWorkerModuleSupport) {
//great, your browser supports web workers
return new Promise(async (resolve, reject) => {
const request = IndexedDBWorkerQueue.register({
params: { TableSchema, DBconfig, queryId, action, arg, dbType },
method: 'execute',
func: (message) => {
if (message.queryId == queryId) {
resolve(message === null || message === void 0 ? void 0 : message.value);
return true;
}
},
});
if (request == false) {
const result = await indexedDB.requestHandler(TableSchema, DBconfig, queryId)[action](arg);
resolve(result === null || result === void 0 ? void 0 : result.value);
}
});
}
else {
const result = await indexedDB.requestHandler(TableSchema, DBconfig, queryId)[action](arg);
return result === null || result === void 0 ? void 0 : result.value;
}
}
}
+7
View File
@@ -0,0 +1,7 @@
import { DatabaseSchema } from '../../models/register-modal.interface.js';
export declare class IndexedDBConnection {
constructor();
connect(config: DatabaseSchema): Promise<IDBDatabase>;
migrate(config: DatabaseSchema): Promise<boolean>;
private runMigrations;
}
@@ -0,0 +1,57 @@
// inspire by https://github.com/hc-oss/use-indexeddb
export class IndexedDBConnection {
constructor() { }
connect(config) {
return new Promise((resolve, reject) => {
const idbInstance = indexedDB || self.indexedDB || self.mozIndexedDB || self.webkitIndexedDB || self.msIndexedDB;
if (idbInstance) {
const request = idbInstance.open(config.databaseName, config.version);
request.onsuccess = () => {
resolve(request.result);
};
request.onerror = (e) => {
reject(e.target.error.name);
};
request.onupgradeneeded = async (e) => {
throw ('need to migrate first');
};
}
else {
reject("IDBDatabase not supported inside webworker");
}
});
}
migrate(config) {
return new Promise((resolve, reject) => {
const idbInstance = indexedDB || self.indexedDB || self.mozIndexedDB || self.webkitIndexedDB || self.msIndexedDB;
if (idbInstance) {
const request = idbInstance.open(config.databaseName, config.version);
request.onsuccess = () => {
resolve(false);
};
request.onerror = (e) => {
reject(e.target.error.name);
};
request.onupgradeneeded = async (e) => {
const db = e.target.result;
await this.runMigrations(db, config);
db.close();
resolve(true);
};
}
else {
reject("Failed to connect");
}
});
}
async runMigrations(db, config) {
await config.stores.forEach(async (storeSchema) => {
if (!db.objectStoreNames.contains(storeSchema.name)) {
const ObjectStore = db.createObjectStore(storeSchema.name, storeSchema.id);
storeSchema.fields.forEach(c => {
ObjectStore.createIndex(c.name, c.keyPath, c.options);
});
}
});
}
}
@@ -0,0 +1,3 @@
export declare class IndexedDBConnectionDynamicChange {
changeSchema(db: any, schemaChanges: any): void;
}
@@ -0,0 +1,31 @@
import { IndexedDBConnection } from './connector';
export class IndexedDBConnectionDynamicChange {
changeSchema(db, schemaChanges) {
db.close();
const newDb = new IndexedDBConnection().connect({
databaseName: 'databaseName',
type: 'indexedDB',
version: 0
});
// newDb.on('blocked', () => false); // Silence console warning of blocked event.
// Workaround: If DB is empty from tables, it needs to be recreated
// if (db.tables.length === 0) {
// await db.delete();
// newDb.version(1).stores(schemaChanges);
// return await newDb.open();
//}
// Extract current schema in dexie format:
const currentSchema = db.tables.reduce((result, { name, schema }) => {
result[name] = [schema.primKey.src, ...schema.indexes.map((idx) => idx.src)].join(',');
return result;
}, {});
// console.log('Version: ' + db.verno);
// console.log('Current Schema: ', currentSchema);
// Tell Dexie about current schema:
// newDb.version(db.verno).stores(currentSchema);
// Tell Dexie about next schema:
// newDb.version(db.verno + 1).stores(schemaChanges);
// Upgrade it:
// return await newDb.open();
}
}
+39
View File
@@ -0,0 +1,39 @@
import { DatabaseSchema, TableSchema } from "../../models/register-modal.interface.js";
import { Method } from "../../models/model.interface.js";
declare class _indexedDB {
private validateStore;
private validateBeforeTransaction;
private createTransaction;
migrate(config: DatabaseSchema): Promise<boolean>;
getConnection(config: DatabaseSchema): Promise<IDBDatabase>;
getActions: (currentStore: any, config: any) => {
getByID: (id: string | number) => Promise<any>;
getOneByIndex: (keyPath: string, value: string | number) => Promise<any>;
getManyByIndex: (keyPath: string, value: string | number) => Promise<any[]>;
getAll: () => Promise<any[]>;
add: (value: Object, key?: any) => Promise<number>;
update: (value: any, key?: any) => Promise<any>;
deleteByID: (id: any) => Promise<any>;
deleteAll: () => Promise<any>;
openCursor: (cursorCallback: any, keyRange?: IDBKeyRange) => Promise<void | IDBCursorWithValue>;
};
requestHandler: (TableSchema: TableSchema, config: DatabaseSchema, queryId: any) => {
select: (methods: Method[]) => Promise<unknown>;
update: (methods: Method[]) => Promise<{
queryId: any;
}>;
delete: (methods: Method[]) => Promise<{
queryId: any;
value?: undefined;
} | {
queryId: any;
value: any;
}>;
insert: (methods: Method[]) => Promise<{
queryId: any;
value: any;
}>;
};
}
export declare const indexedDB: _indexedDB;
export {};
@@ -0,0 +1,366 @@
import { IndexedDBConnection } from "./connector.js";
import { SqlObject } from "../../sql/sqlObject/sqlObject.js";
// inspire by https://github.com/hc-oss/use-indexeddb
class _indexedDB {
constructor() {
this.getActions = (currentStore, config) => {
return {
getByID: (id) => {
return new Promise((resolve, reject) => {
this.getConnection(config)
.then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readonly", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let request = objectStore.get(id);
request.onsuccess = (e) => {
resolve(e.target.result);
};
})
.catch(reject);
});
},
getOneByIndex: (keyPath, value) => {
return new Promise((resolve, reject) => {
this.getConnection(config)
.then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readonly", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let index = objectStore.index(keyPath);
let request = index.get(value);
request.onsuccess = (e) => {
resolve(e.target.result);
};
})
.catch(reject);
});
},
getManyByIndex: (keyPath, value) => {
return new Promise((resolve, reject) => {
this.getConnection(config)
.then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readonly", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let index = objectStore.index(keyPath);
let request = index.getAll(value);
request.onsuccess = (e) => {
resolve(e.target.result);
};
})
.catch(reject);
});
},
getAll: () => {
return new Promise((resolve, reject) => {
this.getConnection(config).then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readonly", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let request = objectStore.getAll();
request.onsuccess = (e) => {
resolve(e.target.result);
};
})
.catch(reject);
});
},
add: (value, key) => {
return new Promise((resolve, reject) => {
this.getConnection(config).then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readwrite", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let request = objectStore.add(value, key);
request.onsuccess = (e) => {
var _a, _b;
(_b = (_a = tx) === null || _a === void 0 ? void 0 : _a.commit) === null || _b === void 0 ? void 0 : _b.call(_a);
resolve(e.target.result);
};
})
.catch(reject);
});
},
update: (value, key) => {
return new Promise((resolve, reject) => {
this.getConnection(config).then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readwrite", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let request = objectStore.put(value, key);
request.onsuccess = (e) => {
var _a, _b;
(_b = (_a = tx) === null || _a === void 0 ? void 0 : _a.commit) === null || _b === void 0 ? void 0 : _b.call(_a);
resolve(e.target.result);
};
request.onerror = (e) => {
console.log(value, key)
console.log(e)
}
})
.catch(reject);
});
},
deleteByID: (id) => {
return new Promise((resolve, reject) => {
this.getConnection(config).then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readwrite", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let request = objectStore.delete(id);
request.onsuccess = (e) => {
var _a, _b;
(_b = (_a = tx) === null || _a === void 0 ? void 0 : _a.commit) === null || _b === void 0 ? void 0 : _b.call(_a);
resolve(e);
};
})
.catch(reject);
});
},
deleteAll: () => {
return new Promise((resolve, reject) => {
this.getConnection(config)
.then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readwrite", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
objectStore.clear();
tx.oncomplete = (e) => {
var _a, _b;
try {
(_b = (_a = tx) === null || _a === void 0 ? void 0 : _a.commit) === null || _b === void 0 ? void 0 : _b.call(_a);
resolve(e);
}
catch (error) {
resolve(e);
}
};
})
.catch(reject);
});
},
openCursor: (cursorCallback, keyRange) => {
return new Promise((resolve, reject) => {
this.getConnection(config)
.then(db => {
this.validateBeforeTransaction(db, currentStore, reject);
let tx = this.createTransaction(db, "readonly", currentStore, resolve, reject);
let objectStore = tx.objectStore(currentStore);
let request = objectStore.openCursor(keyRange);
request.onsuccess = e => {
cursorCallback(e);
resolve();
};
})
.catch(reject);
});
},
};
};
this.requestHandler = (TableSchema, config, queryId) => {
return {
select: async (methods) => {
if (methods[0].methodName == 'all') {
return {
queryId: queryId,
value: await this.getActions(TableSchema.name, config).getAll()
};
}
else if (methods[0].methodName == 'get') {
const args = methods[0].arguments;
if (Object.keys(args).length == 1) {
const key = Object.keys(args)[0];
const value = args[key];
if (TableSchema.id.keyPath == key) {
return {
queryId: queryId,
value: await this.getActions(TableSchema.name, config).getByID(value)
};
}
else {
return {
queryId: queryId,
value: await this.getActions(TableSchema.name, config).getOneByIndex(key, value)
};
}
}
}
else if (methods[methods.length - 1].methodName == 'execute') {
return new Promise(async (resolve, reject) => {
const sqlObject = new SqlObject(TableSchema, methods);
await this.getActions(TableSchema.name, config).openCursor(async (event) => {
var cursor = event.target.result;
if (cursor) {
const row = cursor.value;
await sqlObject.runFirstMethod(row);
cursor.continue();
}
else {
sqlObject.doneRunFirstMethod();
sqlObject.run();
resolve({
queryId: queryId,
value: sqlObject.firstMethod.rows
});
}
});
});
}
else if (methods[methods.length - 1].methodName == 'first') {
return new Promise(async (resolve, reject) => {
const sqlObject = new SqlObject(TableSchema, methods);
await this.getActions(TableSchema.name, config).openCursor(async (event) => {
var cursor = event.target.result;
if (cursor) {
const row = cursor.value;
await sqlObject.runFirstMethod(row, resolve, 1);
cursor.continue();
}
else {
sqlObject.doneRunFirstMethod();
sqlObject.run();
resolve({
queryId: queryId,
value: sqlObject.firstMethod.rows
});
}
});
});
}
},
update: async (methods) => {
if (methods[0].methodName == 'save') {
const args = methods[0].arguments;
const idFieldName = TableSchema.id.keyPath;
const idValue = args[idFieldName];
if (idValue) {
await this.getActions(TableSchema.name, config).update(args);
}
else {
await this.getActions(TableSchema.name, config).update(args, idValue);
}
return {
queryId
};
}
else if (methods[0].methodName != 'update' && methods[methods.length - 1].methodName == 'update') {
const argsToUpdate = methods[methods.length - 1].arguments;
const customMethods = Object.create(methods);
customMethods[methods.length - 1].methodName = 'execute';
const result = await this.requestHandler(TableSchema, config, queryId).select(customMethods);
const rows = result.value;
for (let row of rows) {
const updateRow = Object.assign(row, argsToUpdate);
await this.getActions(TableSchema.name, config).update(updateRow);
}
return {
queryId
};
}
else if (methods[0].methodName == 'update') {
const argsToUpdate = methods[0].arguments;
const idFieldName = TableSchema.id.keyPath;
//await this.getActions(TableSchema.name, config).update(argsToUpdate)
const idValue = argsToUpdate[idFieldName];
if (idValue) {
await this.getActions(TableSchema.name, config).update(argsToUpdate);
}
else {
await this.getActions(TableSchema.name, config).update(argsToUpdate, idValue);
}
return {
queryId
};
}
},
delete: async (methods) => {
if (methods[methods.length - 1].methodName == 'delete' &&
methods[methods.length - 1].arguments == null) {
const customMethods = Object.create(methods);
customMethods[methods.length - 1].methodName = 'execute';
const result = await this.requestHandler(TableSchema, config, queryId).select(customMethods);
const rows = result.value;
for (let row of rows) {
const id = row[TableSchema.id.keyPath];
await this.getActions(TableSchema.name, config).deleteByID(id);
}
return {
queryId
};
}
else if (methods[methods.length - 1].methodName == 'delete' &&
typeof methods[methods.length - 1].arguments == 'object') {
const IdInObject = methods[methods.length - 1].arguments;
const idValue = IdInObject[TableSchema.id.keyPath];
const result = await this.getActions(TableSchema.name, config).deleteByID(idValue)
console.log('delete7', IdInObject,idValue, result.type == 'success', result.type)
return {
queryId: queryId,
value: result.type == 'success'
};
}
else if (methods[methods.length - 1].methodName == 'delete' &&
methods[methods.length - 1].arguments == '*') {
return {
queryId: queryId,
value: await this.getActions(TableSchema.name, config).deleteAll()
};
} else {
console.log('delete else')
}
},
insert: async (methods) => {
const createdObjKeys = [];
const rows = methods[0].arguments;
for (let insert of rows) {
const id = await this.getActions(TableSchema.name, config).add(insert);
createdObjKeys.push(id);
}
// return first element
if (rows.length == 1) {
return {
queryId: queryId,
value: await this.getActions(TableSchema.name, config).getByID(createdObjKeys[0])
};
}
else {
return {
queryId: queryId,
value: createdObjKeys
};
}
}
};
};
}
validateStore(db, storeName) {
return db.objectStoreNames.contains(storeName);
}
validateBeforeTransaction(db, storeName, reject) {
if (!db) {
reject("Queried before opening connection");
}
if (!this.validateStore(db, storeName)) {
reject(`Store ${storeName} not found`);
}
}
createTransaction(db, dbMode, currentStore, resolve, reject, abort) {
let tx = db.transaction(currentStore, dbMode);
tx.onerror = reject;
tx.oncomplete = resolve;
tx.onabort = abort;
return tx;
}
migrate(config) {
return new IndexedDBConnection().migrate(config);
}
getConnection(config) {
return new IndexedDBConnection().connect(config);
}
}
export const indexedDB = new _indexedDB();
+2
View File
@@ -0,0 +1,2 @@
export declare type actionParam = 'insert' | 'update' | 'delete' | 'select';
export declare type dbType = 'indexedDB';
+1
View File
@@ -0,0 +1 @@
export {};

Some files were not shown because too many files have changed in this diff Show More