Pull made

This commit is contained in:
Eudes Inácio
2021-06-15 16:04:05 +01:00
89 changed files with 1198 additions and 3635 deletions
+245 -31
View File
@@ -653,6 +653,138 @@
"integrity": "sha512-jzIutEzUbfBZxLWftpi5oXusL3rwbe2P/6HnNd8NUeBos9+G859R7hCsstAQ61XPn41a2/Fbl+YOwYhdjoBQrw==",
"dev": true
},
"@angular/localize": {
"version": "11.2.14",
"resolved": "https://registry.npmjs.org/@angular/localize/-/localize-11.2.14.tgz",
"integrity": "sha512-ssMuquxxqxA98LgEICEO/3JdmSflWxu5rlm/HPo28bnGiZ4IzDamZjJ1cu4S6RgsonJ1drB3Z8wkidXfEYZiWA==",
"requires": {
"@babel/core": "7.8.3",
"glob": "7.1.2",
"yargs": "^16.2.0"
},
"dependencies": {
"@babel/core": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.3.tgz",
"integrity": "sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==",
"requires": {
"@babel/code-frame": "^7.8.3",
"@babel/generator": "^7.8.3",
"@babel/helpers": "^7.8.3",
"@babel/parser": "^7.8.3",
"@babel/template": "^7.8.3",
"@babel/traverse": "^7.8.3",
"@babel/types": "^7.8.3",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.1",
"json5": "^2.1.0",
"lodash": "^4.17.13",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
}
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"color-convert": "^2.0.1"
}
},
"cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
"integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
"requires": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^7.0.0"
}
},
"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==",
"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=="
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
},
"string-width": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
}
},
"wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
}
},
"y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
},
"yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
"requires": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.0",
"y18n": "^5.0.5",
"yargs-parser": "^20.2.2"
}
},
"yargs-parser": {
"version": "20.2.7",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz",
"integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw=="
}
}
},
"@angular/platform-browser": {
"version": "11.2.2",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-11.2.2.tgz",
@@ -681,7 +813,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz",
"integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==",
"dev": true,
"requires": {
"@babel/highlight": "^7.12.13"
}
@@ -745,6 +876,37 @@
}
}
},
"@babel/generator": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz",
"integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==",
"requires": {
"@babel/types": "^7.14.5",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
},
"dependencies": {
"@babel/helper-validator-identifier": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
"integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg=="
},
"@babel/types": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
"integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
"requires": {
"@babel/helper-validator-identifier": "^7.14.5",
"to-fast-properties": "^2.0.0"
}
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
}
}
},
"@babel/helper-annotate-as-pure": {
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz",
@@ -820,7 +982,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz",
"integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.12.13",
"@babel/template": "^7.12.13",
@@ -831,7 +992,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz",
"integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/parser": "^7.12.13",
@@ -844,7 +1004,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz",
"integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==",
"dev": true,
"requires": {
"@babel/types": "^7.12.13"
}
@@ -972,7 +1131,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz",
"integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==",
"dev": true,
"requires": {
"@babel/types": "^7.12.13"
}
@@ -1092,7 +1250,6 @@
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.0.tgz",
"integrity": "sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ==",
"dev": true,
"requires": {
"@babel/template": "^7.12.13",
"@babel/traverse": "^7.13.0",
@@ -1178,7 +1335,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz",
"integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==",
"dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.12.11",
"chalk": "^2.0.0",
@@ -1188,8 +1344,7 @@
"@babel/parser": {
"version": "7.13.4",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.4.tgz",
"integrity": "sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA==",
"dev": true
"integrity": "sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA=="
},
"@babel/plugin-proposal-async-generator-functions": {
"version": "7.13.5",
@@ -1944,11 +2099,59 @@
"regenerator-runtime": "^0.13.4"
}
},
"@babel/template": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
"integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
"requires": {
"@babel/code-frame": "^7.14.5",
"@babel/parser": "^7.14.5",
"@babel/types": "^7.14.5"
},
"dependencies": {
"@babel/code-frame": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
"integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
"requires": {
"@babel/highlight": "^7.14.5"
}
},
"@babel/helper-validator-identifier": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
"integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg=="
},
"@babel/highlight": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
"integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
"requires": {
"@babel/helper-validator-identifier": "^7.14.5",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
}
},
"@babel/parser": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.5.tgz",
"integrity": "sha512-TM8C+xtH/9n1qzX+JNHi7AN2zHMTiPUtspO0ZdHflW8KaskkALhMmuMHb4bCmNdv9VAPzJX3/bXqkVLnAvsPfg=="
},
"@babel/types": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
"integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
"requires": {
"@babel/helper-validator-identifier": "^7.14.5",
"to-fast-properties": "^2.0.0"
}
}
}
},
"@babel/traverse": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz",
"integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/generator": "^7.13.0",
@@ -1965,7 +2168,6 @@
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.0.tgz",
"integrity": "sha512-zBZfgvBB/ywjx0Rgc2+BwoH/3H+lDtlgD4hBOpEv5LxRnYsm/753iRuLepqnYlynpjC3AdQxtxsoeHJoEEwOAw==",
"dev": true,
"requires": {
"@babel/types": "^7.13.0",
"jsesc": "^2.5.1",
@@ -1975,8 +2177,7 @@
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
}
}
},
@@ -2367,6 +2568,17 @@
"schema-utils": "^3.0.0",
"serialize-javascript": "^5.0.1",
"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": {
@@ -3131,6 +3343,14 @@
"lodash": "^4.17.15"
}
},
"@ng-bootstrap/ng-bootstrap": {
"version": "9.1.2",
"resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-9.1.2.tgz",
"integrity": "sha512-oZt05AjwIY/oagS3QtST2GIlW9LQgTM7gX+wsuLQvHQt8bh9THOHAws8rDobeZi9fTUR3OvuxK56Mvj1jvyljw==",
"requires": {
"tslib": "^2.0.0"
}
},
"@ngtools/webpack": {
"version": "11.2.1",
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-11.2.1.tgz",
@@ -5559,7 +5779,6 @@
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
"integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.1"
}
@@ -9493,8 +9712,7 @@
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
"dev": true
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
},
"escape-goat": {
"version": "2.1.1",
@@ -10289,14 +10507,12 @@
"gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"dev": true
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-intrinsic": {
"version": "1.1.1",
@@ -10350,9 +10566,10 @@
}
},
"glob-parent": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
"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"
}
@@ -10375,8 +10592,7 @@
"globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"dev": true
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
},
"globby": {
"version": "11.0.2",
@@ -12016,7 +12232,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
"dev": true,
"requires": {
"minimist": "^1.2.5"
}
@@ -16701,8 +16916,7 @@
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "2.0.0",
@@ -20588,9 +20802,9 @@
}
},
"ws": {
"version": "7.4.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz",
"integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g=="
"version": "7.4.6",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A=="
},
"xcode": {
"version": "3.0.1",
+3 -1
View File
@@ -20,6 +20,7 @@
"@angular/common": "^11.2.2",
"@angular/core": "^11.2.2",
"@angular/forms": "~11.2.2",
"@angular/localize": "^11.2.2",
"@angular/platform-browser": "~11.2.2",
"@angular/platform-browser-dynamic": "~11.2.2",
"@angular/router": "~11.2.2",
@@ -43,6 +44,7 @@
"@ionic/pwa-elements": "^3.0.2",
"@ionic/storage": "^2.3.1",
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
"angular-calendar": "^0.28.22",
"angular-tag-cloud-module": "^5.2.2",
"cordova": "^10.0.0",
@@ -66,7 +68,7 @@
"socket.io-client": "^2.3.0",
"tslib": "^2.0.0",
"wordcloud": "^1.1.2",
"ws": "^7.4.5",
"ws": "^7.4.6",
"zone.js": "~0.10.2"
},
"devDependencies": {
+3 -2
View File
@@ -26,10 +26,11 @@ import { FormsModule } from '@angular/forms';
import { CalendarModule, DateAdapter } from 'angular-calendar';
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MessagesPage } from './pages/chat/messages/messages.page';
import { WebsocketService } from './services/websocket.service'
import { ChatService } from './services/chat.service'
import { ChatService } from './services/chat.service';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
// import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
+14 -38
View File
@@ -63,47 +63,23 @@ export class AddNotePage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
let notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
@@ -7,7 +7,6 @@ import { IonicModule } from '@ionic/angular';
import { CreateProcessPageRoutingModule } from './create-process-routing.module';
import { CreateProcessPage } from './create-process.page';
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
import { EmptyContainerPage } from 'src/app/shared/empty-container/empty-container.page';
import { EmptyContainerPageModule } from 'src/app/shared/empty-container/empty-container.module';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@@ -43,9 +43,15 @@
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-select placeholder="Tipo" [(ngModel)]="selectedTypes" multiple="true" interface="action-sheet" Cancel-text="Cancelar" required>
<ion-item class="ion-no-border ion-no-padding ion-no-margin">
<ion-label>Tipo de assunto</ion-label>
<ion-select
[(ngModel)]="selectedTypes"
(ngModelChange)="onSelectedTypesChanged($event)"
multiple="true" interface="alert" Cancel-text="Cancelar" required>
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
</ion-select>
</ion-item>
</div>
</div>
</div>
@@ -59,7 +65,7 @@
<div class="list-people">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipants.length == 0" class="list-people-title">Adicionar intervenientes</ion-label>
<ion-label *ngIf="taskParticipants.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
@@ -19,6 +19,8 @@ import { SearchPage } from 'src/app/pages/search/search.page';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { User } from 'src/app/models/user.model';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-create-process',
@@ -72,6 +74,7 @@ export class CreateProcessPage implements OnInit {
private authService: AuthService,
private userAuth: AuthService,
private animationController: AnimationController,
private toastService: ToastService,
) {
this.loggeduser = userAuth.ValidatedUser;
this.user = environment.defaultuser +'@'+ environment.domain;
@@ -83,6 +86,9 @@ export class CreateProcessPage implements OnInit {
this.postData = new Despacho();
this.participants = this.participants = new Array();
//Initialize SubjectTypes Array with the value "Indefinido"
this.selectedTypes = ['99999850'];
this.dispatchFolder = {
Nad: 30,
Subject: '',
@@ -91,7 +97,7 @@ export class CreateProcessPage implements OnInit {
SourceType: 'DOC', //FOLDER
SourceId: this.task.workflowInstanceDataFields.SourceID, //FolderId
DeadlineType: '',
SubjectTypes: ['99999844'],
SubjectTypes: this.selectedTypes,
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
};
@@ -110,8 +116,25 @@ export class CreateProcessPage implements OnInit {
}
ngOnInit() {
console.log(this.postData.DispatchFolder.SubjectTypes);
this.taskDate = new Date(this.task.taskStartDate);
this.getSubjectType();
if(this.selectedTypes.length > 1){
console.log('Yes');
}
}
onSelectedTypesChanged(ev:any){
console.log(ev);
if(ev.length > 1){
console.log(ev.filter(data => data != '99999850'));
this.selectedTypes = ev.filter(data => data != '99999850');
}
if(ev.length == 0){
this.selectedTypes = ["99999850"];
}
}
close(){
@@ -176,10 +199,11 @@ export class CreateProcessPage implements OnInit {
console.log('this.postData', this.postData, this.taskType);
try {
await this.processes.postDespatcho(this.postData).toPromise()
//this.successMessage('')
await this.processes.postDespatcho(this.postData).toPromise();
this.FinalizarDespacho();
this.toastService.successMessage('Despacho criado');
} catch (error) {
this.badRequest()
this.toastService.badRequest('Processo não efectuado');
}
break;
@@ -193,13 +217,15 @@ export class CreateProcessPage implements OnInit {
DispatchFolder: this.dispatchFolder,
}
console.log(this.postData);
await this.processes.postParecer(this.postData).toPromise()
try {
await this.processes.postParecer(this.postData).toPromise()
// this.successMessage()
} catch (error) {
this.badRequest()
await this.processes.postParecer(this.postData).toPromise();
this.FinalizarParecer();
this.toastService.successMessage('Pedido de Parecer criado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
break;
@@ -215,19 +241,19 @@ export class CreateProcessPage implements OnInit {
console.log(this.postData);
try {
await this.processes.postDeferimento(this.postData).toPromise()
// this.successMessage()
} catch (error) {
this.badRequest()
await this.processes.postDeferimento(this.postData).toPromise();
this.executado();
this.toastService.successMessage('Pedido de Deferimento criado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
break;
}
this.executado();
this.modalController.dismiss();
}
else {
this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
this.toastService.badRequest('Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.');
}
break;
@@ -246,10 +272,11 @@ export class CreateProcessPage implements OnInit {
console.log('this.postData', this.postData, this.taskType);
try {
await this.processes.postDespatcho(this.postData).toPromise()
// this.successMessage()
await this.processes.postDespatcho(this.postData).toPromise();
this.executado();
this.toastService.successMessage('Despacho criado');
} catch (error) {
this.badRequest()
this.toastService.badRequest('Processo não efectuado');
}
break;
@@ -263,13 +290,14 @@ export class CreateProcessPage implements OnInit {
DispatchFolder: this.dispatchFolder,
}
console.log(this.postData);
await this.processes.postParecer(this.postData).toPromise()
try {
await this.processes.postParecer(this.postData).toPromise()
// this.successMessage()
} catch (error) {
this.badRequest()
await this.processes.postParecer(this.postData).toPromise();
this.executado();
this.toastService.successMessage('Pedido de Parecer criado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
break;
@@ -285,22 +313,22 @@ export class CreateProcessPage implements OnInit {
console.log(this.postData);
try {
await this.processes.postDeferimento(this.postData).toPromise()
// this.successMessage()
} catch (error) {
this.badRequest()
await this.processes.postDeferimento(this.postData).toPromise();
this.executado();
this.toastService.successMessage('Pedido de Deferimento criado');
}
catch (error) {
this.toastService.badRequest('Processo não efectuado');
}
break;
}
this.executado();
this.modalController.dismiss();
break;
}
}
async executado() {
let body = {
"serialNumber": this.task.serialNumber,
@@ -310,55 +338,87 @@ export class CreateProcessPage implements OnInit {
"ReviewUserComment": '',
},
"AttachmentList" :null,
}
await this.processes.CompleteTask(body).toPromise();
}
async FinalizarDespacho() {
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho'){
let body = {
"serialNumber": this.task.serialNumber,
"action": "Conhecimento",
"ActionTypeId": 104,
"dataFields": {
"ReviewUserComment": '',
},
"AttachmentList" :null,
}
await this.processes.CompleteTask(body).toPromise();
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
} catch (error) {
this.badRequest()
else if(this.task.activityInstanceName =='Concluir Despacho'){
let body = {
"serialNumber": this.task.serialNumber,
"action": "Despacho",
"ActionTypeId": 94,
"dataFields": {
"ReviewUserComment": '',
},
"AttachmentList" :null,
}
await this.processes.CompleteTask(body).toPromise();
}
}
async FinalizarParecer() {
let body = {
"serialNumber": this.task.serialNumber,
"action": "Parecer",
"ActionTypeId": 96,
"dataFields": {
"ReviewUserComment": '',
},
"AttachmentList" :null,
}
await this.processes.CompleteTask(body).toPromise();
}
async addParticipants() {
/* console.log('HERES'); */
this.adding = "intervenient";
this.contacts = this.taskParticipants;
if(window.innerWidth <=800){
if(window.innerWidth <=800) {
this.showAttendees=false;
const modal = await this.modalController.create({
component: AddParticipantsModalPage,
componentProps: {
eventPersons: this.participants
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'add-participants-modal',
cssClass: 'attendee',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
this.taskParticipants = res.data;
let newattendees: EventPerson[] = res['data'];
if(newattendees!= null){
newattendees.forEach(newattendee => {
let att = {
'UserEmail': newattendee.EmailAddress,
'UserType': 'I',
};
if(this.participants == null){
this.participants = new Array();
}
this.participants.push(att);
});
modal.onDidDismiss().then((data) => {
if(data) {
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
this.postData.UsersSelected = this.participants;
console.log(this.postData);
});
} else {
this.showAttendees=true
}
@@ -373,32 +433,31 @@ export class CreateProcessPage implements OnInit {
this.showAttendees=false;
const modal = await this.modalController.create({
component: AddParticipantsCcModalPage,
componentProps: {
eventPersons: this.participants
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'add-participants-cc-modal',
cssClass: 'attendee',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
this.taskParticipantsCc = res.data;
let newattendees: EventPerson[] = res['data'];
if(newattendees!= null){
newattendees.forEach(newattendee => {
let att = {
'UserEmail': newattendee.EmailAddress,
'UserType': 'CC',
};
if(this.participants == null){
this.participants = new Array();
}
this.participants.push(att);
});
modal.onDidDismiss().then((data) => {
if(data) {
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
this.postData.UsersSelected = this.participants;
console.log(this.postData);
});
} else {
this.showAttendees=true
}
@@ -505,48 +564,23 @@ export class CreateProcessPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
+18 -41
View File
@@ -3,6 +3,7 @@ import { AnimationController, ModalController, NavParams } from '@ionic/angular'
import { SearchDocument } from 'src/app/models/search-document';
import { SearchPage } from 'src/app/pages/search/search.page';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
@@ -22,6 +23,7 @@ export class DarParecerPage implements OnInit {
private modalController: ModalController,
private navParams: NavParams,
private animationController: AnimationController,
private toastService: ToastService,
) {
this.serialNumber = this.navParams.get('serialNumber');
this.instanceId = this.navParams.get('ProcessInstanceID');
@@ -65,9 +67,9 @@ export class DarParecerPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise();
this.modalController.dismiss();
this.successMessage('Pedido de Parecer solicitado')
this.toastService.successMessage('Pedido de Parecer solicitado')
} catch (error) {
this.badRequest("Pedido de Parecer não solicitado")
this.toastService.badRequest("Pedido de Parecer não solicitado")
}
@@ -99,49 +101,24 @@ export class DarParecerPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
async badRequest(message?: string, callback?) {
-1
View File
@@ -7,7 +7,6 @@ import { IonicModule } from '@ionic/angular';
import { DelegarPageRoutingModule } from './delegar-routing.module';
import { DelegarPage } from './delegar.page';
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@NgModule({
+18 -41
View File
@@ -13,6 +13,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
import { AlertService } from 'src/app/services/alert.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-delegar',
@@ -48,6 +49,7 @@ export class DelegarPage implements OnInit {
public alertController: AlertController,
private alertService: AlertService,
private animationController: AnimationController,
private toastService: ToastService,
) {
this.task = this.navParams.get('task');
this.postData = new Event();
@@ -97,10 +99,10 @@ export class DelegarPage implements OnInit {
console.log(body);
this.processes.DelegateTask(body).subscribe(res=>{
console.log(res);
this.successMessage('Processo delegado')
this.toastService.successMessage('Processo delegado')
},
(error)=>{
this.badRequest("Processo não delegado")
this.toastService.badRequest("Processo não delegado")
});
}
}
@@ -172,48 +174,23 @@ export class DelegarPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
+1 -13
View File
@@ -8,18 +8,9 @@ import { AgendaPageRoutingModule } from './agenda-routing.module';
import { AgendaPage } from './agenda.page';
import { NgCalendarModule } from 'ionic2-calendar';
import { CalModalPageModule } from '../cal-modal/cal-modal.module';
import { registerLocaleData } from '@angular/common';
import localeDe from '@angular/common/locales/pt';
import { SharedModule } from 'src/app/shared/shared.module';
import { NewEventPage } from "src/app/shared/agenda/new-event/new-event.page"
import { EditEventPage } from 'src/app/shared/agenda/edit-event/edit-event.page';
import { ViewEventPage } from 'src/app/shared/agenda/view-event/view-event.page';
import { EventListPage } from "src/app/shared/agenda/event-list/event-list.page";
import { AttendeesPage } from 'src/app/shared/event/attendees/attendees.page';
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
registerLocaleData(localeDe);
@@ -28,7 +19,7 @@ import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
import { EventsToApprovePage } from 'src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page';
import { ComponentsModule } from 'src/app/components/components.module';
import { AttendeesPageModule } from '../events/attendees/attendees.module';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
import { HeaderPageModule } from 'src/app/shared/header/header.module';
import { ViewEventPageModule } from 'src/app/shared/agenda/view-event/view-event.module';
@@ -53,12 +44,9 @@ import { EditEventPageModule } from 'src/app/shared/agenda/edit-event/edit-event
ComponentsModule,
AgendaPageRoutingModule,
NgCalendarModule,
CalModalPageModule,
// entryComponents
HeaderPageModule,
ViewEventPageModule,
AttendeesPageModule,
AttendeeModalPageModule,
EventsToApprovePageModule,
ApproveEventPageModule,
+5 -4
View File
@@ -213,7 +213,7 @@
</div>
</div> -->
<div class="ss-timeline hide-scroll timeline-mobile flex-grow-1 d-md-none text-black height-100 width-100 overflow-y-auto" >
<div class="ss-timeline timeline-mobile flex-grow-1 d-md-none text-black height-100 width-100 overflow-y-auto" >
<div *ngFor="let events of TimelineMDList | keyvalue;" >
<div *ngIf="CalendarCurrentDay <= events.key">
@@ -224,7 +224,7 @@
<div *ngFor="let event of events.value" >
<div class="d-flex content-{{event.Profile}}-{{event.event.CalendarName}} mt-10 cursor-pointer width-100 " (click)="eventClicked(event)" >
<div class="d-flex content-{{event.profile}}-{{event.event.CalendarName}} mt-10 cursor-pointer width-100 " (click)="eventClicked(event)" >
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
<div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
@@ -256,7 +256,7 @@
</div>
</div>
<div class="fs-timeline hide-scroll flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.Profile == 'MDGPR'">
<div *ngFor="let events of TimelineMDList | keyvalue;" >
<div *ngIf="CalendarCurrentDay <= events.key">
@@ -267,6 +267,7 @@
<div *ngFor="let event of events.value" >
<div class="d-flex content-mdgpr-{{event.event.CalendarName}} mt-10 cursor-pointer" (click)="eventClicked(event)">
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
<div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
<div *ngIf="event.endMany && !event.middle" class="time-start">--</div>
@@ -296,7 +297,7 @@
</div>
</div>
<div class="sd-timeline hide-scroll flex-grow-1 d-none d-md-block timeline-md text-black pl-20 width-100 height-100 overflow-y-auto" >
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 width-100 height-100 overflow-y-auto" >
<div *ngFor="let events of TimelinePRList | keyvalue;">
<div *ngIf="CalendarCurrentDay <= events.key">
+4 -2
View File
@@ -427,6 +427,7 @@ td.monthview-primary-with-event {
font-family: Roboto;
font-size: 15px;
margin-right: 25px;
width: 55px;
}
ul{
@@ -710,13 +711,14 @@ app-approve-event{
.filter-Pessoal {
.content-pr-Pessoal, .content-mdgpr-Pessoal {
.content-pr-Oficial, .content-mdgpr-Oficial, .content-md-Pessoal {
display: none !important;
}
}
.filter-Oficial {
.content-pr-Oficial, .content-mdgpr-Oficial {
.content-pr-Pessoal, .content-mdgpr-Pessoal, .content-md-Pessoal {
display: none !important;
}
}
+5 -39
View File
@@ -2,7 +2,6 @@ import { Component, OnInit, ViewChild, Inject, LOCALE_ID, Input } from '@angular
import { CalendarComponent } from 'ionic2-calendar';
import { AlertController, ModalController } from '@ionic/angular';
import { formatDate } from '@angular/common';
import { CalModalPage } from '../cal-modal/cal-modal.page';
import { EventsService } from 'src/app/services/events.service';
import { Event } from '../../models/event.model';
import { Router, NavigationEnd } from '@angular/router';
@@ -174,6 +173,7 @@ export class AgendaPage implements OnInit {
if(this.loggeduser.Profile == 'MDGPR') {
this.mobileComponent.showEventList = true;
}
}
@@ -289,39 +289,6 @@ export class AgendaPage implements OnInit {
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
}
async openCalModal() {
const modal = await this.modalCtrl.create({
component: CalModalPage,
componentProps:{
segment: this.segment,
profile: this.profile,
eventSelectedDate: this.eventSelectedDate,
},
cssClass: 'cal-modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
let postEvent: Event = data['data'];
if (postEvent.Subject != null)
{
this.eventSource.push({
title: postEvent.Subject,
startTime: new Date(postEvent.StartDate),
endTime: new Date(postEvent.EndDate),
allDay: false,
event: postEvent
});
this.myCal.update();
this.myCal.loadEvents();
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
}
});
}
// for calendar
currentDayEventDisplayBorder(day: any, id: any){
@@ -586,7 +553,7 @@ export class AgendaPage implements OnInit {
});
});
const list = this.timelineFilter(this.timelineFilterState, this.eventsList, 'md');
const list = this.timelineFilter(this.timelineFilterState, this.eventsList, 'mdgpr');
this.TimelineMDList = this.eventListBox(list)
@@ -679,7 +646,7 @@ export class AgendaPage implements OnInit {
});
});
const list = this.timelineFilter(this.timelineFilterState, this.eventsListPessoal, 'md');
const list = this.timelineFilter(this.timelineFilterState, this.eventsListPessoal, 'mdgpr');
this.TimelineMDList = this.eventListBox(list)
@@ -738,7 +705,6 @@ export class AgendaPage implements OnInit {
case "Oficial":
alert('Oficial')
//Inicializa o array eventSource
this.eventsListOficial = [];
@@ -759,7 +725,7 @@ export class AgendaPage implements OnInit {
});
});
const list = this.timelineFilter(this.timelineFilterState, this.eventsListOficial, 'md');
const list = this.timelineFilter(this.timelineFilterState, this.eventsListOficial, 'mdgpr');
this.TimelineMDList = this.eventListBox(list)
@@ -853,7 +819,7 @@ export class AgendaPage implements OnInit {
});
const MDEventList = this.timelineFilter(this.timelineFilterState, this.eventsList, 'md');
const MDEventList = this.timelineFilter(this.timelineFilterState, this.eventsList, 'mdgpr');
@@ -7,7 +7,6 @@ import { IonicModule } from '@ionic/angular';
import { EditEventPageRoutingModule } from './edit-event-routing.module';
import { EditEventPage } from './edit-event.page';
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@NgModule({
@@ -93,7 +93,7 @@
</div>
</div>
</div>
<div class="container-div width-100">
<div class="ion-item-class-2">
<div class="ion-icon-class">
@@ -6,10 +6,11 @@ import { EventPerson } from 'src/app/models/eventperson.model';
import { AlertService } from 'src/app/services/alert.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { Event } from '../../../models/event.model';
import { AttendeesPage } from '../../events/attendees/attendees.page';
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
import { SearchPage } from '../../search/search.page';
@Component({
@@ -47,6 +48,7 @@ export class EditEventPage implements OnInit {
public alertController: AlertController,
private attachmentsService: AttachmentsService,
private animationController: AnimationController,
private toastService: ToastService,
) {
this.isEventEdited = false;
this.postEvent = this.navParams.get('event');
@@ -116,16 +118,16 @@ export class EditEventPage implements OnInit {
});
await alert.present(); */
this.successMessage()
this.toastService.successMessage()
}, error => {
this.badRequest()
this.toastService.badRequest()
});
this.isEventEdited = true;
this.modalController.dismiss(this.isEventEdited);
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -136,7 +138,7 @@ export class EditEventPage implements OnInit {
}
else{
const modal = await this.modalController.create({
component: AttendeesPage,
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
@@ -241,47 +243,23 @@ export class EditEventPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
@@ -21,7 +22,8 @@ export class EventActionsPopoverPage implements OnInit {
private router:Router,
private modalController: ModalController,
private popoverController: PopoverController,
private animationController: AnimationController,) {
private animationController: AnimationController,
private toastService: ToastService,) {
this.serialNumber = this.navParams.get('serialNumber');
this.instanceId = this.navParams.get('InstanceId');
}
@@ -45,9 +47,9 @@ export class EventActionsPopoverPage implements OnInit {
this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.modalController.dismiss(null);
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -61,9 +63,9 @@ export class EventActionsPopoverPage implements OnInit {
this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.modalController.dismiss(null);
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -93,48 +95,23 @@ export class EventActionsPopoverPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
@@ -6,10 +6,11 @@ import { EventPerson } from 'src/app/models/eventperson.model';
import { SearchDocument } from 'src/app/models/search-document';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { Event } from '../../../models/event.model';
import { AttendeesPage } from '../../events/attendees/attendees.page';
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
import { SearchPage } from '../../search/search.page';
@Component({
@@ -41,6 +42,7 @@ export class NewEventPage implements OnInit {
private eventService: EventsService,
private attachmentsService: AttachmentsService,
private animationController: AnimationController,
private toastService: ToastService,
) {
this.postEvent = new Event();
this.eventBody = { BodyType : "1", Text : ""};
@@ -158,60 +160,35 @@ export class NewEventPage implements OnInit {
});
this.successMessage()
this.toastService.successMessage()
this.modalController.dismiss(this.postEvent);
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
@@ -264,7 +241,7 @@ export class NewEventPage implements OnInit {
async openAttendees() {
const modal = await this.modalController.create({
component: AttendeesPage,
component: AttendeesPageModal,
componentProps: {
eventAttendees: this.postEvent.Attendees,
adding: this.adding,
@@ -219,87 +219,9 @@ export class ViewEventPage implements OnInit {
});
}
// async openBookMeetingModal() {
// const doc = this.loadedAttachments[ this.dicIndex];
// let task = {
// serialNumber: doc.SourceId,
// taskStartDate: doc.CreateDate,
// isEvent: true,
// workflowInstanceDataFields: {
// FsId: doc.ApplicationId,
// FolderID: null,
// DocId: doc.SourceId,
// Subject: doc.SourceName
// },
// }
// let classs;
// if( window.innerWidth <= 800){
// classs = 'book-meeting-modal modal modal-desktop'
// } else {
// classs = 'modal modal-desktop showAsideOptions'
// }
// const modal = await this.modalController.create({
// component: BookMeetingModalPage,
// componentProps: {
// task: task,
// },
// cssClass: classs,
// backdropDismiss: false
// });
// await modal.present();
// modal.onDidDismiss();
// }
// async openExpedientActionsModal(taskAction: any) {
// //this.modalController.dismiss();
// let classs;
// if( window.innerWidth <= 800){
// classs = 'modal modal-desktop'
// } else {
// classs = 'modal modal-desktop showAsideOptions'
// }
// const doc = this.loadedAttachments[ this.dicIndex];
// let task = {
// serialNumber: doc.SourceId,
// taskStartDate: doc.CreateDate,
// isEvent: true,
// workflowInstanceDataFields: {
// FsId: doc.ApplicationId,
// FolderID: null,
// DocId: doc.SourceId,
// Subject: doc.SourceName
// },
// }
// const modal = await this.modalController.create({
// component: ExpedientTaskModalPage,
// componentProps: {
// taskAction: taskAction,
// task: task,
// profile: this.profile,
// },
// cssClass: classs,
// });
// await modal.present();
// modal.onDidDismiss().then(res=>{
// console.log(res['data']);
// if(res['data']=='openDiscart'){
// console.log('open discart');
// // this.distartExpedientModal();
// }
// });
// }
async openTaskOptions() {
const doc = this.loadedAttachments[ this.dicIndex];
const doc = this.loadedAttachments[this.dicIndex];
let customTask = {
serialNumber: doc.SourceId,
@@ -1,17 +0,0 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CalModalPage } from './cal-modal.page';
const routes: Routes = [
{
path: '',
component: CalModalPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class CalModalPageRoutingModule {}
@@ -1,23 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { CalModalPageRoutingModule } from './cal-modal-routing.module';
import { CalModalPage } from './cal-modal.page';
import { NgCalendarModule } from 'ionic2-calendar';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
CalModalPageRoutingModule,
ReactiveFormsModule,
NgCalendarModule
],
declarations: [CalModalPage]
})
export class CalModalPageModule {}
-130
View File
@@ -1,130 +0,0 @@
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-button (click)="close()">
<ion-icon name="chevron-back" slot="start"></ion-icon>
</ion-button>
</ion-buttons>
<ion-title>Novo Evento</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="div-ion-content">
<form [formGroup]="ionicForm" novalidate>
<ion-item>
<ion-label position="floating">Assunto <span class="span-color">*</span></ion-label>
<ion-input formControlName="subject" type="text" [(ngModel)]="postEvent.Subject" required></ion-input>
</ion-item>
<!-- Error messages -->
<span class="error ion-padding" *ngIf="formSubjectSatus">
Campo obrigatório
</span>
<ion-item>
<ion-label position="floating">Descrição <span class="span-color">*</span></ion-label>
<ion-input formControlName="description" type="text" [(ngModel)]="postEvent.Body.Text" required></ion-input>
</ion-item>
<!-- Error messages -->
<span class="error ion-padding" *ngIf="formDescriptionSatus">
Campo obrigatório
</span>
<ion-item>
<ion-label position="floating">Localização <span class="span-color">*</span></ion-label>
<ion-input formControlName="location" type="text" [(ngModel)]="postEvent.Location" required></ion-input>
</ion-item>
<!-- Error messages -->
<span class="error ion-padding" *ngIf="formLocationSatus">
Campo obrigatório
</span>
<!-- <span class="error ion-padding" *ngIf="errorControl.location.errors?.required">
Campo obrigatório
</span> -->
<ion-item>
<ion-label position="floating">Selecione a Agenda <span class="span-color">*</span></ion-label>
<ion-select selectedText="{{postEvent.CalendarName}}" formControlName="agenda" [(ngModel)]="postEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar" required>
<ion-select-option Pessoal="Reunião">Pessoal</ion-select-option>
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
</ion-select>
</ion-item>
<!-- Error messages -->
<span class="error ion-padding" *ngIf="formEventTypeSatus">
Campo obrigatório
</span>
<!-- <span class="error ion-padding" *ngIf="errorControl.agenda.errors?.required">
Campo obrigatório
</span> -->
<ion-item>
<ion-label position="floating">Tipo de evento <span class="span-color">*</span></ion-label>
<ion-select formControlName="eventtype" [(ngModel)]="postEvent.EventType" interface="action-sheet" class="custom-options" Cancel-text="Cancelar" required>
<ion-select-option value="Reunião">Reunião</ion-select-option>
<ion-select-option value="Viagem">Viagem</ion-select-option>
<ion-select-option value="Conferência">Conferência</ion-select-option>
<ion-select-option value="Encontro">Encontro</ion-select-option>
</ion-select>
</ion-item>
<!-- Error messages -->
<span class="error ion-padding" *ngIf="formEventTypeSatus">
Campo obrigatório
</span>
<!-- <span class="error ion-padding" *ngIf="errorControl.eventtype.errors?.required">
Campo obrigatório
</span> -->
<ion-item>
<ion-label position="floating">Data Início <span class="span-color">*</span></ion-label>
<ion-datetime placeholder="{{postEvent.StartDate | date: 'dd MMM yyyy H:mm'}}"
formControlName="startdate" [(ngModel)]="postEvent.StartDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
required>
</ion-datetime>
</ion-item>
<!-- Error messages -->
<!-- <span class="error ion-padding" *ngIf="errorControl.startdate.errors?.required">
Campo obrigatório
</span> -->
<ion-item>
<ion-label position="floating">Data Fim <span class="span-color">*</span></ion-label>
<ion-datetime placeholder="{{postEvent.EndDate | date: 'dd MMM yyyy H:mm'}}"
formControlName="enddate" [(ngModel)]="postEvent.EndDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
required></ion-datetime>
</ion-item>
<!-- Error messages -->
<!-- <span class="error ion-padding" *ngIf="errorControl.enddate.errors?.required">
Campo obrigatório
</span> -->
</form>
<div class="div-attach">
<ion-item lines="none">
<ion-icon name="add" slot="end" (click)="openAttendees()"></ion-icon>
<ion-label class="attach-label">Participantes</ion-label>
</ion-item>
<div id="AttachFiles"></div>
</div>
<div class="div-attach">
<ion-item lines="none">
<ion-icon name="add" slot="end" (click)="showAlert()"></ion-icon>
<ion-label class="attach-label">Anexos</ion-label>
</ion-item>
<div id="AttachFiles"></div>
</div>
</div>
</ion-content>
<ion-footer class="ion-no-border">
<ion-toolbar class="btn-div">
<ion-buttons slot="start">
<ion-button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
<ion-icon name="close" slot="start"></ion-icon>
</ion-button>
</ion-buttons>
<ion-title>{{ viewTitle }}</ion-title>
<ion-buttons slot="end">
<ion-button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Enviar</ion-label>
<ion-icon name="checkmark" slot="start"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-footer>
@@ -1,34 +0,0 @@
.div-ion-content{
margin: 15px;
}
:host ::ng-deep{
.monthview-container {
height: auto !important;
}
.event-detail-container{
display: none;
}
}
.div-attach{
border: 1px solid #ccc;
margin: 15px 0 0 0;
padding: 15px;
}
.error{
color:red;
font-size: 12px;
font-weight: bold;
padding-bottom: 20px;
}
/* ion-item{
display: block;
border: 1px solid red;
width: 100%;
float: left;
} */
.span-color{
color:red;
}
/* .ion-badge{
} */
@@ -1,24 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { CalModalPage } from './cal-modal.page';
describe('CalModalPage', () => {
let component: CalModalPage;
let fixture: ComponentFixture<CalModalPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CalModalPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(CalModalPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
-260
View File
@@ -1,260 +0,0 @@
import { Component, OnInit, AfterViewInit, Input } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { Event } from '../../models/event.model';
import { EventsService } from 'src/app/services/events.service';
import { EventBody } from 'src/app/models/eventbody.model';
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
import { AttendeeModalPage } from '../events/attendee-modal/attendee-modal.page';
import { EventPerson } from 'src/app/models/eventperson.model';
import { AlertService } from 'src/app/services/alert.service';
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import { identifierModuleUrl } from '@angular/compiler';
@Component({
selector: 'app-cal-modal',
templateUrl: './cal-modal.page.html',
styleUrls: ['./cal-modal.page.scss'],
})
export class CalModalPage implements OnInit {
calendar = {
mode: 'month',
currentDate: new Date()
};
eventAttendees: EventPerson[];
segment:string = "true";
selectedSegment: string;
selectedDate: Date;
viewTitle: string;
postEvent: Event;
eventBody: EventBody;
modalReady = false;
minDate: string;
ionicForm: FormGroup;
isSubmitted = false;
formSubjectSatus: boolean = false;
formDescriptionSatus: boolean = false;
formLocationSatus: boolean = false;
formEventTypeSatus: boolean = false;
profile:string;
constructor(
public formBuilder: FormBuilder,
private modalCtrl: ModalController,
private eventService: EventsService,
private alertController:AlertService,
private navParams: NavParams
)
{
this.postEvent = new Event();
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
this.profile = this.navParams.get('profile');
}
ngOnInit() {
this.selectedSegment = this.navParams.get('segment');
this.selectedDate = this.navParams.get('eventSelectedDate');
let selectedStartdDate = this.selectedDate;
let selectedEndDate = new Date(this.selectedDate);
/* Set + 30minutes to seleted datetime */
selectedEndDate.setMinutes(this.selectedDate.getMinutes() + 30)
this.minDate = this.selectedDate.toString();
if(this.selectedSegment != "Combinada"){
this.postEvent ={
EventId: '',
Subject: '',
Body: this.eventBody,
Location: '',
CalendarId: '',
CalendarName: this.selectedSegment,
StartDate: selectedStartdDate,
EndDate: new Date(selectedEndDate),
EventType: 'Reunião',
Attendees: null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Categories: null,
HasAttachments: false,
};
}
else{
this.postEvent ={
EventId: '',
Subject: '',
Body: this.eventBody,
Location: '',
CalendarId: '',
CalendarName: 'Oficial',
StartDate: selectedStartdDate,
EndDate: new Date(selectedEndDate),
EventType: 'Reunião',
Attendees: null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Categories: null,
HasAttachments: false,
};
}
this.ionicForm = this.formBuilder.group({
subject: ['', [Validators.required]],
agenda: ['', [Validators.required]],
startdate: ['', [Validators.required]],
enddate: ['', [Validators.required]],
description: ['', [Validators.required]],
location: ['', [Validators.required]],
eventtype: ['', [Validators.required]]
})
}
get errorControl() {
return this.ionicForm.controls;
}
ngAfterViewInit(): void {
setTimeout(()=>{
this.modalReady = true;
}, 0);
}
save(){
if (this.ionicForm.valid) {
if(this.profile=='mdgpr'){
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
}
else if(this.profile=='pr'){
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe();
}
this.modalCtrl.dismiss(this.postEvent);
}
else{
this.validateFormInputs();
}
}
validateFormInputs(){
let formSubject = this.postEvent.Subject.trim();
let formDescription = this.postEvent.Body.Text.trim();
let formLocation = this.postEvent.Location.trim();
if (!this.postEvent.Subject && formSubject.length <= 0){
this.formSubjectSatus=true;
}
else{
this.formSubjectSatus=false;
if(!this.postEvent.Body.Text && formDescription.length <= 0){
this.formDescriptionSatus=true;
}
else{
this.formDescriptionSatus=false;
if (!this.postEvent.Location && formLocation.length <= 0){
this.formLocationSatus=true;
}
else{
this.formLocationSatus=false;
}
}
}
/* return (this.postEvent.Subject && formSubject.length > 0); */
}
onViewTitleChanged(title){
this.viewTitle = title;
}
onTimeSelected(ev){
/* this.postEvent.startTime = new Date(ev.selectedTime); */
}
close(){
this.modalCtrl.dismiss();
/* this.modalCtrl.dismiss(this.postEvent); */
}
async addAttendees()
{
const modal = await this.modalCtrl.create({
component: AttendeeModalPage,
componentProps: {
eventPersons: this.postEvent.Attendees
},
cssClass: 'attendee-modal',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
let newattendees: EventPerson[] = data['data'];
if (newattendees != null)
{
newattendees.forEach(newattendee => {
let att = {
"EmailAddress": newattendee.EmailAddress,
"Name": newattendee.Name,
"IsRequired": (this.segment == "true")
};
if (this.eventAttendees == null)
{
this.eventAttendees = new Array();
}
this.eventAttendees.push(att);
});
}
this.postEvent.Attendees = this.eventAttendees;
});
}
showAlert(){
this.alertController.presentAlert("Funcionalidade em desenvolvimento");
}
async openAttendees()
{
const modal = await this.modalCtrl.create({
component: AttendeesPage,
componentProps: {
eventAttendees: this.postEvent.Attendees
},
cssClass: 'attendee',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if (data['data'] != null)
{
let newattendees: EventPerson[] = data['data'];
this.postEvent.Attendees = newattendees;
}
});
}
}
@@ -1,17 +0,0 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AttendeeModalPage } from './attendee-modal.page';
const routes: Routes = [
{
path: '',
component: AttendeeModalPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class AttendeeModalPageRoutingModule {}
@@ -1,22 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { AttendeeModalPageRoutingModule } from './attendee-modal-routing.module';
import { AttendeeModalPage } from './attendee-modal.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
AttendeeModalPageRoutingModule
],
declarations: [AttendeeModalPage],
exports: [AttendeeModalPage]
})
export class AttendeeModalPageModule {}
@@ -1,39 +0,0 @@
<ion-header class="ion-no-border">
<ion-toolbar>
<ion-title>Adicionar intervenientes</ion-title>
</ion-toolbar>
<ion-searchbar (ionChange)="onChange($event)" placeholder="Pesquisar"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
</ion-header>
<ion-content>
<ion-item-group>
<ion-list>
<ion-item-sliding>
<ion-item lines="none" *ngFor="let attendee of contacts">
<ion-checkbox slot="end" (ionChange)="selectContact(attendee)"></ion-checkbox><!-- [disabled]="isCheckboxDisabled" -->
<ion-label>
<h3>{{ attendee.Name }}</h3>
<p>{{ attendee.EmailAddress }}</p>
</ion-label>
</ion-item>
</ion-item-sliding>
</ion-list>
</ion-item-group>
</ion-content>
<ion-footer class="ion-no-border">
<ion-toolbar class="btn-div">
<ion-buttons slot="start">
<ion-button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
<ion-icon name="close" slot="start"></ion-icon>
</ion-button>
</ion-buttons>
<ion-buttons slot="end">
<ion-button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Adicionar</ion-label>
<ion-icon name="checkmark" slot="start"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-footer>
@@ -1,6 +0,0 @@
ion-item-group{
margin: 15px;
}
ion-searchbar{
--border-radius: 20px;
}
@@ -1,24 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { AttendeeModalPage } from './attendee-modal.page';
describe('AttendeeModalPage', () => {
let component: AttendeeModalPage;
let fixture: ComponentFixture<AttendeeModalPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AttendeeModalPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(AttendeeModalPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,66 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { ContactsService } from 'src/app/services/contacts.service';
import { EventPerson } from 'src/app/models/eventperson.model';
import { ThrowStmt, removeSummaryDuplicates } from '@angular/compiler';
@Component({
selector: 'app-attendee-modal',
templateUrl: './attendee-modal.page.html',
styleUrls: ['./attendee-modal.page.scss'],
})
export class AttendeeModalPage implements OnInit {
contacts: EventPerson[];
showLoader: boolean = false;
eventPersons: EventPerson[];
constructor(private modalCtrl: ModalController, private contactsService: ContactsService) { }
ngOnInit() {
this.fetchContacts("");
}
save(){
this.modalCtrl.dismiss(
this.contacts.filter(function(contact) {
return contact.IsRequired == true;
})
);
}
close(){
this.modalCtrl.dismiss(null);
}
onChange(evt: any) {
this.fetchContacts(evt.detail.value);
}
selectContact(itm: EventPerson){
itm.IsRequired = !itm.IsRequired;
}
async fetchContacts(filter: string) {
this.showLoader = true;
this.contactsService.getContacts(filter).subscribe(result =>
{
if (this.eventPersons != null)
{
this.eventPersons.forEach(attendee => {
const index: number = result.findIndex((cont) => {
return cont.EmailAddress == attendee.EmailAddress
});
result.splice(index, 1);
});
}
this.contacts = result;
this.showLoader = false;
}
);
}
}
@@ -1,12 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AttendeesPage } from './attendees.page';
import { AttendeesPageModal } from './attendees.page';
const routes: Routes = [
{
path: '',
component: AttendeesPage
component: AttendeesPageModal
}
];
@@ -6,7 +6,7 @@ import { IonicModule } from '@ionic/angular';
import { AttendeesPageRoutingModule } from './attendees-routing.module';
import { AttendeesPage } from './attendees.page';
import { AttendeesPageModal } from './attendees.page';
@NgModule({
imports: [
@@ -15,7 +15,7 @@ import { AttendeesPage } from './attendees.page';
IonicModule,
AttendeesPageRoutingModule
],
declarations: [AttendeesPage],
exports: [AttendeesPage]
declarations: [AttendeesPageModal],
exports: [AttendeesPageModal]
})
export class AttendeesPageModule {}
@@ -1,6 +1,6 @@
<ion-header class="ion-no-border px-20">
<ion-toolbar class="px-10">
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
<ion-title class="pa-0">Adicionar intervenientes - A.M.</ion-title>
</ion-toolbar>
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
@@ -8,7 +8,7 @@ import { ContactsService } from 'src/app/services/contacts.service';
templateUrl: './attendees.page.html',
styleUrls: ['./attendees.page.scss'],
})
export class AttendeesPage implements OnInit {
export class AttendeesPageModal implements OnInit {
// Defined by the API
contacts: EventPerson[];
@@ -26,9 +26,11 @@ export class AttendeesPage implements OnInit {
private contactsService: ContactsService,
private navParams: NavParams,
private modalController: ModalController) {
this.adding = this.navParams.get('adding');
this.taskParticipants = this.navParams.get('taskParticipants');
this.taskParticipantsCc = this.navParams.get('taskParticipantsCc');
}
ngOnInit() {
@@ -44,7 +46,7 @@ export class AttendeesPage implements OnInit {
}
ngOnChanges(event){}
ngOnChanges(event) {}
save(){
@@ -54,7 +56,7 @@ export class AttendeesPage implements OnInit {
});
}
close(){
close() {
this.modalController.dismiss(false);
}
@@ -64,28 +66,16 @@ export class AttendeesPage implements OnInit {
filterSearchList(itm: EventPerson): boolean {
if(this.adding == "intervenient"){
const result = this.taskParticipants.find((contact, index)=>{
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
index = index;
return contact;
}
});
return undefined == result;
} else if (this.adding == "CC") {
const result = this.taskParticipantsCc.find((contact, index)=>{
const result = this.taskParticipants.concat( this.taskParticipantsCc).find((contact, index)=>{
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
index = index;
return contact;
}
});
index = index;
return contact;
}
return undefined == result;
}
})
return undefined == result;
}
@@ -118,11 +108,11 @@ export class AttendeesPage implements OnInit {
async selectContact(itm: EventPerson){
if(this.adding == "intervenient"){
itm.IsRequired = true;
this.taskParticipants.push(itm);
} else if (this.adding == "CC") {
itm.IsRequired = false;
this.taskParticipantsCc.push(itm);
}
}
@@ -6,7 +6,7 @@ import { Event } from '../../../models/event.model';
import { EventBody } from 'src/app/models/eventbody.model';
import { AlertController, ModalController } from '@ionic/angular';
import { EventPerson } from 'src/app/models/eventperson.model';
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
import { AlertService } from 'src/app/services/alert.service';
import { Attachment } from 'src/app/models/attachment.model';
import { AttachmentsService } from 'src/app/services/attachments.service';
@@ -87,7 +87,7 @@ export class EditEventPage implements OnInit {
async openAttendees(){
const modal = await this.modalCtrl.create({
component: AttendeesPage,
component: AttendeesPageModal,
componentProps: {
eventAttendees: this.loadedEvent.Attendees
},
@@ -10,7 +10,7 @@ import { AlertService } from 'src/app/services/alert.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { AttachmentsPage } from '../attachments/attachments.page';
import { AttendeesPage } from '../attendees/attendees.page';
import { AttendeesPageModal } from '../attendees/attendees.page';
@Component({
selector: 'app-event-detail-modal',
@@ -81,7 +81,7 @@ export class EventDetailModalPage implements OnInit {
async openAttendees(){
const modal = await this.modalCtrl.create({
component: AttendeesPage,
component: AttendeesPageModal,
componentProps: {
eventAttendees: this.loadedEvent.Attendees
},
@@ -6,7 +6,7 @@ import { Event } from '../../../models/event.model';
import { EventBody } from 'src/app/models/eventbody.model';
import { AlertController, ModalController } from '@ionic/angular';
import { EventPerson } from 'src/app/models/eventperson.model';
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
import { AlertService } from 'src/app/services/alert.service';
import { Attachment } from 'src/app/models/attachment.model';
import { AttachmentsService } from 'src/app/services/attachments.service';
@@ -87,7 +87,7 @@ export class EventDetailPage implements OnInit {
async openAttendees(){
const modal = await this.modalCtrl.create({
component: AttendeesPage,
component: AttendeesPageModal,
componentProps: {
eventAttendees: this.loadedEvent.Attendees
},
+35 -38
View File
@@ -1,42 +1,39 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { EventsPage } from './events.page';
const routes: Routes = [
{
path: '',
component: EventsPage
},
{
path: 'event-detail',
loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule)
},
{
path: 'attachments',
loadChildren: () => import('./attachments/attachments.module').then( m => m.AttachmentsPageModule)
},
{
path: 'attendees',
loadChildren: () => import('./attendees/attendees.module').then( m => m.AttendeesPageModule)
},
{
path: 'attendee-modal',
loadChildren: () => import('./attendee-modal/attendee-modal.module').then( m => m.AttendeeModalPageModule)
},
{
path: 'event-detail-modal',
loadChildren: () => import('./event-detail-modal/event-detail-modal.module').then( m => m.EventDetailModalPageModule)
}, {
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { EventsPage } from './events.page';
const routes: Routes = [
{
path: '',
component: EventsPage
},
{
path: 'event-detail',
loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule)
},
{
path: 'attachments',
loadChildren: () => import('./attachments/attachments.module').then( m => m.AttachmentsPageModule)
},
{
path: 'attendees',
loadChildren: () => import('./attendees/attendees.module').then( m => m.AttendeesPageModule)
},
{
path: 'event-detail-modal',
loadChildren: () => import('./event-detail-modal/event-detail-modal.module').then( m => m.EventDetailModalPageModule)
},
{
path: 'edit-event',
loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule)
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class EventsPageRoutingModule {}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class EventsPageRoutingModule {}
+1 -1
View File
@@ -79,7 +79,7 @@
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
<div class="text">Correspondência por ler</div>
</div>
<button class="btn-no-color cursor-pointer" (click)="viewExpedientListPage()">
<button (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer">
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg"></ion-icon>
</button>
</div>
@@ -21,6 +21,7 @@ import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { DespachosPrOptionsPage } from 'src/app/shared/popover/despachos-pr-options/despachos-pr-options.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-despacho-pr',
@@ -53,7 +54,8 @@ export class DespachoPrPage implements OnInit {
private alertService: AlertService,
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private animationController: AnimationController) {
private animationController: AnimationController,
private toastService: ToastService,) {
this.activatedRoute.queryParams.subscribe(params => {
if(params["serialNumber"]) {
this.serialnumber = params["serialNumber"];
@@ -188,9 +190,9 @@ export class DespachoPrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch(error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -206,10 +208,10 @@ export class DespachoPrPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage('Processo arquivado')
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.badRequest('Processo não arquivado')
this.toastService.badRequest('Processo não arquivado')
}
}
@@ -227,10 +229,10 @@ export class DespachoPrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage('Processo criado')
this.toastService.successMessage('Processo criado')
this.close();
} catch (error) {
this.badRequest('Processo não criado')
this.toastService.badRequest('Processo não criado')
}
}
@@ -247,10 +249,10 @@ export class DespachoPrPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage('')
this.toastService.successMessage('')
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -268,10 +270,10 @@ export class DespachoPrPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -281,7 +283,7 @@ export class DespachoPrPage implements OnInit {
console.log(res);
this.close();
this.successMessage('Processo enviado para pendentes')
this.toastService.successMessage('Processo enviado para pendentes')
});
}
@@ -465,49 +467,25 @@ export class DespachoPrPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
async badRequest(message?: string, callback?) {
@@ -2,41 +2,6 @@
<app-header></app-header>
</ion-header>
<ion-menu autoHide="false" side="end" content-id="main-content">
<ion-header>
<ion-toolbar translucent>
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item (click)="openExpedientActionsModal('0',fulltask)">
<ion-icon name="documents" slot="start"></ion-icon>
<ion-label>Efectuar Despacho</ion-label>
</ion-item>
<ion-item (click)="openExpedientActionsModal('1',fulltask)">
<ion-icon name="arrow-undo" slot="start"></ion-icon>
<ion-label>Pedido de Parecer</ion-label>
</ion-item>
<ion-item (click)="openExpedientActionsModal('2',fulltask)">
<ion-icon name="arrow-redo" slot="start"></ion-icon>
<ion-label>Pedido de Deferimento</ion-label>
</ion-item>
<ion-item (click)="openBookMeetingModal(task)">
<ion-icon name="calendar" slot="start"></ion-icon>
<ion-label>Marcar reunião</ion-label>
</ion-item>
<ion-item hidden disabled>
<ion-icon name="paper-plane" slot="start"></ion-icon>
<ion-label>Enviar para pendentes</ion-label>
</ion-item>
</ion-list>
</ion-content>
</ion-menu>
<div class="ion-page d-none" id="main-content">
<ion-menu-button></ion-menu-button>
</div>
<ion-content>
<div class="main-content d-flex height-100">
<div class="content d-flex flex-column" *ngIf="task">
@@ -20,6 +20,8 @@ import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/despachos-options.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-despacho',
@@ -35,7 +37,7 @@ export class DespachoPage implements OnInit {
task: any;
attachments:any;
fulltask: any;
eventsList: Event[];
eventsList: Event[] = [];
serialnumber: string;
profile: string;
intervenientes: any;
@@ -53,6 +55,7 @@ export class DespachoPage implements OnInit {
private activatedRoute: ActivatedRoute,
private router: Router,
private animationController: AnimationController,
private toastService: ToastService,
) {
this.activatedRoute.queryParams.subscribe(params => {
@@ -62,7 +65,7 @@ export class DespachoPage implements OnInit {
}
});
}
}
ngOnInit() {
this.profile = "mdgpr";
@@ -90,11 +93,11 @@ export class DespachoPage implements OnInit {
let navigationExtras: NavigationExtras = {
queryParams: {
// "serialNumber": serialNumber,
'despachos': true
//'despachos': true
}
}
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
this.router.navigate(['/home/gabinete-digital/despachos'], navigationExtras);
}
@@ -193,9 +196,9 @@ export class DespachoPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage('Processo criado')
this.toastService.successMessage('Processo criado')
} catch(error) {
this.badRequest("Processo não criado")
this.toastService.badRequest("Processo não criado")
}
}
@@ -211,15 +214,15 @@ export class DespachoPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage('Processo descartado')
this.toastService.successMessage('Processo descartado')
this.close();
} catch (error) {
this.badRequest("Processo não descartado")
this.toastService.badRequest("Processo não descartado")
}
}
async reexecute(note:string, documents:any) {
async reencaminhar(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Reencaminhar",
@@ -229,14 +232,33 @@ export class DespachoPage implements OnInit {
},
"AttachmentList" :documents,
}
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage()
this.close();
} catch (error) {
this.toastService.badRequest()
}
}
async reexecute(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Reexecução",
"ActionTypeId": 100000010,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -245,10 +267,10 @@ export class DespachoPage implements OnInit {
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
console.log(res);
this.close();
this.successMessage('Processo enviado para despacho')
this.toastService.successMessage('Processo enviado para despacho')
},
error => {
this.badRequest("Processo não enviado para despacho")
this.toastService.badRequest("Processo não enviado para despacho")
});
}
@@ -409,13 +431,14 @@ export class DespachoPage implements OnInit {
}
async openOptions(taskAction?: any) {
const popover = await this.popoverController.create({
component: OptsExpedientePage,
component: DespachosOptionsPage,
cssClass: 'exp-options',
componentProps: {
task: this.task,
fulltask: this.fulltask,
taskAction:taskAction,
taskAction: taskAction,
showEnviarPendentes: false
},
translucent: true
@@ -423,50 +446,24 @@ export class DespachoPage implements OnInit {
return await popover.present();
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(7000)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
@@ -11,6 +11,7 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-diploma-assinar',
@@ -38,6 +39,7 @@ export class DiplomaAssinarPage implements OnInit {
private activatedRoute: ActivatedRoute,
private router: Router,
private animationController: AnimationController,
private toastService: ToastService
) {
this.activatedRoute.queryParams.subscribe(params => {
if(params["serialNumber"]) {
@@ -151,11 +153,11 @@ export class DiplomaAssinarPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage(false, ()=>{
this.toastService.successMessage(false, ()=>{
this.goBack();
})
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -163,52 +165,7 @@ export class DiplomaAssinarPage implements OnInit {
this.modalController.dismiss();
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -11,6 +11,7 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-diploma',
@@ -38,7 +39,8 @@ export class DiplomaPage implements OnInit {
private iab: InAppBrowser,
private activatedRoute: ActivatedRoute,
private router: Router,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService,
) {
this.activatedRoute.queryParams.subscribe(params => {
if(params["serialNumber"]) {
@@ -154,12 +156,12 @@ export class DiplomaPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage(false, ()=>{
this.toastService.successMessage(false, ()=>{
this.close();
})
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -176,9 +178,9 @@ export class DiplomaPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -195,9 +197,9 @@ export class DiplomaPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise();
this.successMessage('Processo concluído')
this.toastService.successMessage('Processo concluído')
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -275,52 +277,7 @@ export class DiplomaPage implements OnInit {
this.modalController.dismiss();
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -11,6 +11,7 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
import { EmendMessageModalPage } from '../../../agenda/emend-message-modal/emend-message-modal.page';
import { EventActionsPopoverPage } from '../../../agenda/event-actions-popover/event-actions-popover.page';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-approve-event-modal',
@@ -41,6 +42,7 @@ export class ApproveEventModalPage implements OnInit {
private activatedRoute: ActivatedRoute,
private iab: InAppBrowser,
private animationController: AnimationController,
private toastService: ToastService,
) {
@@ -103,13 +105,13 @@ export class ApproveEventModalPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.successMessage('Evento aprovado', ()=>{
this.toastService.successMessage('Evento aprovado', ()=>{
this.router.navigate(['/home/gabinete-digital/event-list']);
this.modalController.dismiss(null);
})
} catch (error) {
this.badRequest('Evento não aprovado')
this.toastService.badRequest('Evento não aprovado')
}
}
@@ -129,13 +131,11 @@ export class ApproveEventModalPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.successMessage('Evento rejeitado', () =>{
this.toastService.successMessage('Evento rejeitado', () =>{
this.router.navigate(['/home/gabinete-digital/event-list']);
})
} catch (error) {
this.badRequest('Evento não rejeitado')
this.toastService.badRequest('Evento não rejeitado')
}
this.modalController.dismiss(null);
@@ -178,7 +178,7 @@ export class ApproveEventModalPage implements OnInit {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewerUseComment": res.data,
"ReviewUserComment": res.data,
}
}
@@ -187,9 +187,9 @@ export class ApproveEventModalPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
this.router.navigate(['/home/gabinete-digital/event-list']);
}
@@ -220,52 +220,7 @@ export class ApproveEventModalPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -96,14 +96,14 @@ export class ApproveEventPage implements OnInit {
console.log(body);
try {
//await this.processes.PostTaskAction(body).toPromise()
//this.successMessage()
await this.processes.PostTaskAction(body).toPromise()
this.toastService.successMessage()
this.toastService.successMessage('Evento aprovado', ()=>{
this.goBack();
});
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -126,16 +126,16 @@ export class ApproveEventPage implements OnInit {
async rejeitar(serialNumber:string){
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
console.log(body);
this.successMessage('Process');
this.toastService.successMessage('Process');
try {
this.processes.PostTaskAction(body).toPromise();
await this.successMessage('Processo rejeitado');
await this.toastService.successMessage('Processo rejeitado');
await this.toastService.successMessage('Processo rejeitado', ()=>{
this.goBack();
});
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -189,17 +189,17 @@ export class ApproveEventPage implements OnInit {
let body = { "serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewerUseComment": res.data,
"ReviewUserComment": res.data,
}
}
console.log(body);
try {
await this.processes.PostTaskAction(body).toPromise();
this.successMessage();
this.toastService.successMessage();
this.goBack();
} catch (error) {
this.badRequest();
this.toastService.badRequest();
}
}
else{
@@ -241,52 +241,7 @@ export class ApproveEventPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -1,5 +1,5 @@
<ion-header class="ion-no-border">
<h4>Adicionar Intervenientes</h4>
<h4>Adicionar Intervenientes - TK</h4>
<ion-searchbar (ionChange)="onChange($event)" placeholder="Pesquisar"></ion-searchbar>
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
</ion-header>
@@ -7,8 +7,6 @@ import { IonicModule } from '@ionic/angular';
import { BookMeetingModalPageRoutingModule } from './book-meeting-modal-routing.module';
import { BookMeetingModalPage } from './book-meeting-modal.page';
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
import { AttendeesPageModule } from 'src/app/shared/event/attendees/attendees.module';
import { EmptyContainerPageModule } from 'src/app/shared/empty-container/empty-container.module';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@@ -19,8 +17,6 @@ import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/att
FormsModule,
IonicModule,
BookMeetingModalPageRoutingModule,
//
// AttendeesPageModule,
EmptyContainerPageModule,
@@ -16,6 +16,8 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { User } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-book-meeting-modal',
@@ -52,7 +54,8 @@ export class BookMeetingModalPage implements OnInit {
private attachmentsService: AttachmentsService,
private calendarService: EventsService,
authService: AuthService,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService,
) {
this.loggeduser = authService.ValidatedUser;
this.task = this.navParams.get('task');
@@ -137,9 +140,9 @@ export class BookMeetingModalPage implements OnInit {
}
this.distartExpedientModal();
this.successMessage('Reunião criada')
this.toastService.successMessage('Reunião criada')
} catch (error) {
this.badRequest('Reunião não criada')
this.toastService.badRequest('Reunião não criada')
}
@@ -155,10 +158,13 @@ export class BookMeetingModalPage implements OnInit {
await this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise();
break;
}
this.successMessage('Reunião criada')
this.close();
this.toastService.successMessage('Reunião criada', ()=>{
this.close();
})
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -172,34 +178,31 @@ export class BookMeetingModalPage implements OnInit {
if(window.innerWidth <= 800){
const modal = await this.modalController.create({
component: AddParticipantsModalPage,
componentProps: {
eventPersons: this.eventAttendees
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'book-meeting-modal',
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
this.taskParticipants = res.data;
let newattendees: EventPerson[] = res['data'];
if(newattendees != null){
newattendees.forEach(newattendee => {
let att = {
"EmailAddress": newattendee.EmailAddress,
"Name": newattendee.Name,
"IsRequired": true
};
if(this.eventAttendees == null){
this.eventAttendees = new Array();
}
this.eventAttendees.push(att);
});
modal.onDidDismiss().then((data) => {
if(data){
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
this.postData.Attendees = this.eventAttendees;
});
} else {
this.showAttendees = true;
}
@@ -211,38 +214,29 @@ export class BookMeetingModalPage implements OnInit {
if(window.innerWidth <= 800) {
const modal = await this.modalController.create({
component: AddParticipantsCcModalPage,
componentProps: {
eventPersons: this.eventAttendees
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'add-participants-cc-modal',
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
this.taskParticipantsCc = res.data;
let newattendees: EventPerson[] = res['data'];
modal.onDidDismiss().then((data) => {
if (newattendees != null)
{
newattendees.forEach(newattendee => {
let att = {
"EmailAddress": newattendee.EmailAddress,
"Name": newattendee.Name,
"IsRequired": false
};
if (this.eventAttendees == null)
{
this.eventAttendees = new Array();
}
this.eventAttendees.push(att);
});
if(data){
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
this.postData.Attendees = this.eventAttendees;
});
} else {
this.showAttendees = true;
@@ -304,100 +298,18 @@ export class BookMeetingModalPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
modal.dismiss()
this.goToGabinete()
},3000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo não efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
goToGabinete() {
this.router.navigate(['/home/gabinete-digital']);
}
setIntervenient(data){
this.taskParticipants = data;
}
setIntervenientCC(data){
this.taskParticipantsCc = data;
}
}
@@ -7,9 +7,7 @@ import { IonicModule } from '@ionic/angular';
import { ExpedientTaskModalPageRoutingModule } from './expedient-task-modal-routing.module';
import { ExpedientTaskModalPage } from './expedient-task-modal.page';
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
import { EmptyContainerPage } from 'src/app/shared/empty-container/empty-container.page';
import { AttendeesPageModule } from 'src/app/shared/event/attendees/attendees.module';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
import { EmptyContainerPageModule } from 'src/app/shared/empty-container/empty-container.module';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
@@ -21,7 +19,6 @@ import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-
IonicModule,
ExpedientTaskModalPageRoutingModule,
//
AttendeesPageModule,
AttendeeModalPageModule,
EmptyContainerPageModule,
BtnModalDismissPageModule,
@@ -43,9 +43,12 @@
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-item>
<ion-label *ngIf="!selectedTypes">Tipos de assunto</ion-label>
<ion-select [(ngModel)]="selectedTypes" multiple="true" interface="action-sheet" Cancel-text="Cancelar" required>
<ion-item class="ion-no-border ion-no-padding ion-no-margin">
<ion-label>Tipo de assunto</ion-label>
<ion-select
[(ngModel)]="selectedTypes"
(ngModelChange)="onSelectedTypesChanged($event)"
multiple="true" interface="alert" Cancel-text="Cancelar" required>
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
</ion-select>
</ion-item>
@@ -62,7 +65,7 @@
<div class="list-people">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipants.length == 0" class="list-people-title">Adicionar intervenientes</ion-label>
<ion-label *ngIf="taskParticipants.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
@@ -7,8 +7,6 @@ import { Participant } from 'src/app/models/participant.model';
import { Folder } from 'src/app/models/folder.model';
import { AuthService } from 'src/app/services/auth.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-modal.page';
import { environment } from 'src/environments/environment';
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
import { AttachmentsService } from 'src/app/services/attachments.service';
@@ -20,6 +18,8 @@ import { EventAttachment } from 'src/app/models/attachment.model';
import { User } from 'src/app/models/user.model';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
@Component({
selector: 'app-expedient-task-modal',
@@ -76,11 +76,11 @@ export class ExpedientTaskModalPage implements OnInit {
private alertController: AlertService,
private authService: AuthService,
private userAuth: AuthService,
private animationController: AnimationController) {
private animationController: AnimationController,
private toastService: ToastService,
) {
this.loggeduser = userAuth.ValidatedUser;
this.user = environment.defaultuser +'@'+ environment.domain;
this.task = this.navParams.get('task');
@@ -88,6 +88,9 @@ export class ExpedientTaskModalPage implements OnInit {
this.taskType = this.navParams.get('taskAction');
//Initialize SubjectTypes Array with the value "Indefinido"
this.selectedTypes = ['99999850'];
this.postData = new Despacho();
this.participants = this.participants = new Array();
this.dispatchFolder = {
@@ -98,7 +101,7 @@ export class ExpedientTaskModalPage implements OnInit {
SourceType: 'DOC', //FOLDER
SourceId: this.task.workflowInstanceDataFields.DocID, //FolderId
DeadlineType: '',
SubjectTypes: ['99999844'],
SubjectTypes: this.selectedTypes,
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
};
@@ -126,6 +129,17 @@ export class ExpedientTaskModalPage implements OnInit {
this.getSubjectType();
}
onSelectedTypesChanged(ev:any){
console.log(ev);
if(ev.length > 1){
console.log(ev.filter(data => data != '99999850'));
this.selectedTypes = ev.filter(data => data != '99999850');
}
if(ev.length == 0){
this.selectedTypes = ["99999850"];
}
}
close(){
this.router.navigate(['/home/gabinete-digital/expediente']);
this.modalController.dismiss(null);
@@ -191,7 +205,6 @@ export class ExpedientTaskModalPage implements OnInit {
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
//SubjectTypes: [],
}
try {
let action_despacho = {
@@ -205,11 +218,17 @@ export class ExpedientTaskModalPage implements OnInit {
console.log(this.postData);
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
this.modalController.dismiss(action_despacho);
//await this.successMessage('Processo efetuado');
await this.toastService.successMessage('Processo efetuado', () =>{
console.log('Hoje Teste T');
this.modalController.dismiss(action_despacho);
});
/* setInterval(()=>{
console.log('Hoje Teste T');
this.modalController.dismiss(action_despacho);
}, 7000); */
} catch (error) {
await this.badRequest('Processo não efetuado')
await this.toastService.badRequest('Processo não efetuado')
}
console.log('this.taskResult', this.taskResult);
break;
@@ -234,11 +253,14 @@ export class ExpedientTaskModalPage implements OnInit {
"Note": "",
}
}
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
this.modalController.dismiss(action_parecer);
//await this.successMessage('Processo efetuado')
//this.taskResult = await this.processes.postParecer(this.postData).toPromise();
await this.toastService.successMessage('Processo efetuado');
setInterval(()=>{
this.modalController.dismiss(action_parecer);
}, 7000);
} catch (error) {
await this.badRequest('Processo não efetuado')
await this.toastService.badRequest('Processo não efetuado')
}
break;
case '2':
@@ -262,10 +284,11 @@ export class ExpedientTaskModalPage implements OnInit {
}
}
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
this.modalController.dismiss(action_deferimento);
//await this.successMessage('Processo efetuado')
await this.toastService.successMessage('Processo efetuado', () =>{
this.modalController.dismiss(action_deferimento);
});
} catch (error) {
await this.badRequest('Processo não efetuado')
await this.toastService.badRequest('Processo não efetuado')
}
console.log('this.taskResult', this.taskResult);
break;
@@ -299,10 +322,12 @@ export class ExpedientTaskModalPage implements OnInit {
}
}
this.taskResult = await this.processes.postDespatchoPr(this.postData).toPromise();
this.modalController.dismiss(action_despacho_pr);
//await this.successMessage('Processo efetuado')
await this.toastService.successMessage('Processo efetuado', () =>{
this.modalController.dismiss(action_despacho_pr);
});
} catch (error) {
await this.badRequest('Processo não efetuado')
await this.toastService.badRequest('Processo não efetuado')
}
console.log('this.taskResult', this.taskResult);
break;
@@ -328,10 +353,12 @@ export class ExpedientTaskModalPage implements OnInit {
}
}
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
this.modalController.dismiss(action_parecer_pr);
//await this.successMessage('Processo efetuado')
await this.toastService.badRequest('Processo efetuado', () =>{
this.modalController.dismiss(action_parecer_pr);
})
} catch (error) {
await this.badRequest('Processo não efetuado')
await this.toastService.badRequest('Processo não efetuado')
}
break;
}
@@ -346,89 +373,71 @@ export class ExpedientTaskModalPage implements OnInit {
});
}
async addParticipants() {
/* console.log('HERES'); */
this.adding = "intervenient";
this.contacts = this.taskParticipants;
if(window.innerWidth <=800){
this.showAttendees=false;
async openAttendees() {
if(window.innerWidth <= 1024) {
const modal = await this.modalController.create({
component: AddParticipantsModalPage,
component: AttendeesPageModal,
componentProps: {
eventPersons: this.participants
adding: this.adding,
taskParticipants: this.taskParticipants,
taskParticipantsCc: this.taskParticipantsCc
},
cssClass: 'add-participants-modal',
cssClass: 'attendee modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
this.taskParticipants = res.data;
let newattendees: EventPerson[] = res['data'];
if(newattendees!= null){
newattendees.forEach(newattendee => {
let att = {
'UserEmail': newattendee.EmailAddress,
'UserType': 'I',
};
if(this.participants == null){
this.participants = new Array();
}
this.participants.push(att);
});
modal.onDidDismiss().then((data) => {
if(data){
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
this.postData.UsersSelected = this.participants;
console.log(this.postData);
});
} else {
this.showAttendees=true
this.showAttendees = true
}
}
/* setIntervenient(data){
this.taskParticipants = data;
//this.postData.UsersSelected = data;
}
setIntervenientCC(data){
this.taskParticipantsCc = data;
} */
async setIntervenient(data) {
this.taskParticipants = data;
}
async setIntervenientCC(data) {
this.taskParticipantsCc = data;
}
async addParticipants() {
this.adding = 'intervenient'
this.openAttendees();
}
async addParticipantsCc() {
this.adding = "CC";
this.contacts = this.taskParticipantsCc;
if(window.innerWidth <=800){
this.showAttendees=false;
const modal = await this.modalController.create({
component: AddParticipantsCcModalPage,
componentProps: {
eventPersons: this.participants
},
cssClass: 'add-participants-cc-modal',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((res) => {
this.taskParticipantsCc = res.data;
let newattendees: EventPerson[] = res['data'];
if(newattendees!= null){
newattendees.forEach(newattendee => {
let att = {
'UserEmail': newattendee.EmailAddress,
'UserType': 'CC',
};
if(this.participants == null){
this.participants = new Array();
}
this.participants.push(att);
});
}
this.postData.UsersSelected = this.participants;
console.log(this.postData);
});
} else {
this.showAttendees=true
}
this.openAttendees();
}
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
this.taskParticipants = taskParticipants;
this.taskParticipantsCc = taskParticipantsCc;
}
async distartExpedientModal() {
@@ -464,13 +473,7 @@ export class ExpedientTaskModalPage implements OnInit {
}
async setIntervenient(data) {
this.taskParticipants = data;
}
async setIntervenientCC(data) {
this.taskParticipantsCc = data;
}
async closeComponent() {
this.showAttendees = false;
@@ -530,94 +533,47 @@ export class ExpedientTaskModalPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
var notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/notification-error.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo não efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
}
@@ -56,7 +56,7 @@ export class ExpedienteDetailPage implements OnInit {
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private toastService: ToastService,
private animationController: AnimationController
private animationController: AnimationController,
) {
this.activateRoute.paramMap.subscribe(params => {
@@ -120,14 +120,14 @@ export class ExpedienteDetailPage implements OnInit {
});
}
sendExpedienteToPending(){
sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
console.log(res);
this.successMessage('Processo enviado para pendentes')
this.toastService.successMessage('Processo enviado para pendentes')
this.goBack();
},
(error)=>{
this.badRequest('Processo não enviado para pendentes')
this.toastService.badRequest('Processo não enviado para pendentes')
});
}
@@ -266,10 +266,10 @@ export class ExpedienteDetailPage implements OnInit {
try {
await this.processes.CompleteTask(otherbody).toPromise()
this.successMessage('Processo descartado');
this.toastService.successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.badRequest('Processo não descartado')
this.toastService.badRequest('Processo não descartado')
}
}
@@ -281,10 +281,10 @@ export class ExpedienteDetailPage implements OnInit {
if(res['data']== 'Yes'){
try {
await this.processes.CompleteTask(body).toPromise();
this.successMessage('Processo descartado');
this.toastService.successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.badRequest('Processo não descartado')
this.toastService.badRequest('Processo não descartado')
}
this.goBack();
}
@@ -292,10 +292,10 @@ export class ExpedienteDetailPage implements OnInit {
console.log('Update');
try {
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
this.successMessage();
this.toastService.successMessage();
this.goBack();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
}
@@ -361,52 +361,7 @@ export class ExpedienteDetailPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -34,7 +34,6 @@
//DIV
ion-item{
border: 1px solid blue;
margin: 0 !important;
padding: 0 !important;
--background: none;
@@ -21,6 +21,7 @@ import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { OptsExpedientePrPage } from 'src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-expediente-pr',
@@ -56,6 +57,7 @@ export class ExpedientePrPage implements OnInit {
private activatedRoute: ActivatedRoute,
private userAuth: AuthService,
private animationController: AnimationController,
private toastService: ToastService,
) {
this.loggeduser = userAuth.ValidatedUser;
@@ -102,11 +104,11 @@ export class ExpedientePrPage implements OnInit {
sendExpedienteToPending(){
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
console.log(res);
this.successMessage('Processo enviado para pendentes')
this.toastService.successMessage('Processo enviado para pendentes')
this.goBack();
},
(error)=>{
this.badRequest('Processo não enviado para pendentes')
this.toastService.badRequest('Processo não enviado para pendentes')
});
}
@@ -201,9 +203,9 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage('Processo aprovado')
this.toastService.successMessage('Processo aprovado')
} catch(error) {
this.badRequest('Processo não aprovado')
this.toastService.badRequest('Processo não aprovado')
}
}
@@ -221,9 +223,9 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch(error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -329,9 +331,9 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(otherbody).toPromise();
this.successMessage('Processo descartado')
this.toastService.successMessage('Processo descartado')
} catch (error) {
this.badRequest('Processo não descartado')
this.toastService.badRequest('Processo não descartado')
}
@@ -345,10 +347,10 @@ export class ExpedientePrPage implements OnInit {
try {
//await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.goBack();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -360,9 +362,9 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.UpdateTaskStatus(this.task.FolderId);
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -440,52 +442,7 @@ export class ExpedientePrPage implements OnInit {
return await popover.present();
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -24,6 +24,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { User } from 'src/app/models/user.model';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-pedido',
@@ -56,7 +57,8 @@ export class PedidoPage implements OnInit {
private alertService: AlertService,
public popoverController: PopoverController,
authService: AuthService,
private animationController: AnimationController) {
private animationController: AnimationController,
private toastService: ToastService,) {
this.loggeduser = authService.ValidatedUser;
this.activatedRoute.queryParams.subscribe(params => {
if(params["serialNumber"]) {
@@ -199,10 +201,10 @@ export class PedidoPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -221,10 +223,10 @@ export class PedidoPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage('Processo arquivado')
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -418,52 +420,7 @@ export class PedidoPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
+3 -47
View File
@@ -50,6 +50,7 @@ export class LoginPage implements OnInit {
public alertController: AlertController,
private modalController: ModalController,
private animationController: AnimationController,
//private fcm: FCM
) {
@@ -186,10 +187,10 @@ export class LoginPage implements OnInit {
const encrypted = crypto.SHA1(code)
if( encrypted == localStorage.getItem('PIN')) {
//this.successMessage()
//this.toastService.successMessage()
this.router.navigate(['/home/events']);
} else {
this.badRequest('Pin incorreto')
this.toastService.badRequest('Pin incorreto')
this.code = []
}
@@ -206,52 +207,7 @@ export class LoginPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController } from '@ionic/angular';
import { PublicationFolder } from 'src/app/models/publicationfolder';
import { PublicationsService } from 'src/app/services/publications.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
@@ -19,6 +20,7 @@ export class NewActionPage implements OnInit {
private modalController: ModalController,
private publication: PublicationsService,
private animationController: AnimationController,
private toastService: ToastService
) {
this.folder = new PublicationFolder();
@@ -45,10 +47,10 @@ export class NewActionPage implements OnInit {
try {
await this.publication.CreatePublicationFolder(this.folder).toPromise()
this.successMessage("Ação presidencial criado")
this.toastService.successMessage("Ação presidencial criado")
this.close();
} catch (error) {
this.badRequest("Ação presidencial não criado")
this.toastService.badRequest("Ação presidencial não criado")
}
}
@@ -56,96 +58,8 @@ export class NewActionPage implements OnInit {
this.modalController.dismiss();
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo não realizado com sucesso',
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
import { Publication } from 'src/app/models/publication';
import { PublicationsService } from 'src/app/services/publications.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ImageModalPage } from '../gallery/image-modal/image-modal.page';
@@ -23,7 +24,8 @@ export class PublicationDetailPage implements OnInit {
private modalController: ModalController,
private navParams:NavParams,
private publications:PublicationsService,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService
) {
this.publicationId = this.navParams.get('publicationId');
/* this.folderId = this.navParams.get('folderIdId'); */
@@ -83,10 +85,10 @@ export class PublicationDetailPage implements OnInit {
try {
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
this.successMessage('Publicação eliminado')
this.toastService.successMessage('Publicação eliminado')
this.close();
} catch (error) {
this.badRequest('Publicação não eliminado')
this.toastService.badRequest('Publicação não eliminado')
}
}
@@ -122,95 +124,7 @@ export class PublicationDetailPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo não realizado com sucesso',
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
import { Publication } from 'src/app/models/publication';
import { PublicationsService } from 'src/app/services/publications.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ImageModalPage } from '../../gallery/image-modal/image-modal.page';
@@ -22,7 +23,8 @@ export class PublicationDetailPage implements OnInit {
private modalController: ModalController,
private navParams:NavParams,
private publications:PublicationsService,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService,
) {
this.publicationId = this.navParams.get('publicationId');
this.folderId = this.navParams.get('folderId');
@@ -83,13 +85,13 @@ export class PublicationDetailPage implements OnInit {
try {
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
this.successMessage('Publicaçao eliminado')
this.toastService.successMessage('Publicaçao eliminado')
this.close();
//this.goBackToViewPublications.emit();
} catch (error) {
this.badRequest('Publicaçao não eliminado')
this.toastService.badRequest('Publicaçao não eliminado')
}
}
@@ -124,96 +126,8 @@ export class PublicationDetailPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: 'Processo não realizado com sucesso',
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
+29 -69
View File
@@ -24,94 +24,54 @@ export class ToastService {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
let notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
let notification = document.createElement('div')
notification.id = 'notification'
notification.innerHTML = `
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/notification-error.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
</div>
`
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
document.body.append(notification)
notification.querySelector('.text').innerHTML = message || 'Processo não efetuado'
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
notification.remove()
},7000)
}
}
@@ -11,6 +11,7 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { EditEventToApproveComponent } from '../../gabinete-digital/edit-event-to-approve/edit-event.page';
import { BadRequestPage } from '../../popover/bad-request/bad-request.page';
import { SuccessMessagePage} from '../../popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
@@ -47,7 +48,8 @@ export class ApproveEventPage implements OnInit {
private menu: MenuController,
private alertService: AlertService,
private iab: InAppBrowser,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService
) {
// $$$
@@ -88,9 +90,9 @@ export class ApproveEventPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.modalController.dismiss(serialNumber);
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
/* this.approveEventDismiss.emit({
@@ -112,7 +114,7 @@ export class ApproveEventPage implements OnInit {
await this.openEmendMessageModal(serialNumber);
this.modalController.dismiss(null);
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -126,9 +128,9 @@ export class ApproveEventPage implements OnInit {
await this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.modalController.dismiss(null);
this.successMessage('Evento rejeitado')
this.toastService.successMessage('Evento rejeitado')
} catch (error) {
this.badRequest('Evento não rejeitado')
this.toastService.badRequest('Evento não rejeitado')
}
}
@@ -180,7 +182,7 @@ export class ApproveEventPage implements OnInit {
let body = { "serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewerUseComment": res.data,
"ReviewUserComment": res.data,
}
}
console.log(body);
@@ -189,9 +191,9 @@ export class ApproveEventPage implements OnInit {
await this.processes.PostTaskAction(body).toPromise()
//this.router.navigate(['/home/gabinete-digital/event-list']);
this.goToEventsToApprove();
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -236,52 +238,7 @@ export class ApproveEventPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -11,6 +11,7 @@ import { SearchDocument } from "src/app/models/search-document";
import { EventAttachment } from 'src/app/models/attachment.model';
import { BadRequestPage } from '../../popover/bad-request/bad-request.page';
import { SuccessMessagePage} from '../../popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
@@ -49,6 +50,7 @@ export class NewEventPage implements OnInit {
private eventService: EventsService,
private attachmentsService: AttachmentsService,
private animationController: AnimationController,
private toastService: ToastService
) {}
@@ -206,11 +208,11 @@ export class NewEventPage implements OnInit {
this.afterSave();
}
this.successMessage('Evento criado')
this.toastService.successMessage('Evento criado')
},
error => {
this.badRequest('Evento não criado')
this.toastService.badRequest('Evento não criado')
});
}
else if(this.profile=='pr') {
@@ -247,7 +249,7 @@ export class NewEventPage implements OnInit {
this.afterSave();
}
this.successMessage('Evento criado')
this.toastService.successMessage('Evento criado')
});
}
}
@@ -315,97 +317,9 @@ export class NewEventPage implements OnInit {
window['temp.path:/home/agenda/new-event.component.ts'] = {}
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo não realizado com sucesso',
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
@@ -1,12 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AttendeeModalPage } from './attendee-modal.page';
import { AttendeePage } from './attendee-modal.page';
const routes: Routes = [
{
path: '',
component: AttendeeModalPage
component: AttendeePage
}
];
@@ -6,7 +6,7 @@ import { IonicModule } from '@ionic/angular';
import { AttendeeModalPageRoutingModule } from './attendee-modal-routing.module';
import { AttendeeModalPage } from './attendee-modal.page';
import { AttendeePage } from './attendee-modal.page';
@NgModule({
imports: [
@@ -15,7 +15,7 @@ import { AttendeeModalPage } from './attendee-modal.page';
IonicModule,
AttendeeModalPageRoutingModule
],
declarations: [AttendeeModalPage],
exports: [AttendeeModalPage]
declarations: [AttendeePage],
exports: [AttendeePage]
})
export class AttendeeModalPageModule {}
@@ -1,6 +1,7 @@
<ion-header class="ion-no-border px-20">
<ion-toolbar class="px-10">
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
<ion-title>Agenda Desktop</ion-title>
</ion-toolbar>
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
@@ -1,19 +1,19 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { AttendeeModalPage } from './attendee-modal.page';
import { AttendeePage } from './attendee-modal.page';
describe('AttendeeModalPage', () => {
let component: AttendeeModalPage;
let fixture: ComponentFixture<AttendeeModalPage>;
describe('AttendeePage', () => {
let component: AttendeePage;
let fixture: ComponentFixture<AttendeePage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AttendeeModalPage ],
declarations: [ AttendeePage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(AttendeeModalPage);
fixture = TestBed.createComponent(AttendeePage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
@@ -8,7 +8,7 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
templateUrl: './attendee-modal.page.html',
styleUrls: ['./attendee-modal.page.scss'],
})
export class AttendeeModalPage implements OnInit {
export class AttendeePage implements OnInit {
// Defined by the API
contacts: EventPerson[];
@@ -118,7 +118,7 @@ export class AttendeeModalPage implements OnInit {
filterSearchList(itm: EventPerson): boolean {
const result1 = this.LtaskParticipants.find((contact, index)=>{
const result = this.LtaskParticipants.concat(this.LtaskParticipantsCc).find((contact, index)=>{
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
index = index;
@@ -127,7 +127,7 @@ export class AttendeeModalPage implements OnInit {
});
// if to show
if(undefined != result1){
if(undefined != result){
return false;
}
@@ -1,12 +0,0 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AttendeesPage } from './attendees.page';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class AttendeesPageRoutingModule {}
@@ -1,21 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { AttendeesPageRoutingModule } from './attendees-routing.module';
import { AttendeesPage } from './attendees.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
AttendeesPageRoutingModule
],
declarations: [AttendeesPage],
exports: [AttendeesPage]
})
export class AttendeesPageModule {}
@@ -1,57 +0,0 @@
<ion-header class="ion-no-border">
<ion-toolbar>
<ion-title>Participantes</ion-title>
</ion-toolbar>
<ion-toolbar>
<ion-segment [(ngModel)]="segment">
<ion-segment-button value="true">
Intervenientes
</ion-segment-button>
<ion-segment-button value="false">
Com Conhecimento
</ion-segment-button>
</ion-segment>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-item-group>
<ion-button class="btn-ok-no-width" fill="clear" color="#fff" shape="round" (click)="addAttendees()" expand="block">
<ion-label>Adicionar participantes</ion-label>
</ion-button>
</ion-item-group>
<ion-item-group [ngSwitch]="segment" *ngFor="let attendee of eventAttendees">
<ion-list *ngSwitchCase="attendee.IsRequired.toString()">
<ion-item-sliding>
<ion-item-options side="end">
<ion-item-option color="danger" (click)="removeAttendee(attendee)">Apagar</ion-item-option>
</ion-item-options>
<ion-item lines="none">
<ion-icon slot="start" name="person"></ion-icon>
<ion-label>
<h3>{{ attendee.Name }}</h3>
<p>{{ attendee.EmailAddress }}</p>
</ion-label>
</ion-item>
</ion-item-sliding>
</ion-list>
</ion-item-group>
</ion-content>
<ion-footer class="ion-no-border">
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
<ion-buttons slot="start">
<ion-button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label>
<ion-icon name="close" slot="start"></ion-icon>
</ion-button>
</ion-buttons>
<ion-title></ion-title>
<ion-buttons slot="end">
<ion-button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>OK</ion-label>
<ion-icon name="checkmark" slot="start"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-footer>
@@ -1,4 +0,0 @@
ion-item{
border-bottom:1px solid #ccc;
}
@@ -1,24 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { AttendeesPage } from './attendees.page';
describe('AttendeesPage', () => {
let component: AttendeesPage;
let fixture: ComponentFixture<AttendeesPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AttendeesPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(AttendeesPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,93 +0,0 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { EventPerson } from 'src/app/models/eventperson.model';
import { EventsService } from 'src/app/services/events.service';
import { ModalController, NavController } from '@ionic/angular';
// import { AttendeeModalPage } from '../attendee-modal/attendee-modal.page';
@Component({
selector: 'app-attendees',
templateUrl: './attendees.page.html',
styleUrls: ['./attendees.page.scss'],
})
export class AttendeesPage implements OnInit {
segment:string = "true";
shouldShowCancel:boolean = true;
searchCountryString = ''; // initialize your searchCountryString string empty
@Output() openAttendeeModal = new EventEmitter<any>();
@Output() openAddEvent = new EventEmitter<any>();
@Input() eventAttendees: EventPerson[];
@Output() GoBackEditOrAdd = new EventEmitter<any>();
constructor(private eventService: EventsService, private modalCtrl: ModalController,
private navCtrl: NavController) {
}
ngOnInit() {
}
save(){
this.GoBackEditOrAdd.emit();
//this.openAddEvent.emit();
// this.modalCtrl.dismiss(this.eventAttendees);
}
close(){
this.GoBackEditOrAdd.emit();
// this.modalCtrl.dismiss(null);
//this.openAddEvent.emit();
}
removeAttendee(attendee: EventPerson)
{
let index: number = this.eventAttendees.findIndex((att) => {
return att.EmailAddress == attendee.EmailAddress
});
this.eventAttendees.splice(index, 1);
}
async addAttendees() {
console.log('Event Intervenient');
this.openAttendeeModal.emit();
/* const modal = await this.modalCtrl.create({
component: AttendeeModalPage,
componentProps: {
eventPersons: this.eventAttendees
},
cssClass: 'attendee-modal',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
let newattendees: EventPerson[] = data['data'];
if (newattendees != null)
{
newattendees.forEach(newattendee => {
let att = {
"EmailAddress": newattendee.EmailAddress,
"Name": newattendee.Name,
"IsRequired": (this.segment == "true")
};
if (this.eventAttendees == null)
{
this.eventAttendees = new Array();
}
this.eventAttendees.push(att);
});
}
}); */
}
}
@@ -59,12 +59,12 @@ export class FingerprintPage implements OnInit {
// })
// .then((FingerPrintHash: any) => {
// this.successMessage()
// this.toastService.successMessage()
// localStorage.setItem('FingerPrintHash', FingerPrintHash)
// })
// .catch((error: any) => {
// this.badRequest()
// this.toastService.badRequest()
// });
}
@@ -3,11 +3,12 @@ import { AlertController, AnimationController, ModalController, NavParams } from
import { Attachment } from 'src/app/models/attachment.model';
import { EventPerson } from 'src/app/models/eventperson.model';
import { SearchDocument } from 'src/app/models/search-document';
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
import { SearchPage } from 'src/app/pages/search/search.page';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { Event, EventToApproveEdit } from '../../../models/event.model';
import { BadRequestPage } from '../../popover/bad-request/bad-request.page';
import { SuccessMessagePage} from '../../popover/success-message/success-message.page';
@@ -140,7 +141,8 @@ export class EditEventToApproveComponent implements OnInit {
public alertController: AlertController,
private attachmentsService: AttachmentsService,
private processes:ProcessesService,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService,
) {
this.serialNumber = this.navParams.get('serialNumber');
@@ -253,9 +255,9 @@ export class EditEventToApproveComponent implements OnInit {
}
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
this.successMessage('Evento editado')
this.toastService.successMessage('Evento editado');
}, error =>{
this.badRequest('Evento não editado')
this.toastService.badRequest('Evento não editado');
})
@@ -263,16 +265,16 @@ export class EditEventToApproveComponent implements OnInit {
if(document['action'] == 'add') {
delete document.action
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
//this.successMessage()
this.toastService.successMessage();
}, error =>{
this.badRequest()
this.toastService.badRequest();
});
} else if(document['action'] == 'delete') {
delete document.action
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
//this.successMessage()
this.toastService.successMessage()
}, error =>{
this.badRequest()
this.toastService.badRequest()
})
}
@@ -287,7 +289,7 @@ export class EditEventToApproveComponent implements OnInit {
if(window.innerWidth <= 1024) {
const modal = await this.modalController.create({
component: AttendeesPage,
component: AttendeesPageModal,
componentProps: {
adding: this.adding,
taskParticipants: this.taskParticipants,
@@ -407,96 +409,4 @@ export class EditEventToApproveComponent implements OnInit {
});
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
+5 -84
View File
@@ -3,6 +3,7 @@ import { AnimationController, ModalController } from '@ionic/angular';
import { BadRequestPage } from '../popover/bad-request/bad-request.page';
import { SuccessMessagePage } from '../popover/success-message/success-message.page';
import crypto from 'crypto-js'
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-pin',
templateUrl: './pin.page.html',
@@ -12,7 +13,8 @@ export class PinPage implements OnInit {
code = []
constructor( private modalController: ModalController,
private animationController: AnimationController) { }
private animationController: AnimationController,
private toastService: ToastService) { }
ngOnInit() {
}
@@ -41,7 +43,7 @@ export class PinPage implements OnInit {
if(this.code.length == 4) {
this.close()
//this.successMessage()
//this.toastService.successMessage()
const code = this.code.join('')
const encrypted = crypto.SHA1(code)
@@ -49,94 +51,13 @@ export class PinPage implements OnInit {
localStorage.setItem('PIN', encrypted)
} else {
this.badRequest()
this.toastService.badRequest()
}
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
modal.dismiss()
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
this.close()
modal.dismiss()
},3000)
}
}
@@ -4,6 +4,7 @@ import { AnimationController, ModalController, PopoverController } from '@ionic/
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from '../bad-request/bad-request.page';
import { SuccessMessagePage } from '../success-message/success-message.page';
@@ -25,7 +26,8 @@ export class DeplomaOptionsPage implements OnInit {
private modalController: ModalController,
private activatedRoute: ActivatedRoute,
private processes: ProcessesService,
private animationController: AnimationController) {
private animationController: AnimationController,
private toastService: ToastService) {
this.activatedRoute.queryParams.subscribe(params => {
if(params["serialNumber"]) {
this.serialnumber = params["serialNumber"];
@@ -99,9 +101,9 @@ export class DeplomaOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -138,9 +140,9 @@ export class DeplomaOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -8,7 +8,16 @@
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma </button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Reexecutar Despacho'">
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
@@ -17,10 +26,14 @@
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
</div>
</ion-content>
@@ -5,7 +5,7 @@ import { EventsService } from 'src/app/services/events.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { formatDate } from '@angular/common';
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
import { AnimationController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
import { momentG } from 'src/plugin/momentG'
@@ -17,6 +17,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
@@ -42,7 +43,14 @@ export class DespachosOptionsPage implements OnInit {
private alertService: AlertService,
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private animationController: AnimationController) { }
private animationController: AnimationController,
private navParams: NavParams,
private toastService: ToastService) {
this.task = this.navParams.get('task')
this.fulltask = this.navParams.get('fulltask')
}
ngOnInit() {
@@ -175,10 +183,10 @@ export class DespachosOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -202,9 +210,7 @@ export class DespachosOptionsPage implements OnInit {
modal.onDidDismiss().then(res => {
console.log(res);
if(res.data){
if(res.data) {
const DocumentToSave = res.data.documents.map((e) => {
return {
@@ -238,7 +244,7 @@ export class DespachosOptionsPage implements OnInit {
});
}
async arquivar(note:string, documents:any){
async arquivar(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Arquivo",
@@ -250,10 +256,10 @@ export class DespachosOptionsPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage('Processo arquivado')
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.badRequest('Processo não arquivado')
this.toastService.badRequest('Processo não arquivado')
}
}
@@ -273,60 +279,15 @@ export class DespachosOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch(error) {
this.badRequest()
this.toastService.badRequest()
}
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const modal = await this.modalController.create({
@@ -361,22 +322,24 @@ export class DespachosOptionsPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
goBack() {
let navigationExtras: NavigationExtras = {
queryParams: {
"despachospr": true,
// "despachospr": true,
}
};
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
this.router.navigate(['/home/gabinete-digital/despachos'], navigationExtras);
// window.history.back()
}
@@ -17,6 +17,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
@@ -43,7 +44,8 @@ export class DespachosPrOptionsPage implements OnInit {
private alertService: AlertService,
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private animationController: AnimationController) { }
private animationController: AnimationController,
private toastService: ToastService) { }
ngOnInit() {
@@ -176,10 +178,10 @@ export class DespachosPrOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -251,10 +253,10 @@ export class DespachosPrOptionsPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage('Processo arquivado')
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.badRequest('Processo não arquivado')
this.toastService.badRequest('Processo não arquivado')
}
}
@@ -274,60 +276,15 @@ export class DespachosPrOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch(error) {
this.badRequest()
this.toastService.badRequest()
}
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const modal = await this.modalController.create({
@@ -362,10 +319,10 @@ export class DespachosPrOptionsPage implements OnInit {
}
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.close();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -11,6 +11,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
import { AuthService } from 'src/app/services/auth.service';
import { EventsService } from 'src/app/services/events.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from '../bad-request/bad-request.page';
import { SuccessMessagePage } from '../success-message/success-message.page';
@@ -43,7 +44,8 @@ export class OptsExpedientePrPage implements OnInit {
private userAuth: AuthService,
private navParams: NavParams,
private animationController: AnimationController,
private router: Router
private router: Router,
private toastService: ToastService
) {
@@ -122,9 +124,9 @@ export class OptsExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch(error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -148,11 +150,11 @@ export class OptsExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.toastService.successMessage()
this.goBack();
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -169,9 +171,9 @@ export class OptsExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(otherbody).toPromise()
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
@@ -198,9 +200,9 @@ export class OptsExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body);
this.close();
this.successMessage()
this.toastService.successMessage()
} catch(error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -289,52 +291,7 @@ export class OptsExpedientePrPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const modal = await this.modalController.create({
@@ -8,6 +8,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
@@ -31,7 +32,8 @@ export class RequestOptionsPage implements OnInit {
private navParams: NavParams,
private processes: ProcessesService,
private activatedRoute: ActivatedRoute,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService
) {
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
@@ -166,9 +168,9 @@ export class RequestOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
this.toastService.successMessage()
} catch (error) {
this.badRequest()
this.toastService.badRequest()
}
}
@@ -232,9 +234,9 @@ export class RequestOptionsPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage('Processo arquivado')
this.toastService.successMessage('Processo arquivado')
} catch (error) {
this.badRequest('Processo não arquivado')
this.toastService.badRequest('Processo não arquivado')
}
@@ -285,52 +287,7 @@ export class RequestOptionsPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
@@ -2,6 +2,7 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { AnimationController, ModalController } from '@ionic/angular';
import { PublicationFolder } from 'src/app/models/publicationfolder';
import { PublicationsService } from 'src/app/services/publications.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from '../../popover/bad-request/bad-request.page';
import { SuccessMessagePage} from '../../popover/success-message/success-message.page';
@@ -20,7 +21,8 @@ export class NewActionPage implements OnInit {
constructor(
private modalController: ModalController,
private publication: PublicationsService,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService
) {
this.folder = new PublicationFolder();
}
@@ -47,9 +49,9 @@ export class NewActionPage implements OnInit {
try {
await this.publication.CreatePublicationFolder(this.folder).toPromise()
this.close();
this.successMessage('Publicação criado')
this.toastService.successMessage('Publicação criado')
} catch (error) {
this.badRequest('Publicação não criado')
this.toastService.badRequest('Publicação não criado')
}
}
@@ -59,96 +61,8 @@ export class NewActionPage implements OnInit {
}
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: 'Processo não realizado com sucesso',
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
@@ -18,6 +18,7 @@ import { ViewPublicationsPage } from '../view-publications/view-publications.pag
import { LoadingService } from 'src/app/services/loading.service';
import { BadRequestPage } from '../../popover/bad-request/bad-request.page';
import { SuccessMessagePage} from '../../popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
@Component({
selector: 'app-new-publication',
@@ -57,7 +58,8 @@ export class NewPublicationPage implements OnInit {
public photoService: PhotoService,
private publications: PublicationsService,
private camera: Camera,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService,
) {
this.publicationTitle = 'Nova Publicação';
}
@@ -159,11 +161,11 @@ export class NewPublicationPage implements OnInit {
console.log(this.publication);
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.successMessage("Publicação criado")
this.toastService.successMessage("Publicação criado")
this.goBack();
} catch (error) {
this.badRequest("Publicação não criado")
this.toastService.badRequest("Publicação não criado")
}
}
@@ -183,11 +185,11 @@ export class NewPublicationPage implements OnInit {
try {
console.log(this.publication);
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.successMessage("Publicação criado")
this.toastService.successMessage("Publicação criado")
this.goBack();
} catch (error) {
this.badRequest("Publicação não criado")
this.toastService.badRequest("Publicação não criado")
}
}
@@ -209,11 +211,11 @@ export class NewPublicationPage implements OnInit {
try {
console.log(this.publication);
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
this.successMessage("Publicação criado")
this.toastService.successMessage("Publicação criado")
this.goBackToViewPublications.emit();
} catch (error) {
this.badRequest("Publicação não criado")
this.toastService.badRequest("Publicação não criado")
}
}
@@ -275,96 +277,8 @@ export class NewPublicationPage implements OnInit {
} */
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: 'Processo não realizado com sucesso',
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
@@ -4,6 +4,7 @@ import { Publication } from 'src/app/models/publication';
import { ImageModalPage } from 'src/app/pages/publications/gallery/image-modal/image-modal.page';
import { NewPublicationPage } from 'src/app/pages/publications/new-publication/new-publication.page';
import { PublicationsService } from 'src/app/services/publications.service';
import { ToastService } from 'src/app/services/toast.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
@@ -26,7 +27,8 @@ export class PublicationDetailPage implements OnInit {
constructor(
private modalController: ModalController,
private publications:PublicationsService,
private animationController: AnimationController
private animationController: AnimationController,
private toastService: ToastService,
) {
/* this.folderId = this.navParams.get('folderIdId'); */
@@ -88,10 +90,10 @@ export class PublicationDetailPage implements OnInit {
try {
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
this.successMessage("Publicação eliminado")
this.toastService.successMessage("Publicação eliminado")
this.goBackToViewPublications.emit();
} catch (error) {
this.badRequest("Publicação não eliminado")
this.toastService.badRequest("Publicação não eliminado")
}
}
@@ -141,96 +143,8 @@ export class PublicationDetailPage implements OnInit {
async successMessage(message?: any, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: SuccessMessagePage,
componentProps: {
message: message || 'Processo efetuado' ,
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
async badRequest(message?: string, callback?) {
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: BadRequestPage,
componentProps: {
message: 'Processo não realizado com sucesso',
},
cssClass: 'notification-modal'
});
modal.present()
setTimeout(()=>{
if (callback) {
callback()
}
modal.dismiss()
},7000)
}
}
+69 -63
View File
@@ -632,7 +632,8 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
// center
app-approve-event ion-content .main-content,
app-view-event ion-content .main-content{
app-view-event ion-content .main-content,
app-expediente-pr .main-content{
max-width: 1366px !important;
margin: 0px auto !important;
}
@@ -751,79 +752,48 @@ ion-icon{
}
@media only screen and (min-width: 300px) {
@media only screen and (max-width: 500px) {
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: rgb(92, 92, 92);
width: 5px !important;
height: 5px !important;
}
}
@media only screen and (min-width: 800px) {
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: rgb(92, 92, 92);
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: rgb(92, 92, 92);
}
// ===================================
.hide-scroll::-webkit-scrollbar {
display: none !important;
}
@@ -842,3 +812,39 @@ ion-icon{
.hide-scroll::-webkit-scrollbar-thumb:hover {
display: none !important;
}
#notification{
position: absolute;
top: 23px;
right: 0px;
height: 87px;
max-width: 400px;
border-radius: 9px;
-webkit-border-radius: 9px;
-moz-border-radius: 9px;
-ms-border-radius: 9px;
-o-border-radius: 9px;
background-color: white;
text-align: center;
align-items: center;
display: flex;
justify-content: center;
background-image: url("/assets/background/background-circle-negative.svg");
background-size: 686px 674px;
background-position: center;
background-position-y: 0px;
background-repeat: no-repeat;
min-width: 340px;
box-shadow: 0px 2px 10px #0000003d;
display: flex;
align-items: center;
.main-content {
display: flex;
align-items: center;
}
.message {
font-size: 12pt;
}
}