mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge with branchBug
This commit is contained in:
+2
-1
@@ -84,7 +84,8 @@
|
|||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "app:build"
|
"browserTarget": "app:build",
|
||||||
|
"proxyConfig": "src/proxy.conf.json"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
|
|||||||
+11
-1
@@ -3,5 +3,15 @@
|
|||||||
"integrations": {
|
"integrations": {
|
||||||
"cordova": {}
|
"cordova": {}
|
||||||
},
|
},
|
||||||
"type": "angular"
|
"type": "angular",
|
||||||
|
"proxies":[
|
||||||
|
{
|
||||||
|
"path": "/mfp/api/imfpush/",
|
||||||
|
"proxyUrl": "http://gpr-dev-10.gabinetedigital.local:9080/mfp/api/imfpush/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/mfp/api",
|
||||||
|
"proxyUrl": "http://gpr-dev-10.gabinetedigital.local:9080/mfp/api"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+175
-444
@@ -765,9 +765,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"make-fetch-happen": {
|
"make-fetch-happen": {
|
||||||
"version": "9.0.4",
|
"version": "9.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz",
|
||||||
"integrity": "sha512-sQWNKMYqSmbAGXqJg2jZ+PmHh5JAybvwu0xM8mZR/bsTjGiTASj3ldXJV7KFHy1k/IJIBkjxQFoWIVsv9+PQMg==",
|
"integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"agentkeepalive": "^4.1.3",
|
"agentkeepalive": "^4.1.3",
|
||||||
@@ -784,16 +784,17 @@
|
|||||||
"minipass-pipeline": "^1.2.4",
|
"minipass-pipeline": "^1.2.4",
|
||||||
"negotiator": "^0.6.2",
|
"negotiator": "^0.6.2",
|
||||||
"promise-retry": "^2.0.1",
|
"promise-retry": "^2.0.1",
|
||||||
"socks-proxy-agent": "^5.0.0",
|
"socks-proxy-agent": "^6.0.0",
|
||||||
"ssri": "^8.0.0"
|
"ssri": "^8.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cacache": {
|
"cacache": {
|
||||||
"version": "15.2.0",
|
"version": "15.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/cacache/-/cacache-15.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz",
|
||||||
"integrity": "sha512-uKoJSHmnrqXgthDFx/IU6ED/5xd+NNGe+Bb+kLZy7Ku4P+BaiWEUflAKPZ7eAzsYGcsAGASJZsybXp+quEcHTw==",
|
"integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@npmcli/fs": "^1.0.0",
|
||||||
"@npmcli/move-file": "^1.0.1",
|
"@npmcli/move-file": "^1.0.1",
|
||||||
"chownr": "^2.0.0",
|
"chownr": "^2.0.0",
|
||||||
"fs-minipass": "^2.0.0",
|
"fs-minipass": "^2.0.0",
|
||||||
@@ -901,9 +902,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"read-package-json-fast": {
|
"read-package-json-fast": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz",
|
||||||
"integrity": "sha512-5fyFUyO9B799foVk4n6ylcoAktG/FbE3jwRKxvwaeSrIunaoMc0u81dzXxjeAFKOce7O5KncdfwpGvvs6r5PsQ==",
|
"integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"json-parse-even-better-errors": "^2.3.0",
|
"json-parse-even-better-errors": "^2.3.0",
|
||||||
@@ -919,6 +920,27 @@
|
|||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"socks": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ip": "^1.1.5",
|
||||||
|
"smart-buffer": "^4.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"socks-proxy-agent": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-FIgZbQWlnjVEQvMkylz64/rUggGtrKstPnx8OZyYFG0tAFR8CSBtpXxSwbFLHyeXFn/cunFL7MpuSOvDSOPo9g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"agent-base": "^6.0.2",
|
||||||
|
"debug": "^4.3.1",
|
||||||
|
"socks": "^2.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"uuid": {
|
"uuid": {
|
||||||
"version": "8.3.2",
|
"version": "8.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||||
@@ -4509,6 +4531,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@gar/promisify": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@hapi/hoek": {
|
"@hapi/hoek": {
|
||||||
"version": "9.2.0",
|
"version": "9.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz",
|
||||||
@@ -4546,11 +4574,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic-native/file": {
|
"@ionic-native/file": {
|
||||||
"version": "5.31.1",
|
"version": "5.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic-native/file/-/file-5.31.1.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic-native/file/-/file-5.36.0.tgz",
|
||||||
"integrity": "sha512-VWLpI6T/VeqbqIoiGg4Gr380fmEf1RXe0yzq7t9DDwXhpvsyG8uT+T4/BYSxhGalNE0lH2I0nvhKx/YfVuWIOA==",
|
"integrity": "sha512-x7yZ4VdC8n8FNlpRmUFtohNlOZnExvoxZ/6oCvGsV+ec8TJXUsDK/BYi1g+lkPTCUY3EmQIeBOe4PLO6fRJ7qg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/cordova": "^0.0.34"
|
"@types/cordova": "^0.0.34"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/cordova": {
|
||||||
|
"version": "0.0.34",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
|
||||||
|
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic-native/file-path": {
|
"@ionic-native/file-path": {
|
||||||
@@ -4602,6 +4637,21 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@ionic-native/local-notifications/-/local-notifications-4.20.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic-native/local-notifications/-/local-notifications-4.20.0.tgz",
|
||||||
"integrity": "sha512-Ht/0zau8/2+G/bH/okXXhhWB6YrkCNL2QxVJHQ2dophXFGxQPOZAN3CKWhuQSjfbr76fa2nvQXF6jsXLpIR/ng=="
|
"integrity": "sha512-Ht/0zau8/2+G/bH/okXXhhWB6YrkCNL2QxVJHQ2dophXFGxQPOZAN3CKWhuQSjfbr76fa2nvQXF6jsXLpIR/ng=="
|
||||||
},
|
},
|
||||||
|
"@ionic-native/media": {
|
||||||
|
"version": "5.36.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ionic-native/media/-/media-5.36.0.tgz",
|
||||||
|
"integrity": "sha512-WIDCeUlX7bCbse/x2Rr7mAIQJnLo18ZWcmsVgSTTBVS7ObU2DBl4ieqRx6y9PAAV+3tNZqMV4JAWDfMiFokpJg==",
|
||||||
|
"requires": {
|
||||||
|
"@types/cordova": "^0.0.34"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/cordova": {
|
||||||
|
"version": "0.0.34",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
|
||||||
|
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@ionic-native/network": {
|
"@ionic-native/network": {
|
||||||
"version": "5.35.0",
|
"version": "5.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic-native/network/-/network-5.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic-native/network/-/network-5.35.0.tgz",
|
||||||
@@ -4641,11 +4691,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic-native/sqlite": {
|
"@ionic-native/sqlite": {
|
||||||
"version": "5.31.1",
|
"version": "5.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic-native/sqlite/-/sqlite-5.31.1.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic-native/sqlite/-/sqlite-5.36.0.tgz",
|
||||||
"integrity": "sha512-X26n+6mvqyv94ADG67lHOmDj/Ha+ZVbHztwsWzbvBqmnmgck9y+mo8ndC47UKIXRA/8lwoGMyAtJAfE81eT3mg==",
|
"integrity": "sha512-+1nXUqBucwG6MYoEvqKlZecvI3xVGWeKIzdZf8Nc4vQx4JFDUYdluiEw3mfzptCC1S/4l6skBsL8eZLFfpzUKA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/cordova": "^0.0.34"
|
"@types/cordova": "^0.0.34"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/cordova": {
|
||||||
|
"version": "0.0.34",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
|
||||||
|
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic-native/sqlite-porter": {
|
"@ionic-native/sqlite-porter": {
|
||||||
@@ -4673,11 +4730,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/angular": {
|
"@ionic/angular": {
|
||||||
"version": "5.5.4",
|
"version": "5.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-5.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-5.7.0.tgz",
|
||||||
"integrity": "sha512-Iavv1rvOXNgVpYjy/HVKiPMO0SRx4a8Dwpn9/HHVsxrIbBX+Jr1Fo0UvCTyXOeWBCd6rkKTW1ro5zcWonuv8nw==",
|
"integrity": "sha512-oJLpHYRevSmih7IuBVm/VoCHkl8H5V24ZFaPT2XdqixyxcnwmoeQ10ew/Ha0UjgUv8q6T8t5I5c/LUqgwGypjQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ionic/core": "5.5.4",
|
"@ionic/core": "5.7.0",
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -4689,12 +4746,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/angular-toolkit": {
|
"@ionic/angular-toolkit": {
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/angular-toolkit/-/angular-toolkit-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/angular-toolkit/-/angular-toolkit-4.0.0.tgz",
|
||||||
"integrity": "sha512-qaNSFouUVM4TaGwiZMQNft13dFUkZpg2m/rKGVdBoajvTowXSM2sHUNoyzerDqjKZZdeD7mSn8J8bL40mUtyFQ==",
|
"integrity": "sha512-HGRAGUtc1YSwNZ/Q7X7c2QRyYM2AfsSm++OasPrMo3LnPRVr8OIsUih2ithEU7f3CXrViUR7j/Anu90zGsRgzg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@schematics/angular": "^11.1.0",
|
"@schematics/angular": "^12.0.0",
|
||||||
"cheerio": "1.0.0-rc.3",
|
"cheerio": "1.0.0-rc.3",
|
||||||
"colorette": "1.1.0",
|
"colorette": "1.1.0",
|
||||||
"copy-webpack-plugin": "^6.2.1",
|
"copy-webpack-plugin": "^6.2.1",
|
||||||
@@ -4703,40 +4760,11 @@
|
|||||||
"ws": "^7.0.1"
|
"ws": "^7.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": {
|
"@types/json-schema": {
|
||||||
"version": "11.2.1",
|
"version": "7.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-11.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
|
||||||
"integrity": "sha512-CPFQn+NNC4x28X/STwmwmWge127iY9dsKuXeIV8OCSTOQiY4odOTYigP19AglXyK4e9DG/0JKxej/3CeUYx6Tg==",
|
"integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"ajv": "6.12.6",
|
|
||||||
"fast-json-stable-stringify": "2.1.0",
|
|
||||||
"magic-string": "0.25.7",
|
|
||||||
"rxjs": "6.6.3",
|
|
||||||
"source-map": "0.7.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@angular-devkit/schematics": {
|
|
||||||
"version": "11.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-11.2.1.tgz",
|
|
||||||
"integrity": "sha512-y2tzJq+MMwLdQ6Li+AxjozI51miN5CjK9x9jtFHi+njqJr595WTNQi39RjyHxAue1VFMr8gu1VBnKGKJ1J3vNA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@angular-devkit/core": "11.2.1",
|
|
||||||
"ora": "5.3.0",
|
|
||||||
"rxjs": "6.6.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@schematics/angular": {
|
|
||||||
"version": "11.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-11.2.1.tgz",
|
|
||||||
"integrity": "sha512-CnN4bkRwhCp7jc4HGJ9qp/xqLwmnkn/zRf/EEb5tHFC0Bz2WvoNuAoqPRSkgIis3L+Ozahmeb8JxTIdazK1Hog==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@angular-devkit/core": "11.2.1",
|
|
||||||
"@angular-devkit/schematics": "11.2.1",
|
|
||||||
"jsonc-parser": "3.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "6.12.6",
|
"version": "6.12.6",
|
||||||
@@ -4750,92 +4778,6 @@
|
|||||||
"uri-js": "^4.2.2"
|
"uri-js": "^4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"ansi-styles": {
|
|
||||||
"version": "4.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
|
||||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"color-convert": "^2.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cacache": {
|
|
||||||
"version": "15.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz",
|
|
||||||
"integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@npmcli/move-file": "^1.0.1",
|
|
||||||
"chownr": "^2.0.0",
|
|
||||||
"fs-minipass": "^2.0.0",
|
|
||||||
"glob": "^7.1.4",
|
|
||||||
"infer-owner": "^1.0.4",
|
|
||||||
"lru-cache": "^6.0.0",
|
|
||||||
"minipass": "^3.1.1",
|
|
||||||
"minipass-collect": "^1.0.2",
|
|
||||||
"minipass-flush": "^1.0.5",
|
|
||||||
"minipass-pipeline": "^1.2.2",
|
|
||||||
"mkdirp": "^1.0.3",
|
|
||||||
"p-map": "^4.0.0",
|
|
||||||
"promise-inflight": "^1.0.1",
|
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"ssri": "^8.0.0",
|
|
||||||
"tar": "^6.0.2",
|
|
||||||
"unique-filename": "^1.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chalk": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chownr": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"cli-cursor": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"restore-cursor": "^3.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cli-spinners": {
|
|
||||||
"version": "2.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz",
|
|
||||||
"integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"color-convert": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"color-name": "~1.1.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"color-name": {
|
|
||||||
"version": "1.1.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
|
||||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"colorette": {
|
"colorette": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.1.0.tgz",
|
||||||
@@ -4859,63 +4801,6 @@
|
|||||||
"schema-utils": "^3.0.0",
|
"schema-utils": "^3.0.0",
|
||||||
"serialize-javascript": "^5.0.1",
|
"serialize-javascript": "^5.0.1",
|
||||||
"webpack-sources": "^1.4.3"
|
"webpack-sources": "^1.4.3"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"glob-parent": {
|
|
||||||
"version": "5.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
|
||||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-glob": "^4.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"has-flag": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"log-symbols": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"chalk": "^4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mimic-fn": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"onetime": {
|
|
||||||
"version": "5.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
|
|
||||||
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"mimic-fn": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ora": {
|
|
||||||
"version": "5.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz",
|
|
||||||
"integrity": "sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"bl": "^4.0.3",
|
|
||||||
"chalk": "^4.1.0",
|
|
||||||
"cli-cursor": "^3.1.0",
|
|
||||||
"cli-spinners": "^2.5.0",
|
|
||||||
"is-interactive": "^1.0.0",
|
|
||||||
"log-symbols": "^4.0.0",
|
|
||||||
"strip-ansi": "^6.0.0",
|
|
||||||
"wcwidth": "^1.0.1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"p-limit": {
|
"p-limit": {
|
||||||
@@ -4927,91 +4812,16 @@
|
|||||||
"yocto-queue": "^0.1.0"
|
"yocto-queue": "^0.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"p-map": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"aggregate-error": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"restore-cursor": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"onetime": "^5.1.0",
|
|
||||||
"signal-exit": "^3.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rxjs": {
|
|
||||||
"version": "6.6.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz",
|
|
||||||
"integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"tslib": "^1.9.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema-utils": {
|
"schema-utils": {
|
||||||
"version": "3.0.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||||
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==",
|
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.6",
|
"@types/json-schema": "^7.0.8",
|
||||||
"ajv": "^6.12.5",
|
"ajv": "^6.12.5",
|
||||||
"ajv-keywords": "^3.5.2"
|
"ajv-keywords": "^3.5.2"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"serialize-javascript": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"randombytes": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strip-ansi": {
|
|
||||||
"version": "6.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
|
||||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-regex": "^5.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"supports-color": {
|
|
||||||
"version": "7.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
|
||||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"has-flag": "^4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tapable": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz",
|
|
||||||
"integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"tslib": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
|
|
||||||
"dev": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -5210,19 +5020,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/core": {
|
"@ionic/core": {
|
||||||
"version": "5.5.4",
|
"version": "5.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.7.0.tgz",
|
||||||
"integrity": "sha512-IjbGN8vh3XuJ2ulo3BMlMflcWlUhvEGEexr29JKFvb+O4bWKP5sC2fkqSrswrIstOmv7axm7CeIi2MNRkwYwVA==",
|
"integrity": "sha512-5GunAeZWDhjbo4/gFCYjA4vXP3V+8PEoGa9C+ZEojurpk7IBuAtI36KalCukrHLPoIbfUCywTXoZubfC1S6lHQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ionicons": "^5.1.2",
|
"@stencil/core": "^2.4.0",
|
||||||
"tslib": "^1.10.0"
|
"ionicons": "^5.5.3",
|
||||||
},
|
"tslib": "^2.1.0"
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/lab": {
|
"@ionic/lab": {
|
||||||
@@ -6634,6 +6438,27 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz",
|
||||||
"integrity": "sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q=="
|
"integrity": "sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q=="
|
||||||
},
|
},
|
||||||
|
"@npmcli/fs": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@gar/promisify": "^1.0.1",
|
||||||
|
"semver": "^7.3.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"semver": {
|
||||||
|
"version": "7.3.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||||
|
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"lru-cache": "^6.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@npmcli/git": {
|
"@npmcli/git": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.6.tgz",
|
||||||
@@ -6796,9 +6621,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@stencil/core": {
|
"@stencil/core": {
|
||||||
"version": "2.4.0",
|
"version": "2.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.8.0.tgz",
|
||||||
"integrity": "sha512-gU6+Yyd6O0KrCSS/O6j8KKqmRo+/Dcs2fI0+APCpbAWK+nqhwDISpdnSEfGDCLMoAC08XOZCycBRk2K1VGnEcg=="
|
"integrity": "sha512-WazFGUMnbumg8ePNvej8cIOEcxvuZ0ugKQkkE1xFbDYcl7DgJd62MiG+bIqCcQlIdLEfhjAdoixxlFdJgrgjyA=="
|
||||||
},
|
},
|
||||||
"@szmarczak/http-timer": {
|
"@szmarczak/http-timer": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
@@ -6943,6 +6768,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.39.tgz",
|
"resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.39.tgz",
|
||||||
"integrity": "sha512-lYR2Y/tV2ujpk/WyUc7S0VLI0a9hrtVIN9EwnrNo5oSEJI2cK2/XrgwOQmXLL3eTulOESvh9qP6si9+DWM9cOA=="
|
"integrity": "sha512-lYR2Y/tV2ujpk/WyUc7S0VLI0a9hrtVIN9EwnrNo5oSEJI2cK2/XrgwOQmXLL3eTulOESvh9qP6si9+DWM9cOA=="
|
||||||
},
|
},
|
||||||
|
"@types/http-proxy": {
|
||||||
|
"version": "1.17.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz",
|
||||||
|
"integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/istanbul-lib-coverage": {
|
"@types/istanbul-lib-coverage": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
|
||||||
@@ -9146,26 +8979,6 @@
|
|||||||
"integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==",
|
"integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"dom-serializer": {
|
|
||||||
"version": "0.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz",
|
|
||||||
"integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"domelementtype": "^1.3.0",
|
|
||||||
"entities": "^1.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"domutils": {
|
|
||||||
"version": "1.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
|
|
||||||
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"dom-serializer": "0",
|
|
||||||
"domelementtype": "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"entities": {
|
"entities": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
|
||||||
@@ -10655,6 +10468,12 @@
|
|||||||
"integrity": "sha512-Wq0kCanxubK/JroTW4Mp5soayScnRyiY1eCkbwiz1Dyt1xHOiOW/v+1miqtBHtnZhcXw25TulCKAVJzkNBdmyg==",
|
"integrity": "sha512-Wq0kCanxubK/JroTW4Mp5soayScnRyiY1eCkbwiz1Dyt1xHOiOW/v+1miqtBHtnZhcXw25TulCKAVJzkNBdmyg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"cordova-plugin-media": {
|
||||||
|
"version": "5.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.3.tgz",
|
||||||
|
"integrity": "sha512-UQPFlpk1zL4BY44zGi8RVmYCvcKBCN4Dyf8ovxqGYCC8zR1yhbTRWYDdO9vJdERwbfgWV7+z7FMWiSUfqWm9bQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"cordova-plugin-mfp": {
|
"cordova-plugin-mfp": {
|
||||||
"version": "8.0.2021031007",
|
"version": "8.0.2021031007",
|
||||||
"resolved": "https://registry.npmjs.org/cordova-plugin-mfp/-/cordova-plugin-mfp-8.0.2021031007.tgz",
|
"resolved": "https://registry.npmjs.org/cordova-plugin-mfp/-/cordova-plugin-mfp-8.0.2021031007.tgz",
|
||||||
@@ -13796,19 +13615,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dom-serializer": {
|
"dom-serializer": {
|
||||||
"version": "0.2.2",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz",
|
||||||
"integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
|
"integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"domelementtype": "^2.0.1",
|
"domelementtype": "^1.3.0",
|
||||||
"entities": "^2.0.0"
|
"entities": "^1.1.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"domelementtype": {
|
"entities": {
|
||||||
"version": "2.1.0",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
|
||||||
"integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
|
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13851,9 +13670,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"domutils": {
|
"domutils": {
|
||||||
"version": "1.7.0",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
|
||||||
"integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
|
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"dom-serializer": "0",
|
"dom-serializer": "0",
|
||||||
@@ -15768,120 +15587,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"http-proxy-middleware": {
|
"http-proxy-middleware": {
|
||||||
"version": "0.19.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.1.tgz",
|
||||||
"integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==",
|
"integrity": "sha512-cfaXRVoZxSed/BmkA7SwBVNI9Kj7HFltaE5rqYOub5kWzWZ+gofV2koVN1j2rMW7pEfSSlCHGJ31xmuyFyfLOg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"http-proxy": "^1.17.0",
|
"@types/http-proxy": "^1.17.5",
|
||||||
"is-glob": "^4.0.0",
|
"http-proxy": "^1.18.1",
|
||||||
"lodash": "^4.17.11",
|
"is-glob": "^4.0.1",
|
||||||
"micromatch": "^3.1.10"
|
"is-plain-obj": "^3.0.0",
|
||||||
},
|
"micromatch": "^4.0.2"
|
||||||
"dependencies": {
|
|
||||||
"braces": {
|
|
||||||
"version": "2.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
|
|
||||||
"integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"arr-flatten": "^1.1.0",
|
|
||||||
"array-unique": "^0.3.2",
|
|
||||||
"extend-shallow": "^2.0.1",
|
|
||||||
"fill-range": "^4.0.0",
|
|
||||||
"isobject": "^3.0.1",
|
|
||||||
"repeat-element": "^1.1.2",
|
|
||||||
"snapdragon": "^0.8.1",
|
|
||||||
"snapdragon-node": "^2.0.1",
|
|
||||||
"split-string": "^3.0.2",
|
|
||||||
"to-regex": "^3.0.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"extend-shallow": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
|
||||||
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-extendable": "^0.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fill-range": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
|
||||||
"integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"extend-shallow": "^2.0.1",
|
|
||||||
"is-number": "^3.0.0",
|
|
||||||
"repeat-string": "^1.6.1",
|
|
||||||
"to-regex-range": "^2.1.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"extend-shallow": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
|
||||||
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-extendable": "^0.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"is-number": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
|
|
||||||
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"kind-of": "^3.0.2"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"kind-of": {
|
|
||||||
"version": "3.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
|
||||||
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-buffer": "^1.1.5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"micromatch": {
|
|
||||||
"version": "3.1.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
|
|
||||||
"integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"arr-diff": "^4.0.0",
|
|
||||||
"array-unique": "^0.3.2",
|
|
||||||
"braces": "^2.3.1",
|
|
||||||
"define-property": "^2.0.2",
|
|
||||||
"extend-shallow": "^3.0.2",
|
|
||||||
"extglob": "^2.0.4",
|
|
||||||
"fragment-cache": "^0.2.1",
|
|
||||||
"kind-of": "^6.0.2",
|
|
||||||
"nanomatch": "^1.2.9",
|
|
||||||
"object.pick": "^1.3.0",
|
|
||||||
"regex-not": "^1.0.0",
|
|
||||||
"snapdragon": "^0.8.1",
|
|
||||||
"to-regex": "^3.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to-regex-range": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
|
|
||||||
"integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-number": "^3.0.0",
|
|
||||||
"repeat-string": "^1.6.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"http-server": {
|
"http-server": {
|
||||||
@@ -16404,11 +16118,11 @@
|
|||||||
"integrity": "sha512-ytlaVoz8Olq4k04Vaf/xuhDeoWEbdeCB/9kqTMnZgWfTkA+M87X72V4pyDtKEm1G+nDwxSboBRlYLDj9wtXdIA=="
|
"integrity": "sha512-ytlaVoz8Olq4k04Vaf/xuhDeoWEbdeCB/9kqTMnZgWfTkA+M87X72V4pyDtKEm1G+nDwxSboBRlYLDj9wtXdIA=="
|
||||||
},
|
},
|
||||||
"ionicons": {
|
"ionicons": {
|
||||||
"version": "5.5.0",
|
"version": "5.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-5.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-5.5.3.tgz",
|
||||||
"integrity": "sha512-0DUHTeoIrGSY+KNyNDaQW7v5+mDstjSkjx8dzT925kXKYBDrN3sGs8kUcSSQbTK132U4CbgDEZkn7FDUa9x8Qw==",
|
"integrity": "sha512-L71djrMi8pAad66tpwdnO1vwcyluCFvehzxU1PpH1k/HpYBZhZ5IaYhqXipmqUvu5aEbd4cbRguYyI5Fd4bxTw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stencil/core": "^2.4.0"
|
"@stencil/core": "^2.5.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ios-sim": {
|
"ios-sim": {
|
||||||
@@ -16710,6 +16424,11 @@
|
|||||||
"path-is-inside": "^1.0.2"
|
"path-is-inside": "^1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"is-plain-obj": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA=="
|
||||||
|
},
|
||||||
"is-plain-object": {
|
"is-plain-object": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||||
@@ -30196,6 +29915,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"http-proxy-middleware": {
|
||||||
|
"version": "0.19.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz",
|
||||||
|
"integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"http-proxy": "^1.17.0",
|
||||||
|
"is-glob": "^4.0.0",
|
||||||
|
"lodash": "^4.17.11",
|
||||||
|
"micromatch": "^3.1.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"is-binary-path": {
|
"is-binary-path": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
|
||||||
|
|||||||
+10
-4
@@ -42,21 +42,22 @@
|
|||||||
"@fullcalendar/interaction": "^5.3.0",
|
"@fullcalendar/interaction": "^5.3.0",
|
||||||
"@ionic-native/camera": "^5.31.1",
|
"@ionic-native/camera": "^5.31.1",
|
||||||
"@ionic-native/core": "^5.0.7",
|
"@ionic-native/core": "^5.0.7",
|
||||||
"@ionic-native/file": "^5.30.0",
|
"@ionic-native/file": "^5.36.0",
|
||||||
"@ionic-native/file-path": "^5.30.0",
|
"@ionic-native/file-path": "^5.30.0",
|
||||||
"@ionic-native/fingerprint-aio": "^4.20.0",
|
"@ionic-native/fingerprint-aio": "^4.20.0",
|
||||||
"@ionic-native/http": "^5.31.1",
|
"@ionic-native/http": "^5.31.1",
|
||||||
"@ionic-native/in-app-browser": "^5.28.0",
|
"@ionic-native/in-app-browser": "^5.28.0",
|
||||||
"@ionic-native/ionic-webview": "^5.35.0",
|
"@ionic-native/ionic-webview": "^5.35.0",
|
||||||
"@ionic-native/local-notifications": "^4.20.0",
|
"@ionic-native/local-notifications": "^4.20.0",
|
||||||
|
"@ionic-native/media": "^5.36.0",
|
||||||
"@ionic-native/network": "^5.35.0",
|
"@ionic-native/network": "^5.35.0",
|
||||||
"@ionic-native/screen-orientation": "^5.35.0",
|
"@ionic-native/screen-orientation": "^5.35.0",
|
||||||
"@ionic-native/splash-screen": "^5.31.1",
|
"@ionic-native/splash-screen": "^5.31.1",
|
||||||
"@ionic-native/sqlite": "^5.31.1",
|
"@ionic-native/sqlite": "^5.36.0",
|
||||||
"@ionic-native/sqlite-porter": "^5.31.1",
|
"@ionic-native/sqlite-porter": "^5.31.1",
|
||||||
"@ionic-native/status-bar": "^5.0.0",
|
"@ionic-native/status-bar": "^5.0.0",
|
||||||
"@ionic-native/wheel-selector": "^5.31.1",
|
"@ionic-native/wheel-selector": "^5.31.1",
|
||||||
"@ionic/angular": "^5.5.4",
|
"@ionic/angular": "^5.7.0",
|
||||||
"@ionic/pwa-elements": "^3.0.2",
|
"@ionic/pwa-elements": "^3.0.2",
|
||||||
"@ionic/storage": "^2.3.1",
|
"@ionic/storage": "^2.3.1",
|
||||||
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
|
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
"duration": "^0.2.2",
|
"duration": "^0.2.2",
|
||||||
"faker": "^5.5.3",
|
"faker": "^5.5.3",
|
||||||
"global": "^4.4.0",
|
"global": "^4.4.0",
|
||||||
|
"http-proxy-middleware": "^2.0.1",
|
||||||
"http-server": "^0.12.3",
|
"http-server": "^0.12.3",
|
||||||
"ibm-mfp-web-push": "^8.0.2020052213",
|
"ibm-mfp-web-push": "^8.0.2020052213",
|
||||||
"ibm-mfp-web-sdk": "^8.0.2021021706",
|
"ibm-mfp-web-sdk": "^8.0.2021021706",
|
||||||
@@ -114,7 +116,7 @@
|
|||||||
"@angular/compiler": "^12.1.2",
|
"@angular/compiler": "^12.1.2",
|
||||||
"@angular/compiler-cli": "^12.1.2",
|
"@angular/compiler-cli": "^12.1.2",
|
||||||
"@angular/language-service": "^12.1.2",
|
"@angular/language-service": "^12.1.2",
|
||||||
"@ionic/angular-toolkit": "^3.0.0",
|
"@ionic/angular-toolkit": "^4.0.0",
|
||||||
"@ionic/lab": "3.1.7",
|
"@ionic/lab": "3.1.7",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "~3.6.0",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@types/jasminewd2": "~2.0.3",
|
||||||
@@ -136,6 +138,7 @@
|
|||||||
"cordova-plugin-inappbrowser": "^4.0.0",
|
"cordova-plugin-inappbrowser": "^4.0.0",
|
||||||
"cordova-plugin-ionic-keyboard": "^2.2.0",
|
"cordova-plugin-ionic-keyboard": "^2.2.0",
|
||||||
"cordova-plugin-ionic-webview": "^5.0.0",
|
"cordova-plugin-ionic-webview": "^5.0.0",
|
||||||
|
"cordova-plugin-media": "^5.0.3",
|
||||||
"cordova-plugin-mfp": "^8.0.2021031007",
|
"cordova-plugin-mfp": "^8.0.2021031007",
|
||||||
"cordova-plugin-mfp-jsonstore": "^8.0.2021062408",
|
"cordova-plugin-mfp-jsonstore": "^8.0.2021062408",
|
||||||
"cordova-plugin-mfp-push": "^8.0.2021062405",
|
"cordova-plugin-mfp-push": "^8.0.2021062405",
|
||||||
@@ -180,6 +183,9 @@
|
|||||||
"cordova-plugin-network-information": {},
|
"cordova-plugin-network-information": {},
|
||||||
"cordova-plugin-camera": {
|
"cordova-plugin-camera": {
|
||||||
"ANDROID_SUPPORT_V4_VERSION": "27.+"
|
"ANDROID_SUPPORT_V4_VERSION": "27.+"
|
||||||
|
},
|
||||||
|
"cordova-plugin-media": {
|
||||||
|
"KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE": "NO"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"platforms": [
|
"platforms": [
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ import {MatDatepickerModule} from '@angular/material/datepicker';
|
|||||||
import {MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
|
import {MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
|
||||||
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
import { Network } from '@ionic-native/network/ngx';
|
import { Network } from '@ionic-native/network/ngx';
|
||||||
|
import { Media } from '@ionic-native/media/ngx';
|
||||||
|
import { File } from '@ionic-native/file/ngx';
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -55,6 +57,7 @@ import { fab } from '@fortawesome/free-brands-svg-icons'
|
|||||||
|
|
||||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||||
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||||
|
import { SQLite } from '@ionic-native/sqlite/ngx';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -106,7 +109,10 @@ import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|||||||
WebsocketService,
|
WebsocketService,
|
||||||
ChatService,
|
ChatService,
|
||||||
ScreenOrientation,
|
ScreenOrientation,
|
||||||
Network
|
Network,
|
||||||
|
Media,
|
||||||
|
File,
|
||||||
|
SQLite
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import { ExpedienteGdStore } from '../store/expedientegd-store.service';
|
|||||||
import { InativityService } from '../services/inativity.service';
|
import { InativityService } from '../services/inativity.service';
|
||||||
import { SessionStore } from '../store/session.service';
|
import { SessionStore } from '../store/session.service';
|
||||||
import { StorageService } from '../services/storage.service';
|
import { StorageService } from '../services/storage.service';
|
||||||
|
import { Media, MediaObject } from '@ionic-native/media/ngx';
|
||||||
|
import { File } from '@ionic-native/file/ngx';
|
||||||
import { WebNotificationPopupService } from '../services/notification/web-notification-popup.service';
|
import { WebNotificationPopupService } from '../services/notification/web-notification-popup.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -61,6 +63,8 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
synchro = synchro
|
synchro = synchro
|
||||||
|
|
||||||
|
status:string="";
|
||||||
|
audioName:string="";
|
||||||
constructor(
|
constructor(
|
||||||
private zone: NgZone,
|
private zone: NgZone,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@@ -109,10 +113,9 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
this.webnotification.webconnection();
|
this.webnotification.webconnection();
|
||||||
this.webnotification.onReceviNotificationWeb();
|
this.webnotification.register();
|
||||||
} else {
|
} else {
|
||||||
this.mobilefirstConnect();
|
this.mobilefirstConnect();
|
||||||
this.notificationsService.getAndpostToken2();
|
|
||||||
this.notificationsService.onReceviNotification();
|
this.notificationsService.onReceviNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,6 +132,8 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
mobilefirstConnect() {
|
mobilefirstConnect() {
|
||||||
|
|
||||||
|
console.log("Mobileconecct");
|
||||||
|
|
||||||
if(window['WLAuthorizationManager']) {
|
if(window['WLAuthorizationManager']) {
|
||||||
if(window['WLAuthorizationManager'].obtainAccessToken) {
|
if(window['WLAuthorizationManager'].obtainAccessToken) {
|
||||||
window['WLAuthorizationManager'].obtainAccessToken("").then((token) => {
|
window['WLAuthorizationManager'].obtainAccessToken("").then((token) => {
|
||||||
@@ -173,12 +178,13 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
synchro.registerCallback('Online',()=>{
|
synchro.registerCallback('Online',()=>{
|
||||||
|
console.log('Onlineee')
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
synchro.registerCallback('Offline',()=>{
|
synchro.registerCallback('Offline',()=>{
|
||||||
|
console.log('Offlineee')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { JsonStore } from '../../services/jsonStore.service';
|
|||||||
import { StorageService } from '../../services/storage.service';
|
import { StorageService } from '../../services/storage.service';
|
||||||
import { NotificationsService } from '../../services/notifications.service';
|
import { NotificationsService } from '../../services/notifications.service';
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
|
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-profile',
|
selector: 'app-profile',
|
||||||
@@ -43,6 +44,7 @@ export class ProfilePage implements OnInit {
|
|||||||
private notificationservice: NotificationsService,
|
private notificationservice: NotificationsService,
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private notificationsService: NotificationsService,
|
private notificationsService: NotificationsService,
|
||||||
|
private eventtrigger: EventTrigger
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
@@ -200,6 +202,10 @@ export class ProfilePage implements OnInit {
|
|||||||
|
|
||||||
this.notificationservice.tempClearArray();
|
this.notificationservice.tempClearArray();
|
||||||
this.deleteNotification(index);
|
this.deleteNotification(index);
|
||||||
|
this.eventtrigger.publishSomeData({
|
||||||
|
notification: "deleted"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { AlertController, ModalController, PopoverController } from '@ionic/angular';
|
import { AlertController, ModalController, PopoverController, Platform } from '@ionic/angular';
|
||||||
import { EventBody } from 'src/app/models/eventbody.model';
|
import { EventBody } from 'src/app/models/eventbody.model';
|
||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
import { EventsService } from 'src/app/services/events.service';
|
||||||
@@ -12,6 +12,8 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||||
import { Location } from '@angular/common'
|
import { Location } from '@angular/common'
|
||||||
|
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||||
|
import { synchro } from '../../../services/socket/synchro.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-event',
|
selector: 'app-view-event',
|
||||||
@@ -42,6 +44,7 @@ export class ViewEventPage implements OnInit {
|
|||||||
dicIndex = 0;
|
dicIndex = 0;
|
||||||
isModal = false
|
isModal = false
|
||||||
header = true
|
header = true
|
||||||
|
synch = synchro;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -55,7 +58,11 @@ export class ViewEventPage implements OnInit {
|
|||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private location: Location
|
private location: Location,
|
||||||
|
public platform: Platform,
|
||||||
|
private sqliteservice: SqliteService
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
@@ -88,8 +95,29 @@ export class ViewEventPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.loadEvent();
|
synchro.registerCallback('Online', () => {
|
||||||
|
this.loadEvent();
|
||||||
|
console.log('Onlineee view-event')
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.sqliteservice.getEventById(this.eventId).then((event) => {
|
||||||
|
this.loadedEvent = event[0];
|
||||||
|
console.log("Event ditails local,", event[0])
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
/* this.sqliteservice.getEventById(this.eventId).then((event) => {
|
||||||
|
this.loadedEvent = event[0];
|
||||||
|
console.log("Event ditails local,", event[0])
|
||||||
|
})
|
||||||
|
this.loadEvent(); */
|
||||||
|
|
||||||
|
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
// if not mobile remove all component
|
// if not mobile remove all component
|
||||||
@@ -131,6 +159,7 @@ export class ViewEventPage implements OnInit {
|
|||||||
const loader = this.toastService.loading();
|
const loader = this.toastService.loading();
|
||||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||||
this.loadedEvent = res;
|
this.loadedEvent = res;
|
||||||
|
this.sqliteservice.addEvent(res);
|
||||||
/* this.today = new Date(res.StartDate);
|
/* this.today = new Date(res.StartDate);
|
||||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||||
loader.remove()
|
loader.remove()
|
||||||
@@ -294,4 +323,25 @@ export class ViewEventPage implements OnInit {
|
|||||||
this.dicIndex = index
|
this.dicIndex = index
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getEventsFromLocalDb() {
|
||||||
|
console.log("event id details ", this.eventId)
|
||||||
|
|
||||||
|
synchro.registerCallback('Online', () => {
|
||||||
|
this.loadEvent();
|
||||||
|
console.log('Onlineee view-event')
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.sqliteservice.getEventById(this.eventId).then((event) => {
|
||||||
|
this.loadedEvent = event[0];
|
||||||
|
console.log("Event ditails local,", event[0])
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
this.chatService.getRoomMessages(roomId).subscribe(async res => {
|
this.chatService.getRoomMessages(roomId).subscribe(async res => {
|
||||||
|
console.log("Chat message",res)
|
||||||
|
|
||||||
|
|
||||||
if (res == 502) {
|
if (res == 502) {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of toDayEventStorage.eventsList"
|
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
|
||||||
(click)="goToEvent(event.EventId)"
|
(click)="goToEvent(event.EventId)"
|
||||||
>
|
>
|
||||||
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
|
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
|
||||||
|
|||||||
@@ -12,10 +12,12 @@ import { EventDetailPage } from './event-detail/event-detail.page';
|
|||||||
import { ProcessesService } from '../../services/processes.service';
|
import { ProcessesService } from '../../services/processes.service';
|
||||||
import { DailyWorkTask } from '../../models/dailyworktask.model';
|
import { DailyWorkTask } from '../../models/dailyworktask.model';
|
||||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||||
import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service';
|
import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service';
|
||||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||||
|
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||||
|
import { synchro } from '../../services/socket/synchro.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-events',
|
selector: 'app-events',
|
||||||
@@ -29,16 +31,16 @@ export class EventsPage implements OnInit {
|
|||||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||||
|
|
||||||
customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||||
|
|
||||||
/* Setting appropriate greeting according to the time */
|
/* Setting appropriate greeting according to the time */
|
||||||
grettings = ["Bom dia", "Boa tarde", "Boa noite"];
|
grettings = ["Bom dia", "Boa tarde", "Boa noite"];
|
||||||
greetting='';
|
greetting = '';
|
||||||
|
|
||||||
timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
||||||
/* Set segment variable */
|
/* Set segment variable */
|
||||||
segment:string;
|
segment: string;
|
||||||
public profile:string;
|
public profile: string;
|
||||||
currentEvent: any;
|
currentEvent: any;
|
||||||
|
|
||||||
eventsList: Event[];
|
eventsList: Event[];
|
||||||
@@ -52,14 +54,14 @@ export class EventsPage implements OnInit {
|
|||||||
combinedEvents: Event[];
|
combinedEvents: Event[];
|
||||||
|
|
||||||
customText = false;
|
customText = false;
|
||||||
totalEvent=0;
|
totalEvent = 0;
|
||||||
currentHoursMinutes: Date | string;
|
currentHoursMinutes: Date | string;
|
||||||
|
|
||||||
showLoader: boolean;
|
showLoader: boolean;
|
||||||
|
|
||||||
taskslist:DailyWorkTask[] = [];
|
taskslist: DailyWorkTask[] = [];
|
||||||
expedientList:any;
|
expedientList: any;
|
||||||
hideSearchBtn: boolean=false;
|
hideSearchBtn: boolean = false;
|
||||||
|
|
||||||
// shared data
|
// shared data
|
||||||
toDayEventStorage = ToDayEventStorage
|
toDayEventStorage = ToDayEventStorage
|
||||||
@@ -67,43 +69,52 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
pdfSrc = "https://www.tabularium.pt/file-upload/FSovLiyEa8Hqy2iDA/TK-Justificativo.pdf";
|
pdfSrc = "https://www.tabularium.pt/file-upload/FSovLiyEa8Hqy2iDA/TK-Justificativo.pdf";
|
||||||
|
listToPresent
|
||||||
|
|
||||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
expedienteTaskPipe = new ExpedienteTaskPipe()
|
||||||
|
|
||||||
@Output() openExpedientListPage:EventEmitter<any> = new EventEmitter<any>();
|
@Output() openExpedientListPage: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
|
|
||||||
existingScreenOrientation: string;
|
existingScreenOrientation: string;
|
||||||
|
synch = synchro
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private eventService: EventsService,
|
private eventService: EventsService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private storageService:StorageService,
|
private storageService: StorageService,
|
||||||
public activatedRoute: ActivatedRoute,
|
public activatedRoute: ActivatedRoute,
|
||||||
private alertController: AlertService,
|
private alertController: AlertService,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private processes:ProcessesService,
|
private processes: ProcessesService,
|
||||||
/* private gabineteService: GabineteDigitalPage, */
|
/* private gabineteService: GabineteDigitalPage, */
|
||||||
private modalController:ModalController,
|
private modalController: ModalController,
|
||||||
private screenOrientation: ScreenOrientation,
|
private screenOrientation: ScreenOrientation,
|
||||||
public platform: Platform,
|
public platform: Platform,
|
||||||
) {
|
private sqliteservice: SqliteService,
|
||||||
this.existingScreenOrientation = this.screenOrientation.type;
|
) {
|
||||||
console.log(this.existingScreenOrientation);
|
this.existingScreenOrientation = this.screenOrientation.type;
|
||||||
|
console.log(this.existingScreenOrientation);
|
||||||
|
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
|
|
||||||
this.prEventList = null;
|
this.prEventList = null;
|
||||||
|
|
||||||
this.platform.resize.subscribe(async () => {
|
this.platform.resize.subscribe(async () => {
|
||||||
//console.log('Resize event detected');
|
//console.log('Resize event detected');
|
||||||
// console.log('Resize event detected');
|
// console.log('Resize event detected');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.sqliteservice.databaseConn();
|
||||||
|
} catch (error) {
|
||||||
|
console.log("Error creating local database: ", error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.segment = "Combinada";
|
this.segment = "Combinada";
|
||||||
@@ -112,7 +123,7 @@ export class EventsPage implements OnInit {
|
|||||||
this.showGreeting();
|
this.showGreeting();
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == '/home/events') {
|
if (event instanceof NavigationEnd && event.url == '/home/events') {
|
||||||
this.RefreshEvents();
|
this.RefreshEvents();
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
@@ -121,11 +132,13 @@ export class EventsPage implements OnInit {
|
|||||||
});
|
});
|
||||||
this.hideSearch();
|
this.hideSearch();
|
||||||
|
|
||||||
|
this.getEventsFromLocalDb();
|
||||||
|
|
||||||
//this.checkScreenOrientation();
|
//this.checkScreenOrientation();
|
||||||
}
|
}
|
||||||
|
|
||||||
hideSearch(){
|
hideSearch() {
|
||||||
if(this.router.url == '/home/events'){
|
if (this.router.url == '/home/events') {
|
||||||
this.hideSearchBtn = true;
|
this.hideSearchBtn = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,28 +154,28 @@ export class EventsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Lock to portrait
|
// Lock to portrait
|
||||||
lockToPortrait(){
|
lockToPortrait() {
|
||||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
|
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
|
||||||
console.log('set');
|
console.log('set');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lock to landscape
|
// Lock to landscape
|
||||||
lockToLandscape(){
|
lockToLandscape() {
|
||||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
|
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unlock screen orientation
|
// Unlock screen orientation
|
||||||
unlockScreenOrientation(){
|
unlockScreenOrientation() {
|
||||||
this.screenOrientation.unlock();
|
this.screenOrientation.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
checkScreenOrientation(){
|
checkScreenOrientation() {
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
this.lockToPortrait();
|
this.lockToPortrait();
|
||||||
console.log('was here');
|
console.log('was here');
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.unlockScreenOrientation();
|
this.unlockScreenOrientation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,20 +186,24 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
date.setMonth(date.getMonth() + 1);
|
date.setMonth(date.getMonth() + 1);
|
||||||
let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
let start = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||||
let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59";
|
let end = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " 23:59:59";
|
||||||
|
|
||||||
|
|
||||||
if(this.loggeduser.Profile == 'MDGPR') {
|
if (this.loggeduser.Profile == 'MDGPR') {
|
||||||
|
|
||||||
let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise();
|
let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise();
|
||||||
let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise();
|
let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise();
|
||||||
|
|
||||||
const list = mdOficialEvents.concat(mdPessoalEvents);
|
const list = mdOficialEvents.concat(mdPessoalEvents);
|
||||||
|
console.log("getAllMdOficialPessoalEvents", list)
|
||||||
|
this.SqliteAddEvent(list);
|
||||||
|
this.listToPresent = this.toDayEventStorage.eventsList
|
||||||
this.toDayEventStorage.reset(list)
|
this.toDayEventStorage.reset(list)
|
||||||
|
|
||||||
if(this.toDayEventStorage.eventsList.length > 0){
|
|
||||||
|
|
||||||
|
if (this.toDayEventStorage.eventsList.length > 0) {
|
||||||
this.currentEvent = this.toDayEventStorage.eventsList[0].Subject;
|
this.currentEvent = this.toDayEventStorage.eventsList[0].Subject;
|
||||||
this.currentHoursMinutes = this.toDayEventStorage.eventsList[0].StartDate;
|
this.currentHoursMinutes = this.toDayEventStorage.eventsList[0].StartDate;
|
||||||
}
|
}
|
||||||
@@ -197,18 +214,20 @@ export class EventsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
else if (this.loggeduser.Profile == 'PR') {
|
else if (this.loggeduser.Profile == 'PR') {
|
||||||
|
|
||||||
let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
let prOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
||||||
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
let prPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
||||||
|
|
||||||
const list = prOficialEvents.concat(prPessoalEvents);
|
const list = prOficialEvents.concat(prPessoalEvents);
|
||||||
|
console.log("getAllPrOficialPessoalEvents", list)
|
||||||
|
this.SqliteAddEvent(list);
|
||||||
this.toDayEventStorage.reset(list)
|
this.toDayEventStorage.reset(list)
|
||||||
|
|
||||||
if(this.toDayEventStorage.eventsList.length > 0) {
|
if (this.toDayEventStorage.eventsList.length > 0) {
|
||||||
this.currentEvent = this.toDayEventStorage.eventsList[0].Subject;
|
this.currentEvent = this.toDayEventStorage.eventsList[0].Subject;
|
||||||
this.currentHoursMinutes = this.toDayEventStorage.eventsList[0].StartDate;
|
this.currentHoursMinutes = this.toDayEventStorage.eventsList[0].StartDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.listToPresent = this.toDayEventStorage.eventsList;
|
||||||
this.totalEvent = this.toDayEventStorage.eventsList.length;
|
this.totalEvent = this.toDayEventStorage.eventsList.length;
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
@@ -284,48 +303,110 @@ export class EventsPage implements OnInit {
|
|||||||
break;
|
break;
|
||||||
} */
|
} */
|
||||||
}
|
}
|
||||||
|
SqliteAddEvent(list) {
|
||||||
|
list.forEach((event) => {
|
||||||
|
let data = {
|
||||||
|
EventId: event.EventId,
|
||||||
|
HasAttachments: event.HasAttachments,
|
||||||
|
Subject: event.Subject,
|
||||||
|
Location: event.Location,
|
||||||
|
CalendarId: event.CalendarId,
|
||||||
|
CalendarName: event.CalendarName,
|
||||||
|
StartDate: event.StartDate,
|
||||||
|
EndDate: event.EndDate,
|
||||||
|
EventType: "",
|
||||||
|
Attendees: "",
|
||||||
|
IsMeeting: "",
|
||||||
|
IsRecurring: "",
|
||||||
|
IsAllDayEvent: event.IsAllDayEvent,
|
||||||
|
AppointmentState: "",
|
||||||
|
TimeZone: "",
|
||||||
|
Organizer: "",
|
||||||
|
Category: "",
|
||||||
|
EventRecurrence: "",
|
||||||
|
Attachments: "",
|
||||||
|
Body: ""
|
||||||
|
}
|
||||||
|
|
||||||
showGreeting(){
|
if(!event.Organizer){
|
||||||
if(this.today.getHours() >= 6 && this.today.getHours() < 12){
|
this.sqliteservice.addEvent(data);
|
||||||
|
console.log("Events page add event sqllite")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getEventsFromLocalDb() {
|
||||||
|
|
||||||
|
synchro.registerCallback('Online', () => {
|
||||||
|
this.router.events.forEach((event) => {
|
||||||
|
if (event instanceof NavigationEnd && event.url == '/home/events') {
|
||||||
|
this.RefreshEvents();
|
||||||
|
this.LoadList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log('Onlineee')
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.sqliteservice.getAllEvents().then((event) => {
|
||||||
|
this.listToPresent = event
|
||||||
|
this.totalEvent = this.listToPresent.length
|
||||||
|
this.currentEvent = this.listToPresent[0].Subject
|
||||||
|
this.currentHoursMinutes = this.listToPresent[0].StartDate
|
||||||
|
console.log("All events from local,", event)
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
showGreeting() {
|
||||||
|
if (this.today.getHours() >= 6 && this.today.getHours() < 12) {
|
||||||
this.greetting = this.grettings[0];
|
this.greetting = this.grettings[0];
|
||||||
}
|
}
|
||||||
else if(this.today.getHours() >= 12 && this.today.getHours() < 18){
|
else if (this.today.getHours() >= 12 && this.today.getHours() < 18) {
|
||||||
this.greetting = this.grettings[1];
|
this.greetting = this.grettings[1];
|
||||||
}
|
}
|
||||||
else /* if(this.today.getHours() < 6 && this.today.getHours() >= 18) */{
|
else /* if(this.today.getHours() < 6 && this.today.getHours() >= 18) */ {
|
||||||
this.greetting = this.grettings[2];
|
this.greetting = this.grettings[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gotTo(){
|
gotTo() {
|
||||||
this.router.navigate(['/home/events']);
|
this.router.navigate(['/home/events']);
|
||||||
}
|
}
|
||||||
|
|
||||||
changeProfile(){
|
changeProfile() {
|
||||||
if(this.profile == "mdgpr"){
|
if (this.profile == "mdgpr") {
|
||||||
console.log('pr');
|
console.log('pr');
|
||||||
this.profile ="pr";
|
this.profile = "pr";
|
||||||
this.RefreshEvents();
|
this.RefreshEvents();
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
console.log('mdgpr');
|
console.log('mdgpr');
|
||||||
this.profile ="mdgpr";
|
this.profile = "mdgpr";
|
||||||
this.RefreshEvents();
|
this.RefreshEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logout()
|
logout() {
|
||||||
{
|
|
||||||
this.authService.ValidatedUser.BasicAuthKey = "";
|
this.authService.ValidatedUser.BasicAuthKey = "";
|
||||||
this.router.navigate(['/home/login']);
|
this.router.navigate(['/home/login']);
|
||||||
}
|
}
|
||||||
|
|
||||||
async openEventDetail1(id:any){
|
async openEventDetail1(id: any) {
|
||||||
console.log(id);
|
console.log(id);
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: EventDetailPage,
|
component: EventDetailPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
eventId: id,
|
eventId: id,
|
||||||
},
|
},
|
||||||
cssClass: 'event-detail',
|
cssClass: 'event-detail',
|
||||||
@@ -340,27 +421,27 @@ export class EventsPage implements OnInit {
|
|||||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||||
console.log("Expediente", result);
|
console.log("Expediente", result);
|
||||||
|
|
||||||
const ExpedienteTask = result.map( e=> this.expedienteTaskPipe.transform(e))
|
const ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||||
|
|
||||||
this.expedienteGdStore.reset(ExpedienteTask)
|
this.expedienteGdStore.reset(ExpedienteTask)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
sortArrayISODate(myArray: any){
|
sortArrayISODate(myArray: any) {
|
||||||
return myArray.sort(function(a, b) {
|
return myArray.sort(function (a, b) {
|
||||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
goToEvent(eventId:any){
|
goToEvent(eventId: any) {
|
||||||
this.router.navigate(['/home/events', eventId, 'events']);
|
this.router.navigate(['/home/events', eventId, 'events']);
|
||||||
}
|
}
|
||||||
|
|
||||||
goToExpediente(SerialNumber:any) {
|
goToExpediente(SerialNumber: any) {
|
||||||
if(this.loggeduser.Profile == 'MDGPR'){
|
if (this.loggeduser.Profile == 'MDGPR') {
|
||||||
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
||||||
}
|
}
|
||||||
else if(this.loggeduser.Profile == 'PR'){
|
else if (this.loggeduser.Profile == 'PR') {
|
||||||
this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']);
|
this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -370,8 +451,8 @@ export class EventsPage implements OnInit {
|
|||||||
if( window.innerWidth < 701){
|
if( window.innerWidth < 701){
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,} };
|
let navigationExtras: NavigationExtras = { queryParams: { "expedientes": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -379,13 +460,16 @@ export class EventsPage implements OnInit {
|
|||||||
if( window.innerWidth < 701){
|
if( window.innerWidth < 701){
|
||||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientes-pr": true,} };
|
let navigationExtras: NavigationExtras = { queryParams: { "expedientes-pr": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edi
|
|||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
|
||||||
|
import { SqliteService } from '../../../../services/sqlite.service';
|
||||||
|
import { synchro } from '../../../../services/socket/synchro.service';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-approve-event',
|
selector: 'app-approve-event',
|
||||||
templateUrl: './approve-event.page.html',
|
templateUrl: './approve-event.page.html',
|
||||||
@@ -19,28 +23,30 @@ import { Location } from '@angular/common';
|
|||||||
})
|
})
|
||||||
export class ApproveEventPage implements OnInit {
|
export class ApproveEventPage implements OnInit {
|
||||||
event: Event;
|
event: Event;
|
||||||
loadedEvent:any = false
|
loadedEvent: any = false
|
||||||
loadedAttachments:any;
|
loadedAttachments: any;
|
||||||
customDate:any;
|
customDate: any;
|
||||||
today:any;
|
today: any;
|
||||||
show: boolean = false;
|
show: boolean = false;
|
||||||
|
|
||||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||||
|
|
||||||
serialNumber:string;
|
serialNumber: string;
|
||||||
caller:string;
|
caller: string;
|
||||||
@Input() InstanceId:string;
|
@Input() InstanceId: string;
|
||||||
|
|
||||||
@Output() approveEventDismiss = new EventEmitter<any>();
|
@Output() approveEventDismiss = new EventEmitter<any>();
|
||||||
@Output() closeEventToApprove = new EventEmitter<any>();
|
@Output() closeEventToApprove = new EventEmitter<any>();
|
||||||
@Output() AproveEventEditEvent = new EventEmitter<any>();
|
@Output() AproveEventEditEvent = new EventEmitter<any>();
|
||||||
|
|
||||||
|
synch = synchro;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router:Router,
|
private router: Router,
|
||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private processes:ProcessesService,
|
private processes: ProcessesService,
|
||||||
private attachmentsService: AttachmentsService,
|
private attachmentsService: AttachmentsService,
|
||||||
private popoverController: PopoverController,
|
private popoverController: PopoverController,
|
||||||
private menu: MenuController,
|
private menu: MenuController,
|
||||||
@@ -49,14 +55,16 @@ export class ApproveEventPage implements OnInit {
|
|||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private location: Location,
|
private location: Location,
|
||||||
|
private sqliteservice: SqliteService,
|
||||||
|
private platform: Platform
|
||||||
) {
|
) {
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
// console.log(params["params"]);
|
// console.log(params["params"]);
|
||||||
|
|
||||||
if(params["params"].serialNumber) {
|
if (params["params"].serialNumber) {
|
||||||
this.serialNumber = params["params"].serialNumber;
|
this.serialNumber = params["params"].serialNumber;
|
||||||
}
|
}
|
||||||
if(params["params"].caller){
|
if (params["params"].caller) {
|
||||||
this.caller = params["params"].caller;
|
this.caller = params["params"].caller;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -70,7 +78,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.serialNumber);
|
console.log(this.serialNumber);
|
||||||
console.log(this.caller);
|
console.log(this.caller);
|
||||||
|
this.getProcessFromDB();
|
||||||
this.getTask();
|
this.getTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,19 +97,97 @@ export class ApproveEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addProcessToDB(data) {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.sqliteservice.updateProcess(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getProcessFromDB() {
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
|
||||||
|
this.sqliteservice.getProcessById(this.serialNumber).then((process) => {
|
||||||
|
console.log('event aprove serial', process)
|
||||||
|
|
||||||
|
var doc;
|
||||||
|
var action = [];
|
||||||
|
var origi = [];
|
||||||
|
var wordafi = {};
|
||||||
|
if (process[0].Documents === "null" || process[0].Documents === "undefined") {
|
||||||
|
doc = []
|
||||||
|
} else {
|
||||||
|
doc = JSON.parse(process[0].Documents)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process[0].actions === "null" || process[0].actions === "undefined") {
|
||||||
|
action = []
|
||||||
|
} else {
|
||||||
|
action = JSON.parse(process[0].Documents)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process[0].originator === "null" || process[0].originator === "undefined") {
|
||||||
|
origi = []
|
||||||
|
} else {
|
||||||
|
origi = JSON.parse(process[0].Documents)
|
||||||
|
}
|
||||||
|
if (process[0].workflowInstanceDataFields === "null" || process[0].workflowInstanceDataFields === "undefined") {
|
||||||
|
wordafi = []
|
||||||
|
} else {
|
||||||
|
wordafi = JSON.parse(process[0].workflowInstanceDataFields)
|
||||||
|
}
|
||||||
|
|
||||||
|
let task = {
|
||||||
|
"Documents": doc,
|
||||||
|
"actions": action,
|
||||||
|
"activityInstanceName": process[0].activityInstanceName,
|
||||||
|
"formURL": process[0].formURL,
|
||||||
|
"originator": origi,
|
||||||
|
"serialNumber": process[0].serialNumber,
|
||||||
|
"taskStartDate": process[0].taskStartDate,
|
||||||
|
"totalDocuments": process[0].totalDocuments,
|
||||||
|
"workflowDisplayName": process[0].workflowDisplayName,
|
||||||
|
"workflowID": process[0].workflowID,
|
||||||
|
"workflowInstanceDataFields": wordafi,
|
||||||
|
"workflowInstanceFolio": process[0].workflowInstanceFolio,
|
||||||
|
"workflowInstanceID": process[0].workflowInstanceID,
|
||||||
|
"workflowName": process[0].workflowInstanceID
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loadedEvent = task
|
||||||
|
console.log('offline event',this.loadedEvent);
|
||||||
|
|
||||||
|
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||||
|
|
||||||
|
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||||
|
|
||||||
|
let instanceId = this.loadedEvent.workflowInstanceDataFields.InstanceId;
|
||||||
|
this.loadedAttachments = this.loadedEvent.Documents;
|
||||||
|
console.log('Attatara', this.loadedAttachments)
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
async getTask() {
|
async getTask() {
|
||||||
this.loadedEvent = await this.processes.GetTask(this.serialNumber).toPromise();
|
this.loadedEvent = await this.processes.GetTask(this.serialNumber).toPromise();
|
||||||
console.log(this.loadedEvent);
|
console.log(this.loadedEvent);
|
||||||
|
|
||||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||||
|
|
||||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||||
|
|
||||||
let instanceId = this.loadedEvent.workflowInstanceDataFields.InstanceId;
|
let instanceId = this.loadedEvent.workflowInstanceDataFields.InstanceId;
|
||||||
this.getAttachments(instanceId);
|
this.getAttachments(instanceId);
|
||||||
|
|
||||||
|
this.addProcessToDB(this.loadedEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
async approveTask(serialNumber:string) {
|
async approveTask(serialNumber: string) {
|
||||||
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
||||||
console.log(body);
|
console.log(body);
|
||||||
|
|
||||||
@@ -131,12 +217,12 @@ export class ApproveEventPage implements OnInit {
|
|||||||
}); */
|
}); */
|
||||||
}
|
}
|
||||||
|
|
||||||
async emendTask(serialNumber:string){
|
async emendTask(serialNumber: string) {
|
||||||
console.log('Desktop');
|
console.log('Desktop');
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: EmendMessageModalPage,
|
component: EmendMessageModalPage,
|
||||||
componentProps:{
|
componentProps: {
|
||||||
},
|
},
|
||||||
cssClass: 'emend-message-modal',
|
cssClass: 'emend-message-modal',
|
||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
@@ -145,41 +231,42 @@ export class ApproveEventPage implements OnInit {
|
|||||||
await modal.present();
|
await modal.present();
|
||||||
|
|
||||||
modal.onDidDismiss()
|
modal.onDidDismiss()
|
||||||
.then( async (res) => {
|
.then(async (res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
|
|
||||||
if(res.data !== ''){
|
if (res.data !== '') {
|
||||||
let body = { "serialNumber": serialNumber,
|
let body = {
|
||||||
"action": "Emendar",
|
"serialNumber": serialNumber,
|
||||||
|
"action": "Emendar",
|
||||||
"dataFields": {
|
"dataFields": {
|
||||||
"ReviewUserComment": res.data,
|
"ReviewUserComment": res.data,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
console.log(body);
|
||||||
|
|
||||||
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.processes.PostTaskAction(body).toPromise();
|
||||||
|
this.toastService.successMessage('Pedido enviado');
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest();
|
||||||
|
} finally {
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(body);
|
else {
|
||||||
|
//this.alertService.presentAlert('Operação cancelada!');
|
||||||
const loader = this.toastService.loading()
|
|
||||||
|
|
||||||
try {
|
|
||||||
await this.processes.PostTaskAction(body).toPromise();
|
|
||||||
this.toastService.successMessage('Pedido enviado');
|
|
||||||
this.goBack();
|
|
||||||
} catch (error) {
|
|
||||||
this.toastService.badRequest();
|
|
||||||
} finally {
|
|
||||||
loader.remove()
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
//this.alertService.presentAlert('Operação cancelada!');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//this.openEmendMessageModal(serialNumber);
|
//this.openEmendMessageModal(serialNumber);
|
||||||
//this.goBack();
|
//this.goBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
async rejeitar(serialNumber:string){
|
async rejeitar(serialNumber: string) {
|
||||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||||
console.log(body);
|
console.log(body);
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
@@ -195,10 +282,12 @@ export class ApproveEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAttachments(instanceId:string) {
|
async getAttachments(instanceId: string) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise();
|
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise();
|
||||||
|
this.sqliteservice.updateUser(JSON.stringify(this.serialNumber),JSON.stringify(this.loadedAttachments))
|
||||||
|
console.log('Attatara', this.loadedAttachments)
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
@@ -206,23 +295,23 @@ export class ApproveEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewDocument(sourceId){
|
viewDocument(sourceId) {
|
||||||
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
|
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res => {
|
||||||
/* console.log(res); */
|
/* console.log(res); */
|
||||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
const url: string = res.replace("webTRIX.Viewer", "webTRIX.Viewer.Branch1");
|
||||||
const browser = this.iab.create(url,"_blank");
|
const browser = this.iab.create(url, "_blank");
|
||||||
browser.show();
|
browser.show();
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async openOptions(ev:any) {
|
async openOptions(ev: any) {
|
||||||
const popover = await this.popoverController.create({
|
const popover = await this.popoverController.create({
|
||||||
component: EventActionsPopoverPage,
|
component: EventActionsPopoverPage,
|
||||||
cssClass: 'events-options',
|
cssClass: 'events-options',
|
||||||
event: ev,
|
event: ev,
|
||||||
translucent: true,
|
translucent: true,
|
||||||
componentProps:{
|
componentProps: {
|
||||||
serialNumber: ev.serialNumber,
|
serialNumber: ev.serialNumber,
|
||||||
InstanceId: ev.workflowInstanceDataFields.InstanceId,
|
InstanceId: ev.workflowInstanceDataFields.InstanceId,
|
||||||
},
|
},
|
||||||
@@ -233,10 +322,10 @@ export class ApproveEventPage implements OnInit {
|
|||||||
openMenu() {
|
openMenu() {
|
||||||
this.menu.open();
|
this.menu.open();
|
||||||
}
|
}
|
||||||
async openEmendMessageModal(serialNumber:string) {
|
async openEmendMessageModal(serialNumber: string) {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: EmendMessageModalPage,
|
component: EmendMessageModalPage,
|
||||||
componentProps:{
|
componentProps: {
|
||||||
},
|
},
|
||||||
cssClass: 'emend-message-modal',
|
cssClass: 'emend-message-modal',
|
||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
@@ -244,13 +333,14 @@ export class ApproveEventPage implements OnInit {
|
|||||||
|
|
||||||
await modal.present();
|
await modal.present();
|
||||||
|
|
||||||
modal.onDidDismiss().then( async (res) => {
|
modal.onDidDismiss().then(async (res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
|
|
||||||
if(res.data !== ''){
|
if (res.data !== '') {
|
||||||
let body = { "serialNumber": serialNumber,
|
let body = {
|
||||||
"action": "Emendar",
|
"serialNumber": serialNumber,
|
||||||
"dataFields": {
|
"action": "Emendar",
|
||||||
|
"dataFields": {
|
||||||
"ReviewUserComment": res.data,
|
"ReviewUserComment": res.data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -264,18 +354,18 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest();
|
this.toastService.badRequest();
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
//this.alertService.presentAlert('Operação cancelada!');
|
//this.alertService.presentAlert('Operação cancelada!');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
goToEventsToApprove(){
|
goToEventsToApprove() {
|
||||||
let navigationExtras: NavigationExtras = {
|
let navigationExtras: NavigationExtras = {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"eventos": true,
|
"eventos": true,
|
||||||
@@ -290,7 +380,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
component: EditEventToApproveComponent,
|
component: EditEventToApproveComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
serialNumber: serialNumber,
|
serialNumber: serialNumber,
|
||||||
InstanceId:this.InstanceId
|
InstanceId: this.InstanceId
|
||||||
},
|
},
|
||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
// backdropDismiss: false
|
// backdropDismiss: false
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { NavigationStart, Router } from '@angular/router';
|
|||||||
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
|
||||||
|
import { SqliteService } from '../../../services/sqlite.service';
|
||||||
|
import { synchro } from '../../../services/socket/synchro.service';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-event-list',
|
selector: 'app-event-list',
|
||||||
templateUrl: './event-list.page.html',
|
templateUrl: './event-list.page.html',
|
||||||
@@ -29,12 +33,16 @@ export class EventListPage implements OnInit {
|
|||||||
skeletonLoader = true
|
skeletonLoader = true
|
||||||
eventaprovacaostore = EventoAprovacaoStore;
|
eventaprovacaostore = EventoAprovacaoStore;
|
||||||
|
|
||||||
|
synch = synchro;
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes:ProcessesService,
|
private processes:ProcessesService,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private location: Location
|
private location: Location,
|
||||||
|
private sqliteservice: SqliteService,
|
||||||
|
private platform: Platform
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -43,6 +51,9 @@ export class EventListPage implements OnInit {
|
|||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
|
|
||||||
|
this.getEventToAproveFromDB();
|
||||||
|
|
||||||
|
|
||||||
this.LoadToApproveEvents()
|
this.LoadToApproveEvents()
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
@@ -65,6 +76,25 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getEventToAproveFromDB() {
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
|
||||||
|
this.sqliteservice.getListOfEventAprove('Agenda Oficial MDGPR','Agenda Pessoal MDGPR' ).then((event: any[]) => {
|
||||||
|
this.eventsMDGPRList = event
|
||||||
|
console.log("All evento to aprove from db ", event)
|
||||||
|
})
|
||||||
|
|
||||||
|
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR','Agenda Pessoal PR' ).then((event: any[]) => {
|
||||||
|
this.eventsPRList = event
|
||||||
|
console.log("All evento to aprove from db ", event)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
segmentChanged(ev: any) {
|
segmentChanged(ev: any) {
|
||||||
this.LoadToApproveEvents();
|
this.LoadToApproveEvents();
|
||||||
}
|
}
|
||||||
@@ -78,7 +108,8 @@ export class EventListPage implements OnInit {
|
|||||||
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||||
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||||
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
|
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
|
||||||
console.log(this.eventsMDGPRList);
|
console.log('Event aprove',this.eventsMDGPRList);
|
||||||
|
|
||||||
|
|
||||||
this.eventaprovacaostore.resetmd(this.eventsMDGPRList);
|
this.eventaprovacaostore.resetmd(this.eventsMDGPRList);
|
||||||
}
|
}
|
||||||
@@ -92,6 +123,10 @@ export class EventListPage implements OnInit {
|
|||||||
this.skeletonLoader = false
|
this.skeletonLoader = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getEventToaproveFromDB() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
async openApproveModal(eventSerialNumber, event){
|
async openApproveModal(eventSerialNumber, event){
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: ApproveEventModalPage,
|
component: ApproveEventModalPage,
|
||||||
|
|||||||
+54
-2
@@ -23,6 +23,10 @@ import { ExpedienteService } from 'src/app/Rules/expediente.service';
|
|||||||
import { expedienteTask } from 'src/app/models/dailyworktask.model';
|
import { expedienteTask } from 'src/app/models/dailyworktask.model';
|
||||||
import { TaskService } from 'src/app/Rules/task.service';
|
import { TaskService } from 'src/app/Rules/task.service';
|
||||||
|
|
||||||
|
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
import { synchro } from 'src/app/services/socket/synchro.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-expediente-detail',
|
selector: 'app-expediente-detail',
|
||||||
templateUrl: './expediente-detail.page.html',
|
templateUrl: './expediente-detail.page.html',
|
||||||
@@ -49,6 +53,9 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
hideSendToPendentes = true
|
hideSendToPendentes = true
|
||||||
searchDocumentPipe = new SearchDocumentPipe()
|
searchDocumentPipe = new SearchDocumentPipe()
|
||||||
|
|
||||||
|
synch = synchro
|
||||||
|
onlinecheck: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
private iab: InAppBrowser,
|
private iab: InAppBrowser,
|
||||||
@@ -63,7 +70,9 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
private attachmentsService: AttachmentsService,
|
private attachmentsService: AttachmentsService,
|
||||||
public p: PermissionService,
|
public p: PermissionService,
|
||||||
private taskService: TaskService,
|
private taskService: TaskService,
|
||||||
private expedienteService: ExpedienteService
|
private expedienteService: ExpedienteService,
|
||||||
|
public platform: Platform,
|
||||||
|
private sqliteservice: SqliteService,
|
||||||
) {
|
) {
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["params"].SerialNumber) {
|
if(params["params"].SerialNumber) {
|
||||||
@@ -76,7 +85,10 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.LoadTaskDetail(this.serialNumber);
|
this.getFromDB();
|
||||||
|
if(this.onlinecheck) {
|
||||||
|
this.LoadTaskDetail(this.serialNumber);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,6 +100,45 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
this.toastService.presentToast('Não foi possível fazer login"');
|
this.toastService.presentToast('Não foi possível fazer login"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFromDB() {
|
||||||
|
|
||||||
|
synchro.registerCallback('Online', () => {
|
||||||
|
this.onlinecheck = true;
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.onlinecheck = false;
|
||||||
|
this.sqliteservice.getProcessById(this.serialNumber).then((process) => {
|
||||||
|
console.log("expedient ditail", process)
|
||||||
|
|
||||||
|
var workflow = JSON.parse(process[0].workflowInstanceDataFields);
|
||||||
|
var origina = JSON.parse(process[0].originator)
|
||||||
|
|
||||||
|
this.task = {
|
||||||
|
"SerialNumber": process[0].serialNumber,
|
||||||
|
"Folio": workflow.Subject,
|
||||||
|
"Senders": origina.email,
|
||||||
|
"CreateDate": momentG(new Date(process[0].taskStartDate),'yyyy-MM-dd HH:mm:ss'),
|
||||||
|
"DocumentURL": workflow.ViewerRequest,
|
||||||
|
"Remetente": workflow.Sender,
|
||||||
|
"Note": workflow.TaskMessage || workflow.Note,
|
||||||
|
"FolderId": workflow.FolderID,
|
||||||
|
"FsId": workflow.FsId,
|
||||||
|
"DocId": workflow.DocID,
|
||||||
|
"WorkflowName": process[0].workflowDisplayName,
|
||||||
|
"Status": workflow.Status,
|
||||||
|
"DispatchNumber": workflow.DispatchNumber,
|
||||||
|
"AttachmentsProcessLastInstanceID": workflow.AttachmentsProcessLastInstanceID,
|
||||||
|
"InstanceID": workflow.InstanceID
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
async approve(note:string, documents:any) {
|
async approve(note:string, documents:any) {
|
||||||
let body = {
|
let body = {
|
||||||
@@ -261,6 +312,7 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.fulltask = res;
|
this.fulltask = res;
|
||||||
|
this.sqliteservice.updateProcess(res)
|
||||||
|
|
||||||
let thedate = new Date(this.task.CreateDate);
|
let thedate = new Date(this.task.CreateDate);
|
||||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<div
|
<div
|
||||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||||
*ngFor = "let task of expedienteGdStore.list"
|
*ngFor = "let task of listToPresent"
|
||||||
(click)="goToExpediente(task.SerialNumber)"
|
(click)="goToExpediente(task.SerialNumber)"
|
||||||
>
|
>
|
||||||
<div class="item width-100">
|
<div class="item width-100">
|
||||||
@@ -65,13 +65,13 @@
|
|||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
*ngIf="!skeletonLoader && expedienteGdStore.list.length == 0 && expedienteGdStore.list.length == 0"
|
*ngIf="!skeletonLoader && listToPresent.length == 0 && listToPresent.length == 0"
|
||||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||||
>
|
>
|
||||||
<span>Lista vazia</span>
|
<span>Lista vazia</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="skeletonLoader && expedienteGdStore.list.length == 0">
|
<div *ngIf="skeletonLoader && listToPresent.length == 0">
|
||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
|||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||||
|
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
import { synchro } from '../../../services/socket/synchro.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-expediente',
|
selector: 'app-expediente',
|
||||||
@@ -12,40 +15,49 @@ import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
|||||||
})
|
})
|
||||||
export class ExpedientePage implements OnInit {
|
export class ExpedientePage implements OnInit {
|
||||||
|
|
||||||
segment:string;
|
segment: string;
|
||||||
skeletonLoader = true
|
skeletonLoader = true
|
||||||
//profile:string;
|
//profile:string;
|
||||||
showLoader:boolean;
|
showLoader: boolean;
|
||||||
|
|
||||||
taskslist = [];
|
taskslist = [];
|
||||||
serialNumber:string;
|
serialNumber: string;
|
||||||
|
|
||||||
expedienteGdStore = ExpedienteGdStore
|
expedienteGdStore = ExpedienteGdStore
|
||||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
expedienteTaskPipe = new ExpedienteTaskPipe()
|
||||||
|
onlinecheck: boolean;
|
||||||
|
|
||||||
|
listToPresent;
|
||||||
|
synch = synchro
|
||||||
constructor(
|
constructor(
|
||||||
private processes:ProcessesService,
|
private processes: ProcessesService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private toastService: ToastService
|
private toastService: ToastService,
|
||||||
) {}
|
public platform: Platform,
|
||||||
|
private sqliteservice: SqliteService,
|
||||||
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
const location = window.location
|
const location = window.location
|
||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
|
|
||||||
this.LoadList()
|
this.getEventsFromLocalDb();
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
if (this.onlinecheck) {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
this.LoadList()
|
||||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
|
||||||
this.refreshing()
|
this.router.events.forEach((event) => {
|
||||||
} else {
|
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||||
this.LoadList()
|
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||||
|
this.refreshing()
|
||||||
|
} else {
|
||||||
|
this.LoadList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async LoadList() {
|
async LoadList() {
|
||||||
@@ -54,17 +66,18 @@ export class ExpedientePage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
const expediente: object[] = await this.processes.GetTaskListExpediente(false).toPromise()
|
const expediente: object[] = await this.processes.GetTaskListExpediente(false).toPromise()
|
||||||
const result = expediente
|
const result = expediente
|
||||||
|
|
||||||
this.taskslist = new Array();
|
this.taskslist = new Array();
|
||||||
let res = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
let res = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||||
|
|
||||||
res.forEach((element: any) => {
|
res.forEach((element: any) => {
|
||||||
|
|
||||||
let task = this.expedienteTaskPipe.transform(element)
|
let task = this.expedienteTaskPipe.transform(element)
|
||||||
this.taskslist.push(task);
|
this.taskslist.push(task);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.expedienteGdStore.reset(this.taskslist);
|
this.listToPresent = this.taskslist
|
||||||
|
console.log('expediente list', this.listToPresent)
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest('Processo não encontrado')
|
this.toastService.badRequest('Processo não encontrado')
|
||||||
@@ -92,9 +105,75 @@ export class ExpedientePage implements OnInit {
|
|||||||
this.router.navigate(['/home/gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital']);
|
||||||
}
|
}
|
||||||
|
|
||||||
goToExpediente(serialNumber:any){
|
goToExpediente(serialNumber: any) {
|
||||||
//console.log('ABRE');
|
//console.log('ABRE');
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||||
|
}
|
||||||
|
|
||||||
|
SqliteAddExpediente(list) {
|
||||||
|
list.forEach((expediente) => {
|
||||||
|
let data = {
|
||||||
|
serialNumber: expediente.serialNumber,
|
||||||
|
workflowInstanceFolio: expediente.workflowInstanceFolio,
|
||||||
|
Documents: expediente.Documents,
|
||||||
|
actions: expediente.actions,
|
||||||
|
activityInstanceName: expediente.activityInstanceName,
|
||||||
|
formURL: expediente.formURL,
|
||||||
|
originator: expediente.originator,
|
||||||
|
taskStartDate: expediente.taskStartDate,
|
||||||
|
totalDocuments: expediente.totalDocuments,
|
||||||
|
workflowDisplayName: expediente.workflowDisplayName,
|
||||||
|
workflowID: expediente.workflowID,
|
||||||
|
workflowInstanceDataFields: expediente.workflowInstanceDataFields,
|
||||||
|
workflowInstanceID: expediente.workflowInstanceID,
|
||||||
|
workflowName: expediente.workflowName
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sqliteservice.addExpediente(data);
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getEventsFromLocalDb() {
|
||||||
|
|
||||||
|
synchro.registerCallback('Online', () => {
|
||||||
|
this.onlinecheck = true;
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.onlinecheck = false;
|
||||||
|
this.taskslist = new Array();
|
||||||
|
this.sqliteservice.getprocessByworkflow("Expediente").then((expediente: any[]) => {
|
||||||
|
|
||||||
|
expediente.forEach((element) => {
|
||||||
|
|
||||||
|
var workflow = JSON.parse(element.workflowInstanceDataFields);
|
||||||
|
|
||||||
|
let exped = {
|
||||||
|
"CreateDate": element.taskStartDate,
|
||||||
|
"DocumentsQty": element.totalDocuments,
|
||||||
|
"Senders": workflow.Senders,
|
||||||
|
"SerialNumber": element.serialNumber,
|
||||||
|
"Status": workflow.Status,
|
||||||
|
"Subject": workflow.Subject,
|
||||||
|
"WorkflowName": element.workflowDisplayName,
|
||||||
|
"activityInstanceName": element.activityInstanceName
|
||||||
|
}
|
||||||
|
|
||||||
|
this.taskslist.push(exped)
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
this.listToPresent = this.taskslist
|
||||||
|
console.log("All expedientes from local,", expediente)
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
|
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center exp-card-title ">Todas as tarefas</p>
|
<p class="text-center exp-card-title ">Todas as tarefas</p>
|
||||||
<p class="text-center exp-card-content">{{ totalDocumentStore.count }} <span class="title1">Documentos</span></p>
|
<p class="text-center exp-card-content">{{ allProcessesList.length }} <span class="title1">Documentos</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="box-hover exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="box-hover exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||||
|
|||||||
@@ -22,39 +22,43 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
|||||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||||
|
|
||||||
|
import { SqliteService } from '../../services/sqlite.service';
|
||||||
|
import { synchro } from '../../services/socket/synchro.service';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-gabinete-digital',
|
selector: 'app-gabinete-digital',
|
||||||
templateUrl: './gabinete-digital.page.html',
|
templateUrl: './gabinete-digital.page.html',
|
||||||
styleUrls: ['./gabinete-digital.page.scss'],
|
styleUrls: ['./gabinete-digital.page.scss'],
|
||||||
})
|
})
|
||||||
|
|
||||||
export class GabineteDigitalPage implements OnInit, DoCheck {
|
export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||||
|
|
||||||
segment:string;
|
segment: string;
|
||||||
segmentVista:string;
|
segmentVista: string;
|
||||||
showLoader: boolean;
|
showLoader: boolean;
|
||||||
public profile:string;
|
public profile: string;
|
||||||
|
|
||||||
allProcessesList: any = new Array();
|
allProcessesList: any = new Array();
|
||||||
skeletonLoader: boolean;
|
skeletonLoader: boolean;
|
||||||
|
|
||||||
count_exp_dailywork=0;
|
count_exp_dailywork = 0;
|
||||||
count_exp_pr =0
|
count_exp_pr = 0
|
||||||
count_desp_dailywork=0;
|
count_desp_dailywork = 0;
|
||||||
count_desp_pending=0;
|
count_desp_pending = 0;
|
||||||
count_par_dailywork=0;
|
count_par_dailywork = 0;
|
||||||
count_par_pending=0;
|
count_par_pending = 0;
|
||||||
count_def_dailywork=0;
|
count_def_dailywork = 0;
|
||||||
count_def_pending=0;
|
count_def_pending = 0;
|
||||||
count_exp_pp : string;
|
count_exp_pp: string;
|
||||||
count_exp_pd : string;
|
count_exp_pd: string;
|
||||||
count_dip_apr : string;
|
count_dip_apr: string;
|
||||||
count_dip_as_pr =0
|
count_dip_as_pr = 0
|
||||||
count_dip_pv=0;
|
count_dip_pv = 0;
|
||||||
count_dip_as = 0;
|
count_dip_as = 0;
|
||||||
count_de_pr = 0;
|
count_de_pr = 0;
|
||||||
count_ev_apr=0;
|
count_ev_apr = 0;
|
||||||
count_ev_md=0;
|
count_ev_md = 0;
|
||||||
count_total_pending = 0;
|
count_total_pending = 0;
|
||||||
count_desp_pr_active = 0;
|
count_desp_pr_active = 0;
|
||||||
count_all_processes = 0;
|
count_all_processes = 0;
|
||||||
@@ -63,7 +67,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
|
|
||||||
desktopComponent: any = {
|
desktopComponent: any = {
|
||||||
showEventList: false,
|
showEventList: false,
|
||||||
showExpediente : false,
|
showExpediente: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
showAllProcesses = false;
|
showAllProcesses = false;
|
||||||
@@ -81,7 +85,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
showSignedDiploma = false;
|
showSignedDiploma = false;
|
||||||
emptyTextDescription = 'Sem opção selecionada';
|
emptyTextDescription = 'Sem opção selecionada';
|
||||||
|
|
||||||
serialNumber:string;
|
serialNumber: string;
|
||||||
|
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
mdgpr = "MDGPR";
|
mdgpr = "MDGPR";
|
||||||
@@ -102,6 +106,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
//
|
//
|
||||||
// pipe
|
// pipe
|
||||||
|
|
||||||
|
synch = synchro;
|
||||||
|
|
||||||
|
|
||||||
customTaskPipe = new CustomTaskPipe()
|
customTaskPipe = new CustomTaskPipe()
|
||||||
|
|
||||||
@@ -110,7 +116,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
@ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage;
|
@ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processesbackend:ProcessesService,
|
private processesbackend: ProcessesService,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@@ -118,26 +124,28 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
public p: PermissionService,
|
public p: PermissionService,
|
||||||
public waitForDomService: WaitForDomService,
|
public waitForDomService: WaitForDomService,
|
||||||
private notificationsService: NotificationsService,
|
private notificationsService: NotificationsService,
|
||||||
private despachoRule: DespachoService
|
private despachoRule: DespachoService,
|
||||||
) {
|
private sqliteservice: SqliteService,
|
||||||
|
private platform: Platform
|
||||||
|
) {
|
||||||
|
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
// if not mobile remove all component
|
// if not mobile remove all component
|
||||||
if( window.innerWidth < 701){
|
if (window.innerWidth < 701) {
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
this.segmentVista = "listview";
|
this.segmentVista = "listview";
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.segmentVista = "boxview";
|
this.segmentVista = "boxview";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.checkRoutes();
|
this.checkRoutes();
|
||||||
|
|
||||||
|
|
||||||
// this.eventoaprovacaostore.resetmd([])
|
// this.eventoaprovacaostore.resetmd([])
|
||||||
// this.eventoaprovacaostore.resetpr([])
|
// this.eventoaprovacaostore.resetpr([])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngDoCheck(): void {
|
ngDoCheck(): void {
|
||||||
@@ -159,22 +167,24 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
this.segmentVista = "listview";
|
this.segmentVista = "listview";
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.segmentVista = "boxview"
|
this.segmentVista = "boxview"
|
||||||
}
|
}
|
||||||
|
|
||||||
const pathname = window.location.pathname
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
|
this.getAllProcessFromDB()
|
||||||
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
if (event instanceof NavigationEnd && event.url == pathname) {
|
||||||
|
|
||||||
this.waitForDomService.selector({
|
this.waitForDomService.selector({
|
||||||
selector: 'app-gabinete-digital ion-content .aside-wrapper',
|
selector: 'app-gabinete-digital ion-content .aside-wrapper',
|
||||||
callback: ()=> {
|
callback: () => {
|
||||||
this.checkRoutes();
|
this.checkRoutes();
|
||||||
this.LoadCounts();
|
this.LoadCounts();
|
||||||
}
|
}
|
||||||
@@ -186,7 +196,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
|
|
||||||
this.waitForDomService.selector({
|
this.waitForDomService.selector({
|
||||||
selector: 'app-gabinete-digital ion-content .aside-wrapper',
|
selector: 'app-gabinete-digital ion-content .aside-wrapper',
|
||||||
callback: ()=> {
|
callback: () => {
|
||||||
this.loadAllProcesses();
|
this.loadAllProcesses();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -194,16 +204,17 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async loadAllProcesses() {
|
async loadAllProcesses() {
|
||||||
let allProcessesList = await this.processesbackend.GetTasksList("", false).toPromise();
|
let allProcessesList = await this.processesbackend.GetTasksList("", false).toPromise();
|
||||||
|
|
||||||
if(!this.p.userRole(['PR'])) {
|
if (!this.p.userRole(['PR'])) {
|
||||||
allProcessesList = allProcessesList.filter( element => element.activityInstanceName != 'Assinar Diplomas')
|
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Assinar Diplomas')
|
||||||
} else if (this.p.userRole(['PR'])) {
|
} else if (this.p.userRole(['PR'])) {
|
||||||
allProcessesList = allProcessesList.filter( element => element.activityInstanceName != 'Diploma Assinado')
|
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Diploma Assinado')
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(allProcessesList);
|
console.log(allProcessesList);
|
||||||
|
|
||||||
|
this.addProcessToDB(allProcessesList)
|
||||||
this.skeletonLoader = true;
|
this.skeletonLoader = true;
|
||||||
|
|
||||||
this.allProcessesList = [];
|
this.allProcessesList = [];
|
||||||
@@ -211,7 +222,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
allProcessesList.forEach(element => {
|
allProcessesList.forEach(element => {
|
||||||
let date = new Date(element.taskStartDate);
|
let date = new Date(element.taskStartDate);
|
||||||
date.setMonth(date.getMonth() + 1);
|
date.setMonth(date.getMonth() + 1);
|
||||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||||
|
|
||||||
let task = {
|
let task = {
|
||||||
"SerialNumber": element.serialNumber,
|
"SerialNumber": element.serialNumber,
|
||||||
@@ -230,117 +241,194 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
||||||
}
|
}
|
||||||
|
|
||||||
this.allProcessesList.push(task);
|
this.allProcessesList.push(task);
|
||||||
this.allProcessesList = removeDuplicate( this.allProcessesList)
|
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||||
|
|
||||||
|
this.totalDocumentStore.resetCount(this.allProcessesList.length)
|
||||||
|
|
||||||
this.totalDocumentStore.resetCount( this.allProcessesList.length)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.skeletonLoader = false;
|
this.skeletonLoader = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sortArrayISODate(myArray: any){
|
addProcessToDB(data) {
|
||||||
return myArray.sort(function(a, b) {
|
this.platform.ready().then(() => {
|
||||||
|
data.forEach(element => {
|
||||||
|
|
||||||
|
let process = {
|
||||||
|
"serialNumber": element.serialNumber,
|
||||||
|
"workflowInstanceFolio": element.workflowInstanceFolio,
|
||||||
|
"Documents": element.Documents,
|
||||||
|
"actions": element.actions,
|
||||||
|
"activityInstanceName": element.activityInstanceName,
|
||||||
|
"formURL": element.formURL,
|
||||||
|
"originator": element.originator,
|
||||||
|
"taskStartDate": element.taskStartDate,
|
||||||
|
"totalDocuments": element.totalDocuments,
|
||||||
|
"workflowDisplayName": element.workflowDisplayName,
|
||||||
|
"workflowID": element.workflowID,
|
||||||
|
"workflowInstanceDataFields": element.workflowInstanceDataFields,
|
||||||
|
"workflowInstanceID": element.workflowInstanceID,
|
||||||
|
"workflowName": element.workflowName
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sqliteservice.addProcess(process);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllProcessFromDB() {
|
||||||
|
|
||||||
|
synchro.registerCallback('Online', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.loadAllProcesses();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
|
||||||
|
this.sqliteservice.getAllProcess().then((allprocess: any[]) => {
|
||||||
|
allprocess.forEach(element => {
|
||||||
|
let date = new Date(element.taskStartDate);
|
||||||
|
date.setMonth(date.getMonth() + 1);
|
||||||
|
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||||
|
|
||||||
|
var workflowInstanceDataFields = JSON.parse(element.workflowInstanceDataFields);
|
||||||
|
console.log("WORKFLOW all process", workflowInstanceDataFields)
|
||||||
|
|
||||||
|
let task = {
|
||||||
|
"SerialNumber": element.serialNumber,
|
||||||
|
"Folio": workflowInstanceDataFields.Subject,
|
||||||
|
"Senders": workflowInstanceDataFields.Sender,
|
||||||
|
"CreateDate": taskDate,
|
||||||
|
"DocumentURL": workflowInstanceDataFields.ViewerRequest,
|
||||||
|
"Remetente": workflowInstanceDataFields.Remetente,
|
||||||
|
"DocumentsQty": element.totalDocuments,
|
||||||
|
"DocId": workflowInstanceDataFields.DispatchDocId,
|
||||||
|
"FolderID": workflowInstanceDataFields.FolderID,
|
||||||
|
"WorkflowName": element.workflowDisplayName,
|
||||||
|
"activityInstanceName": element.activityInstanceName,
|
||||||
|
"Status": workflowInstanceDataFields.Status,
|
||||||
|
"Agenda": workflowInstanceDataFields.Agenda,
|
||||||
|
"customDate": this.setFormatDate(new Date(workflowInstanceDataFields.StartDate), new Date(workflowInstanceDataFields.EndDate), workflowInstanceDataFields.IsAllDayEvent),
|
||||||
|
}
|
||||||
|
|
||||||
|
this.allProcessesList.push(task);
|
||||||
|
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||||
|
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||||
|
|
||||||
|
this.totalDocumentStore.resetCount(this.allProcessesList.length)
|
||||||
|
|
||||||
|
});
|
||||||
|
console.log("All process from db ", allprocess)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
sortArrayISODate(myArray: any) {
|
||||||
|
return myArray.sort(function (a, b) {
|
||||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setFormatDate(start:any, end:any, allday:boolean){
|
setFormatDate(start: any, end: any, allday: boolean) {
|
||||||
let customDate;
|
let customDate;
|
||||||
/* start = new Date();
|
/* start = new Date();
|
||||||
end= new Date("2021-08-04T18:01:04.753Z"); */
|
end= new Date("2021-08-04T18:01:04.753Z"); */
|
||||||
//end = new Date("2021-09-04T18:01:04.753Z");
|
//end = new Date("2021-09-04T18:01:04.753Z");
|
||||||
|
|
||||||
const totalSeconds = Math.floor((end - (start))/1000);;
|
const totalSeconds = Math.floor((end - (start)) / 1000);;
|
||||||
const totalMinutes = Math.floor(totalSeconds/60);
|
const totalMinutes = Math.floor(totalSeconds / 60);
|
||||||
const totalHours = Math.floor(totalMinutes/60);
|
const totalHours = Math.floor(totalMinutes / 60);
|
||||||
const totalDays = Math.floor(totalHours/24);
|
const totalDays = Math.floor(totalHours / 24);
|
||||||
|
|
||||||
const hours = totalHours - ( totalDays * 24 );
|
const hours = totalHours - (totalDays * 24);
|
||||||
const minutes = totalMinutes - ( totalDays * 24 * 60 ) - ( hours * 60 );
|
const minutes = totalMinutes - (totalDays * 24 * 60) - (hours * 60);
|
||||||
const seconds = totalSeconds - ( totalDays * 24 * 60 * 60 ) - ( hours * 60 * 60 ) - ( minutes * 60 );
|
const seconds = totalSeconds - (totalDays * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60);
|
||||||
|
|
||||||
let diffDays = totalDays;
|
let diffDays = totalDays;
|
||||||
let diffMinutes = minutes;
|
let diffMinutes = minutes;
|
||||||
|
|
||||||
if(totalDays == 0){
|
if (totalDays == 0) {
|
||||||
if(allday){
|
if (allday) {
|
||||||
customDate = this.getCustomDate(start)+", "+this.getCustomHours(start)+" (todo dia)";
|
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " (todo dia)";
|
||||||
console.log(customDate);
|
console.log(customDate);
|
||||||
return customDate;
|
return customDate;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
//customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+" ("+minutes+" mins)";
|
//customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+" ("+minutes+" mins)";
|
||||||
customDate = this.getCustomDate(start)+", "+this.getCustomHours(start)+" | "+this.getCustomHours(end);
|
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " | " + this.getCustomHours(end);
|
||||||
return customDate;
|
return customDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+
|
customDate = this.getCustomDate(start) + "," + this.getCustomHours(start) +
|
||||||
" (termina:"+ this.getCustomDate(end)+","+this.getCustomHours(end)+")";
|
" (termina:" + this.getCustomDate(end) + "," + this.getCustomHours(end) + ")";
|
||||||
return customDate;
|
return customDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomDate(thedate: Date){
|
getCustomDate(thedate: Date) {
|
||||||
return thedate.getDate() + "/" +
|
return thedate.getDate() + "/" +
|
||||||
(thedate.getMonth()+1) + "/" +
|
(thedate.getMonth() + 1) + "/" +
|
||||||
thedate.getFullYear();
|
thedate.getFullYear();
|
||||||
}
|
}
|
||||||
getCustomHours(thedate: Date){
|
getCustomHours(thedate: Date) {
|
||||||
return thedate.getHours() + ":" +
|
return thedate.getHours() + ":" +
|
||||||
thedate.getMinutes();
|
thedate.getMinutes();
|
||||||
}
|
}
|
||||||
|
|
||||||
goToProcess(serialNumber:string, workflowName:string, activityName:string){
|
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
|
||||||
if(workflowName == 'Despacho') {
|
if (workflowName == 'Despacho') {
|
||||||
if(activityName == 'Tarefa de Despacho'){
|
if (activityName == 'Tarefa de Despacho') {
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Despacho do Presidente da República') {
|
else if (workflowName == 'Despacho do Presidente da República') {
|
||||||
if(activityName == 'Tarefa de Despacho'){
|
if (activityName == 'Tarefa de Despacho') {
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos-pr',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/despachos-pr', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma'){
|
else if (activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma') {
|
||||||
this.router.navigate(['/home/gabinete-digital/diplomas',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(activityName == 'Diploma Assinado'){
|
else if (activityName == 'Diploma Assinado') {
|
||||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/diplomas-assinar', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {
|
else if (workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Expediente') {
|
else if (workflowName == 'Expediente') {
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Expediente' && this.loggeduser.Profile == 'PR') {
|
else if (workflowName == 'Expediente' && this.loggeduser.Profile == 'PR') {
|
||||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if (workflowName == "Pedido de Parecer do Presidente") {
|
else if (workflowName == "Pedido de Parecer do Presidente") {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
/* else if (workflowName == "Expediente") {
|
/* else if (workflowName == "Expediente") {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||||
} */
|
} */
|
||||||
else if(workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR') {
|
else if (workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR') {
|
||||||
this.router.navigate(['/home/gabinete-digital/event-list/approve-event',serialNumber, 'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('cant find page for this task')
|
console.log('cant find page for this task')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onSegmentVistaChange(){
|
onSegmentVistaChange() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkUser(){
|
checkUser() {
|
||||||
this.selectedElement='allProcessesTag';
|
this.selectedElement = 'allProcessesTag';
|
||||||
this.showAllProcesses = true;
|
this.showAllProcesses = true;
|
||||||
/* switch(this.loggeduser.Profile){
|
/* switch(this.loggeduser.Profile){
|
||||||
case 'MDGPR':
|
case 'MDGPR':
|
||||||
@@ -352,77 +440,77 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
} */
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
hideRefreshButton(){
|
hideRefreshButton() {
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
this.hideRefreshBtn = false;
|
this.hideRefreshBtn = false;
|
||||||
this.hideInMobile = false;
|
this.hideInMobile = false;
|
||||||
this.segmentVista = "listview";
|
this.segmentVista = "listview";
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.hideRefreshBtn = true;
|
this.hideRefreshBtn = true;
|
||||||
this.hideInMobile = true;
|
this.hideInMobile = true;
|
||||||
this.segmentVista = "boxview";
|
this.segmentVista = "boxview";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(window.innerWidth < 701){
|
if (window.innerWidth < 701) {
|
||||||
this.hideRefreshBtn = false;
|
this.hideRefreshBtn = false;
|
||||||
this.hideInMobile = false;
|
this.hideInMobile = false;
|
||||||
this.segmentVista = "listview";
|
this.segmentVista = "listview";
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.hideRefreshBtn = true;
|
this.hideRefreshBtn = true;
|
||||||
this.hideInMobile = true;
|
this.hideInMobile = true;
|
||||||
this.segmentVista = "boxview";
|
this.segmentVista = "boxview";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRoutes(){
|
checkRoutes() {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
if(this.router.url == '/home/gabinete-digital?processes=true'){
|
if (this.router.url == '/home/gabinete-digital?processes=true') {
|
||||||
this.openAllProcessesPage();
|
this.openAllProcessesPage();
|
||||||
this.selectedElement='allProcessesTag';
|
this.selectedElement = 'allProcessesTag';
|
||||||
}
|
}
|
||||||
if(this.router.url == '/home/gabinete-digital?eventos=true'){
|
if (this.router.url == '/home/gabinete-digital?eventos=true') {
|
||||||
this.openEventsToApprovePage();
|
this.openEventsToApprovePage();
|
||||||
this.selectedElement='approval';
|
this.selectedElement = 'approval';
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?expedientes=true'){
|
else if (this.router.url == '/home/gabinete-digital?expedientes=true') {
|
||||||
this.openExpedientListPage();
|
this.openExpedientListPage();
|
||||||
if(this.loggeduser.Profile == 'MDGPR'){
|
if (this.loggeduser.Profile == 'MDGPR') {
|
||||||
this.selectedElement='Correspondence';
|
this.selectedElement = 'Correspondence';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.selectedElement='Expediente Presidente'
|
this.selectedElement = 'Expediente Presidente'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?pendentes=true'){
|
else if (this.router.url == '/home/gabinete-digital?pendentes=true') {
|
||||||
this.openPendentesPage('');
|
this.openPendentesPage('');
|
||||||
this.selectedElement='Pending';
|
this.selectedElement = 'Pending';
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?despachos=true'){
|
else if (this.router.url == '/home/gabinete-digital?despachos=true') {
|
||||||
this.openDespachosPage('');
|
this.openDespachosPage('');
|
||||||
this.selectedElement='Dispatches';
|
this.selectedElement = 'Dispatches';
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?pedidos=true'){
|
else if (this.router.url == '/home/gabinete-digital?pedidos=true') {
|
||||||
this.openPedidosPage('parecer');
|
this.openPedidosPage('parecer');
|
||||||
this.selectedElement='RequestsForOpinion';
|
this.selectedElement = 'RequestsForOpinion';
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?expedientespr=true'){
|
else if (this.router.url == '/home/gabinete-digital?expedientespr=true') {
|
||||||
this.openExpedientesPrPage();
|
this.openExpedientesPrPage();
|
||||||
this.selectedElement='Expediente Presidente'
|
this.selectedElement = 'Expediente Presidente'
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?despachospr=true'){
|
else if (this.router.url == '/home/gabinete-digital?despachospr=true') {
|
||||||
this.openDespachosPrPage('');
|
this.openDespachosPrPage('');
|
||||||
this.selectedElement='DispatchesPr'
|
this.selectedElement = 'DispatchesPr'
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?diplomas=true'){
|
else if (this.router.url == '/home/gabinete-digital?diplomas=true') {
|
||||||
this.openDiplomasPage('validar');
|
this.openDiplomasPage('validar');
|
||||||
this.selectedElement='DiplomasPorValidar';
|
this.selectedElement = 'DiplomasPorValidar';
|
||||||
}
|
}
|
||||||
else if(this.router.url == '/home/gabinete-digital?diplomasassinar=true'){
|
else if (this.router.url == '/home/gabinete-digital?diplomasassinar=true') {
|
||||||
this. openDiplomasAssinarPage();
|
this.openDiplomasAssinarPage();
|
||||||
this.selectedElement='DiplomasAssinar';
|
this.selectedElement = 'DiplomasAssinar';
|
||||||
}
|
}
|
||||||
else if (this.router.url == '/home/gabinete-digital?parecer=true') {
|
else if (this.router.url == '/home/gabinete-digital?parecer=true') {
|
||||||
this.openPedidosPage('parecer')
|
this.openPedidosPage('parecer')
|
||||||
@@ -430,7 +518,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
else if (this.router.url == '/home/gabinete-digital?deferimento=true') {
|
else if (this.router.url == '/home/gabinete-digital?deferimento=true') {
|
||||||
this.openPedidosPage('deferimento')
|
this.openPedidosPage('deferimento')
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.checkUser();
|
this.checkUser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -464,8 +552,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
this.expedientegbstore.count = expedientes.length
|
this.expedientegbstore.count = expedientes.length
|
||||||
|
|
||||||
|
|
||||||
let despachos = await this.despachoRule.getList({updateStore: true})
|
let despachos = await this.despachoRule.getList({ updateStore: true })
|
||||||
if(despachos) {
|
if (despachos) {
|
||||||
this.despachoStore.reset(despachos)
|
this.despachoStore.reset(despachos)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,7 +569,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
this.count_def_dailywork = Object.keys(deferimentos.filter(data => data.workflowInstanceDataFields.Status == "Active")).length;
|
this.count_def_dailywork = Object.keys(deferimentos.filter(data => data.workflowInstanceDataFields.Status == "Active")).length;
|
||||||
this.pedidosstore.countdeferimento = this.count_def_dailywork;
|
this.pedidosstore.countdeferimento = this.count_def_dailywork;
|
||||||
|
|
||||||
let pendentes =await this.processesbackend.GetPendingTasks(false).toPromise();
|
let pendentes = await this.processesbackend.GetPendingTasks(false).toPromise();
|
||||||
this.count_total_pending = Object.keys(pendentes).length;
|
this.count_total_pending = Object.keys(pendentes).length;
|
||||||
this.pendentesstore.count = this.count_total_pending;
|
this.pendentesstore.count = this.count_total_pending;
|
||||||
|
|
||||||
@@ -531,7 +619,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
this.count_dip_as_pr = Object.keys(diplomasAssinados).length;
|
this.count_dip_as_pr = Object.keys(diplomasAssinados).length;
|
||||||
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
|
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
|
||||||
|
|
||||||
this.processesbackend.GetToApprovedEvents('Agenda','true').subscribe(res=>{
|
this.processesbackend.GetToApprovedEvents('Agenda', 'true').subscribe(res => {
|
||||||
this.count_ev_apr = res;
|
this.count_ev_apr = res;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -547,55 +635,55 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
console.log(event);
|
console.log(event);
|
||||||
|
|
||||||
// this.closeAllDesktopComponents();
|
// this.closeAllDesktopComponents();
|
||||||
/* switch(this.loggeduser.Profile){
|
/* switch(this.loggeduser.Profile){
|
||||||
case 'MDGPR':
|
case 'MDGPR':
|
||||||
this.selectedElement='Correspondence';
|
this.selectedElement='Correspondence';
|
||||||
this.showExpedients = true;
|
this.showExpedients = true;
|
||||||
this.expedientesPage.doRefresh();
|
this.expedientesPage.doRefresh();
|
||||||
break;
|
break;
|
||||||
case 'PR':
|
case 'PR':
|
||||||
this.selectedElement='ExpedientesPr';
|
this.selectedElement='ExpedientesPr';
|
||||||
this.showExpedientesPr = true;
|
this.showExpedientesPr = true;
|
||||||
break;
|
break;
|
||||||
} */
|
} */
|
||||||
this.LoadCounts();
|
this.LoadCounts();
|
||||||
//this.refreshExpedientes();
|
//this.refreshExpedientes();
|
||||||
|
|
||||||
if(event){
|
if (event) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
event.target.complete();
|
event.target.complete();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
console.log('null');
|
console.log('null');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedElementF(element:string) {
|
selectedElementF(element: string) {
|
||||||
if (window.innerWidth > 701) {
|
if (window.innerWidth > 701) {
|
||||||
return element == this.selectedElement
|
return element == this.selectedElement
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
openAllProcessesPage() {
|
openAllProcessesPage() {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"processes": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "processes": true, } };
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showAllProcesses = true;
|
this.showAllProcesses = true;
|
||||||
this.selectedElement="allProcessesTag";
|
this.selectedElement = "allProcessesTag";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openEventsToApprovePage() {
|
openEventsToApprovePage() {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "eventos": true, } };
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
//this.openEventsToApproveList(profile);
|
//this.openEventsToApproveList(profile);
|
||||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||||
}
|
}
|
||||||
@@ -608,26 +696,26 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
|
|
||||||
openExpedientListPage() {
|
openExpedientListPage() {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
switch(this.loggeduser.Profile){
|
switch (this.loggeduser.Profile) {
|
||||||
case 'MDGPR':
|
case 'MDGPR':
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
//this.openExpedientList();
|
//this.openExpedientList();
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.selectedElement='Correspondence'
|
this.selectedElement = 'Correspondence'
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "expedientes": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showExpedients = true;
|
this.showExpedients = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'PR':
|
case 'PR':
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.selectedElement='ExpedientesPr'
|
this.selectedElement = 'ExpedientesPr'
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "expedientes": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showExpedientesPr = true;
|
this.showExpedientesPr = true;
|
||||||
}
|
}
|
||||||
@@ -636,20 +724,20 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openPedidosPage(segment:string) {
|
openPedidosPage(segment: string) {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
|
|
||||||
let navigationExtras: NavigationExtras;
|
let navigationExtras: NavigationExtras;
|
||||||
|
|
||||||
if (segment == 'deferimento') {
|
if (segment == 'deferimento') {
|
||||||
navigationExtras= { queryParams: {"deferimento": true,}};
|
navigationExtras = { queryParams: { "deferimento": true, } };
|
||||||
this.segment = 'deferimento'
|
this.segment = 'deferimento'
|
||||||
} else if (segment == 'parecer') {
|
} else if (segment == 'parecer') {
|
||||||
navigationExtras = { queryParams: {"parecer": true,}};
|
navigationExtras = { queryParams: { "parecer": true, } };
|
||||||
this.segment = 'parecer'
|
this.segment = 'parecer'
|
||||||
}
|
}
|
||||||
|
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -659,78 +747,78 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
if (segment == 'deferimento') {
|
if (segment == 'deferimento') {
|
||||||
this.selectedElement = 'RequestForApproval'
|
this.selectedElement = 'RequestForApproval'
|
||||||
} else if (segment == 'parecer') {
|
} else if (segment == 'parecer') {
|
||||||
this.selectedElement='RequestsForOpinion'
|
this.selectedElement = 'RequestsForOpinion'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openDespachosPage(segment?:string) {
|
openDespachosPage(segment?: string) {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
if( window.innerWidth < 701){
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
let navigationExtras: NavigationExtras = {queryParams: {"despachos": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "despachos": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showDespachos = true;
|
this.showDespachos = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openDespachosPrPage(segment?:string) {
|
openDespachosPrPage(segment?: string) {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
if( window.innerWidth < 701){
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
|
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
let navigationExtras: NavigationExtras = {queryParams: {"despachospr": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "despachospr": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showDespachosPr = true;
|
this.showDespachosPr = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openPendentesPage(segment?:string){
|
openPendentesPage(segment?: string) {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
if( window.innerWidth < 701){
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"pendentes": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "pendentes": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showPendentes = true;
|
this.showPendentes = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openExpedientesPrPage(segment?:string){
|
openExpedientesPrPage(segment?: string) {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.selectedElement='ExpedientesPr'
|
this.selectedElement = 'ExpedientesPr'
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientespr": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "expedientespr": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showExpedientesPr = true;
|
this.showExpedientesPr = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openDiplomasPage(segment:string) {
|
openDiplomasPage(segment: string) {
|
||||||
let navigationExtras: NavigationExtras;
|
let navigationExtras: NavigationExtras;
|
||||||
|
|
||||||
if (segment == 'validar') {
|
if (segment == 'validar') {
|
||||||
navigationExtras= { queryParams: {"validar": true,}};
|
navigationExtras = { queryParams: { "validar": true, } };
|
||||||
} else if (segment == 'assinados') {
|
} else if (segment == 'assinados') {
|
||||||
navigationExtras = { queryParams: {"assinados": true,}};
|
navigationExtras = { queryParams: { "assinados": true, } };
|
||||||
}
|
}
|
||||||
|
|
||||||
this.segment = segment;
|
this.segment = segment;
|
||||||
|
|
||||||
if( window.innerWidth < 701){
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
this.segment = segment;
|
this.segment = segment;
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomas": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: { "diplomas": true, } };
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showDiplomas = true;
|
this.showDiplomas = true;
|
||||||
}
|
}
|
||||||
@@ -738,14 +826,14 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
|
|
||||||
openDiplomasAssinarPage() {
|
openDiplomasAssinarPage() {
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
if( window.innerWidth < 701){
|
if (window.innerWidth < 701) {
|
||||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||||
}
|
|
||||||
else{
|
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
|
||||||
this.showDiplomasAssinar = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
let navigationExtras: NavigationExtras = { queryParams: { "diplomasassinar": true, } };
|
||||||
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
|
this.showDiplomasAssinar = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { environment } from 'src/environments/environment';
|
|||||||
import { AlertController } from '@ionic/angular';
|
import { AlertController } from '@ionic/angular';
|
||||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
|
import { SqliteService } from '../../services/sqlite.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
@@ -31,11 +32,14 @@ export class LoginPage implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
public alertController: AlertController
|
public alertController: AlertController,
|
||||||
|
private sqliteservice: SqliteService
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//Function to validade the login inputs
|
//Function to validade the login inputs
|
||||||
validateUsername() {
|
validateUsername() {
|
||||||
@@ -85,7 +89,7 @@ export class LoginPage implements OnInit {
|
|||||||
await this.authService.SetSession(attempt, this.userattempt);
|
await this.authService.SetSession(attempt, this.userattempt);
|
||||||
await this.authService.loginChat(this.userattempt);
|
await this.authService.loginChat(this.userattempt);
|
||||||
this.getToken();
|
this.getToken();
|
||||||
SessionStore.setInativity(true)
|
SessionStore.setInativity(true);
|
||||||
|
|
||||||
this.goback()
|
this.goback()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EventTrigger } from './eventTrigger.service';
|
||||||
|
|
||||||
|
describe('EventsService', () => {
|
||||||
|
let service: EventTrigger;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(EventTrigger);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
export class EventTrigger {
|
||||||
|
|
||||||
|
private eventSubject = new Subject<any>()
|
||||||
|
|
||||||
|
publishSomeData(data: any){
|
||||||
|
this.eventSubject.next(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
getObservable(): Subject<any>{
|
||||||
|
return this.eventSubject
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -14,7 +14,8 @@ import { ToastService } from '../services/toast.service';
|
|||||||
import { Optional } from '@angular/core';
|
import { Optional } from '@angular/core';
|
||||||
import { JsonStore } from './jsonStore.service';
|
import { JsonStore } from './jsonStore.service';
|
||||||
import { synchro } from './socket/synchro.service';
|
import { synchro } from './socket/synchro.service';
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
import { EventTrigger } from '../services/eventTrigger.service';
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
@@ -41,7 +42,8 @@ export class NotificationsService {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private zone: NgZone,
|
private zone: NgZone,
|
||||||
private activeroute: ActivatedRoute,
|
private activeroute: ActivatedRoute,
|
||||||
private jsonstore: JsonStore) {
|
private jsonstore: JsonStore,
|
||||||
|
private eventtrigger: EventTrigger) {
|
||||||
|
|
||||||
this.storageService.get("Notifications").then((value) => {
|
this.storageService.get("Notifications").then((value) => {
|
||||||
|
|
||||||
@@ -83,7 +85,7 @@ export class NotificationsService {
|
|||||||
getAndpostToken(username) {
|
getAndpostToken(username) {
|
||||||
|
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
console.log('Notifications not supported')
|
//console.log('Notifications not supported')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const geturl = environment.apiURL + 'notifications/token';
|
const geturl = environment.apiURL + 'notifications/token';
|
||||||
@@ -136,87 +138,10 @@ export class NotificationsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getAndpostToken2() {
|
|
||||||
|
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
|
||||||
console.log('Notifications not supported')
|
|
||||||
} else {
|
|
||||||
|
|
||||||
const geturl = environment.apiURL + 'notifications/token';
|
|
||||||
if(window['WLAuthorizationManager']) {
|
|
||||||
if(window['WLAuthorizationManager'].obtainAccessToken) {
|
|
||||||
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
|
||||||
(token) => {
|
|
||||||
console.log('Push Notification: Success ' + token);
|
|
||||||
|
|
||||||
window['MFPPush'].initialize(
|
|
||||||
function (successResponse) {
|
|
||||||
console.log("Push notification Successfully Service intialized: " + successResponse);
|
|
||||||
},
|
|
||||||
function (failureResponse) {
|
|
||||||
console.log("Push notification failure Service intialized: " + failureResponse);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
window['MFPPush'].registerDevice(null, (successResponse) => {
|
|
||||||
console.log("Successfully registered: " + JSON.stringify(successResponse));
|
|
||||||
console.log('token: ', successResponse.deviceId)
|
|
||||||
/* this.storageService.store(username, successResponse.deviceId);
|
|
||||||
this.storageService.get(username).then(value => {
|
|
||||||
console.log('STORAGE TOKEN', value)
|
|
||||||
this.storageService.get(AuthConnstants.USER).then(res => {
|
|
||||||
console.log('USERID', res);
|
|
||||||
const headers = { 'Authorization': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' };
|
|
||||||
const body = {
|
|
||||||
UserId: res.UserId,
|
|
||||||
TokenId: successResponse.deviceId,
|
|
||||||
Status: 1,
|
|
||||||
Service: 1
|
|
||||||
};
|
|
||||||
this.http.post<Token>(`${geturl}`, body, { headers }).subscribe(data => {
|
|
||||||
console.log('TOKEN USER MIDLE', data);
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
}); */
|
|
||||||
},
|
|
||||||
function (failureResponse) {
|
|
||||||
console.log("Successfully failue: " + JSON.stringify(failureResponse));
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}, (error) => {
|
|
||||||
console.log('Push notification recived: failure ' + error.responseText);
|
|
||||||
console.log(JSON.stringify(error));
|
|
||||||
}
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
console.log('not called')
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log('not called')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
removeDepartment(index): void {
|
|
||||||
/* this.DataArray[this.DataArray.findIndex(item => item.index == index)];
|
|
||||||
this.DataArray.splice( this.DataArray.findIndex(item => item.indexOf(index.to) === 'William'),1); */
|
|
||||||
const indexx = this.DataArray.indexOf(index, 0);
|
|
||||||
if (indexx > -1) {
|
|
||||||
this.DataArray.splice(index, 1);
|
|
||||||
console.log('This notificatio', this.DataArray);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tempClearArray(){
|
tempClearArray(){
|
||||||
this.DataArray = [];
|
this.DataArray = [];
|
||||||
}
|
}
|
||||||
@@ -245,6 +170,9 @@ export class NotificationsService {
|
|||||||
this.storageService.store("Notifications",this.DataArray)
|
this.storageService.store("Notifications",this.DataArray)
|
||||||
|
|
||||||
console.log(message);
|
console.log(message);
|
||||||
|
this.eventtrigger.publishSomeData({
|
||||||
|
notification: "recive"
|
||||||
|
})
|
||||||
var data = JSON.parse(message.payload);
|
var data = JSON.parse(message.payload);
|
||||||
|
|
||||||
synchro.$send(data)
|
synchro.$send(data)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
|||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import { BackgroundService } from '../background.service';
|
import { BackgroundService } from '../background.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { EventTrigger } from '../eventTrigger.service'
|
||||||
|
|
||||||
export interface wss{
|
export interface wss{
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ class SynchroService {
|
|||||||
private url: string = ''
|
private url: string = ''
|
||||||
callback = function(){}
|
callback = function(){}
|
||||||
private _connected = false;
|
private _connected = false;
|
||||||
|
private eventtrigger: EventTrigger;
|
||||||
private BackgroundService = new BackgroundService()
|
private BackgroundService = new BackgroundService()
|
||||||
callBacks: {
|
callBacks: {
|
||||||
type: 'Offline' | 'Online' | 'Onmessage' | 'Chat' | 'Notification' | 'Notifications' | '',
|
type: 'Offline' | 'Online' | 'Onmessage' | 'Chat' | 'Notification' | 'Notifications' | '',
|
||||||
@@ -81,7 +83,7 @@ class SynchroService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!this.conected) {
|
//if(!this._connected) {
|
||||||
|
|
||||||
this.BackgroundService.online()
|
this.BackgroundService.online()
|
||||||
this.callBacks.forEach((e)=>{
|
this.callBacks.forEach((e)=>{
|
||||||
@@ -90,9 +92,13 @@ class SynchroService {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
console.log('open ======================= welcome to socket server')
|
console.log('open ======================= welcome to socket server')
|
||||||
|
this.eventtrigger.publishSomeData({
|
||||||
|
internet: "online"
|
||||||
|
})
|
||||||
|
|
||||||
this._connected = true
|
this._connected = true
|
||||||
|
|
||||||
// send all saved data due to internet connection
|
// send all saved data due to internet connection
|
||||||
@@ -177,14 +183,15 @@ class SynchroService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(this._connected) {
|
// if(this._connected){
|
||||||
this.BackgroundService.offline();
|
this.BackgroundService.offline();
|
||||||
this.callBacks.forEach((e)=>{
|
this.callBacks.forEach((e)=>{
|
||||||
if(e.type == 'Offline') {
|
if(e.type == 'Offline') {
|
||||||
e.funx()
|
e.funx()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
// status
|
// status
|
||||||
this._connected = false
|
this._connected = false
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { SqliteService } from './sqlite.service';
|
||||||
|
|
||||||
|
describe('SqliteService', () => {
|
||||||
|
let service: SqliteService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(SqliteService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,373 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class SqliteService {
|
||||||
|
|
||||||
|
private dbInstance: SQLiteObject;
|
||||||
|
readonly db_name: string = "gabinetedigital.db";
|
||||||
|
readonly events: string = "Events";
|
||||||
|
readonly expedientes: string = "Expedientes";
|
||||||
|
readonly allprocess: string = "ALLPROCESS";
|
||||||
|
EVENTS: Array<any>;
|
||||||
|
EXPEDIENTES: Array<any>;
|
||||||
|
ALLPROCESS: Array<any>;
|
||||||
|
PROCESS: Array<any>;
|
||||||
|
|
||||||
|
constructor(private platform: Platform,
|
||||||
|
private sqlite: SQLite) {
|
||||||
|
this.databaseConn();
|
||||||
|
}
|
||||||
|
|
||||||
|
databaseConn() {
|
||||||
|
this.platform.ready().then(async () => {
|
||||||
|
await this.sqlite.create({
|
||||||
|
name: this.db_name,
|
||||||
|
location: 'default'
|
||||||
|
}).then(async (sqLite: SQLiteObject) => {
|
||||||
|
this.dbInstance = sqLite;
|
||||||
|
await sqLite.executeSql(`
|
||||||
|
CREATE TABLE IF NOT EXISTS ${this.events} (
|
||||||
|
EventId varchar(255) PRIMARY KEY,
|
||||||
|
Subject varchar(255),
|
||||||
|
HasAttachments BIT,
|
||||||
|
Location varchar(255),
|
||||||
|
CalendarId varchar(255),
|
||||||
|
CalendarName varchar(255),
|
||||||
|
StartDate varchar(255),
|
||||||
|
EndDate varchar(255),
|
||||||
|
EventType varchar(255),
|
||||||
|
Attendees Text,
|
||||||
|
IsMeeting BIT,
|
||||||
|
IsRecurring BIT,
|
||||||
|
IsAllDayEvent BIT,
|
||||||
|
AppointmentState INTERGER,
|
||||||
|
TimeZone varchar(255),
|
||||||
|
Organizer Text,
|
||||||
|
Category varchar(255),
|
||||||
|
EventRecurrence Text,
|
||||||
|
Attachments Text,
|
||||||
|
Body Text
|
||||||
|
)`, [])
|
||||||
|
.then((res) => {
|
||||||
|
console.log("Sucess Events Table created: ", res)
|
||||||
|
})
|
||||||
|
.catch((error) => console.log(JSON.stringify(error)));
|
||||||
|
|
||||||
|
await sqLite.executeSql(`
|
||||||
|
CREATE TABLE IF NOT EXISTS ${this.expedientes} (
|
||||||
|
serialNumber varchar(255) PRIMARY KEY,
|
||||||
|
workflowInstanceFolio varchar(255),
|
||||||
|
Documents Text,
|
||||||
|
actions Text,
|
||||||
|
activityInstanceName varchar(255),
|
||||||
|
formURL varchar(255),
|
||||||
|
originator Text,
|
||||||
|
taskStartDate varchar(255),
|
||||||
|
totalDocuments INTERGER,
|
||||||
|
workflowDisplayName varchar(255),
|
||||||
|
workflowID INTERGER,
|
||||||
|
workflowInstanceDataFields Text,
|
||||||
|
workflowInstanceID INTERGER,
|
||||||
|
workflowName varchar(255)
|
||||||
|
)`, [])
|
||||||
|
.then((res) => {
|
||||||
|
console.log("Sucess Espedientes Table created: ", res)
|
||||||
|
})
|
||||||
|
.catch((error) => console.log(JSON.stringify(error)));
|
||||||
|
|
||||||
|
await sqLite.executeSql(`
|
||||||
|
CREATE TABLE IF NOT EXISTS ${this.allprocess} (
|
||||||
|
serialNumber varchar(255) PRIMARY KEY,
|
||||||
|
workflowInstanceFolio varchar(255),
|
||||||
|
Documents Text,
|
||||||
|
actions Text,
|
||||||
|
activityInstanceName varchar(255),
|
||||||
|
formURL varchar(255),
|
||||||
|
originator Text,
|
||||||
|
taskStartDate varchar(255),
|
||||||
|
totalDocuments INTERGER,
|
||||||
|
workflowDisplayName varchar(255),
|
||||||
|
workflowID INTERGER,
|
||||||
|
workflowInstanceDataFields Text,
|
||||||
|
workflowInstanceID INTERGER,
|
||||||
|
workflowName varchar(255)
|
||||||
|
)`, [])
|
||||||
|
.then((res) => {
|
||||||
|
console.log("Sucess AllProcess Table created: ", res)
|
||||||
|
})
|
||||||
|
.catch((error) => console.log(JSON.stringify(error)));
|
||||||
|
})
|
||||||
|
.catch((error) => console.log(JSON.stringify(error)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//addEvent
|
||||||
|
public addEvent(data) {
|
||||||
|
this.dbInstance.executeSql(`
|
||||||
|
INSERT OR REPLACE INTO ${this.events} (EventId,Subject,HasAttachments,Location,CalendarId,CalendarName,StartDate,EndDate,EventType,Attendees,IsMeeting,IsRecurring,IsAllDayEvent,AppointmentState,TimeZone,Organizer,Category,EventRecurrence,Attachments,Body )
|
||||||
|
VALUES ('${data.EventId}','${data.Subject}', '${data.HasAttachments}','${data.Location}','${data.CalendarId}','${data.CalendarName}','${data.StartDate}','${data.EndDate}','${data.EventType}','${data.Attendees}','${data.IsMeeting}','${data.IsRecurring}',
|
||||||
|
'${data.IsAllDayEvent}','${data.AppointmentState}','${data.TimeZone}','${data.Organizer}','${data.Category}','${data.EventRecurrence}','${data.Attachments}','${data.Body}')`, [])
|
||||||
|
.then(() => {
|
||||||
|
console.log("event add with Success");
|
||||||
|
|
||||||
|
}, (e) => {
|
||||||
|
console.log(JSON.stringify(e.err));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//addExpediente
|
||||||
|
public addExpediente(data) {
|
||||||
|
this.dbInstance.executeSql(`
|
||||||
|
INSERT OR REPLACE INTO ${this.expedientes} (serialNumber,workflowInstanceFolio,Documents,actions,activityInstanceName,formURL,originator,taskStartDate,totalDocuments,workflowDisplayName,workflowID,workflowInstanceDataFields,workflowInstanceID,workflowName)
|
||||||
|
VALUES ('${data.serialNumber}','${data.workflowInstanceFolio}', '${data.Documents}','${data.actions}','${data.activityInstanceName}','${data.formURL}','${data.originator}','${data.taskStartDate}','${data.totalDocuments}','${data.workflowDisplayName}','${data.workflowID}',
|
||||||
|
'${data.workflowInstanceDataFields}','${data.workflowInstanceID}','${data.workflowName}')`, [])
|
||||||
|
.then(() => {
|
||||||
|
console.log("expediente add with Success");
|
||||||
|
|
||||||
|
}, (e) => {
|
||||||
|
console.log(JSON.stringify(e.err));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//addprocess
|
||||||
|
public addProcess(data) {
|
||||||
|
this.dbInstance.executeSql(`
|
||||||
|
INSERT OR IGNORE INTO ${this.allprocess} (serialNumber,workflowInstanceFolio,Documents,actions,activityInstanceName,formURL,originator,taskStartDate,totalDocuments,workflowDisplayName,workflowID,workflowInstanceDataFields,workflowInstanceID,workflowName)
|
||||||
|
VALUES ('${data.serialNumber}','${data.workflowInstanceFolio}', '${JSON.stringify(data.Documents)}','${JSON.stringify(data.actions)}','${data.activityInstanceName}','${data.formURL}','${JSON.stringify(data.originator)}','${data.taskStartDate}','${data.totalDocuments}','${data.workflowDisplayName}','${data.workflowID}',
|
||||||
|
'${JSON.stringify(data.workflowInstanceDataFields)}','${data.workflowInstanceID}','${data.workflowName}')`, [])
|
||||||
|
.then(() => {
|
||||||
|
console.log("process add with Success");
|
||||||
|
|
||||||
|
}, (e) => {
|
||||||
|
console.log(JSON.stringify(e.err));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//updateprocess
|
||||||
|
public updateProcess(data) {
|
||||||
|
this.dbInstance.executeSql(`
|
||||||
|
INSERT OR REPLACE INTO ${this.allprocess} (serialNumber,workflowInstanceFolio,Documents,actions,activityInstanceName,formURL,originator,taskStartDate,totalDocuments,workflowDisplayName,workflowID,workflowInstanceDataFields,workflowInstanceID,workflowName)
|
||||||
|
VALUES ('${data.serialNumber}','${data.workflowInstanceFolio}', '${JSON.stringify(data.Documents)}','${JSON.stringify(data.actions)}','${data.activityInstanceName}','${data.formURL}','${JSON.stringify(data.originator)}','${data.taskStartDate}','${data.totalDocuments}','${data.workflowDisplayName}','${data.workflowID}',
|
||||||
|
'${JSON.stringify(data.workflowInstanceDataFields)}','${data.workflowInstanceID}','${data.workflowName}')`, [])
|
||||||
|
.then(() => {
|
||||||
|
console.log("process add with Success");
|
||||||
|
|
||||||
|
}, (e) => {
|
||||||
|
console.log(JSON.stringify(e.err));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//updateAttachment
|
||||||
|
updateUser(id, document,) {
|
||||||
|
let data = [document];
|
||||||
|
return this.dbInstance.executeSql(`UPDATE ${this.allprocess} SET Documents = ? WHERE serialNumber = ${id}`, [document]).then(() => {
|
||||||
|
console.log("process attachment updated")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//getAllEvents
|
||||||
|
getAllEvents() {
|
||||||
|
var hashattachment = false;
|
||||||
|
var ismeeting = false;
|
||||||
|
var isrecurring = false;
|
||||||
|
var isallday = false;
|
||||||
|
return this.dbInstance.executeSql(`SELECT * FROM ${this.events}`, []).then((res) => {
|
||||||
|
this.EVENTS = [];
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
|
if (res.rows.item(i).HasAttachments === "true") {
|
||||||
|
hashattachment = true
|
||||||
|
}
|
||||||
|
if (res.rows.item(i).IsMeeting === "true") {
|
||||||
|
ismeeting = true
|
||||||
|
}
|
||||||
|
if (res.rows.item(i).IsRecurring === "true") {
|
||||||
|
isrecurring = true
|
||||||
|
}
|
||||||
|
if (res.rows.item(i).IsAllDayEvent === "true") {
|
||||||
|
isallday = true
|
||||||
|
}
|
||||||
|
let event = {
|
||||||
|
EventId: res.rows.item(i).EventId,
|
||||||
|
HasAttachments: hashattachment,
|
||||||
|
Subject: res.rows.item(i).Subject,
|
||||||
|
Location: res.rows.item(i).Location,
|
||||||
|
CalendarId: res.rows.item(i).CalendarId,
|
||||||
|
CalendarName: res.rows.item(i).CalendarName,
|
||||||
|
StartDate: res.rows.item(i).StartDate,
|
||||||
|
EndDate: res.rows.item(i).EndDate,
|
||||||
|
EventType: res.rows.item(i).EventType,
|
||||||
|
Attendees: res.rows.item(i).Attendees,
|
||||||
|
IsMeeting: ismeeting,
|
||||||
|
IsRecurring: isrecurring,
|
||||||
|
IsAllDayEvent: isallday,
|
||||||
|
AppointmentState: res.rows.item(i).AppointmentState,
|
||||||
|
TimeZone: res.rows.item(i).TimeZone,
|
||||||
|
Organizer: res.rows.item(i).Organizer,
|
||||||
|
Category: res.rows.item(i).Category,
|
||||||
|
EventRecurrence: res.rows.item(i).EventRecurrence,
|
||||||
|
Attachments: res.rows.item(i).Attachments
|
||||||
|
}
|
||||||
|
this.EVENTS.push(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.EVENTS;
|
||||||
|
}
|
||||||
|
}, (e) => {
|
||||||
|
console.log(" Get all events error", JSON.stringify(e));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllExpedientes() {
|
||||||
|
return this.dbInstance.executeSql(`SELECT * FROM ${this.expedientes}`, []).then((res) => {
|
||||||
|
this.EXPEDIENTES = [];
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
|
this.EXPEDIENTES.push(res.rows.item(i));
|
||||||
|
}
|
||||||
|
return this.EXPEDIENTES;
|
||||||
|
}
|
||||||
|
}, (e) => {
|
||||||
|
console.log(" Get all expedientes error", JSON.stringify(e));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllProcess() {
|
||||||
|
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess}`, []).then((res) => {
|
||||||
|
this.ALLPROCESS = [];
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
|
this.ALLPROCESS.push(res.rows.item(i));
|
||||||
|
}
|
||||||
|
return this.ALLPROCESS;
|
||||||
|
}
|
||||||
|
}, (e) => {
|
||||||
|
console.log(" Get all process error", JSON.stringify(e));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//getlistOfEventAprove
|
||||||
|
getListOfEventAprove(process, type) {
|
||||||
|
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess} WHERE workflowDisplayName = ? OR workflowDisplayName = ? `, [process,type]).then((res) => {
|
||||||
|
this.ALLPROCESS = [];
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
|
this.ALLPROCESS.push(res.rows.item(i));
|
||||||
|
}
|
||||||
|
return this.ALLPROCESS;
|
||||||
|
}
|
||||||
|
}, (e) => {
|
||||||
|
console.log(" Get all process error", JSON.stringify(e));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//getprocessByworkflow
|
||||||
|
getprocessByworkflow(process) {
|
||||||
|
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess} WHERE workflowDisplayName = ? `, [process]).then((res) => {
|
||||||
|
this.ALLPROCESS = [];
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
|
this.ALLPROCESS.push(res.rows.item(i));
|
||||||
|
}
|
||||||
|
return this.ALLPROCESS;
|
||||||
|
}
|
||||||
|
}, (e) => {
|
||||||
|
console.log(" Get all process error", JSON.stringify(e));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getProcessById(serial) {
|
||||||
|
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess} WHERE serialNumber = ? `, [serial]).then((res) => {
|
||||||
|
this.PROCESS = [];
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
|
this.PROCESS.push(res.rows.item(i))
|
||||||
|
}
|
||||||
|
return this.PROCESS;
|
||||||
|
}
|
||||||
|
}, (e) => {
|
||||||
|
console.log(" Get process by serial error", JSON.stringify(e));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//getEventBy id
|
||||||
|
getEventById(id) {
|
||||||
|
|
||||||
|
var hashattachment = false;
|
||||||
|
var ismeeting = false;
|
||||||
|
var isrecurring = false;
|
||||||
|
var isallday = false;
|
||||||
|
var body;
|
||||||
|
var attendes;
|
||||||
|
var organizer;
|
||||||
|
var eventrecurrence;
|
||||||
|
var attachment;
|
||||||
|
|
||||||
|
return this.dbInstance.executeSql(`SELECT * FROM ${this.events} WHERE EventId = ? `, [id]).then((res) => {
|
||||||
|
this.EVENTS = [];
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
|
if (res.rows.item(i).HasAttachments === "true") {
|
||||||
|
hashattachment = true
|
||||||
|
}
|
||||||
|
if (res.rows.item(i).IsMeeting === "true") {
|
||||||
|
ismeeting = true
|
||||||
|
}
|
||||||
|
if (res.rows.item(i).IsRecurring === "true") {
|
||||||
|
isrecurring = true
|
||||||
|
}
|
||||||
|
if (res.rows.item(i).IsAllDayEvent === "true") {
|
||||||
|
isallday = true
|
||||||
|
}
|
||||||
|
/* if (res.rows.item(i).Body != "") {
|
||||||
|
body = JSON.parse(res.rows.item(i).Body);
|
||||||
|
}
|
||||||
|
if (res.rows.item(i).Attendees !="") {
|
||||||
|
attendes = JSON.parse(res.rows.item(i).Attendees);
|
||||||
|
}
|
||||||
|
if(res.rows.item(i).Organizer !=""){
|
||||||
|
organizer = JSON.parse(res.rows.item(i).Organizer);
|
||||||
|
}
|
||||||
|
if(res.row.item(i).EventRecurrence != ""){
|
||||||
|
eventrecurrence = JSON.parse(res.row.item(i).EventRecurrence);
|
||||||
|
}
|
||||||
|
if(res.row.item(i).Attachments != ""){
|
||||||
|
attachment = JSON.parse(res.row.item(i).Attachments);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
let event = {
|
||||||
|
EventId: res.rows.item(i).EventId,
|
||||||
|
HasAttachments: hashattachment,
|
||||||
|
Subject: res.rows.item(i).Subject,
|
||||||
|
Location: res.rows.item(i).Location,
|
||||||
|
CalendarId: res.rows.item(i).CalendarId,
|
||||||
|
CalendarName: res.rows.item(i).CalendarName,
|
||||||
|
StartDate: res.rows.item(i).StartDate,
|
||||||
|
EndDate: res.rows.item(i).EndDate,
|
||||||
|
EventType: res.rows.item(i).EventType,
|
||||||
|
Attendees: res.rows.item(i).Attendees,
|
||||||
|
IsMeeting: ismeeting,
|
||||||
|
IsRecurring: isrecurring,
|
||||||
|
IsAllDayEvent: isallday,
|
||||||
|
Body: res.rows.item(i).Body,
|
||||||
|
AppointmentState: res.rows.item(i).AppointmentState,
|
||||||
|
TimeZone: res.rows.item(i).TimeZone,
|
||||||
|
Organizer: res.rows.item(i).Organizer,
|
||||||
|
Category: res.rows.item(i).Category,
|
||||||
|
EventRecurrence: res.rows.item(i).EventRecurrence,
|
||||||
|
Attachments: res.rows.item(i).Attachments
|
||||||
|
}
|
||||||
|
this.EVENTS.push(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.EVENTS;
|
||||||
|
}
|
||||||
|
}, (e) => {
|
||||||
|
console.log(" Get events by id error", JSON.stringify(e));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import { StorageService } from 'src/app/services/storage.service';
|
|||||||
import { AuthConnstants } from 'src/app/config/auth-constants';
|
import { AuthConnstants } from 'src/app/config/auth-constants';
|
||||||
import { Token } from '../models/token.model';
|
import { Token } from '../models/token.model';
|
||||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||||
import { NavigationExtras,Router } from '@angular/router';
|
import { NavigationExtras, Router } from '@angular/router';
|
||||||
import { ToastService } from './toast.service';
|
import { ToastService } from './toast.service';
|
||||||
import MFPPush from 'ibm-mfp-web-push';
|
import MFPPush from 'ibm-mfp-web-push';
|
||||||
|
|
||||||
@@ -31,13 +31,27 @@ export class WebNotificationsService {
|
|||||||
|
|
||||||
webconnection() {
|
webconnection() {
|
||||||
|
|
||||||
|
var inicializeObj = {
|
||||||
|
appId: "com.gpr.gabinetedigital",
|
||||||
|
mfpContextRoot: "/mfp",
|
||||||
|
/* serverUrl: "http://gpr-dev-10.gabinetedigital.local:9080",
|
||||||
|
safariWebsitePushId: "http://gpr-dev-10.gabinetedigital.local:9080", */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MFPPush.initialize({
|
||||||
|
appId: "com.gpr.gabinetedigital",
|
||||||
|
mfpContextRoot: "/mfp",
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* MFPPush.initialize({
|
/* MFPPush.initialize({
|
||||||
appId: "com.gpr.gabinetedigital",
|
appId: "com.gpr.gabinetedigital",
|
||||||
mfpContextRoot: "/mfp",
|
mfpContextRoot: "/mfp",
|
||||||
}); */
|
}); */
|
||||||
|
|
||||||
MFPPush.registerDevice()
|
/* MFPPush.registerDevice()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("WEB Successfully Registered Device...");
|
console.log("WEB Successfully Registered Device...");
|
||||||
|
|
||||||
@@ -55,17 +69,129 @@ export class WebNotificationsService {
|
|||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("WEB Registration Failed" + err);
|
console.log("WEB Registration Failed" + err);
|
||||||
});
|
}); */
|
||||||
}
|
}
|
||||||
|
|
||||||
async onReceviNotificationWeb() {
|
register(){
|
||||||
|
MFPPush.registerDevice()
|
||||||
|
.then((res) => {
|
||||||
|
console.log("WEB Successfully Registered Device...", res);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("WEB Registration Failed" + err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async onReceviNotificationWeb() {
|
||||||
|
|
||||||
|
if (window['WLAuthorizationManager']) {
|
||||||
|
if (window['WLAuthorizationManager'].obtainAccessToken) {
|
||||||
|
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
||||||
|
(token) => {
|
||||||
|
console.log('Push Notification: Success ' + token);
|
||||||
|
|
||||||
|
MFPPush.initialize(
|
||||||
|
function (successResponse) {
|
||||||
|
console.log("Push notification Successfully intialized: " + successResponse);
|
||||||
|
MFPPush.registerNotificationsCallback(notificationReceived);
|
||||||
|
},
|
||||||
|
function (failureResponse) {
|
||||||
|
console.log("Push notification failure intialized: " + failureResponse);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
var notificationReceived = (message) => {
|
||||||
|
console.log(message);
|
||||||
|
var data = JSON.parse(message.payload);
|
||||||
|
console.log(data.Service);
|
||||||
|
console.log(data.IdObject);
|
||||||
|
console.log(data.Object);
|
||||||
|
|
||||||
|
if (message.actionName) {
|
||||||
|
//this.notificatinsRoutes(data);
|
||||||
|
console.log("Web notification")
|
||||||
|
} else {
|
||||||
|
console.log("Web notification")
|
||||||
|
//this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}, (error) => {
|
||||||
|
console.log('Push notification recived: failure ' + error.responseText);
|
||||||
|
console.log(JSON.stringify(error));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* getTokenByUserIdAndId(user, userID) {
|
||||||
|
const geturl = environment.apiURL + 'notifications/user/' + userID;
|
||||||
|
|
||||||
|
return this.http.get<Token[]>(`${geturl}`);
|
||||||
|
} */
|
||||||
|
|
||||||
|
/* getAndpostToken(username) {
|
||||||
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
|
console.log('Notifications not supported')
|
||||||
|
} else {
|
||||||
|
|
||||||
|
const geturl = environment.apiURL + 'notifications/token'; */
|
||||||
|
/*
|
||||||
|
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
||||||
|
(token) => {
|
||||||
|
console.log('Push Notification: Success ' + token);
|
||||||
|
|
||||||
if(window['WLAuthorizationManager']) {
|
MFPPush.initialize(
|
||||||
if(window['WLAuthorizationManager'].obtainAccessToken) {
|
function (successResponse) {
|
||||||
|
console.log("Push notification Successfully Service intialized: " + successResponse);
|
||||||
|
},
|
||||||
|
function (failureResponse) {
|
||||||
|
console.log("Push notification failure Service intialized: " + failureResponse);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
MFPPush.registerDevice(null, (successResponse) => {
|
||||||
|
console.log("Successfully registered: " + JSON.stringify(successResponse));
|
||||||
|
console.log('token: ', successResponse.deviceId)
|
||||||
|
this.storageService.store(username, successResponse.deviceId);
|
||||||
|
this.storageService.get(username).then(value => {
|
||||||
|
console.log('STORAGE TOKEN', value)
|
||||||
|
this.storageService.get(AuthConnstants.USER).then(res => {
|
||||||
|
console.log('USERID', res);
|
||||||
|
const headers = { 'Authorization': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' };
|
||||||
|
const body = {
|
||||||
|
UserId: res.UserId,
|
||||||
|
TokenId: successResponse.deviceId,
|
||||||
|
Status: 1,
|
||||||
|
Service: 1
|
||||||
|
};
|
||||||
|
this.http.post<Token>(`${geturl}`, body, { headers }).subscribe(data => {
|
||||||
|
console.log('TOKEN USER MIDLE', data);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
function (failureResponse) {
|
||||||
|
console.log("Successfully failue: " + JSON.stringify(failureResponse));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}, (error) => {
|
||||||
|
console.log('Push notification recived: failure ' + error.responseText);
|
||||||
|
console.log(JSON.stringify(error));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
} */
|
||||||
|
/*
|
||||||
|
async onReceviNotification() {
|
||||||
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
||||||
(token) => {
|
(token) => {
|
||||||
console.log('Push Notification: Success ' + token);
|
console.log('Push Notification: Success ' + token);
|
||||||
|
|
||||||
MFPPush.initialize(
|
MFPPush.initialize(
|
||||||
function (successResponse) {
|
function (successResponse) {
|
||||||
console.log("Push notification Successfully intialized: " + successResponse);
|
console.log("Push notification Successfully intialized: " + successResponse);
|
||||||
@@ -81,122 +207,20 @@ async onReceviNotificationWeb() {
|
|||||||
console.log(data.Service);
|
console.log(data.Service);
|
||||||
console.log(data.IdObject);
|
console.log(data.IdObject);
|
||||||
console.log(data.Object);
|
console.log(data.Object);
|
||||||
|
|
||||||
if(message.actionName){
|
if(message.actionName){
|
||||||
//this.notificatinsRoutes(data);
|
this.notificatinsRoutes(data);
|
||||||
console.log("Web notification")
|
|
||||||
} else {
|
} else {
|
||||||
console.log("Web notification")
|
this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
|
||||||
//this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.log('Push notification recived: failure ' + error.responseText);
|
console.log('Push notification recived: failure ' + error.responseText);
|
||||||
console.log(JSON.stringify(error));
|
console.log(JSON.stringify(error));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
} */
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* getTokenByUserIdAndId(user, userID) {
|
|
||||||
const geturl = environment.apiURL + 'notifications/user/' + userID;
|
|
||||||
|
|
||||||
return this.http.get<Token[]>(`${geturl}`);
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* getAndpostToken(username) {
|
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
|
||||||
console.log('Notifications not supported')
|
|
||||||
} else {
|
|
||||||
|
|
||||||
const geturl = environment.apiURL + 'notifications/token'; */
|
|
||||||
/*
|
|
||||||
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
|
||||||
(token) => {
|
|
||||||
console.log('Push Notification: Success ' + token);
|
|
||||||
|
|
||||||
MFPPush.initialize(
|
|
||||||
function (successResponse) {
|
|
||||||
console.log("Push notification Successfully Service intialized: " + successResponse);
|
|
||||||
},
|
|
||||||
function (failureResponse) {
|
|
||||||
console.log("Push notification failure Service intialized: " + failureResponse);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
MFPPush.registerDevice(null, (successResponse) => {
|
|
||||||
console.log("Successfully registered: " + JSON.stringify(successResponse));
|
|
||||||
console.log('token: ', successResponse.deviceId)
|
|
||||||
this.storageService.store(username, successResponse.deviceId);
|
|
||||||
this.storageService.get(username).then(value => {
|
|
||||||
console.log('STORAGE TOKEN', value)
|
|
||||||
this.storageService.get(AuthConnstants.USER).then(res => {
|
|
||||||
console.log('USERID', res);
|
|
||||||
const headers = { 'Authorization': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' };
|
|
||||||
const body = {
|
|
||||||
UserId: res.UserId,
|
|
||||||
TokenId: successResponse.deviceId,
|
|
||||||
Status: 1,
|
|
||||||
Service: 1
|
|
||||||
};
|
|
||||||
this.http.post<Token>(`${geturl}`, body, { headers }).subscribe(data => {
|
|
||||||
console.log('TOKEN USER MIDLE', data);
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
function (failureResponse) {
|
|
||||||
console.log("Successfully failue: " + JSON.stringify(failureResponse));
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}, (error) => {
|
|
||||||
console.log('Push notification recived: failure ' + error.responseText);
|
|
||||||
console.log(JSON.stringify(error));
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
} */
|
|
||||||
/*
|
|
||||||
async onReceviNotification() {
|
|
||||||
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
|
||||||
(token) => {
|
|
||||||
console.log('Push Notification: Success ' + token);
|
|
||||||
|
|
||||||
MFPPush.initialize(
|
|
||||||
function (successResponse) {
|
|
||||||
console.log("Push notification Successfully intialized: " + successResponse);
|
|
||||||
MFPPush.registerNotificationsCallback(notificationReceived);
|
|
||||||
},
|
|
||||||
function (failureResponse) {
|
|
||||||
console.log("Push notification failure intialized: " + failureResponse);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
var notificationReceived = (message) => {
|
|
||||||
console.log(message);
|
|
||||||
var data = JSON.parse(message.payload);
|
|
||||||
console.log(data.Service);
|
|
||||||
console.log(data.IdObject);
|
|
||||||
console.log(data.Object);
|
|
||||||
|
|
||||||
if(message.actionName){
|
|
||||||
this.notificatinsRoutes(data);
|
|
||||||
} else {
|
|
||||||
this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}, (error) => {
|
|
||||||
console.log('Push notification recived: failure ' + error.responseText);
|
|
||||||
console.log(JSON.stringify(error));
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* notificatinsRoutes = (data) => {
|
/* notificatinsRoutes = (data) => {
|
||||||
if (data.Service === "agenda") {
|
if (data.Service === "agenda") {
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import { LoginUserRespose } from 'src/app/models/user.model';
|
|||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
|
||||||
|
import { SqliteService } from '../../../services/sqlite.service';
|
||||||
|
import { synchro } from '../../../services/socket/synchro.service';
|
||||||
|
import { Platform } from '@ionic/angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-all-processes',
|
selector: 'app-all-processes',
|
||||||
@@ -13,29 +16,55 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
|
|||||||
export class AllProcessesPage implements OnInit {
|
export class AllProcessesPage implements OnInit {
|
||||||
|
|
||||||
skeletonLoader = true;
|
skeletonLoader = true;
|
||||||
allProcessesList:any[] = [];
|
allProcessesList: any[] = [];
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
|
|
||||||
|
synch = synchro;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processesService: ProcessesService,
|
private processesService: ProcessesService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
|
private sqliteservice: SqliteService,
|
||||||
|
private platform: Platform
|
||||||
) {
|
) {
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.loadAllProcesses();
|
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.sqliteservice.getAllProcess().then((allprocess: any[]) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital')) {
|
this.allProcessesList = allprocess;
|
||||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
console.log("All process from db ", allprocess)
|
||||||
this.refreshing();
|
})
|
||||||
} else {
|
|
||||||
this.loadAllProcesses();
|
|
||||||
}
|
/* synchro.registerCallback('Online', () => {
|
||||||
}
|
this.platform.ready().then(() => {
|
||||||
});
|
this.loadAllProcesses();
|
||||||
|
|
||||||
|
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')) {
|
||||||
|
this.refreshing();
|
||||||
|
} else {
|
||||||
|
this.loadAllProcesses();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
|
||||||
|
this.sqliteservice.getAllProcess().then((allprocess: any[]) => {
|
||||||
|
this.allProcessesList = allprocess;
|
||||||
|
console.log("All process from db ", allprocess)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
}) */
|
||||||
}
|
}
|
||||||
|
|
||||||
doRefresh() {
|
doRefresh() {
|
||||||
@@ -52,9 +81,10 @@ export class AllProcessesPage implements OnInit {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadAllProcesses(){
|
async loadAllProcesses() {
|
||||||
let allProcessesList = await this.processesService.GetTasksList("", false).toPromise();
|
let allProcessesList = await this.processesService.GetTasksList("", false).toPromise();
|
||||||
console.log(allProcessesList);
|
console.log(allProcessesList);
|
||||||
|
this.addProcessToDB(allProcessesList)
|
||||||
|
|
||||||
this.skeletonLoader = true;
|
this.skeletonLoader = true;
|
||||||
|
|
||||||
@@ -63,7 +93,8 @@ export class AllProcessesPage implements OnInit {
|
|||||||
allProcessesList.forEach(element => {
|
allProcessesList.forEach(element => {
|
||||||
let date = new Date(element.taskStartDate);
|
let date = new Date(element.taskStartDate);
|
||||||
date.setMonth(date.getMonth() + 1);
|
date.setMonth(date.getMonth() + 1);
|
||||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||||
|
|
||||||
|
|
||||||
let task = {
|
let task = {
|
||||||
"SerialNumber": element.serialNumber,
|
"SerialNumber": element.serialNumber,
|
||||||
@@ -81,104 +112,194 @@ export class AllProcessesPage implements OnInit {
|
|||||||
"Agenda": element.workflowInstanceDataFields.Agenda,
|
"Agenda": element.workflowInstanceDataFields.Agenda,
|
||||||
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
||||||
}
|
}
|
||||||
this.allProcessesList.push(task);
|
this.allProcessesList.push(task);
|
||||||
this.allProcessesList = removeDuplicate( this.allProcessesList)
|
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.skeletonLoader = false;
|
this.skeletonLoader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
sortArrayISODate(myArray: any){
|
|
||||||
return myArray.sort(function(a, b) {
|
addProcessToDB(data) {
|
||||||
|
|
||||||
|
data.forEach(element => {
|
||||||
|
|
||||||
|
let process = {
|
||||||
|
"serialNumber": element.serialNumber,
|
||||||
|
"workflowInstanceFolio": element.workflowInstanceFolio,
|
||||||
|
"Documents": element.Documents,
|
||||||
|
"actions": element.actions,
|
||||||
|
"activityInstanceName": element.activityInstanceName,
|
||||||
|
"formURL": element.formURL,
|
||||||
|
"originator": element.originator,
|
||||||
|
"taskStartDate": element.taskStartDate,
|
||||||
|
"totalDocuments": element.totalDocuments,
|
||||||
|
"workflowDisplayName": element.workflowDisplayName,
|
||||||
|
"workflowID": element.workflowID,
|
||||||
|
"workflowInstanceDataFields": element.workflowInstanceDataFields,
|
||||||
|
"workflowInstanceID": element.workflowInstanceID,
|
||||||
|
"workflowName": element.workflowName
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sqliteservice.addProcess(process);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllProcessFromDB() {
|
||||||
|
|
||||||
|
synchro.registerCallback('Online', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
this.loadAllProcesses();
|
||||||
|
|
||||||
|
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')) {
|
||||||
|
this.refreshing();
|
||||||
|
} else {
|
||||||
|
this.loadAllProcesses();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
synchro.registerCallback('Offline', () => {
|
||||||
|
this.platform.ready().then(() => {
|
||||||
|
|
||||||
|
this.sqliteservice.getAllProcess().then((allprocess: any[]) => {
|
||||||
|
allprocess.forEach(element => {
|
||||||
|
let date = new Date(element.taskStartDate);
|
||||||
|
date.setMonth(date.getMonth() + 1);
|
||||||
|
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||||
|
|
||||||
|
var workflowInstanceDataFields = JSON.parse(element.workflowInstanceDataFields);
|
||||||
|
console.log("WORKFLOW all process", workflowInstanceDataFields)
|
||||||
|
|
||||||
|
let task = {
|
||||||
|
"SerialNumber": element.serialNumber,
|
||||||
|
"Folio": workflowInstanceDataFields.Subject,
|
||||||
|
"Senders": workflowInstanceDataFields.Sender,
|
||||||
|
"CreateDate": taskDate,
|
||||||
|
"DocumentURL": workflowInstanceDataFields.ViewerRequest,
|
||||||
|
"Remetente": workflowInstanceDataFields.Remetente,
|
||||||
|
"DocumentsQty": element.totalDocuments,
|
||||||
|
"DocId": workflowInstanceDataFields.DispatchDocId,
|
||||||
|
"FolderID": workflowInstanceDataFields.FolderID,
|
||||||
|
"WorkflowName": element.workflowDisplayName,
|
||||||
|
"activityInstanceName": element.activityInstanceName,
|
||||||
|
"Status": workflowInstanceDataFields.Status,
|
||||||
|
"Agenda": workflowInstanceDataFields.Agenda,
|
||||||
|
"customDate": this.setFormatDate(new Date(workflowInstanceDataFields.StartDate), new Date(workflowInstanceDataFields.EndDate), workflowInstanceDataFields.IsAllDayEvent),
|
||||||
|
}
|
||||||
|
|
||||||
|
this.allProcessesList.push(task);
|
||||||
|
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||||
|
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.allProcessesList = allprocess;
|
||||||
|
console.log("All process from db ", allprocess)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log('Offlineee')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
sortArrayISODate(myArray: any) {
|
||||||
|
return myArray.sort(function (a, b) {
|
||||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setFormatDate(start:any, end:any, allday:boolean){
|
setFormatDate(start: any, end: any, allday: boolean) {
|
||||||
let customDate;
|
let customDate;
|
||||||
/* start = new Date();
|
/* start = new Date();
|
||||||
end= new Date("2021-08-04T18:01:04.753Z"); */
|
end= new Date("2021-08-04T18:01:04.753Z"); */
|
||||||
//end = new Date("2021-09-04T18:01:04.753Z");
|
//end = new Date("2021-09-04T18:01:04.753Z");
|
||||||
|
|
||||||
const totalSeconds = Math.floor((end - (start))/1000);;
|
const totalSeconds = Math.floor((end - (start)) / 1000);;
|
||||||
const totalMinutes = Math.floor(totalSeconds/60);
|
const totalMinutes = Math.floor(totalSeconds / 60);
|
||||||
const totalHours = Math.floor(totalMinutes/60);
|
const totalHours = Math.floor(totalMinutes / 60);
|
||||||
const totalDays = Math.floor(totalHours/24);
|
const totalDays = Math.floor(totalHours / 24);
|
||||||
|
|
||||||
const hours = totalHours - ( totalDays * 24 );
|
const hours = totalHours - (totalDays * 24);
|
||||||
const minutes = totalMinutes - ( totalDays * 24 * 60 ) - ( hours * 60 );
|
const minutes = totalMinutes - (totalDays * 24 * 60) - (hours * 60);
|
||||||
const seconds = totalSeconds - ( totalDays * 24 * 60 * 60 ) - ( hours * 60 * 60 ) - ( minutes * 60 );
|
const seconds = totalSeconds - (totalDays * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60);
|
||||||
|
|
||||||
let diffDays = totalDays;
|
let diffDays = totalDays;
|
||||||
let diffMinutes = minutes;
|
let diffMinutes = minutes;
|
||||||
|
|
||||||
if(totalDays == 0) {
|
if (totalDays == 0) {
|
||||||
if(allday) {
|
if (allday) {
|
||||||
customDate = this.getCustomDate(start)+", "+this.getCustomHours(start)+" (todo dia)";
|
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " (todo dia)";
|
||||||
console.log(customDate);
|
console.log(customDate);
|
||||||
return customDate;
|
return customDate;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
//customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+" ("+minutes+" mins)";
|
//customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+" ("+minutes+" mins)";
|
||||||
customDate = this.getCustomDate(start)+", "+this.getCustomHours(start)+" | "+this.getCustomHours(end);
|
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " | " + this.getCustomHours(end);
|
||||||
return customDate;
|
return customDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+
|
customDate = this.getCustomDate(start) + "," + this.getCustomHours(start) +
|
||||||
" (termina:"+ this.getCustomDate(end)+","+this.getCustomHours(end)+")";
|
" (termina:" + this.getCustomDate(end) + "," + this.getCustomHours(end) + ")";
|
||||||
return customDate;
|
return customDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomDate(thedate: Date){
|
getCustomDate(thedate: Date) {
|
||||||
return (thedate.getDay()+1) + "/" +
|
return (thedate.getDay() + 1) + "/" +
|
||||||
(thedate.getMonth()+1) + "/" +
|
(thedate.getMonth() + 1) + "/" +
|
||||||
thedate.getFullYear();
|
thedate.getFullYear();
|
||||||
}
|
}
|
||||||
getCustomHours(thedate: Date){
|
getCustomHours(thedate: Date) {
|
||||||
return thedate.getHours() + ":" +
|
return thedate.getHours() + ":" +
|
||||||
thedate.getMinutes();
|
thedate.getMinutes();
|
||||||
}
|
}
|
||||||
|
|
||||||
goToProcess(serialNumber:string, workflowName:string, activityName:string){
|
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
|
||||||
if(workflowName == 'Despacho') {
|
if (workflowName == 'Despacho') {
|
||||||
if(activityName == 'Tarefa de Despacho'|| activityName == 'Concluir Despacho'){
|
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Despacho do Presidente da República') {
|
else if (workflowName == 'Despacho do Presidente da República') {
|
||||||
if(activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho'){
|
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
|
||||||
this.router.navigate(['/home/gabinete-digital/despachos-pr',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/despachos-pr', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma'){
|
else if (activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma') {
|
||||||
this.router.navigate(['/home/gabinete-digital/diplomas',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(activityName == 'Diploma Assinado'){
|
else if (activityName == 'Diploma Assinado') {
|
||||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/diplomas-assinar', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {
|
else if (workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Expediente') {
|
else if (workflowName == 'Expediente') {
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if(workflowName == 'Expediente' && this.loggeduser.Profile == 'PR') {
|
else if (workflowName == 'Expediente' && this.loggeduser.Profile == 'PR') {
|
||||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/expedientes-pr', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else if (workflowName == "Pedido de Parecer do Presidente") {
|
else if (workflowName == "Pedido de Parecer do Presidente") {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
/* else if (workflowName == "Expediente") {
|
/* else if (workflowName == "Expediente") {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||||
} */
|
} */
|
||||||
else if(workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR') {
|
else if (workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR') {
|
||||||
this.router.navigate(['/home/gabinete-digital/event-list/approve-event',serialNumber, 'gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('cant find page for this task')
|
console.log('cant find page for this task')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { StorageService } from '../../services/storage.service';
|
|||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
import { NotificationsService } from '../../services/notifications.service';
|
import { NotificationsService } from '../../services/notifications.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-header',
|
selector: 'app-header',
|
||||||
@@ -33,7 +34,8 @@ export class HeaderPage implements OnInit {
|
|||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private storageservice: StorageService,
|
private storageservice: StorageService,
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private notificationsService: NotificationsService,
|
private notificationsService: NotificationsService,
|
||||||
|
private eventrigger: EventTrigger
|
||||||
) {
|
) {
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
router.events.subscribe((val) => {
|
router.events.subscribe((val) => {
|
||||||
@@ -46,12 +48,20 @@ export class HeaderPage implements OnInit {
|
|||||||
this.hideSearch();
|
this.hideSearch();
|
||||||
this.notificationLengthData();
|
this.notificationLengthData();
|
||||||
|
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
/* if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
console.log('Notifications not supported')
|
console.log('Notifications not supported')
|
||||||
this.UpdateNotificationCount();
|
this.UpdateNotificationCount();
|
||||||
} else {
|
} else {
|
||||||
this.UpdateNotificationCount();
|
this.UpdateNotificationCount();
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
this.eventrigger.getObservable().subscribe((data)=>{
|
||||||
|
if(data.notification == "delete" || "recive"){
|
||||||
|
this.notificationLengthData();
|
||||||
|
console.log('Deleted notification',data )
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,117 +0,0 @@
|
|||||||
/* eslint-disable no-unused-vars */
|
|
||||||
/* eslint-disable no-undef */
|
|
||||||
/* eslint-disable no-restricted-globals */
|
|
||||||
|
|
||||||
const regex = /{{\s*([^}]+)\s*}}/g;
|
|
||||||
var _pushVaribales = "";
|
|
||||||
|
|
||||||
function interpolate(messageData) {
|
|
||||||
return function interpolate(o) {
|
|
||||||
return messageData.replace(regex, function (a, b) {
|
|
||||||
var r = o[b];
|
|
||||||
return typeof r === 'string' || typeof r === 'number' ? r : a;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createTemplateMessage(messageData) {
|
|
||||||
if (Object.keys(_pushVaribales).length > 0 ) {
|
|
||||||
var message = interpolate(messageData)(_pushVaribales);
|
|
||||||
return message;
|
|
||||||
} else {
|
|
||||||
return messageData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function displayNotification(event) {
|
|
||||||
var messageJson = event.data.text();
|
|
||||||
messageJson = JSON.parse(messageJson);
|
|
||||||
var title = messageJson.title ? messageJson.title : "New message";
|
|
||||||
var imageUrl = messageJson.iconUrl ? messageJson.iconUrl : "images/icon.png";
|
|
||||||
// var tagJson = messageJson.payload;
|
|
||||||
// var tag = tagJson.tag ? tagJson.tag : "";
|
|
||||||
var bodyAlert = messageJson.alert ? messageJson.alert : "Example message"
|
|
||||||
var payloadData = messageJson.payload ? messageJson.payload : "Example message"
|
|
||||||
let messageTemp;
|
|
||||||
if ((messageTemp = regex.exec(bodyAlert)) !== null) {
|
|
||||||
bodyAlert = createTemplateMessage(bodyAlert);
|
|
||||||
}
|
|
||||||
self.registration.showNotification(title, {
|
|
||||||
body: bodyAlert,
|
|
||||||
icon: imageUrl,
|
|
||||||
data: payloadData,
|
|
||||||
// tag: tag
|
|
||||||
});
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function triggerSeenEvent(strMsg) {
|
|
||||||
send_message_to_all_clients("msgEventSeen:" + strMsg);
|
|
||||||
}
|
|
||||||
|
|
||||||
function triggerOpenEvent(strMsg) {
|
|
||||||
send_message_to_all_clients("msgEventOpen:" + strMsg);
|
|
||||||
}
|
|
||||||
|
|
||||||
function onPushNotificationReceived(event) {
|
|
||||||
console.log('Push notification received : ', event);
|
|
||||||
if (event.data) {
|
|
||||||
console.log('Event data is : ', event.data.text());
|
|
||||||
}
|
|
||||||
event.waitUntil(displayNotification(event).then(() => triggerSeenEvent(event.data.text())));
|
|
||||||
};
|
|
||||||
|
|
||||||
self.addEventListener('push', onPushNotificationReceived);
|
|
||||||
|
|
||||||
function send_message_to_client(client, msg) {
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
var msg_chan = new MessageChannel();
|
|
||||||
|
|
||||||
msg_chan.port1.onmessage = function (event) {
|
|
||||||
if (event.data.error) {
|
|
||||||
reject(event.data.error);
|
|
||||||
} else {
|
|
||||||
resolve(event.data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
client.postMessage(msg, [msg_chan.port2]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function send_message_to_all_clients(msg) {
|
|
||||||
clients.matchAll().then(clients => {
|
|
||||||
clients.forEach(client => {
|
|
||||||
send_message_to_client(client, msg);
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
self.addEventListener('install', function (event) {
|
|
||||||
self.skipWaiting();
|
|
||||||
console.log('Installed Service Worker : ', event);
|
|
||||||
//event.postMessage("SW Says 'Hello back!'");
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('message', function (event) {
|
|
||||||
replyPort = event.ports[0];
|
|
||||||
_pushVaribales = event.data;
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('activate', function (event) {
|
|
||||||
console.log('Activated Service Worker : ', event);
|
|
||||||
event.waitUntil(self.clients.claim());
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('notificationclick', function (event) {
|
|
||||||
console.log('Notification clicked with tag' + event.notification.tag + " and data " + event.notification.data);
|
|
||||||
let nidjson = event.notification.data;
|
|
||||||
event.notification.close();
|
|
||||||
event.waitUntil(triggerOpenEvent(nidjson));
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('pushsubscriptionchange', function () {
|
|
||||||
console.log('Push Subscription change');
|
|
||||||
send_message_to_all_clients("updateRegistration:");
|
|
||||||
});
|
|
||||||
+6
-4
@@ -7,14 +7,16 @@
|
|||||||
|
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
|
|
||||||
<script type="text/javascript" src="node_modules/ibm-mfp-web-sdk/ibmmfpfanalytics.js"></script>
|
|
||||||
<script type="text/javascript" src="node_modules/ibm-mfp-web-sdk/ibmmfpf.js"></script>
|
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.9.359/pdf.min.js" integrity="sha512-U5C477Z8VvmbYAoV4HDq17tf4wG6HXPC6/KM9+0/wEXQQ13gmKY2Zb0Z2vu0VNUWch4GlJ+Tl/dfoLOH4i2msw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.9.359/pdf.min.js" integrity="sha512-U5C477Z8VvmbYAoV4HDq17tf4wG6HXPC6/KM9+0/wEXQQ13gmKY2Zb0Z2vu0VNUWch4GlJ+Tl/dfoLOH4i2msw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||||
|
|
||||||
|
<!-- <script src="node_modules/ibm-mfp-web-sdk/ibmmfpf.js"></script>
|
||||||
|
<script src="node_modules/ibm-mfp-web-sdk/ibmmfpfanalytics.js"></script> -->
|
||||||
<!-- <script src="assets/js/index.js"></script> -->
|
<!-- <script src="assets/js/index.js"></script> -->
|
||||||
<script src="assets/js/wldirectudpate.js"></script>
|
<!-- <script src="assets/js/wldirectudpate.js"></script> -->
|
||||||
|
<link rel="manifest" href="assets/manifest.json">
|
||||||
<script>
|
<script>
|
||||||
if (navigator.serviceWorker) {
|
if (navigator.serviceWorker) {
|
||||||
navigator.serviceWorker.register("assets/js/MFPPushServiceWorker.js").then(function(reg) {
|
navigator.serviceWorker.register("assets/MFPPushServiceWorker.js").then(function(reg) {
|
||||||
window.pushReg = reg;
|
window.pushReg = reg;
|
||||||
if (reg.installing) {
|
if (reg.installing) {
|
||||||
console.info('Service worker installing');
|
console.info('Service worker installing');
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
const proxy = require("http-proxy-middleware");
|
||||||
|
|
||||||
|
module.exports = function (app) {
|
||||||
|
app.use(
|
||||||
|
proxy("/mfp/api/imfpush/", {
|
||||||
|
target: "http://gpr-dev-10.gabinetedigital.local:9080",
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: function (path, req) {
|
||||||
|
console.log("Rewrite in /mfp/api/imfpush/: ", path);
|
||||||
|
return path.replace("/mfp/api", "");
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
app.use(
|
||||||
|
proxy("/mfp/api", {
|
||||||
|
target: "http://gpr-dev-10.gabinetedigital.local:9080",
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: function (path, req) {
|
||||||
|
console.log("Rewrite in /mfp/api: ", path);
|
||||||
|
return path;
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user