From 2ef22e7e83394db3c8184257f6b6b38e1ed0484a Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 13 Mar 2018 16:25:24 +0100 Subject: [PATCH 01/23] =?UTF-8?q?indice=20con=20mas=20tama=C3=B1o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/salix/src/styles/misc.scss | 2 +- package-lock.json | 954 ++++++++++++------------------ 2 files changed, 393 insertions(+), 563 deletions(-) diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss index e20bda7ed..b90297764 100644 --- a/client/salix/src/styles/misc.scss +++ b/client/salix/src/styles/misc.scss @@ -215,7 +215,7 @@ vn-main-block { color: #ffa410; margin-left: .5em; transition: opacity 250ms ease-out; - + font-size: 2em; &:hover { opacity: 1; } diff --git a/package-lock.json b/package-lock.json index 8d9be895f..352d1587b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,8 @@ "acorn": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==" + "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==", + "dev": true }, "acorn-dynamic-import": { "version": "2.0.2", @@ -65,6 +66,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, "requires": { "acorn": "3.3.0" }, @@ -72,7 +74,8 @@ "acorn": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true } } }, @@ -82,22 +85,6 @@ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", "dev": true }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" - }, "align-text": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", @@ -118,7 +105,7 @@ "angular": { "version": "1.6.8", "resolved": "https://registry.npmjs.org/angular/-/angular-1.6.8.tgz", - "integrity": "sha1-W+N4pYvpGlSJ54tZxFGM2f0nP/s=" + "integrity": "sha512-9WErZIOw1Cu1V5Yxdvxz/6YpND8ntdP71fdPpufPFJvZodZXqCjQBYrHqEoMZreO5i84O3D/Jw/vepoFt68Azw==" }, "angular-cookies": { "version": "1.6.4", @@ -212,11 +199,6 @@ "ansi-wrap": "0.1.0" } }, - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==" - }, "ansi-gray": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", @@ -244,12 +226,14 @@ "ansi-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", - "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=" + "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=", + "dev": true }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, "ansi-wrap": { "version": "0.1.0", @@ -368,6 +352,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, "requires": { "array-uniq": "1.0.3" } @@ -375,7 +360,8 @@ "array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true }, "array-unique": { "version": "0.2.1", @@ -392,7 +378,8 @@ "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true }, "asn1": { "version": "0.2.3", @@ -525,6 +512,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, "requires": { "chalk": "1.1.3", "esutils": "2.0.2", @@ -534,7 +522,8 @@ "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true } } }, @@ -1283,7 +1272,8 @@ "balanced-match": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true }, "base": { "version": "0.11.2", @@ -1628,6 +1618,7 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "dev": true, "requires": { "balanced-match": "0.4.2", "concat-map": "0.0.1" @@ -1740,7 +1731,8 @@ "buffer-shims": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", + "dev": true }, "buffer-xor": { "version": "1.0.3", @@ -1810,6 +1802,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, "requires": { "callsites": "0.2.0" } @@ -1823,7 +1816,8 @@ "callsites": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true }, "camel-case": { "version": "3.0.0", @@ -1887,6 +1881,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, "requires": { "ansi-styles": "2.2.1", "escape-string-regexp": "1.0.5", @@ -1895,11 +1890,6 @@ "supports-color": "2.0.0" } }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, "chokidar": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.1.tgz", @@ -1930,7 +1920,8 @@ "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true }, "class-utils": { "version": "0.3.6", @@ -2066,18 +2057,11 @@ "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", "dev": true }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "2.0.0" - } - }, "cli-width": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true }, "cliui": { "version": "3.2.0", @@ -2149,7 +2133,8 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true }, "code-point-at": { "version": "1.1.0", @@ -2171,6 +2156,7 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "dev": true, "requires": { "color-name": "1.1.3" } @@ -2178,7 +2164,8 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "color-support": { "version": "1.1.3", @@ -2320,12 +2307,14 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, "requires": { "inherits": "2.0.3", "readable-stream": "2.3.3", @@ -2336,6 +2325,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "dev": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -2350,6 +2340,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, "requires": { "safe-buffer": "5.1.1" } @@ -2498,7 +2489,8 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cors": { "version": "2.8.1", @@ -4059,7 +4051,8 @@ "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true }, "defaults": { "version": "1.0.3", @@ -4101,6 +4094,7 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, "requires": { "globby": "5.0.0", "is-path-cwd": "1.0.0", @@ -4224,6 +4218,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, "requires": { "esutils": "2.0.2" } @@ -4240,50 +4235,12 @@ "void-elements": "2.0.1" } }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" - } - } - }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" - }, - "domhandler": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", - "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", - "requires": { - "domelementtype": "1.3.0" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" - } - }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -4572,11 +4529,6 @@ "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", "dev": true }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" - }, "errno": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", @@ -4840,7 +4792,8 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "escope": { "version": "3.6.0", @@ -4855,162 +4808,211 @@ } }, "eslint": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.17.0.tgz", - "integrity": "sha512-AyxBUCANU/o/xC0ijGMKavo5Ls3oK6xykiOITlMdjFjrKOsqLrA7Nf5cnrDgcKrHzBirclAZt63XO7YZlVUPwA==", + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true, "requires": { - "ajv": "5.5.2", "babel-code-frame": "6.26.0", - "chalk": "2.3.1", + "chalk": "1.1.3", "concat-stream": "1.6.0", - "cross-spawn": "5.1.0", - "debug": "3.1.0", + "debug": "2.2.0", "doctrine": "2.1.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "1.0.0", + "escope": "3.6.0", "espree": "3.5.3", "esquery": "1.0.0", + "estraverse": "4.2.0", "esutils": "2.0.2", "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.3.0", + "glob": "7.1.1", + "globals": "9.18.0", "ignore": "3.3.7", "imurmurhash": "0.1.4", - "inquirer": "3.3.0", + "inquirer": "0.12.0", + "is-my-json-valid": "2.15.0", "is-resolvable": "1.1.0", "js-yaml": "3.10.0", - "json-stable-stringify-without-jsonify": "1.0.1", + "json-stable-stringify": "1.0.1", "levn": "0.3.0", - "lodash": "4.17.5", - "minimatch": "3.0.3", + "lodash": "4.16.6", "mkdirp": "0.5.1", "natural-compare": "1.4.0", "optionator": "0.8.2", "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", + "pluralize": "1.2.1", + "progress": "1.1.8", "require-uncached": "1.0.3", - "semver": "5.3.0", - "strip-ansi": "4.0.0", + "shelljs": "0.7.8", + "strip-bom": "3.0.0", "strip-json-comments": "2.0.1", - "table": "4.0.2", - "text-table": "0.2.0" + "table": "3.8.3", + "text-table": "0.2.0", + "user-home": "2.0.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, "requires": { - "color-convert": "1.9.0" + "co": "4.6.0", + "json-stable-stringify": "1.0.1" } }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" + "restore-cursor": "1.0.1" } }, - "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, "requires": { - "ansi-styles": "3.2.0", "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" + "object-assign": "4.1.0" } }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "dev": true, "requires": { - "lru-cache": "4.0.1", - "shebang-command": "1.2.0", - "which": "1.2.11" + "ansi-escapes": "1.4.0", + "ansi-regex": "2.0.0", + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-width": "2.2.0", + "figures": "1.7.0", + "lodash": "4.16.6", + "readline2": "1.0.1", + "run-async": "0.1.0", + "rx-lite": "3.1.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "through": "2.3.8" } }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, "requires": { - "ms": "2.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "once": "1.4.0" + } + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "ajv-keywords": "1.5.1", + "chalk": "1.1.3", + "lodash": "4.16.6", + "slice-ansi": "0.0.4", + "string-width": "2.1.1" }, "dependencies": { - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, "requires": { - "brace-expansion": "1.1.11" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" } } } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", - "requires": { - "has-flag": "3.0.0" - } } } }, @@ -5049,38 +5051,17 @@ "integrity": "sha1-Hn1Khr9JF5gFxGIugyp7G+606IE=", "dev": true }, - "eslint-plugin-html": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-4.0.2.tgz", - "integrity": "sha512-CrQd0F8GWdNWnu4PFrYZl+LjUCXNVy2h0uhDMtnf/7VKc9HRcnkXSrlg0BSGfptZPSzmwnnwCaREAa9+fnQhYw==", - "requires": { - "htmlparser2": "3.9.2" - } - }, "eslint-plugin-jasmine": { "version": "2.8.4", "resolved": "https://registry.npmjs.org/eslint-plugin-jasmine/-/eslint-plugin-jasmine-2.8.4.tgz", "integrity": "sha1-Z6VVHj0dXguMa1Sq66uVNw9dN94=", "dev": true }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "requires": { - "esrecurse": "4.2.0", - "estraverse": "4.2.0" - } - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" - }, "espree": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.3.tgz", "integrity": "sha512-Zy3tAJDORxQZLl2baguiRU1syPERAIg0L+JB2MWorORgTu/CplzvxS9WWA7Xh4+Q+eOQihNs/1o1Xep8cvCxWQ==", + "dev": true, "requires": { "acorn": "5.4.1", "acorn-jsx": "3.0.1" @@ -5096,6 +5077,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true, "requires": { "estraverse": "4.2.0" } @@ -5104,6 +5086,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true, "requires": { "estraverse": "4.2.0", "object-assign": "4.1.0" @@ -5112,12 +5095,14 @@ "estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true }, "etag": { "version": "1.8.1", @@ -5236,6 +5221,12 @@ "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, "expand-braces": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", @@ -5426,26 +5417,6 @@ } } }, - "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", - "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.19", - "tmp": "0.0.33" - }, - "dependencies": { - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "1.0.2" - } - } - } - }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -5519,17 +5490,20 @@ "fast-deep-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "fastparse": { "version": "1.1.1", @@ -5555,18 +5529,11 @@ "pend": "1.2.0" } }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "1.0.5" - } - }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, "requires": { "flat-cache": "1.3.0", "object-assign": "4.1.0" @@ -5964,6 +5931,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, "requires": { "circular-json": "0.3.3", "del": "2.2.2", @@ -6063,7 +6031,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "1.1.3", @@ -6993,11 +6962,6 @@ "integrity": "sha1-2RBL8+RniLVUaMAr8bL6vPj8Ga8=", "dev": true }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -7083,6 +7047,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -7302,15 +7267,11 @@ } } }, - "globals": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==" - }, "globby": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, "requires": { "array-union": "1.0.2", "arrify": "1.0.1", @@ -8414,6 +8375,16 @@ } } }, + "gulp-env": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/gulp-env/-/gulp-env-0.4.0.tgz", + "integrity": "sha1-g3BkaUmjJJPcBtrZSgZDKW+q2+g=", + "dev": true, + "requires": { + "ini": "1.3.4", + "through2": "2.0.1" + } + }, "gulp-extend": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/gulp-extend/-/gulp-extend-0.2.0.tgz", @@ -9905,6 +9876,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, "requires": { "ansi-regex": "2.0.0" } @@ -10151,19 +10123,6 @@ "uglify-js": "2.7.4" } }, - "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", - "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.4.1", - "domutils": "1.7.0", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.1.5" - } - }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -10267,7 +10226,8 @@ "iconv-lite": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=" + "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=", + "dev": true }, "ieee754": { "version": "1.1.8", @@ -10278,7 +10238,8 @@ "ignore": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true }, "ignore-by-default": { "version": "1.0.1", @@ -10325,7 +10286,8 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "in-publish": { "version": "2.0.0", @@ -10352,6 +10314,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -10360,7 +10323,8 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true }, "ini": { "version": "1.3.4", @@ -10368,87 +10332,6 @@ "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", "dev": true }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.3.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.1.0", - "figures": "2.0.0", - "lodash": "4.16.6", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", - "requires": { - "has-flag": "3.0.0" - } - } - } - }, "internal-ip": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", @@ -10712,12 +10595,14 @@ "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true }, "is-path-in-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, "requires": { "is-path-inside": "1.0.0" } @@ -10726,6 +10611,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, "requires": { "path-is-inside": "1.0.2" } @@ -10759,11 +10645,6 @@ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -10797,7 +10678,8 @@ "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true }, "is-retry-allowed": { "version": "1.1.0", @@ -10853,7 +10735,8 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isbinaryfile": { "version": "3.0.2", @@ -10864,7 +10747,8 @@ "isexe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz", - "integrity": "sha1-NvPiLmB1CSD15yQaR2qMakInWtA=" + "integrity": "sha1-NvPiLmB1CSD15yQaR2qMakInWtA=", + "dev": true }, "isobject": { "version": "2.1.0", @@ -10943,6 +10827,7 @@ "version": "3.10.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, "requires": { "argparse": "1.0.9", "esprima": "4.0.0" @@ -10951,7 +10836,8 @@ "esprima": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true } } }, @@ -10983,12 +10869,17 @@ "json-schema-traverse": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true }, - "json-stable-stringify-without-jsonify": { + "json-stable-stringify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } }, "json-stringify-safe": { "version": "5.0.1", @@ -11016,6 +10907,12 @@ "graceful-fs": "4.1.10" } }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, "jsonpointer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz", @@ -11098,7 +10995,7 @@ "karma-firefox-launcher": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.1.0.tgz", - "integrity": "sha1-LEcDBFLwRTHrfRPU/HZpYwu5Mzk=", + "integrity": "sha512-LbZ5/XlIXLeQ3cqnCbYLn+rOVhuMIK9aZwlP6eOLGzWdo1UVp7t6CN3DP4SafiRLjexKwHeKHDm0c38Mtd3VxA==", "dev": true }, "karma-jasmine": { @@ -11119,7 +11016,7 @@ "karma-webpack": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-2.0.9.tgz", - "integrity": "sha1-YciAkffdkQY1E0wDKyZqRlr/tX8=", + "integrity": "sha512-F1j3IG/XhiMzcunAXbWXH95uizjzr3WdTzmVWlta8xqxcCtAu9FByCb4sccIMxaVFAefpgnUW9KlCo0oLvIX6A==", "dev": true, "requires": { "async": "0.9.2", @@ -11226,6 +11123,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, "requires": { "prelude-ls": "1.1.2", "type-check": "0.3.2" @@ -11299,7 +11197,8 @@ "lodash": { "version": "4.16.6", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.6.tgz", - "integrity": "sha1-0iyaxmAojzhD4Wun0rXQbMon13c=" + "integrity": "sha1-0iyaxmAojzhD4Wun0rXQbMon13c=", + "dev": true }, "lodash._arraycopy": { "version": "3.0.0", @@ -11759,6 +11658,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.1.tgz", "integrity": "sha1-E0OVXtry432bnn7nJB4nxLn7cr4=", + "dev": true, "requires": { "pseudomap": "1.0.2", "yallist": "2.0.0" @@ -11980,7 +11880,8 @@ "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true }, "minimalistic-assert": { "version": "1.0.0", @@ -11998,6 +11899,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "dev": true, "requires": { "brace-expansion": "1.1.6" } @@ -12069,6 +11971,7 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, "requires": { "minimist": "0.0.8" }, @@ -12076,7 +11979,8 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true } } }, @@ -12117,11 +12021,6 @@ "integrity": "sha1-QCj3d4sXcIpImTCm5SrDvKDaQdA=", "dev": true }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, "mysql2": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-1.5.2.tgz", @@ -12270,7 +12169,8 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "ncname": { "version": "1.0.0", @@ -12675,7 +12575,8 @@ "object-assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=" + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=", + "dev": true }, "object-component": { "version": "0.0.3", @@ -12890,18 +12791,11 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1.0.2" } }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "1.2.0" - } - }, "opn": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.2.0.tgz", @@ -12933,6 +12827,7 @@ "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, "requires": { "deep-is": "0.1.3", "fast-levenshtein": "2.0.6", @@ -12945,7 +12840,8 @@ "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true } } }, @@ -13017,7 +12913,8 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true }, "osenv": { "version": "0.1.4", @@ -13212,12 +13109,14 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true }, "path-key": { "version": "2.0.1", @@ -13294,17 +13193,20 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, "requires": { "pinkie": "2.0.4" } @@ -13383,7 +13285,8 @@ "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true }, "prepend-http": { "version": "1.0.4", @@ -13428,12 +13331,8 @@ "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true }, "progress-stream": { "version": "1.2.0", @@ -13512,7 +13411,8 @@ "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true }, "public-encrypt": { "version": "4.0.0", @@ -13685,6 +13585,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", + "dev": true, "requires": { "buffer-shims": "1.0.0", "core-util-is": "1.0.2", @@ -13707,6 +13608,25 @@ "set-immediate-shim": "1.0.1" } }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "mute-stream": "0.0.5" + }, + "dependencies": { + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "dev": true + } + } + }, "recast": { "version": "0.11.18", "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.18.tgz", @@ -13944,6 +13864,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, "requires": { "caller-path": "0.1.0", "resolve-from": "1.0.1" @@ -14018,7 +13939,8 @@ "resolve-from": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true }, "resolve-url": { "version": "0.2.1", @@ -14026,22 +13948,6 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" - }, - "dependencies": { - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - } - } - }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -14055,6 +13961,7 @@ "version": "2.5.4", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", + "dev": true, "requires": { "glob": "7.1.1" } @@ -14069,14 +13976,6 @@ "inherits": "2.0.3" } }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "2.1.0" - } - }, "run-sequence": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-2.2.0.tgz", @@ -14127,23 +14026,11 @@ } } }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "requires": { - "rx-lite": "4.0.8" - } - }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=", + "dev": true }, "sass-graph": { "version": "2.2.4", @@ -14260,7 +14147,8 @@ "semver": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true }, "semver-diff": { "version": "2.1.0", @@ -14495,6 +14383,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, "requires": { "shebang-regex": "1.0.0" } @@ -14502,7 +14391,19 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dev": true, + "requires": { + "glob": "7.1.1", + "interpret": "1.0.1", + "rechoir": "0.6.2" + } }, "sigmund": { "version": "1.0.1", @@ -14531,21 +14432,6 @@ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", "dev": true }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "requires": { - "is-fullwidth-code-point": "2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - } - } - }, "sliced": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", @@ -15317,7 +15203,8 @@ "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true }, "stringstream": { "version": "0.0.5", @@ -15329,6 +15216,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "2.0.0" } @@ -15360,7 +15248,8 @@ "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true }, "style-loader": { "version": "0.20.1", @@ -15426,85 +15315,8 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", - "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.3.1", - "lodash": "4.17.5", - "slice-ansi": "1.0.0", - "string-width": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", - "requires": { - "has-flag": "3.0.0" - } - } - } + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true }, "tapable": { "version": "0.2.8", @@ -15535,7 +15347,8 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, "throttleit": { "version": "0.0.2", @@ -15546,7 +15359,8 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true }, "through2": { "version": "2.0.1", @@ -15849,6 +15663,7 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, "requires": { "prelude-ls": "1.1.2" } @@ -15883,7 +15698,8 @@ "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true }, "uglify-js": { "version": "2.7.4", @@ -16309,6 +16125,15 @@ } } }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, "useragent": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", @@ -16357,7 +16182,8 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "utils-merge": { "version": "1.0.1", @@ -17296,6 +17122,7 @@ "version": "1.2.11", "resolved": "https://registry.npmjs.org/which/-/which-1.2.11.tgz", "integrity": "sha1-yLLu6muMFln6fB3U/aq+lTPcXos=", + "dev": true, "requires": { "isexe": "1.1.2" } @@ -17348,12 +17175,14 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "write": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, "requires": { "mkdirp": "0.5.1" } @@ -17432,7 +17261,8 @@ "yallist": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.0.0.tgz", - "integrity": "sha1-MGxUODXwnuGkyyO3vOmrNByRzdQ=" + "integrity": "sha1-MGxUODXwnuGkyyO3vOmrNByRzdQ=", + "dev": true }, "yaml-loader": { "version": "0.5.0", From 6879435011919372174a27ceea11fbcd2bd15bf4 Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 14 Mar 2018 11:15:14 +0100 Subject: [PATCH 02/23] fuentes client descriptor --- client/client/src/descriptor/descriptor.html | 18 ++++++++++++------ client/client/src/web-access/locale/es.yml | 3 ++- client/client/src/web-access/web-access.html | 1 + client/core/src/styles/fontello-icons.css | 10 +++++++--- client/core/src/styles/fontello.woff2 | Bin 6804 -> 8056 bytes client/item/routes.json | 6 +++--- client/salix/src/locale/es.yml | 7 ++++++- client/ticket/routes.json | 2 +- services/loopback/common/locale/es.json | 4 +++- 9 files changed, 35 insertions(+), 16 deletions(-) diff --git a/client/client/src/descriptor/descriptor.html b/client/client/src/descriptor/descriptor.html index 950baf89c..8d2c825df 100644 --- a/client/client/src/descriptor/descriptor.html +++ b/client/client/src/descriptor/descriptor.html @@ -25,30 +25,36 @@ - - + + + \ No newline at end of file diff --git a/client/client/src/web-access/locale/es.yml b/client/client/src/web-access/locale/es.yml index 2d1905c16..9d95dcc24 100644 --- a/client/client/src/web-access/locale/es.yml +++ b/client/client/src/web-access/locale/es.yml @@ -2,4 +2,5 @@ User: Usuario Enable web access: Habilitar acceso web New password: Nueva contraseña Repeat password: Repetir contraseña -Change password: Cambiar contraseña \ No newline at end of file +Change password: Cambiar contraseña +Client must be checked to activate: No se puede activar un cliente si no esta verificado (036) \ No newline at end of file diff --git a/client/client/src/web-access/web-access.html b/client/client/src/web-access/web-access.html index 47e05759a..7c9b87df9 100644 --- a/client/client/src/web-access/web-access.html +++ b/client/client/src/web-access/web-access.html @@ -23,6 +23,7 @@ vn-one margin-medium-top label="User" + info="Client must be checked to activate" field="$ctrl.account.name"> diff --git a/client/core/src/styles/fontello-icons.css b/client/core/src/styles/fontello-icons.css index 03698f3cf..cebb4042b 100644 --- a/client/core/src/styles/fontello-icons.css +++ b/client/core/src/styles/fontello-icons.css @@ -1,7 +1,9 @@ -.icon-barcode:before { content: '\e800'; } /* '' */ +.icon-tags:before { content: '\e800'; } /* '' */ .icon-volume:before { content: '\e801'; } /* '' */ -.icon-bucket:before { content: '\e802'; } /* '' */ +.icon-barcode:before { content: '\e802'; } /* '' */ +.icon-bucket:before { content: '\e803'; } /* '' */ +.icon-frozen:before { content: '\e808'; } /* '' */ .icon-disabled:before { content: '\e80b'; } /* '' */ .icon-invoices:before { content: '\e80c'; } /* '' */ .icon-noweb:before { content: '\e812'; } /* '' */ @@ -15,4 +17,6 @@ .icon-addperson:before { content: '\e81e'; } /* '' */ .icon-bin:before { content: '\e81f'; } /* '' */ .icon-sms:before { content: '\e820'; } /* '' */ -.icon-tags:before { content: '\e821'; } /* '' */ \ No newline at end of file +.icon-ticket:before { content: '\e821'; } /* '' */ +.icon-tax:before { content: '\e822'; } /* '' */ +.icon-no036:before { content: '\e823'; } /* '' */ \ No newline at end of file diff --git a/client/core/src/styles/fontello.woff2 b/client/core/src/styles/fontello.woff2 index eea564017cfaef602a607c3aa17e33af266c794a..286d7d8abe4c9bf704c2ac19ef47d1f6527cea4d 100644 GIT binary patch literal 8056 zcmV-;ABW&~Pew8T0RR9103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Dup`Vc-&fU3v>*m$M z%F>mK`5W^$CMR-p!*iKTCe<((h-U2^Z^9pqfkeQ|@C>Yi%7B0w@G00bv`Qmd#4IWy zsw1_FWl2BH6fdV{=F_bDo+EC&G!5q3&$!>ZYYZTi_?(*$m9r4ixkl1{5;_ zOtF!nwQC3=l_q)8Qb{~8`1JGc_Zj}hf7*uq5x|k>7<6aty}&(FIj|QBo9c!F3a-xT zWBwNyAl5^#_4H(Mpz9;z03>U+Jrl$>^SGNy{?IiH){`CtttS>=&xDXvT`hXe$m$It zrw?+*w?9gGh`~w$*r=-MNPC4&Ja5t&?E{2&eM%QXpVKAnN4mD{=gS*?(X)N@jKlx* zVSaUd-}8PW^EmU``e00BVs!lFN*{Bc_nFT*nS9o>jz8PNzR{1Vm{)%L-1!m>)}X!?lsM)(k6Xm!nry_70<1xmEgMui#;I_RQ@J_eY;B&NW6@PTJc1MZco$;-(7R}M-? z&$5+=8}`|=)03Barl>ym+@pO Date: Wed, 14 Mar 2018 11:36:57 +0100 Subject: [PATCH 03/23] Credit classification & credit insurance task #150, #151, #152 --- client/client/routes.json | 51 ++++++++++++ client/client/src/client.js | 4 + .../credit-classification-create.html | 24 ++++++ .../credit-classification-create.js | 20 +++++ .../credit-classification-list.html | 43 ++++++++++ .../credit-classification-list.js | 68 ++++++++++++++++ .../credit-classification-list.spec.js | 80 +++++++++++++++++++ .../credit-classification-list/locale/es.yml | 4 + .../credit-insurance-create.html | 42 ++++++++++ .../credit-insurance-create.js | 20 +++++ .../src/credit-insurance-create/locale/es.yml | 1 + .../credit-insurance-list.html | 28 +++++++ .../credit-insurance-list.js | 17 ++++ .../src/credit-insurance-list/locale/es.yml | 1 + client/client/src/locale/es.yml | 2 +- client/client/src/summary/client-summary.html | 8 +- .../common/methods/creditInsurance/filter.js | 14 ++++ .../common/models/credit-classification.json | 2 +- .../client/common/models/credit-insurance.js | 22 +++++ .../common/models/credit-insurance.json | 2 +- services/loopback/common/models/client.json | 5 ++ 21 files changed, 451 insertions(+), 7 deletions(-) create mode 100644 client/client/src/credit-classification-create/credit-classification-create.html create mode 100644 client/client/src/credit-classification-create/credit-classification-create.js create mode 100644 client/client/src/credit-classification-list/credit-classification-list.html create mode 100644 client/client/src/credit-classification-list/credit-classification-list.js create mode 100644 client/client/src/credit-classification-list/credit-classification-list.spec.js create mode 100644 client/client/src/credit-classification-list/locale/es.yml create mode 100644 client/client/src/credit-insurance-create/credit-insurance-create.html create mode 100644 client/client/src/credit-insurance-create/credit-insurance-create.js create mode 100644 client/client/src/credit-insurance-create/locale/es.yml create mode 100644 client/client/src/credit-insurance-list/credit-insurance-list.html create mode 100644 client/client/src/credit-insurance-list/credit-insurance-list.js create mode 100644 client/client/src/credit-insurance-list/locale/es.yml create mode 100644 services/client/common/methods/creditInsurance/filter.js create mode 100644 services/client/common/models/credit-insurance.js diff --git a/client/client/routes.json b/client/client/routes.json index c466ad7f9..73eb28fd3 100644 --- a/client/client/routes.json +++ b/client/client/routes.json @@ -220,6 +220,57 @@ "params": { "client": "$ctrl.client" } + }, + { + "url": "/credit-classification", + "abstract": true, + "state": "clientCard.creditClassification", + "component": "ui-view", + "acl": ["creditInsurance"] + }, + { + "url": "/list", + "state": "clientCard.creditClassification.list", + "component": "vn-client-credit-classification-list", + "params": { + "client": "$ctrl.client" + }, + "menu": { + "description": "Credit contracts", + "icon": "security" + }, + "acl": ["creditInsurance"] + }, + { + "url": "/create", + "state": "clientCard.creditClassification.create", + "component": "vn-client-credit-classification-create", + "params": { + "client": "$ctrl.client" + } + }, + { + "url": "/credit-insurance", + "abstract": true, + "state": "clientCard.creditInsurance", + "component": "ui-view", + "acl": ["creditInsurance"] + }, + { + "url": "/:classificationId/list", + "state": "clientCard.creditInsurance.list", + "component": "vn-client-credit-insurance-list", + "params": { + "client": "$ctrl.client" + } + }, + { + "url": "/:classificationId/create", + "state": "clientCard.creditInsurance.create", + "component": "vn-client-credit-insurance-create", + "params": { + "client": "$ctrl.client" + } } ] } diff --git a/client/client/src/client.js b/client/client/src/client.js index 935a33b43..f583127a2 100644 --- a/client/client/src/client.js +++ b/client/client/src/client.js @@ -23,3 +23,7 @@ import './invoices/invoices'; import './summary/client-summary'; import './recovery-list/recovery-list'; import './recovery-create/recovery-create'; +import './credit-classification-list/credit-classification-list'; +import './credit-classification-create/credit-classification-create'; +import './credit-insurance-list/credit-insurance-list'; +import './credit-insurance-create/credit-insurance-create'; diff --git a/client/client/src/credit-classification-create/credit-classification-create.html b/client/client/src/credit-classification-create/credit-classification-create.html new file mode 100644 index 000000000..a8aa58ada --- /dev/null +++ b/client/client/src/credit-classification-create/credit-classification-create.html @@ -0,0 +1,24 @@ + + + +
+ + New contract + + + + + + + + +
diff --git a/client/client/src/credit-classification-create/credit-classification-create.js b/client/client/src/credit-classification-create/credit-classification-create.js new file mode 100644 index 000000000..9e5c5de1d --- /dev/null +++ b/client/client/src/credit-classification-create/credit-classification-create.js @@ -0,0 +1,20 @@ +import ngModule from '../module'; + +class Controller { + constructor($filter, $state) { + this.creditClassification = { + started: $filter('date')(new Date(), 'yyyy-MM-dd HH:mm') + }; + this.$state = $state; + } +} + +Controller.$inject = ['$filter', '$state']; + +ngModule.component('vnClientCreditClassificationCreate', { + template: require('./credit-classification-create.html'), + controller: Controller, + bindings: { + client: '<' + } +}); diff --git a/client/client/src/credit-classification-list/credit-classification-list.html b/client/client/src/credit-classification-list/credit-classification-list.html new file mode 100644 index 000000000..827e73453 --- /dev/null +++ b/client/client/src/credit-classification-list/credit-classification-list.html @@ -0,0 +1,43 @@ + + + Contract credit insurance + + + + + lock_outline + + +
Since {{::classification.started | date:'dd/MM/yyyy'}}
+
To {{classification.finished | date:'dd/MM/yyyy'}}
+
+ + + Credit {{insurance.credit}} + Grade + - + {{insurance.grade}} + Date {{insurance.created | date:'dd/MM/yyyy' }} + + + + + +
+
+
+
+ + +
\ No newline at end of file diff --git a/client/client/src/credit-classification-list/credit-classification-list.js b/client/client/src/credit-classification-list/credit-classification-list.js new file mode 100644 index 000000000..6b8d479e9 --- /dev/null +++ b/client/client/src/credit-classification-list/credit-classification-list.js @@ -0,0 +1,68 @@ +import ngModule from '../module'; + +class Controller { + + constructor($http, $scope) { + this.$http = $http; + this.$scope = $scope; + } + + $onChanges() { + if (this.client && this.client.id) + this._getClassifications(this.client.id); + } + + _getClassifications(clientId) { + let filter = { + include: [ + { + relation: 'creditInsurances', + scope: { + fields: ['id', 'credit', 'created', 'grade'], + order: 'created DESC', + limit: 2 + } + } + + ], + where: {client: clientId} + }; + filter = encodeURIComponent(JSON.stringify(filter)); + + let query = `/client/api/CreditClassifications?filter=${filter}`; + this.$http.get(query).then(res => { + if (res.data) + this.classifications = res.data; + }); + } + + canCreateNew() { + if (!this.classifications) + return false; + + let items = this.classifications; + for (let i = 0; i < items.length; i++) { + if (!items[i].finished) + return false; + } + + return true; + } + + closeContract(classification) { + let params = {finished: Date.now()}; + this.$http.patch(`/client/api/CreditClassifications/${classification.id}`, params).then(() => { + this._getClassifications(this.client.id); + }); + } +} + +Controller.$inject = ['$http', '$scope']; + +ngModule.component('vnClientCreditClassificationList', { + template: require('./credit-classification-list.html'), + controller: Controller, + bindings: { + client: '<' + } +}); diff --git a/client/client/src/credit-classification-list/credit-classification-list.spec.js b/client/client/src/credit-classification-list/credit-classification-list.spec.js new file mode 100644 index 000000000..c233b6dc8 --- /dev/null +++ b/client/client/src/credit-classification-list/credit-classification-list.spec.js @@ -0,0 +1,80 @@ +import './credit-classification-list.js'; + +describe('Client', () => { + describe('Component vnClientCreditClassificationList', () => { + let $componentController; + let controller; + let $httpBackend; + + beforeEach(() => { + angular.mock.module('client'); + }); + + beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => { + $componentController = _$componentController_; + $httpBackend = _$httpBackend_; + controller = $componentController('vnClientCreditClassificationList'); + })); + + describe('_getClassifications()', () => { + it('should perform a GET query to define the classifications property in the controller', () => { + let res = ['some classifications']; + let query = '/client/api/CreditClassifications?filter=%7B%22include%22%3A%5B%7B%22relation%22%3A%22creditInsurances%22%2C%22scope%22%3A%7B%22fields%22%3A%5B%22id%22%2C%22credit%22%2C%22created%22%2C%22grade%22%5D%2C%22order%22%3A%22created%20DESC%22%2C%22limit%22%3A2%7D%7D%5D%2C%22where%22%3A%7B%7D%7D'; + + $httpBackend.whenGET(query).respond(res); + $httpBackend.expectGET(query); + controller._getClassifications(); + $httpBackend.flush(); + + expect(controller.classifications).toEqual(['some classifications']); + }); + }); + + describe('canCreateNew()', () => { + it(`should return false if doesn't have classifications`, () => { + let result = controller.canCreateNew(); + + expect(result).toBeFalsy(); + }); + + it(`should return false if finds a classification without due date`, () => { + controller.classifications = [ + {finished: Date.now()}, + {finished: null} + ]; + + let result = controller.canCreateNew(); + + expect(result).toBeFalsy(); + }); + + it(`should return true if all classifications are defined with due date`, () => { + controller.classifications = [ + {finished: Date.now()}, + {finished: Date.now()} + ]; + + let result = controller.canCreateNew(); + + expect(result).toBeTruthy(); + }); + }); + + describe('closeContract()', () => { + it('should perform a GET query to set a due date to a contract', () => { + let res = ['pepinillos']; + controller.client = {id: 101}; + let classification = {id: 1}; + let query = '/client/api/CreditClassifications/1'; + spyOn(controller, '_getClassifications'); + + $httpBackend.whenPATCH(query).respond(res); + $httpBackend.expectPATCH(query); + controller.closeContract(classification); + $httpBackend.flush(); + + expect(controller._getClassifications).toHaveBeenCalledWith(101); + }); + }); + }); +}); diff --git a/client/client/src/credit-classification-list/locale/es.yml b/client/client/src/credit-classification-list/locale/es.yml new file mode 100644 index 000000000..aec6b185a --- /dev/null +++ b/client/client/src/credit-classification-list/locale/es.yml @@ -0,0 +1,4 @@ +Contract credit insurance: Contratos de seguro de crédito +New contract: Nuevo contrato +Close contract: Cerrar contrato +Edit contract: Modificar contrato \ No newline at end of file diff --git a/client/client/src/credit-insurance-create/credit-insurance-create.html b/client/client/src/credit-insurance-create/credit-insurance-create.html new file mode 100644 index 000000000..8d8005187 --- /dev/null +++ b/client/client/src/credit-insurance-create/credit-insurance-create.html @@ -0,0 +1,42 @@ + + + +
+ + New credit + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/client/client/src/credit-insurance-create/credit-insurance-create.js b/client/client/src/credit-insurance-create/credit-insurance-create.js new file mode 100644 index 000000000..f9d22189f --- /dev/null +++ b/client/client/src/credit-insurance-create/credit-insurance-create.js @@ -0,0 +1,20 @@ +import ngModule from '../module'; + +class Controller { + constructor($state, $filter) { + this.insurance = { + created: $filter('date')(new Date(), 'yyyy-MM-dd HH:mm') + }; + this.classificationId = $state.params.classificationId; + } +} + +Controller.$inject = ['$state', '$filter']; + +ngModule.component('vnClientCreditInsuranceCreate', { + template: require('./credit-insurance-create.html'), + controller: Controller, + bindings: { + client: '<' + } +}); diff --git a/client/client/src/credit-insurance-create/locale/es.yml b/client/client/src/credit-insurance-create/locale/es.yml new file mode 100644 index 000000000..deb27ae21 --- /dev/null +++ b/client/client/src/credit-insurance-create/locale/es.yml @@ -0,0 +1 @@ +New credit: Añadir crédito \ No newline at end of file diff --git a/client/client/src/credit-insurance-list/credit-insurance-list.html b/client/client/src/credit-insurance-list/credit-insurance-list.html new file mode 100644 index 000000000..ba3931013 --- /dev/null +++ b/client/client/src/credit-insurance-list/credit-insurance-list.html @@ -0,0 +1,28 @@ + + + + + Requested credits + + + + + + + + {{insurance.credit}} + {{insurance.grade}} + {{insurance.created | date: 'dd/MM/yyyy'}} + + + + + + + + + \ No newline at end of file diff --git a/client/client/src/credit-insurance-list/credit-insurance-list.js b/client/client/src/credit-insurance-list/credit-insurance-list.js new file mode 100644 index 000000000..73403f375 --- /dev/null +++ b/client/client/src/credit-insurance-list/credit-insurance-list.js @@ -0,0 +1,17 @@ +import ngModule from '../module'; + +class Controller { + constructor($state) { + this.classificationId = $state.params.classificationId; + } +} + +Controller.$inject = ['$state']; + +ngModule.component('vnClientCreditInsuranceList', { + template: require('./credit-insurance-list.html'), + controller: Controller, + bindings: { + client: '<' + } +}); diff --git a/client/client/src/credit-insurance-list/locale/es.yml b/client/client/src/credit-insurance-list/locale/es.yml new file mode 100644 index 000000000..b21b6b030 --- /dev/null +++ b/client/client/src/credit-insurance-list/locale/es.yml @@ -0,0 +1 @@ +Requested credits: Créditos solicitados \ No newline at end of file diff --git a/client/client/src/locale/es.yml b/client/client/src/locale/es.yml index bb2984d9b..c46f0430a 100644 --- a/client/client/src/locale/es.yml +++ b/client/client/src/locale/es.yml @@ -17,7 +17,7 @@ Save: Guardar Pay method : Forma de pago Address: Consignatario Credit : Crédito -Secured credit: Crédito asegurado +Credit contracts: Contratos de crédito Verified data: Datos comprobados Mandate: Mandato Amount: Importe \ No newline at end of file diff --git a/client/client/src/summary/client-summary.html b/client/client/src/summary/client-summary.html index e506ae23e..a720f9c41 100644 --- a/client/client/src/summary/client-summary.html +++ b/client/client/src/summary/client-summary.html @@ -123,8 +123,8 @@
Recovery
-

Since {{$ctrl.recovery.started}}

-

To {{$ctrl.recovery.finished}}

+

Since {{$ctrl.recovery.started | date:'dd/MM/yyyy'}}

+

To {{$ctrl.recovery.finished | date:'dd/MM/yyyy'}}

Amount {{$ctrl.recovery.amount | currency:'€':2}}

Period {{$ctrl.recovery.period}}

@@ -145,8 +145,8 @@

Secured credit - - - {{$ctrl.summary.creditInsurance | currency:'€':2}} + - + {{$ctrl.summary.creditInsurance | currency:'€':2}}

diff --git a/services/client/common/methods/creditInsurance/filter.js b/services/client/common/methods/creditInsurance/filter.js new file mode 100644 index 000000000..121c3a407 --- /dev/null +++ b/services/client/common/methods/creditInsurance/filter.js @@ -0,0 +1,14 @@ +module.exports = Self => { + Self.installMethod('filter', filterParams); + + function filterParams(params) { + return { + where: { + creditClassification: params.creditClassification + }, + skip: (params.page - 1) * params.size, + limit: params.size, + order: params.order + }; + } +}; diff --git a/services/client/common/models/credit-classification.json b/services/client/common/models/credit-classification.json index 01087314a..74edb6640 100644 --- a/services/client/common/models/credit-classification.json +++ b/services/client/common/models/credit-classification.json @@ -33,7 +33,7 @@ "model": "Client", "foreignKey": "client" }, - "creditInsurance": { + "creditInsurances": { "type": "hasMany", "model": "CreditInsurance", "foreignKey": "creditClassification" diff --git a/services/client/common/models/credit-insurance.js b/services/client/common/models/credit-insurance.js new file mode 100644 index 000000000..95902ab9c --- /dev/null +++ b/services/client/common/models/credit-insurance.js @@ -0,0 +1,22 @@ +module.exports = function(Self) { + require('../methods/creditInsurance/filter.js')(Self); + + Self.validateBinded('credit', Self.validateCredit, { + message: 'The credit must be an integer greater than or equal to zero', + allowNull: false, // FIXME: Ignored by loopback when it's false + allowBlank: false + }); + + Self.validateCredit = function(credit) { + return (credit >= 0 && credit % 1 == 0); + }; + + Self.validateBinded('grade', Self.validateGrade, { + message: 'The grade must be an integer greater than or equal to zero', + allowNull: true + }); + + Self.validateGrade = function(grade) { + return (typeof grade === 'undefined' || (grade >= 0 && grade % 1 == 0)); + }; +}; diff --git a/services/client/common/models/credit-insurance.json b/services/client/common/models/credit-insurance.json index a6d280bc6..58dd53ccc 100644 --- a/services/client/common/models/credit-insurance.json +++ b/services/client/common/models/credit-insurance.json @@ -27,7 +27,7 @@ } }, "relations": { - "creditClassification": { + "classification": { "type": "belongsTo", "model": "CreditClassification", "foreignKey": "creditClassification" diff --git a/services/loopback/common/models/client.json b/services/loopback/common/models/client.json index c7120e67a..c47e3e8a3 100644 --- a/services/loopback/common/models/client.json +++ b/services/loopback/common/models/client.json @@ -156,6 +156,11 @@ "type": "hasMany", "model": "Greuge", "foreignKey": "clientFk" + }, + "creditClassifications": { + "type": "hasMany", + "model": "CreditClassification", + "foreignKey": "client" } } } \ No newline at end of file From 856fc647421b4e799f54361089cf2e1c0c710103 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Wed, 14 Mar 2018 11:41:19 +0100 Subject: [PATCH 04/23] frontEnd ticket module file system --- client/ticket/routes.json | 36 ++++++++++++++++--- client/ticket/src/card/ticket-card.html | 11 ++++++ client/ticket/src/card/ticket-card.js | 35 ++++++++++++++++++ client/ticket/src/create/ticket-create.html | 18 ++++++++++ client/ticket/src/create/ticket-create.js | 21 +++++++++++ client/ticket/src/data/ticket-data.html | 0 client/ticket/src/data/ticket-data.js | 0 client/ticket/src/{index => list}/style.scss | 0 .../item.html => list/ticket-item.html} | 2 +- .../{index/item.js => list/ticket-item.js} | 2 +- .../index.html => list/ticket-list.html} | 6 ++-- .../{index/index.js => list/ticket-list.js} | 7 ++-- client/ticket/src/ticket.js | 6 ++-- 13 files changed, 130 insertions(+), 14 deletions(-) create mode 100644 client/ticket/src/card/ticket-card.html create mode 100644 client/ticket/src/card/ticket-card.js create mode 100644 client/ticket/src/create/ticket-create.html create mode 100644 client/ticket/src/create/ticket-create.js create mode 100644 client/ticket/src/data/ticket-data.html create mode 100644 client/ticket/src/data/ticket-data.js rename client/ticket/src/{index => list}/style.scss (100%) rename client/ticket/src/{index/item.html => list/ticket-item.html} (88%) rename client/ticket/src/{index/item.js => list/ticket-item.js} (88%) rename client/ticket/src/{index/index.html => list/ticket-list.html} (79%) rename client/ticket/src/{index/index.js => list/ticket-list.js} (57%) diff --git a/client/ticket/routes.json b/client/ticket/routes.json index 8fd9b65f5..eb2a208c0 100644 --- a/client/ticket/routes.json +++ b/client/ticket/routes.json @@ -5,10 +5,38 @@ "validations": false, "routes": [ { - "url": "/tickets", - "state": "tickets", - "component": "vn-ticket-index", - "acl": ["developer"] + "url": "/ticket", + "state": "ticket", + "abstract": true, + "component": "ui-view" + }, + { + "url": "/list?q", + "state": "ticket.list", + "component": "vn-ticket-list" + }, + { + "url": "/create", + "state": "ticket.create", + "component": "vn-ticket-create" + }, + { + "url": "/:id", + "state": "ticket.card", + "abstract": true, + "component": "vn-ticket-card" + }, + { + "url" : "/data", + "state": "ticket.card.data", + "component": "vn-ticket-data", + "params": { + "ticket": "$ctrl.ticket" + }, + "menu": { + "description": "Basic data", + "icon": "settings" + } } ] } \ No newline at end of file diff --git a/client/ticket/src/card/ticket-card.html b/client/ticket/src/card/ticket-card.html new file mode 100644 index 000000000..266252ee5 --- /dev/null +++ b/client/ticket/src/card/ticket-card.html @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/client/ticket/src/card/ticket-card.js b/client/ticket/src/card/ticket-card.js new file mode 100644 index 000000000..8f3ea3462 --- /dev/null +++ b/client/ticket/src/card/ticket-card.js @@ -0,0 +1,35 @@ +import ngModule from '../module'; + +class TicketCard { + constructor($http, $state, $timeout) { + this.$http = $http; + this.$state = $state; + this.$timeout = $timeout; + + this.ticket = null; + } + + _getTicket() { + let filter = { + }; + this.$http.get(`/ticket/api/Tickets/${this.$state.params.id}?filter=${JSON.stringify(filter)}`) + .then(res => { + if (res.data && res.data.id) { + this.$timeout(() => { + this.ticket = res.data; + }); + } + } + ); + } + + $onInit() { + this._getTicket(); + } +} +TicketCard.$inject = ['$http', '$state', '$timeout']; + +ngModule.component('vnTicketCard', { + template: require('./ticket-card.html'), + controller: TicketCard +}); diff --git a/client/ticket/src/create/ticket-create.html b/client/ticket/src/create/ticket-create.html new file mode 100644 index 000000000..1542ffbc4 --- /dev/null +++ b/client/ticket/src/create/ticket-create.html @@ -0,0 +1,18 @@ + + + +
+
+ + New ticket + + + + + +
+
diff --git a/client/ticket/src/create/ticket-create.js b/client/ticket/src/create/ticket-create.js new file mode 100644 index 000000000..f9b33c16d --- /dev/null +++ b/client/ticket/src/create/ticket-create.js @@ -0,0 +1,21 @@ +import ngModule from '../module'; + +class TicketCreate { + constructor($scope, $state) { + this.$ = $scope; + this.$state = $state; + this.Ticket = {}; + } + + onSubmit() { + this.$.watcher.submit().then( + json => this.$state.go('ticket.card.data', {id: json.data.id}) + ); + } +} +TicketCreate.$inject = ['$scope', '$state']; + +ngModule.component('vnTicketCreate', { + template: require('./ticket-create.html'), + controller: TicketCreate +}); diff --git a/client/ticket/src/data/ticket-data.html b/client/ticket/src/data/ticket-data.html new file mode 100644 index 000000000..e69de29bb diff --git a/client/ticket/src/data/ticket-data.js b/client/ticket/src/data/ticket-data.js new file mode 100644 index 000000000..e69de29bb diff --git a/client/ticket/src/index/style.scss b/client/ticket/src/list/style.scss similarity index 100% rename from client/ticket/src/index/style.scss rename to client/ticket/src/list/style.scss diff --git a/client/ticket/src/index/item.html b/client/ticket/src/list/ticket-item.html similarity index 88% rename from client/ticket/src/index/item.html rename to client/ticket/src/list/ticket-item.html index eed354bff..d245d04ab 100644 --- a/client/ticket/src/index/item.html +++ b/client/ticket/src/list/ticket-item.html @@ -1,5 +1,5 @@ diff --git a/client/ticket/src/index/item.js b/client/ticket/src/list/ticket-item.js similarity index 88% rename from client/ticket/src/index/item.js rename to client/ticket/src/list/ticket-item.js index c48d773f1..da58c89cd 100644 --- a/client/ticket/src/index/item.js +++ b/client/ticket/src/list/ticket-item.js @@ -13,7 +13,7 @@ class Controller { ngModule.component('vnTicketItem', { controller: Controller, - template: require('./item.html'), + template: require('./ticket-item.html'), bindings: { ticket: '<' } diff --git a/client/ticket/src/index/index.html b/client/ticket/src/list/ticket-list.html similarity index 79% rename from client/ticket/src/index/index.html rename to client/ticket/src/list/ticket-list.html index 51a50474c..9952267f0 100644 --- a/client/ticket/src/index/index.html +++ b/client/ticket/src/list/ticket-list.html @@ -1,4 +1,4 @@ - +
@@ -19,6 +19,6 @@
-
- + + diff --git a/client/ticket/src/index/index.js b/client/ticket/src/list/ticket-list.js similarity index 57% rename from client/ticket/src/index/index.js rename to client/ticket/src/list/ticket-list.js index bc514194c..f1538f300 100644 --- a/client/ticket/src/index/index.js +++ b/client/ticket/src/list/ticket-list.js @@ -1,5 +1,6 @@ import ngModule from '../module'; -import './item'; +import './ticket-item'; +import './style.scss'; export default class Controller { search(index) { @@ -8,7 +9,7 @@ export default class Controller { } Controller.$inject = []; -ngModule.component('vnTicketIndex', { - template: require('./index.html'), +ngModule.component('vnTicketList', { + template: require('./ticket-list.html'), controller: Controller }); diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js index c7b861d2c..92b0b6ec8 100644 --- a/client/ticket/src/ticket.js +++ b/client/ticket/src/ticket.js @@ -1,4 +1,6 @@ export * from './module'; -import './index/index'; - +import './list/ticket-list'; +import './create/ticket-create'; +import './card/ticket-card'; +import './data/ticket-data'; From 60f3bfc7b86b8a88f061ddc0f3e24616dcefd4ed Mon Sep 17 00:00:00 2001 From: Bernat Exposito Date: Wed, 14 Mar 2018 12:06:21 +0100 Subject: [PATCH 05/23] create models saleChecked saleComponent, added fixtures and ACL --- services/db/04-fixtures.sql | 23 +++++++++++ services/db/changes/1.0.2/01-ACLinserts.sql | 2 + services/db/changes/1.0.2/03-saleChecked.sql | 11 ++++++ .../ticket/common/models/componentRate.json | 39 +++++++++++++++++++ .../ticket/common/models/saleChecked.json | 24 ++++++++++++ .../ticket/common/models/saleComponent.json | 29 ++++++++++++++ services/ticket/server/model-config.json | 8 +++- 7 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 services/db/changes/1.0.2/03-saleChecked.sql create mode 100644 services/ticket/common/models/componentRate.json create mode 100644 services/ticket/common/models/saleChecked.json create mode 100644 services/ticket/common/models/saleComponent.json diff --git a/services/db/04-fixtures.sql b/services/db/04-fixtures.sql index 9a8a36e6f..047720eeb 100644 --- a/services/db/04-fixtures.sql +++ b/services/db/04-fixtures.sql @@ -415,6 +415,29 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric ( 2, 1, 1, 'Gem of Time', 2 , 1.5, 0, 0, 0, CURDATE()), ( 3, 2, 2, 'Mjolnir' , 10, 4 , 0, 0, 0, CURDATE()); +INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`) + VALUES + ( 1, 0), + ( 2, 1); + +INSERT INTO `vn`.`componentTypeRate`(`id`, `type`) + VALUES + ( 1, 'agency'), + ( 2, 'client'), + ( 3, 'company'); + +INSERT INTO `vn`.`componentRate`(`id`, `name`, `componentTypeRate`, `classRate`, `tax`, `isRenewable`) + VALUES + ( 1, 'Special price', 1, NULL, NULL, 1), + ( 2, 'Delivery', 2, NULL, NULL, 1), + ( 3, 'Mana', 3, 1, NULL, 0 ); + +INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`) + VALUES + ( 1, 1, 0.5), + ( 2, 2, 1.2 ); + + INSERT INTO `vn`.`itemBarcode`(`id`, `itemFk`, `code`) VALUES (1, 1 ,1 ), diff --git a/services/db/changes/1.0.2/01-ACLinserts.sql b/services/db/changes/1.0.2/01-ACLinserts.sql index ec1bc0282..635e6145d 100644 --- a/services/db/changes/1.0.2/01-ACLinserts.sql +++ b/services/db/changes/1.0.2/01-ACLinserts.sql @@ -7,3 +7,5 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('TicketPackaging', '*', '*', 'ALLOW', 'ROLE', 'employee'); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Packaging', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Packaging', '*', 'WRITE', 'ALLOW', 'ROLE', 'logistic'); +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SaleChecked', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SaleComponent', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); \ No newline at end of file diff --git a/services/db/changes/1.0.2/03-saleChecked.sql b/services/db/changes/1.0.2/03-saleChecked.sql new file mode 100644 index 000000000..ba79c0565 --- /dev/null +++ b/services/db/changes/1.0.2/03-saleChecked.sql @@ -0,0 +1,11 @@ +USE `vn`; +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `vn`.`saleChecked` AS + SELECT + `m`.`Id_Movimiento` AS `saleFk`, + `m`.`checked` AS `isChecked` + FROM + `vn2008`.`Movimientos_checked` `m`; diff --git a/services/ticket/common/models/componentRate.json b/services/ticket/common/models/componentRate.json new file mode 100644 index 000000000..41e987880 --- /dev/null +++ b/services/ticket/common/models/componentRate.json @@ -0,0 +1,39 @@ +{ + "name": "ComponentRate", + "base": "VnModel", + "options": { + "mysql": { + "table": "componentRate" + } + }, + "properties": { + "id": { + "id": true, + "type": "Number", + "description": "Identifier" + }, + "name": { + "type": "String" + }, + "classRate": { + "type": "Number" + }, + "tax": { + "type": "Number" + }, + "isRenewable": { + "type": "Number" + }, + "componentTypeRate": { + "type": "Number" + } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ] +} \ No newline at end of file diff --git a/services/ticket/common/models/saleChecked.json b/services/ticket/common/models/saleChecked.json new file mode 100644 index 000000000..8ac52d598 --- /dev/null +++ b/services/ticket/common/models/saleChecked.json @@ -0,0 +1,24 @@ +{ + "name": "SaleChecked", + "base": "VnModel", + "options": { + "mysql": { + "table": "saleChecked" + } + }, + "properties": { + "isChecked": { + "type": "Number" + }, + "saleFk": { + "id": true + } + }, + "relations": { + "sale": { + "type": "belongsTo", + "model": "Sale", + "foreignKey": "saleFk" + } + } +} \ No newline at end of file diff --git a/services/ticket/common/models/saleComponent.json b/services/ticket/common/models/saleComponent.json new file mode 100644 index 000000000..b990b1ed8 --- /dev/null +++ b/services/ticket/common/models/saleComponent.json @@ -0,0 +1,29 @@ +{ + "name": "SaleComponent", + "base": "VnModel", + "options": { + "mysql": { + "table": "saleComponent" + } + }, + "properties": { + "value": { + "type": "Number" + }, + "saleFk": { + "id": true + } + }, + "relations": { + "sale": { + "type": "belongsTo", + "model": "Sale", + "foreignKey": "saleFk" + }, + "componentRate": { + "type": "belongsTo", + "model": "componentRate", + "foreignKey": "componentFk" + } + } +} \ No newline at end of file diff --git a/services/ticket/server/model-config.json b/services/ticket/server/model-config.json index 55ec2a2a5..5b82e8f58 100644 --- a/services/ticket/server/model-config.json +++ b/services/ticket/server/model-config.json @@ -16,5 +16,11 @@ }, "Packaging": { "dataSource": "vn" + }, + "SaleChecked": { + "dataSource": "vn" } -} +} + + + From c21efeeb633202a46f6e00121f3fa6f928177e0c Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Wed, 14 Mar 2018 12:12:06 +0100 Subject: [PATCH 06/23] ticket summary structure --- client/ticket/routes.json | 8 ++++++++ client/ticket/src/list/ticket-item.html | 2 +- client/ticket/src/summary/ticket-summary.html | 9 +++++++++ client/ticket/src/summary/ticket-summary.js | 12 ++++++++++++ client/ticket/src/ticket.js | 1 + 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 client/ticket/src/summary/ticket-summary.html create mode 100644 client/ticket/src/summary/ticket-summary.js diff --git a/client/ticket/routes.json b/client/ticket/routes.json index eb2a208c0..74908edd0 100644 --- a/client/ticket/routes.json +++ b/client/ticket/routes.json @@ -26,6 +26,14 @@ "abstract": true, "component": "vn-ticket-card" }, + { + "url": "/summary", + "state": "ticket.card.summary", + "component": "vn-ticket-summary", + "params": { + "ticket": "$ctrl.ticket" + } + }, { "url" : "/data", "state": "ticket.card.data", diff --git a/client/ticket/src/list/ticket-item.html b/client/ticket/src/list/ticket-item.html index d245d04ab..1db1da939 100644 --- a/client/ticket/src/list/ticket-item.html +++ b/client/ticket/src/list/ticket-item.html @@ -1,5 +1,5 @@ diff --git a/client/ticket/src/summary/ticket-summary.html b/client/ticket/src/summary/ticket-summary.html new file mode 100644 index 000000000..020e275ec --- /dev/null +++ b/client/ticket/src/summary/ticket-summary.html @@ -0,0 +1,9 @@ + + + +
Ticket Summary
+
+ + +
+
\ No newline at end of file diff --git a/client/ticket/src/summary/ticket-summary.js b/client/ticket/src/summary/ticket-summary.js new file mode 100644 index 000000000..ac62d499e --- /dev/null +++ b/client/ticket/src/summary/ticket-summary.js @@ -0,0 +1,12 @@ +import ngModule from '../module'; + +class TicketSummary {} +TicketSummary.$inject = []; + +ngModule.component('vnTicketSummary', { + template: require('./ticket-summary.html'), + controller: TicketSummary, + bindings: { + ticket: '<' + } +}); diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js index 92b0b6ec8..12d84e555 100644 --- a/client/ticket/src/ticket.js +++ b/client/ticket/src/ticket.js @@ -3,4 +3,5 @@ export * from './module'; import './list/ticket-list'; import './create/ticket-create'; import './card/ticket-card'; +import './summary/ticket-summary'; import './data/ticket-data'; From ab3ead6a28e01f6f1f91f13d2862fe65e39f35ab Mon Sep 17 00:00:00 2001 From: Bernat Exposito Date: Wed, 14 Mar 2018 13:00:17 +0100 Subject: [PATCH 07/23] added modelconfig.json for models in the commit 60f3bfc and new procedure 04.ticketVolume --- services/db/changes/1.0.2/04.ticketVolume.sql | 30 +++++++++++++++++++ services/ticket/server/model-config.json | 6 ++++ 2 files changed, 36 insertions(+) create mode 100644 services/db/changes/1.0.2/04.ticketVolume.sql diff --git a/services/db/changes/1.0.2/04.ticketVolume.sql b/services/db/changes/1.0.2/04.ticketVolume.sql new file mode 100644 index 000000000..5b6860700 --- /dev/null +++ b/services/db/changes/1.0.2/04.ticketVolume.sql @@ -0,0 +1,30 @@ +USE `vn`; +DROP procedure IF EXISTS `ticketVolume`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`ticketVolume`(IN vTicketId INT) +BEGIN + DECLARE vWarehouseId INTEGER; + DECLARE vShippedDate DATE; + + DROP TEMPORARY TABLE IF EXISTS ticketVolume; + SELECT warehouseFk, shipped INTO vWarehouseId,vShippedDate FROM vn.ticket WHERE id = vTicketId; + + CREATE TEMPORARY TABLE IF NOT EXISTS ticketVolume ENGINE MEMORY + + SELECT itemFk,quantity, concept, VolUd as m3_uni, volume as m3, @m3:= @m3 + ifnull(volume,0) as m3_total + FROM + ( + SELECT round(r.cm3 / 1000000,3) as VolUd ,s.quantity, round(r.cm3 * s.quantity / 1000000,3) as volume, + s.itemFk, s.concept, @m3:= 0, @vol:=0, t.agencyModeFk + FROM sale s + JOIN vn.ticket t on t.id = s.ticketFk + JOIN bi.rotacion r ON r.Id_Article = s.itemFk AND r.warehouse_id = t.warehouseFk + WHERE s.ticketFk = vTicketId + ) sub; + +END$$ + +DELIMITER ; + diff --git a/services/ticket/server/model-config.json b/services/ticket/server/model-config.json index 5b82e8f58..8a2b05c49 100644 --- a/services/ticket/server/model-config.json +++ b/services/ticket/server/model-config.json @@ -19,6 +19,12 @@ }, "SaleChecked": { "dataSource": "vn" + }, + "ComponentRate": { + "dataSource": "vn" + }, + "SaleComponent": { + "dataSource": "vn" } } From a4166cc14d057d8b92a9f020cb8ede00b69692fb Mon Sep 17 00:00:00 2001 From: Bernat Exposito Date: Wed, 14 Mar 2018 13:51:07 +0100 Subject: [PATCH 08/23] update model packaging.json --- services/ticket/common/models/packaging.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/ticket/common/models/packaging.json b/services/ticket/common/models/packaging.json index e05de2c93..119fbb154 100644 --- a/services/ticket/common/models/packaging.json +++ b/services/ticket/common/models/packaging.json @@ -37,7 +37,7 @@ "relations": { "item": { "type": "belongsTo", - "model": "Iicket", + "model": "Item", "foreignKey": "itemFk" } } From e6a8b34fe461cabfbf7d3623dd983f6abf75facf Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Wed, 14 Mar 2018 13:59:01 +0100 Subject: [PATCH 09/23] filter tickets --- client/ticket/src/list/ticket-list.html | 2 +- .../loopback/common/methods/ticket/filter.js | 42 +++++++++++++++++++ services/loopback/common/models/ticket.js | 1 + 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 services/loopback/common/methods/ticket/filter.js diff --git a/client/ticket/src/list/ticket-list.html b/client/ticket/src/list/ticket-list.html index 9952267f0..51750d20a 100644 --- a/client/ticket/src/list/ticket-list.html +++ b/client/ticket/src/list/ticket-list.html @@ -1,4 +1,4 @@ - +
diff --git a/services/loopback/common/methods/ticket/filter.js b/services/loopback/common/methods/ticket/filter.js new file mode 100644 index 000000000..aaf46ec97 --- /dev/null +++ b/services/loopback/common/methods/ticket/filter.js @@ -0,0 +1,42 @@ +module.exports = Self => { + Self.installMethod('filter', filterParams); + + function filterParams(params) { + let filters = { + where: {}, + skip: (params.page - 1) * params.size, + limit: params.size, + order: params.order || 'created DESC' + }; + + delete params.page; + delete params.size; + delete params.order; + + if (params.search) { + filters.where.and = [ + { + or: [ + {id: params.search}, + {name: {regexp: params.search}} + ] + } + ]; + delete params.search; + } + + Object.keys(params).forEach( + key => { + if (filters.where.and) { + let filter = {}; + filter[key] = (key === 'nickname') ? {regexp: params[key]} : params[key]; + filters.where.and.push(filter); + } else { + filters.where[key] = (key === 'nickname') ? {regexp: params[key]} : params[key]; + } + } + ); + + return filters; + } +}; diff --git a/services/loopback/common/models/ticket.js b/services/loopback/common/models/ticket.js index f390c559f..108ebc872 100644 --- a/services/loopback/common/models/ticket.js +++ b/services/loopback/common/models/ticket.js @@ -2,4 +2,5 @@ module.exports = function(Self) { require('../methods/ticket/change-time.js')(Self); require('../methods/ticket/change-worker.js')(Self); + require('../methods/ticket/filter.js')(Self); }; From 0e04d97dc070aa11d40120c4798102967000c1ac Mon Sep 17 00:00:00 2001 From: Bernat Exposito Date: Wed, 14 Mar 2018 14:20:01 +0100 Subject: [PATCH 10/23] update model packaging.sql --- services/ticket/common/models/packaging.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/ticket/common/models/packaging.json b/services/ticket/common/models/packaging.json index 119fbb154..014730eab 100644 --- a/services/ticket/common/models/packaging.json +++ b/services/ticket/common/models/packaging.json @@ -15,13 +15,13 @@ "volume": { "type": "Number" }, - "X": { + "width": { "type": "Date" }, - "Y": { + "height": { "type": "Number" }, - "Z": { + "depth": { "type": "Number" }, "isPackageReturnable": { From 2877ec05cc6b46f5341e09f65e833824171f4c04 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Wed, 14 Mar 2018 14:26:25 +0100 Subject: [PATCH 11/23] mock ticketItem --- client/ticket/src/list/ticket-item.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ticket/src/list/ticket-item.html b/client/ticket/src/list/ticket-item.html index 1db1da939..c46590caf 100644 --- a/client/ticket/src/list/ticket-item.html +++ b/client/ticket/src/list/ticket-item.html @@ -4,7 +4,7 @@ class="vn-list-item"> -
{{::$ctrl.ticket.name}}
+
{{::$ctrl.ticket.nickname}}
Id {{::$ctrl.ticket.id}}
From 0b21cc231cc17d47e41c9b59695a335d21d72eb2 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Date: Thu, 15 Mar 2018 13:47:47 +0100 Subject: [PATCH 12/23] new model expedition, add fixtures for the model and update ACL --- services/db/04-fixtures.sql | 6 +++ services/db/changes/1.0.2/01-ACLinserts.sql | 3 +- ...4.ticketVolume.sql => 04-ticketVolume.sql} | 0 services/db/changes/1.0.2/05-expedition.sql | 19 +++++++ .../loopback/common/models/agency-mode.json | 10 +++- services/ticket/common/models/expedition.json | 51 +++++++++++++++++++ services/ticket/server/model-config.json | 3 ++ 7 files changed, 90 insertions(+), 2 deletions(-) rename services/db/changes/1.0.2/{04.ticketVolume.sql => 04-ticketVolume.sql} (100%) create mode 100644 services/db/changes/1.0.2/05-expedition.sql create mode 100644 services/ticket/common/models/expedition.json diff --git a/services/db/04-fixtures.sql b/services/db/04-fixtures.sql index 047720eeb..6ce558cc5 100644 --- a/services/db/04-fixtures.sql +++ b/services/db/04-fixtures.sql @@ -397,6 +397,12 @@ INSERT INTO `vn`.`item`(`id`, `name`,`typeFk`,`size`,`inkFk`,`category`,`stems`, (4, 'Mark I', 1, 60, 'AMR', 'EXT', 1, 1, 'Iron Mans first armor', 1, 05080000, 1, 2, 0, NULL, 0, 66090, 2), (5, 'Mjolnir', 3, 30, 'AZR', 'EXT', 1, 2, 'Thors hammer!', 2, 06021010, 1, 2, 0, NULL, 0, 67350, 2); +INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`) + VALUES + ( 1, 1, 1, 0, CURDATE(), 1, 0, 2, 1), + ( 2, 1, 1, 1, CURDATE(), 2, 1, 0, 2), + ( 3, 2, 2, 2, CURDATE(), 3, 2, 0, NULL); + INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`) VALUES (1, 0.00, 10, 10, 0, 0, CURDATE(), 1, 1.50), diff --git a/services/db/changes/1.0.2/01-ACLinserts.sql b/services/db/changes/1.0.2/01-ACLinserts.sql index 635e6145d..be55aeb0f 100644 --- a/services/db/changes/1.0.2/01-ACLinserts.sql +++ b/services/db/changes/1.0.2/01-ACLinserts.sql @@ -8,4 +8,5 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Packaging', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Packaging', '*', 'WRITE', 'ALLOW', 'ROLE', 'logistic'); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SaleChecked', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); -INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SaleComponent', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); \ No newline at end of file +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SaleComponent', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Expedition', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); diff --git a/services/db/changes/1.0.2/04.ticketVolume.sql b/services/db/changes/1.0.2/04-ticketVolume.sql similarity index 100% rename from services/db/changes/1.0.2/04.ticketVolume.sql rename to services/db/changes/1.0.2/04-ticketVolume.sql diff --git a/services/db/changes/1.0.2/05-expedition.sql b/services/db/changes/1.0.2/05-expedition.sql new file mode 100644 index 000000000..1baeeb480 --- /dev/null +++ b/services/db/changes/1.0.2/05-expedition.sql @@ -0,0 +1,19 @@ +USE `vn`; +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `vn`.`expedition` AS + SELECT + `e`.`expeditions_id` AS `id`, + `e`.`agency_id` AS `agencyModeFk`, + `e`.`ticket_id` AS `ticketFk`, + `e`.`EsBulto` AS `isBox`, + `e`.`odbc_date` AS `created`, + `e`.`Id_Article` AS `itemFk`, + `e`.`counter` AS `counter`, + `e`.`checked` AS `checked`, + `e`.`workerFk` AS `workerFk` + FROM + `vn2008`.`expeditions` `e` + diff --git a/services/loopback/common/models/agency-mode.json b/services/loopback/common/models/agency-mode.json index ebac22a77..d29695ae3 100644 --- a/services/loopback/common/models/agency-mode.json +++ b/services/loopback/common/models/agency-mode.json @@ -41,5 +41,13 @@ "model": "AgencyType", "foreignKey": "agencyTypeFk" } - } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ] } diff --git a/services/ticket/common/models/expedition.json b/services/ticket/common/models/expedition.json new file mode 100644 index 000000000..da070e04b --- /dev/null +++ b/services/ticket/common/models/expedition.json @@ -0,0 +1,51 @@ +{ + "name": "Expedition", + "base": "VnModel", + "options": { + "mysql": { + "table": "expedition" + } + }, + "properties": { + "id": { + "id": true, + "type": "Number", + "description": "Identifier" + }, + "isBox": { + "type": "Number" + }, + "created": { + "type": "Date" + }, + "counter": { + "type": "Number" + }, + "checked": { + "type": "Number" + } + }, + "relations": { + "ticket": { + "type": "belongsTo", + "model": "Ticket", + "foreignKey": "ticketFk" + }, + "agencyMode": { + "type": "belongsTo", + "model": "agency-mode", + "foreignKey": "agencyModeFk" + }, + "item": { + "type": "belongsTo", + "model": "Item", + "foreignKey": "itemFk" + }, + "worker": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "workerFk" + } + } + } + \ No newline at end of file diff --git a/services/ticket/server/model-config.json b/services/ticket/server/model-config.json index 8a2b05c49..2bcc701ef 100644 --- a/services/ticket/server/model-config.json +++ b/services/ticket/server/model-config.json @@ -25,6 +25,9 @@ }, "SaleComponent": { "dataSource": "vn" + }, + "Expedition": { + "dataSource": "vn" } } From 34a0c3779712b5e8c77442d0ec6c64c0de8ed04c Mon Sep 17 00:00:00 2001 From: Bernat Exposito Date: Thu, 15 Mar 2018 13:53:28 +0100 Subject: [PATCH 13/23] update ACLs for expedition --- services/db/changes/1.0.2/01-ACLinserts.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/db/changes/1.0.2/01-ACLinserts.sql b/services/db/changes/1.0.2/01-ACLinserts.sql index be55aeb0f..2136703fc 100644 --- a/services/db/changes/1.0.2/01-ACLinserts.sql +++ b/services/db/changes/1.0.2/01-ACLinserts.sql @@ -10,3 +10,5 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SaleChecked', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SaleComponent', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Expedition', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Expedition', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Expedition', '*', 'WRITE', 'ALLOW', 'ROLE', 'production'); From af2fca38799aa88941a639103071ea9b9d428ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Thu, 15 Mar 2018 14:36:09 +0100 Subject: [PATCH 14/23] Ticket packages, moved Item model to loopback service --- client/client/src/summary/client-summary.js | 83 +++++++------------ client/ticket/routes.json | 18 ++++ .../ticket/src/package/list/package-list.html | 56 +++++++++++++ .../ticket/src/package/list/package-list.js | 19 +++++ client/ticket/src/package/locale/es.yml | 6 ++ client/ticket/src/ticket.js | 1 + .../crudItemBarcodes.js | 0 .../spec}/crudItemBarcodes.spec.js | 0 .../methods/{item => item-log}/getLog.js | 0 .../{item => item-niche}/crudItemNiches.js | 0 .../spec}/crudItemNiches.spec.js | 0 .../{item => item-tag}/crudItemTags.js | 0 services/item/common/models/item-barcode.js | 2 +- services/item/common/models/item-log.js | 2 +- services/item/common/models/item-niche.js | 2 +- services/item/common/models/item-tag.js | 2 +- services/item/server/model-config.json | 21 ----- services/loopback/common/locale/es.json | 5 +- .../common/methods/item/clone.js | 4 +- .../common/methods/item/filter.js | 0 .../common/methods/item/updateTaxes.js | 0 .../common/models/expence.json | 0 .../{item => loopback}/common/models/ink.json | 0 .../common/models/intrastat.json | 0 .../common/models/item-type.json | 0 .../{item => loopback}/common/models/item.js | 2 +- .../common/models/item.json | 0 .../common/models/origin.json | 0 .../common/models/producer.json | 0 services/loopback/common/models/specie.json | 43 ++++++++++ services/loopback/common/models/ticket.json | 5 ++ services/loopback/server/model-config.json | 23 ++++- .../common/methods/packaging/listPackaging.js | 49 +++++++++++ services/ticket/common/models/packaging.js | 3 + services/ticket/common/models/packaging.json | 2 +- 35 files changed, 265 insertions(+), 83 deletions(-) create mode 100644 client/ticket/src/package/list/package-list.html create mode 100644 client/ticket/src/package/list/package-list.js create mode 100644 client/ticket/src/package/locale/es.yml rename services/item/common/methods/{item => item-barcode}/crudItemBarcodes.js (100%) rename services/item/common/methods/{item/specs => item-barcode/spec}/crudItemBarcodes.spec.js (100%) rename services/item/common/methods/{item => item-log}/getLog.js (100%) rename services/item/common/methods/{item => item-niche}/crudItemNiches.js (100%) rename services/item/common/methods/{item/specs => item-niche/spec}/crudItemNiches.spec.js (100%) rename services/item/common/methods/{item => item-tag}/crudItemTags.js (100%) rename services/{item => loopback}/common/methods/item/clone.js (90%) rename services/{item => loopback}/common/methods/item/filter.js (100%) rename services/{item => loopback}/common/methods/item/updateTaxes.js (100%) rename services/{item => loopback}/common/models/expence.json (100%) rename services/{item => loopback}/common/models/ink.json (100%) rename services/{item => loopback}/common/models/intrastat.json (100%) rename services/{item => loopback}/common/models/item-type.json (100%) rename services/{item => loopback}/common/models/item.js (92%) rename services/{item => loopback}/common/models/item.json (100%) rename services/{item => loopback}/common/models/origin.json (100%) rename services/{item => loopback}/common/models/producer.json (100%) create mode 100644 services/loopback/common/models/specie.json create mode 100644 services/ticket/common/methods/packaging/listPackaging.js create mode 100644 services/ticket/common/models/packaging.js diff --git a/client/client/src/summary/client-summary.js b/client/client/src/summary/client-summary.js index a3e7c7bae..2a6b9e3f3 100644 --- a/client/client/src/summary/client-summary.js +++ b/client/client/src/summary/client-summary.js @@ -1,53 +1,29 @@ import ngModule from '../module'; -class ClientSummary { +class Controller { constructor($http) { this.$http = $http; } - set client(value) { - if (!value) + $onChanges() { + if (!this.client || !this.client.id) return; + this.getSummary(); + this.getGreuse(); + this.getRecoveries(); + } + + getSummary() { let filter = { include: [ - { - relation: 'account', - scope: { - fields: ['name', 'active'] - } - }, - { - relation: 'salesPerson', - scope: { - fields: ['name'] - } - }, - { - relation: 'country', - scope: { - fields: ['country'] - } - }, - { - relation: 'province', - scope: { - fields: ['name'] - } - }, - { - relation: 'contactChannel', - scope: { - fields: ['name'] - } - }, - { - relation: 'payMethod', - scope: { - fields: ['name'] - } - }, + {relation: 'account', scope: {fields: ['name', 'active']}}, + {relation: 'salesPerson', scope: {fields: ['name']}}, + {relation: 'country', scope: {fields: ['country']}}, + {relation: 'province', scope: {fields: ['name']}}, + {relation: 'contactChannel', scope: {fields: ['name']}}, + {relation: 'payMethod', scope: {fields: ['name']}}, { relation: 'addresses', scope: { @@ -57,43 +33,46 @@ class ClientSummary { } ] }; + filter = encodeURIComponent(JSON.stringify(filter)); - let clientSummary = `/client/api/Clients/${value.id}?filter=${JSON.stringify(filter)}`; - - this.$http.get(encodeURIComponent(clientSummary)).then(res => { + let query = `/client/api/Clients/${this.client.id}?filter=${filter}`; + this.$http.get(query).then(res => { if (res.data) { this.summary = res.data; this.address = res.data.addresses[0]; } }); + } - let greugeSum = `/client/api/Greuges/${value.id}/sumAmount`; - - this.$http.get(encodeURIComponent(greugeSum)).then(res => { + getGreuse() { + let query = `/client/api/Greuges/${this.client.id}/sumAmount`; + this.$http.get(query).then(res => { if (res.data) this.greuge = res.data; }); + } - let recoveryFilter = { + getRecoveries() { + let filter = { where: { - and: [{clientFk: value.id}, {or: [{finished: null}, {finished: {gt: Date.now()}}]}] + and: [{clientFk: this.client.id}, {or: [{finished: null}, {finished: {gt: Date.now()}}]}] }, limit: 1 }; + filter = encodeURIComponent(JSON.stringify(filter)); - let recovery = `/client/api/Recoveries?filter=${JSON.stringify(recoveryFilter)}`; - - this.$http.get(encodeURIComponent(recovery)).then(res => { + let query = `/client/api/Recoveries?filter=${filter}`; + this.$http.get(query).then(res => { if (res.data) this.recovery = res.data[0]; }); } } -ClientSummary.$inject = ['$http']; +Controller.$inject = ['$http']; ngModule.component('vnClientSummary', { template: require('./client-summary.html'), - controller: ClientSummary, + controller: Controller, bindings: { client: '<' } diff --git a/client/ticket/routes.json b/client/ticket/routes.json index cfcdd0e4b..ed43ed6ec 100644 --- a/client/ticket/routes.json +++ b/client/ticket/routes.json @@ -45,6 +45,24 @@ "description": "Basic data", "icon": "settings" } + }, + { + "url" : "/package", + "abstract": true, + "state": "ticket.card.package", + "component": "ui-view" + }, + { + "url": "/list", + "state": "ticket.card.package.list", + "component": "vn-ticket-package-list", + "params": { + "ticket": "$ctrl.ticket" + }, + "menu": { + "description": "Packages", + "icon": "icon-bucket" + } } ] } \ No newline at end of file diff --git a/client/ticket/src/package/list/package-list.html b/client/ticket/src/package/list/package-list.html new file mode 100644 index 000000000..6a895361e --- /dev/null +++ b/client/ticket/src/package/list/package-list.html @@ -0,0 +1,56 @@ + + + + + Packages + + + + {{id}} : {{name}} + + + + + + + + + + + + + + + +
diff --git a/client/ticket/src/package/list/package-list.js b/client/ticket/src/package/list/package-list.js new file mode 100644 index 000000000..f77a77418 --- /dev/null +++ b/client/ticket/src/package/list/package-list.js @@ -0,0 +1,19 @@ +import ngModule from '../../module'; + +class Controller { + + construct($http, $scope) { + this.$http = $http; + this.$ = $scope; + } +} + +Controller.$inject = ['$http', '$scope']; + +ngModule.component('vnTicketPackageList', { + template: require('./package-list.html'), + controller: Controller, + bindings: { + ticket: '<' + } +}); diff --git a/client/ticket/src/package/locale/es.yml b/client/ticket/src/package/locale/es.yml new file mode 100644 index 000000000..93ef2231d --- /dev/null +++ b/client/ticket/src/package/locale/es.yml @@ -0,0 +1,6 @@ +Packages: Embalajes +Package: Embalaje +Quantity: Cantidad +Added: Añadido +Add package: Añadir embalaje +Remove package: Quitar embalaje \ No newline at end of file diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js index 12d84e555..50b8e5d8a 100644 --- a/client/ticket/src/ticket.js +++ b/client/ticket/src/ticket.js @@ -5,3 +5,4 @@ import './create/ticket-create'; import './card/ticket-card'; import './summary/ticket-summary'; import './data/ticket-data'; +import './package/list/package-list'; diff --git a/services/item/common/methods/item/crudItemBarcodes.js b/services/item/common/methods/item-barcode/crudItemBarcodes.js similarity index 100% rename from services/item/common/methods/item/crudItemBarcodes.js rename to services/item/common/methods/item-barcode/crudItemBarcodes.js diff --git a/services/item/common/methods/item/specs/crudItemBarcodes.spec.js b/services/item/common/methods/item-barcode/spec/crudItemBarcodes.spec.js similarity index 100% rename from services/item/common/methods/item/specs/crudItemBarcodes.spec.js rename to services/item/common/methods/item-barcode/spec/crudItemBarcodes.spec.js diff --git a/services/item/common/methods/item/getLog.js b/services/item/common/methods/item-log/getLog.js similarity index 100% rename from services/item/common/methods/item/getLog.js rename to services/item/common/methods/item-log/getLog.js diff --git a/services/item/common/methods/item/crudItemNiches.js b/services/item/common/methods/item-niche/crudItemNiches.js similarity index 100% rename from services/item/common/methods/item/crudItemNiches.js rename to services/item/common/methods/item-niche/crudItemNiches.js diff --git a/services/item/common/methods/item/specs/crudItemNiches.spec.js b/services/item/common/methods/item-niche/spec/crudItemNiches.spec.js similarity index 100% rename from services/item/common/methods/item/specs/crudItemNiches.spec.js rename to services/item/common/methods/item-niche/spec/crudItemNiches.spec.js diff --git a/services/item/common/methods/item/crudItemTags.js b/services/item/common/methods/item-tag/crudItemTags.js similarity index 100% rename from services/item/common/methods/item/crudItemTags.js rename to services/item/common/methods/item-tag/crudItemTags.js diff --git a/services/item/common/models/item-barcode.js b/services/item/common/models/item-barcode.js index be746ecb3..df121dcc3 100644 --- a/services/item/common/models/item-barcode.js +++ b/services/item/common/models/item-barcode.js @@ -1,3 +1,3 @@ module.exports = function(Self) { - require('../methods/item/crudItemBarcodes.js')(Self); + require('../methods/item-barcode/crudItemBarcodes.js')(Self); }; diff --git a/services/item/common/models/item-log.js b/services/item/common/models/item-log.js index 248cc6abd..a5ec25778 100644 --- a/services/item/common/models/item-log.js +++ b/services/item/common/models/item-log.js @@ -1,3 +1,3 @@ module.exports = function(Self) { - require('../methods/item/getLog.js')(Self); + require('../methods/item-log/getLog.js')(Self); }; diff --git a/services/item/common/models/item-niche.js b/services/item/common/models/item-niche.js index 8f9d85da7..edec4182e 100644 --- a/services/item/common/models/item-niche.js +++ b/services/item/common/models/item-niche.js @@ -1,3 +1,3 @@ module.exports = function(Self) { - require('../methods/item/crudItemNiches.js')(Self); + require('../methods/item-niche/crudItemNiches.js')(Self); }; diff --git a/services/item/common/models/item-tag.js b/services/item/common/models/item-tag.js index d4e768bdb..411528836 100644 --- a/services/item/common/models/item-tag.js +++ b/services/item/common/models/item-tag.js @@ -1,3 +1,3 @@ module.exports = function(Self) { - require('../methods/item/crudItemTags.js')(Self); + require('../methods/item-tag/crudItemTags.js')(Self); }; diff --git a/services/item/server/model-config.json b/services/item/server/model-config.json index 229054dd6..779816c19 100644 --- a/services/item/server/model-config.json +++ b/services/item/server/model-config.json @@ -1,22 +1,4 @@ { - "Item": { - "dataSource": "vn" - }, - "ItemType": { - "dataSource": "vn" - }, - "Ink": { - "dataSource": "vn" - }, - "Origin": { - "dataSource": "vn" - }, - "Producer": { - "dataSource": "vn" - }, - "Intrastat": { - "dataSource": "vn" - }, "TaxClass": { "dataSource": "vn" }, @@ -26,9 +8,6 @@ "TaxType": { "dataSource": "vn" }, - "Expence": { - "dataSource": "vn" - }, "ItemTag": { "dataSource": "vn" }, diff --git a/services/loopback/common/locale/es.json b/services/loopback/common/locale/es.json index d460ae82c..edf12882c 100644 --- a/services/loopback/common/locale/es.json +++ b/services/loopback/common/locale/es.json @@ -7,5 +7,8 @@ "El método de pago seleccionado requiere que se especifique el IBAN": "El método de pago seleccionado requiere que se especifique el IBAN", "can't be blank": "can't be blank", "DNI Incorrecto": "DNI Incorrecto", - "Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre" + "Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre", + "ValidationError: The `Item` instance is not valid. Details: `originFk` Cannot be blank (value: undefined).": "ValidationError: The `Item` instance is not valid. Details: `originFk` Cannot be blank (value: undefined).", + "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `Articles_ibfk_5` FOREIGN KEY (`tipo_id`) REFERENCES `Tipos` (`tipo_id`) ON UPDATE CASCADE)": "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `Articles_ibfk_5` FOREIGN KEY (`tipo_id`) REFERENCES `Tipos` (`tipo_id`) ON UPDATE CASCADE)", + "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `Gastos` (`Id_Gasto`) ON UPDATE CASCADE)": "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `Gastos` (`Id_Gasto`) ON UPDATE CASCADE)" } \ No newline at end of file diff --git a/services/item/common/methods/item/clone.js b/services/loopback/common/methods/item/clone.js similarity index 90% rename from services/item/common/methods/item/clone.js rename to services/loopback/common/methods/item/clone.js index f6f846751..a3e9e38fc 100644 --- a/services/item/common/methods/item/clone.js +++ b/services/loopback/common/methods/item/clone.js @@ -1,4 +1,4 @@ -var UserError = require('../../../../loopback/common/helpers').UserError; +var UserError = require('../../helpers').UserError; module.exports = Self => { Self.remoteMethod('clone', { @@ -27,7 +27,7 @@ module.exports = Self => { id: itemId }, include: [ - {relation: "itemTag", scope: {order: "priority ASC", include: {relation: "tag"}}} + {relation: 'itemTag', scope: {order: 'priority ASC', include: {relation: 'tag'}}} ] }; diff --git a/services/item/common/methods/item/filter.js b/services/loopback/common/methods/item/filter.js similarity index 100% rename from services/item/common/methods/item/filter.js rename to services/loopback/common/methods/item/filter.js diff --git a/services/item/common/methods/item/updateTaxes.js b/services/loopback/common/methods/item/updateTaxes.js similarity index 100% rename from services/item/common/methods/item/updateTaxes.js rename to services/loopback/common/methods/item/updateTaxes.js diff --git a/services/item/common/models/expence.json b/services/loopback/common/models/expence.json similarity index 100% rename from services/item/common/models/expence.json rename to services/loopback/common/models/expence.json diff --git a/services/item/common/models/ink.json b/services/loopback/common/models/ink.json similarity index 100% rename from services/item/common/models/ink.json rename to services/loopback/common/models/ink.json diff --git a/services/item/common/models/intrastat.json b/services/loopback/common/models/intrastat.json similarity index 100% rename from services/item/common/models/intrastat.json rename to services/loopback/common/models/intrastat.json diff --git a/services/item/common/models/item-type.json b/services/loopback/common/models/item-type.json similarity index 100% rename from services/item/common/models/item-type.json rename to services/loopback/common/models/item-type.json diff --git a/services/item/common/models/item.js b/services/loopback/common/models/item.js similarity index 92% rename from services/item/common/models/item.js rename to services/loopback/common/models/item.js index 35cff55d4..8eb0c16a1 100644 --- a/services/item/common/models/item.js +++ b/services/loopback/common/models/item.js @@ -1,4 +1,4 @@ -let UserError = require('../../../loopback/common/helpers').UserError; +let UserError = require('../helpers').UserError; module.exports = function(Self) { require('../methods/item/filter.js')(Self); diff --git a/services/item/common/models/item.json b/services/loopback/common/models/item.json similarity index 100% rename from services/item/common/models/item.json rename to services/loopback/common/models/item.json diff --git a/services/item/common/models/origin.json b/services/loopback/common/models/origin.json similarity index 100% rename from services/item/common/models/origin.json rename to services/loopback/common/models/origin.json diff --git a/services/item/common/models/producer.json b/services/loopback/common/models/producer.json similarity index 100% rename from services/item/common/models/producer.json rename to services/loopback/common/models/producer.json diff --git a/services/loopback/common/models/specie.json b/services/loopback/common/models/specie.json new file mode 100644 index 000000000..afa669af3 --- /dev/null +++ b/services/loopback/common/models/specie.json @@ -0,0 +1,43 @@ +{ + "name": "Specie", + "base": "VnModel", + "options": { + "mysql": { + "table": "specie" + } + }, + "properties": { + "specie_id": { + "type": "Number", + "id": true, + "description": "Identifier" + }, + "latin_species_name": { + "type": "String" + }, + "entry_date": { + "type": "date" + }, + "expiry_date": { + "type": "date" + }, + "change_date_time": { + "type": "date" + } + }, + "relations": { + "genus": { + "type": "belongsTo", + "model": "Genus", + "foreignKey": "genus_id" + } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ] +} \ No newline at end of file diff --git a/services/loopback/common/models/ticket.json b/services/loopback/common/models/ticket.json index 493c18a78..cd50e1482 100644 --- a/services/loopback/common/models/ticket.json +++ b/services/loopback/common/models/ticket.json @@ -71,6 +71,11 @@ "model": "AgencyMode", "foreignKey": "agencyModeFk", "required": true + }, + "packages": { + "type": "hasMany", + "model": "TicketPackaging", + "foreignKey": "ticketFk" } } } \ No newline at end of file diff --git a/services/loopback/server/model-config.json b/services/loopback/server/model-config.json index b0d9eda0a..d04d34070 100644 --- a/services/loopback/server/model-config.json +++ b/services/loopback/server/model-config.json @@ -68,5 +68,26 @@ }, "TicketState":{ "dataSource": "vn" - } + }, + "Item": { + "dataSource": "vn" + }, + "Origin": { + "dataSource": "vn" + }, + "ItemType": { + "dataSource": "vn" + }, + "Expence": { + "dataSource": "vn" + }, + "Ink": { + "dataSource": "vn" + }, + "Intrastat": { + "dataSource": "vn" + }, + "Producer": { + "dataSource": "vn" + } } diff --git a/services/ticket/common/methods/packaging/listPackaging.js b/services/ticket/common/methods/packaging/listPackaging.js new file mode 100644 index 000000000..9aa1ad678 --- /dev/null +++ b/services/ticket/common/methods/packaging/listPackaging.js @@ -0,0 +1,49 @@ +module.exports = Self => { + Self.remoteMethod('listPackaging', { + description: 'Returns all packages including item', + accessType: 'READ', + accepts: [{ + arg: 'filter', + type: 'Object', + required: false, + description: 'Filter defining where and paginated data', + http: {source: 'query'} + }], + returns: { + type: ["Object"], + root: true + }, + http: { + path: `/listPackaging`, + verb: 'get' + } + }); + + Self.listPackaging = async filter => { + let where = ''; + let limit = ''; + let order = ''; + let params; + + if (filter) { + let connector = Self.dataSource.connector; + if (filter.where) { + if (filter.where.packagingFk) { + where = 'WHERE p.id = ?'; + params = [filter.where.packagingFk]; + } else { + let search = filter.where.name.regexp; + where = 'WHERE i.id REGEXP ? OR i.name REGEXP ?'; + params = [search, search]; + } + } + + limit = connector._buildLimit(null, filter.limit, filter.offset); + order = connector.buildOrderBy('Item', filter.order); + } + + let query = `SELECT i.name, i.id, p.id packagingFk FROM + item i JOIN packaging p ON i.id = p.itemFk ${where} ${order} ${limit}`; + return await Self.rawSql(query, params); + }; +}; diff --git a/services/ticket/common/models/packaging.js b/services/ticket/common/models/packaging.js new file mode 100644 index 000000000..c252d02ce --- /dev/null +++ b/services/ticket/common/models/packaging.js @@ -0,0 +1,3 @@ +module.exports = function(Self) { + require('../methods/packaging/listPackaging')(Self); +}; diff --git a/services/ticket/common/models/packaging.json b/services/ticket/common/models/packaging.json index 014730eab..9d5c098df 100644 --- a/services/ticket/common/models/packaging.json +++ b/services/ticket/common/models/packaging.json @@ -9,7 +9,7 @@ "properties": { "id": { "id": true, - "type": "Number", + "type": "String", "description": "Identifier" }, "volume": { From a218e506583ac818af8293654713a6af1a5c20b5 Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Fri, 16 Mar 2018 08:56:40 +0100 Subject: [PATCH 15/23] interface ticket Revision --- client/ticket/routes.json | 12 ++++++++++++ client/ticket/src/review/locale/es.yml | 4 ++++ client/ticket/src/review/review.html | 23 +++++++++++++++++++++++ client/ticket/src/review/review.js | 18 ++++++++++++++++++ client/ticket/src/ticket.js | 1 + 5 files changed, 58 insertions(+) create mode 100644 client/ticket/src/review/locale/es.yml create mode 100644 client/ticket/src/review/review.html create mode 100644 client/ticket/src/review/review.js diff --git a/client/ticket/routes.json b/client/ticket/routes.json index ed43ed6ec..060d0c772 100644 --- a/client/ticket/routes.json +++ b/client/ticket/routes.json @@ -63,6 +63,18 @@ "description": "Packages", "icon": "icon-bucket" } + }, + { + "url" : "/review", + "state": "ticket.card.review", + "component": "vn-ticket-review", + "params": { + "ticket": "$ctrl.ticket" + }, + "menu": { + "description": "Review", + "icon": "remove_red_eye" + } } ] } \ No newline at end of file diff --git a/client/ticket/src/review/locale/es.yml b/client/ticket/src/review/locale/es.yml new file mode 100644 index 000000000..ae3a7e678 --- /dev/null +++ b/client/ticket/src/review/locale/es.yml @@ -0,0 +1,4 @@ +date : Fecha +Employee : Empleado +State: Estado +Review: Revision \ No newline at end of file diff --git a/client/ticket/src/review/review.html b/client/ticket/src/review/review.html new file mode 100644 index 000000000..d38b231e5 --- /dev/null +++ b/client/ticket/src/review/review.html @@ -0,0 +1,23 @@ + + + + + Review + + + + + + + + + + No results + + + + + +
+ + \ No newline at end of file diff --git a/client/ticket/src/review/review.js b/client/ticket/src/review/review.js new file mode 100644 index 000000000..7b4cc5678 --- /dev/null +++ b/client/ticket/src/review/review.js @@ -0,0 +1,18 @@ +import ngModule from '../module'; + +class ticketReview { + construct($http, $scope) { + this.$http = $http; + this.$ = $scope; + } +} + +ticketReview.$inject = ['$http', '$scope']; + +ngModule.component('vnTicketReview', { + template: require('./review.html'), + controller: ticketReview, + bindings: { + ticket: '<' + } +}); diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js index 50b8e5d8a..d269a5fbd 100644 --- a/client/ticket/src/ticket.js +++ b/client/ticket/src/ticket.js @@ -6,3 +6,4 @@ import './card/ticket-card'; import './summary/ticket-summary'; import './data/ticket-data'; import './package/list/package-list'; +import './review/review'; From ece2fd384db19b74e34fde70c4c6a94d40cade15 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Fri, 16 Mar 2018 15:06:42 +0100 Subject: [PATCH 16/23] #179 listar notas de ticket --- client/ticket/routes.json | 12 ++ .../ticket/src/notes/ticket-observations.html | 60 ++++++++ .../ticket/src/notes/ticket-observations.js | 140 +++++++++++++++++ .../src/notes/ticket-observations.spec.js | 143 ++++++++++++++++++ client/ticket/src/ticket.js | 1 + .../methods/ticket/crudTicketObservations.js | 3 + .../ticket/common/models/ticketObservation.js | 3 + .../common/models/ticketObservation.json | 50 +++--- 8 files changed, 387 insertions(+), 25 deletions(-) create mode 100644 client/ticket/src/notes/ticket-observations.html create mode 100644 client/ticket/src/notes/ticket-observations.js create mode 100644 client/ticket/src/notes/ticket-observations.spec.js create mode 100644 services/ticket/common/methods/ticket/crudTicketObservations.js create mode 100644 services/ticket/common/models/ticketObservation.js diff --git a/client/ticket/routes.json b/client/ticket/routes.json index 060d0c772..e0c476028 100644 --- a/client/ticket/routes.json +++ b/client/ticket/routes.json @@ -46,6 +46,18 @@ "icon": "settings" } }, + { + "url": "/observations", + "state": "ticket.card.observations", + "component": "vn-ticket-observations", + "params": { + "ticket": "$ctrl.ticket" + }, + "menu": { + "description": "Notes", + "icon": "insert_drive_file" + } + }, { "url" : "/package", "abstract": true, diff --git a/client/ticket/src/notes/ticket-observations.html b/client/ticket/src/notes/ticket-observations.html new file mode 100644 index 000000000..b48ec5a72 --- /dev/null +++ b/client/ticket/src/notes/ticket-observations.html @@ -0,0 +1,60 @@ + + +
+ + + Notes + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/client/ticket/src/notes/ticket-observations.js b/client/ticket/src/notes/ticket-observations.js new file mode 100644 index 000000000..793865fde --- /dev/null +++ b/client/ticket/src/notes/ticket-observations.js @@ -0,0 +1,140 @@ +import ngModule from '../module'; + +class TicketObservations { + constructor($stateParams, $scope, $http, $translate, vnApp) { + this.params = $stateParams; + this.$scope = $scope; + this.$http = $http; + this.$translate = $translate; + this.vnApp = vnApp; + + this.ticketObservations = []; + this.oldObservations = {}; + this.removedObservations = []; + } + + _setIconAdd() { + if (this.ticketObservations.length) { + this.ticketObservations.map(element => { + element.showAddIcon = false; + return true; + }); + this.ticketObservations[this.ticketObservations.length - 1].showAddIcon = true; + } + } + + _setDirtyForm() { + if (this.$scope.form) { + this.$scope.form.$setDirty(); + } + } + + _unsetDirtyForm() { + if (this.$scope.form) { + this.$scope.form.$setPristine(); + } + } + + addObservation() { + this.ticketObservations.push({description: null, ticketFk: this.params.id, showAddIcon: true}); + this._setIconAdd(); + } + + removeObservation(index) { + let item = this.ticketObservations[index]; + if (item) { + this.ticketObservations.splice(index, 1); + this._setIconAdd(); + if (item.id) { + this.removedObservations.push(item.id); + this._setDirtyForm(); + } + } + } + + _equalObservations(oldObservation, newObservation) { + return oldObservation.id === newObservation.id && oldObservation.observationTypeFk === newObservation.observationTypeFk && oldObservation.description === newObservation.description; + } + + setOldObservations(response) { + this._setIconAdd(); + response.data.forEach(observation => { + this.oldObservations[observation.id] = Object.assign({}, observation); + }); + } + + getObservations() { + let filter = { + where: {ticketFk: this.params.id}, + include: ['observationType'] + }; + + this.$http.get(`/ticket/api/TicketObservations?filter=${JSON.stringify(filter)}`).then(response => { + this.ticketObservations = response.data; + this.setOldObservations(response); + }); + } + + submit() { + let typesDefined = []; + let repeatedType = false; + let canSubmit; + let observationsObj = { + delete: this.removedObservations, + create: [], + update: [] + }; + + this.ticketObservations.forEach(observation => { + let isNewObservation = !observation.id; + + delete observation.showAddIcon; + + if (typesDefined.indexOf(observation.observationTypeFk) !== -1) { + repeatedType = true; + return; + } + typesDefined.push(observation.observationTypeFk); + + if (isNewObservation && observation.description && observation.observationTypeFk) { + observationsObj.create.push(observation); + } + + if (!isNewObservation && !this._equalObservations(this.oldObservations[observation.id], observation)) { + observationsObj.update.push(observation); + } + }); + + if (this.$scope.form.$invalid) { + return this.vnApp.showMessage(this.$translate.instant('Some fields are invalid')); + } + + if (repeatedType) { + return this.vnApp.showMessage(this.$translate.instant('The observation type must be unique')); + } + + canSubmit = observationsObj.update.length > 0 || observationsObj.create.length > 0 || observationsObj.delete.length > 0; + + if (canSubmit) { + return this.$http.post(`/ticket/api/TicketObservations/crudTicketObservations`, observationsObj).then(() => { + this.getObservations(); + this._unsetDirtyForm(); + }); + } + this.vnApp.showMessage(this.$translate.instant('No changes to save')); + } + + $onInit() { + this.getObservations(); + } +} + +TicketObservations.$inject = ['$stateParams', '$scope', '$http', '$translate', 'vnApp']; + +ngModule.component('vnTicketObservations', { + template: require('./ticket-observations.html'), + controller: TicketObservations, + bindings: { + ticket: '<' + } +}); diff --git a/client/ticket/src/notes/ticket-observations.spec.js b/client/ticket/src/notes/ticket-observations.spec.js new file mode 100644 index 000000000..982cfb61b --- /dev/null +++ b/client/ticket/src/notes/ticket-observations.spec.js @@ -0,0 +1,143 @@ +import './ticket-observations.js'; + +describe('ticket', () => { + describe('Component vnTicketObservations', () => { + let $componentController; + let $state; + let controller; + let $httpBackend; + + beforeEach(() => { + angular.mock.module('ticket'); + }); + + beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => { + $componentController = _$componentController_; + $state = _$state_; + $httpBackend = _$httpBackend_; + controller = $componentController('vnTicketObservations', {$state: $state}); + })); + + describe('add / remove observation', () => { + it('should add one empty observation into controller observations collection and call _setIconAdd()', () => { + controller.ticketObservations = []; + spyOn(controller, '_setIconAdd').and.callThrough(); + controller.addObservation(); + + expect(controller._setIconAdd).toHaveBeenCalledWith(); + expect(controller.ticketObservations.length).toEqual(1); + expect(controller.ticketObservations[0].id).toBe(undefined); + expect(controller.ticketObservations[0].showAddIcon).toBeTruthy(); + }); + + it('should remove an observation that occupies the position in the index given and call _setIconAdd()', () => { + let index = 2; + controller.ticketObservations = [ + {id: 1, observationTypeFk: 1, description: 'one', showAddIcon: false}, + {id: 2, observationTypeFk: 2, description: 'two', showAddIcon: false}, + {id: 3, observationTypeFk: 3, description: 'three', showAddIcon: true} + ]; + + spyOn(controller, '_setIconAdd').and.callThrough(); + + controller.removeObservation(index); + + expect(controller._setIconAdd).toHaveBeenCalledWith(); + expect(controller.ticketObservations.length).toEqual(2); + expect(controller.ticketObservations[0].showAddIcon).toBeFalsy(); + expect(controller.ticketObservations[1].showAddIcon).toBeTruthy(); + expect(controller.ticketObservations[index]).toBe(undefined); + }); + }); + + describe('_equalObservations()', () => { + it('should return true if two observations are equals independent of control attributes', () => { + let observationOne = {id: 1, observationTypeFk: 1, description: 'one', showAddIcon: true}; + let observationTwo = {id: 1, observationTypeFk: 1, description: 'one', showAddIcon: false}; + let equals = controller._equalObservations(observationOne, observationTwo); + + expect(equals).toBeTruthy(); + }); + + it('should return false if two observations aint equals independent of control attributes', () => { + let observationOne = {id: 1, observationTypeFk: 1, description: 'one', showAddIcon: true}; + let observationTwo = {id: 1, observationTypeFk: 1, description: 'two', showAddIcon: true}; + let equals = controller._equalObservations(observationOne, observationTwo); + + expect(equals).toBeFalsy(); + }); + }); + + describe('get Observations()', () => { + it('should perform a GET query to receive the ticket observations', () => { + let res = [{id: 1, observationTypeFk: 1, description: 'one'}]; + + $httpBackend.whenGET(`/ticket/api/TicketObservations?filter={"where":{},"include":["observationType"]}`).respond(res); + $httpBackend.expectGET(`/ticket/api/TicketObservations?filter={"where":{},"include":["observationType"]}`); + controller.getObservations(); + $httpBackend.flush(); + }); + }); + + describe('submit()', () => { + it("should return an error message 'The observation type must be unique'", () => { + controller.$scope.form = {}; + spyOn(controller.vnApp, 'showMessage').and.callThrough(); + controller.ticketObservations = [ + {id: 1, observationTypeFk: 1, description: 'one', itemFk: 1}, + {observationTypeFk: 1, description: 'one', itemFk: 1} + ]; + controller.oldObservations = {1: {id: 1, observationTypeFk: 1, description: 'one', itemFk: 1}}; + controller.submit(); + + expect(controller.vnApp.showMessage).toHaveBeenCalledWith('The observation type must be unique'); + }); + + it("should perfom a query to delete observations", () => { + controller.$scope.form = {$setPristine: () => {}}; + controller.oldObservations = {1: {id: 1, observationTypeFk: 1, description: 'one'}}; + controller.ticketObservations = []; + controller.removedObservations = [1]; + + $httpBackend.whenGET(`/ticket/api/TicketObservations?filter={"where":{},"include":["observationType"]}`).respond([]); + $httpBackend.expectPOST(`/ticket/api/TicketObservations/crudTicketObservations`).respond('ok!'); + controller.submit(); + $httpBackend.flush(); + }); + + it("should perfom a query to update observations", () => { + controller.$scope.form = {$setPristine: () => {}}; + controller.ticketObservations = [{id: 1, observationTypeFk: 1, description: 'number one!'}]; + controller.oldObservations = {1: {id: 1, observationTypeFk: 1, description: 'one'}}; + + $httpBackend.whenGET(`/ticket/api/TicketObservations?filter={"where":{},"include":["observationType"]}`).respond([]); + $httpBackend.expectPOST(`/ticket/api/TicketObservations/crudTicketObservations`).respond('ok!'); + controller.submit(); + $httpBackend.flush(); + }); + + it("should perfom a query to create new observation", () => { + controller.$scope.form = {$setPristine: () => {}}; + controller.ticketObservations = [{observationTypeFk: 2, description: 'two'}]; + + $httpBackend.whenGET(`/ticket/api/TicketObservations?filter={"where":{},"include":["observationType"]}`).respond([]); + $httpBackend.expectPOST(`/ticket/api/TicketObservations/crudTicketObservations`).respond('ok!'); + controller.submit(); + $httpBackend.flush(); + }); + + it("should return a message 'No changes to save' when there are no changes to apply", () => { + controller.$scope.form = {$setPristine: () => {}}; + spyOn(controller.vnApp, 'showMessage').and.callThrough(); + controller.oldObservations = [ + {id: 1, observationTypeFk: 1, description: 'one', showAddIcon: false}, + {id: 2, observationTypeFk: 2, description: 'two', showAddIcon: true} + ]; + controller.ticketObservations = []; + controller.submit(); + + expect(controller.vnApp.showMessage).toHaveBeenCalledWith('No changes to save'); + }); + }); + }); +}); diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js index d269a5fbd..4a7af6e58 100644 --- a/client/ticket/src/ticket.js +++ b/client/ticket/src/ticket.js @@ -5,5 +5,6 @@ import './create/ticket-create'; import './card/ticket-card'; import './summary/ticket-summary'; import './data/ticket-data'; +import './notes/ticket-observations'; import './package/list/package-list'; import './review/review'; diff --git a/services/ticket/common/methods/ticket/crudTicketObservations.js b/services/ticket/common/methods/ticket/crudTicketObservations.js new file mode 100644 index 000000000..33949e1f4 --- /dev/null +++ b/services/ticket/common/methods/ticket/crudTicketObservations.js @@ -0,0 +1,3 @@ +module.exports = Self => { + Self.installCrudModel('crudTicketObservations'); +}; diff --git a/services/ticket/common/models/ticketObservation.js b/services/ticket/common/models/ticketObservation.js new file mode 100644 index 000000000..bed837bd3 --- /dev/null +++ b/services/ticket/common/models/ticketObservation.js @@ -0,0 +1,3 @@ +module.exports = function(Self) { + require('../methods/ticket/crudTicketObservations.js')(Self); +}; diff --git a/services/ticket/common/models/ticketObservation.json b/services/ticket/common/models/ticketObservation.json index a6e5e3029..e5b0169c1 100644 --- a/services/ticket/common/models/ticketObservation.json +++ b/services/ticket/common/models/ticketObservation.json @@ -2,33 +2,33 @@ "name": "TicketObservation", "base": "VnModel", "options": { - "mysql": { - "table": "ticketObservation" - } + "mysql": { + "table": "ticketObservation" + } }, "properties": { - "id": { - "id": true, - "type": "Number", - "description": "Identifier" - }, - "description": { - "type": "String", - "required": true - } + "id": { + "id": true, + "type": "Number", + "description": "Identifier" + }, + "description": { + "type": "String", + "required": true + } }, "relations": { - "ticket": { - "type": "belongsTo", - "model": "Ticket", - "foreignKey": "ticketFk", - "required": true - }, - "observationType": { - "type": "belongsTo", - "model": "ObservationType", - "foreignKey": "observationTypeFk", - "required": true - } + "ticket": { + "type": "belongsTo", + "model": "Ticket", + "foreignKey": "ticketFk", + "required": true + }, + "observationType": { + "type": "belongsTo", + "model": "ObservationType", + "foreignKey": "observationTypeFk", + "required": true + } } - } \ No newline at end of file +} From 945a1b30493b50aabf65826d89f9f33c8536f10a Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Fri, 16 Mar 2018 15:08:36 +0100 Subject: [PATCH 17/23] corrected bug on all htmls using crud --- .../client/src/address-edit/address-edit.html | 8 ++++ .../client/src/address-edit/address-edit.js | 38 +++++++++++-------- .../src/components/textfield/textfield.html | 6 +-- client/item/src/barcode/item-barcode.js | 3 ++ client/item/src/niche/item-niche.html | 12 +++++- client/item/src/niche/item-niche.js | 3 ++ client/item/src/tags/item-tags.html | 8 ++++ 7 files changed, 57 insertions(+), 21 deletions(-) diff --git a/client/client/src/address-edit/address-edit.html b/client/client/src/address-edit/address-edit.html index ba83368eb..cc50c1060 100644 --- a/client/client/src/address-edit/address-edit.html +++ b/client/client/src/address-edit/address-edit.html @@ -54,6 +54,7 @@ + + 0 || observationsObj.create.length > 0 || observationsObj.delete.length > 0; + canSubmitObservations = observationsObj.update.length > 0 || observationsObj.create.length > 0 || observationsObj.delete.length > 0; if (repeatedTypes) { this.vnApp.showMessage( this.$translate.instant('The observation type must be unique') ); - } else if (canWatcherSubmit && !canObservationsSubmit) { + } else if (canSubmitWatcher && !canSubmitObservations) { this.$scope.watcher.submit().then(() => { this.$state.go('clientCard.addresses.list', {id: this.$state.params.id}); }); - } else if (!canWatcherSubmit && canObservationsSubmit) { + } else if (!canSubmitWatcher && canSubmitObservations) { this._submitObservations(observationsObj).then(() => { this.$state.go('clientCard.addresses.list', {id: this.$state.params.id}); }); - } else if (canWatcherSubmit && canObservationsSubmit) { + } else if (canSubmitWatcher && canSubmitObservations) { this.$q.all([this.$scope.watcher.submit(), this._submitObservations(observationsObj)]).then(() => { this.$state.go('clientCard.addresses.list', {id: this.$state.params.id}); }); @@ -113,7 +115,7 @@ export default class Controller { this._unsetDirtyForm(); } - $onInit() { + _getAddressNotes() { let filter = { where: {addressFk: this.address.id}, include: {relation: 'observationType'} @@ -121,10 +123,14 @@ export default class Controller { this.$http.get(`/client/api/AddressObservations?filter=${JSON.stringify(filter)}`).then(res => { this.observations = res.data; res.data.forEach(item => { - this.observationsOld[item.id] = Object.assign({}, item); + this.oldObservations[item.id] = Object.assign({}, item); }); }); } + + $onInit() { + this._getAddressNotes(); + } } Controller.$inject = ['$state', '$scope', '$http', '$q', '$translate', 'vnApp']; diff --git a/client/core/src/components/textfield/textfield.html b/client/core/src/components/textfield/textfield.html index 43599186b..7f39ccf64 100644 --- a/client/core/src/components/textfield/textfield.html +++ b/client/core/src/components/textfield/textfield.html @@ -1,8 +1,8 @@ -
- + ng-blur="$ctrl.hasFocus = false"/>
{ @@ -30,11 +31,13 @@ export default class Controller { this.$scope.form.$setDirty(); } } + _unsetDirtyForm() { if (this.$scope.form) { this.$scope.form.$setPristine(); } } + _equalBarcodes(oldBarcode, newBarcode) { return oldBarcode.id === newBarcode.id && oldBarcode.code === newBarcode.code; } diff --git a/client/item/src/niche/item-niche.html b/client/item/src/niche/item-niche.html index ae30034db..068eedb41 100644 --- a/client/item/src/niche/item-niche.html +++ b/client/item/src/niche/item-niche.html @@ -8,7 +8,8 @@ Item Niches + + { this.niches = response.data; this.setOldNiches(response); @@ -95,6 +97,7 @@ export default class Controller { create: [], update: [] }; + this.niches.forEach(niche => { let isNewNiche = !niche.id; diff --git a/client/item/src/tags/item-tags.html b/client/item/src/tags/item-tags.html index 318a5dec7..c92a13292 100644 --- a/client/item/src/tags/item-tags.html +++ b/client/item/src/tags/item-tags.html @@ -8,6 +8,7 @@ Item tags + + Date: Fri, 16 Mar 2018 15:09:04 +0100 Subject: [PATCH 18/23] fixed all e2e paths --- client/item/src/niche/item-niche.spec.js | 2 +- e2e/helpers/selectors.js | 20 ++++++--- .../02_edit_item_basic_data.spec.js | 5 ++- .../item-module/03_edit_item_tax.spec.js | 2 +- .../item-module/04_create_item_tags.spec.js | 44 ++++++++----------- .../item-module/05_create_item_niche.spec.js | 18 +++----- 6 files changed, 44 insertions(+), 47 deletions(-) diff --git a/client/item/src/niche/item-niche.spec.js b/client/item/src/niche/item-niche.spec.js index 3218f262e..e223133d9 100644 --- a/client/item/src/niche/item-niche.spec.js +++ b/client/item/src/niche/item-niche.spec.js @@ -92,7 +92,7 @@ describe('Item', () => { }); describe('submit()', () => { - it("should return an error message 'The niche must be unique' when the niche code isnt unique", () => { + it("should return an error message 'The niche must be unique' when the niche warehouse isnt unique", () => { controller.$scope.form = {}; spyOn(controller.vnApp, 'showMessage').and.callThrough(); controller.niches = [ diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index ab30e2db7..497b8de64 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -188,24 +188,29 @@ export default { itemTags: { goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]', tagsButton: `${components.vnMenuItem}[ui-sref="item.card.tags"]`, + firstRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(2) > ${components.vnIcon}[icon="remove_circle_outline"]`, firstTagSelect: `vn-item-tags vn-horizontal:nth-child(2) > ${components.vnAutocomplete}[field="itemTag.tagFk"] input`, + firstTagDisabled: `vn-item-tags vn-horizontal:nth-child(2) > vn-textfield[label="Tag"] > div > input`, firstTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(2) > ${components.vnAutocomplete}[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`, firstValueInput: `vn-item-tags vn-horizontal:nth-child(2) > vn-textfield[label="Value"] > div > input`, firstRelevancyInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Relevancy"] > div > input`, secondTagSelect: `vn-item-tags vn-horizontal:nth-child(3) > ${components.vnAutocomplete}[field="itemTag.tagFk"] input`, + secondTagDisabled: `vn-item-tags vn-horizontal:nth-child(3) > vn-textfield[label="Tag"] > div > input`, secondTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(3) > ${components.vnAutocomplete}[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`, secondValueInput: `vn-item-tags vn-horizontal:nth-child(3) > vn-textfield[label="Value"] > div > input`, secondRelevancyInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Relevancy"] > div > input`, thirdTagSelect: `vn-item-tags vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemTag.tagFk"] input`, + thirdTagDisabled: `vn-item-tags vn-horizontal:nth-child(4) > vn-textfield[label="Tag"] > div > input`, thirdTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`, thirdValueInput: `vn-item-tags vn-horizontal:nth-child(4) > vn-textfield[label="Value"] > div > input`, thirdRelevancyInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Relevancy"] > div > input`, fourthTagSelect: `vn-item-tags vn-horizontal:nth-child(5) > ${components.vnAutocomplete}[field="itemTag.tagFk"] input`, + fourthTagDisabled: `vn-item-tags vn-horizontal:nth-child(5) > vn-textfield[label="Tag"] > div > input`, fourthTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(5) > ${components.vnAutocomplete}[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`, fourthValueInput: `vn-item-tags vn-horizontal:nth-child(5) > vn-textfield[label="Value"] > div > input`, fourthRelevancyInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Relevancy"] > div > input`, - fifthRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(6) > ${components.vnIcon}[icon="remove_circle_outline"]`, fifthTagSelect: `vn-item-tags vn-horizontal:nth-child(6) > ${components.vnAutocomplete}[field="itemTag.tagFk"] input`, + fifthTagDisabled: `vn-item-tags vn-horizontal:nth-child(6) > vn-textfield[label="Tag"] > div > input`, fifthTagSelectOptionFive: `vn-item-tags vn-horizontal:nth-child(6) > ${components.vnAutocomplete}[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(5)`, fifthValueInput: `vn-item-tags vn-horizontal:nth-child(6) > vn-textfield[label="Value"] > div > input`, fifthRelevancyInput: `vn-horizontal:nth-child(6) > vn-textfield[label="Relevancy"] > div > input`, @@ -233,14 +238,17 @@ export default { nicheButton: `${components.vnMenuItem}[ui-sref="item.card.niche"]`, addNicheButton: `${components.vnIcon}[icon="add_circle"]`, firstWarehouseSelect: `${components.vnAutocomplete}[field="itemNiche.warehouseFk"] input`, + firstWarehouseDisabled: `vn-horizontal:nth-child(2) > vn-textfield[label="Warehouse"] > div > input`, firstWarehouseSelectSecondOption: `${components.vnAutocomplete}[field="itemNiche.warehouseFk"] vn-drop-down ul > li:nth-child(2)`, + firstCodeInput: `vn-horizontal:nth-child(2) > vn-textfield[label="code"] > div > input`, secondWarehouseSelect: `vn-horizontal:nth-child(3) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] input`, - thirdWarehouseSelect: `vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] input`, - thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`, + secondWarehouseDisabled: `vn-horizontal:nth-child(3) > vn-textfield[label="Warehouse"] > div > input`, + secondCodeInput: `vn-horizontal:nth-child(3) > vn-textfield[label="code"] > div > input`, secondNicheRemoveButton: `vn-horizontal:nth-child(3) > vn-one > ${components.vnIcon}[icon="remove_circle_outline"]`, - firstCodeInput: `vn-horizontal:nth-child(2) > ${components.vnTextfield}`, - secondCodeInput: `vn-horizontal:nth-child(3) > ${components.vnTextfield}`, - thirdCodeInput: `vn-horizontal:nth-child(4) > ${components.vnTextfield}`, + thirdWarehouseSelect: `vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] input`, + thirdWarehouseDisabled: `vn-horizontal:nth-child(4) > vn-textfield[label="Warehouse"] > div > input`, + thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > ${components.vnAutocomplete}[field="itemNiche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`, + thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="code"] > div > input`, submitNichesButton: `${components.vnSubmit}` }, itemBotanical: { diff --git a/e2e/paths/item-module/02_edit_item_basic_data.spec.js b/e2e/paths/item-module/02_edit_item_basic_data.spec.js index c2de03c06..36b7fb81e 100644 --- a/e2e/paths/item-module/02_edit_item_basic_data.spec.js +++ b/e2e/paths/item-module/02_edit_item_basic_data.spec.js @@ -66,9 +66,10 @@ describe('edit item basic data path', () => { it(`should confirm the item name was edited`, () => { return nightmare - .click(selectors.itemNiches.firstCodeInput) - .wait(selectors.itemNiches.firstCodeInput) + .click(selectors.itemNiches.nicheButton) + .wait(selectors.itemNiches.firstWarehouseDisabled) .waitToClick(selectors.itemBasicData.basicDataButton) + .waitForTextInInput(selectors.itemBasicData.nameInput, 'Rose of Purity') .getInputValue(selectors.itemBasicData.nameInput) .then(result => { expect(result).toEqual('Rose of Purity'); diff --git a/e2e/paths/item-module/03_edit_item_tax.spec.js b/e2e/paths/item-module/03_edit_item_tax.spec.js index 07bb75414..4347d1752 100644 --- a/e2e/paths/item-module/03_edit_item_tax.spec.js +++ b/e2e/paths/item-module/03_edit_item_tax.spec.js @@ -61,7 +61,7 @@ describe('add item tax path', () => { it(`should confirm the item tax class was edited`, () => { return nightmare .click(selectors.itemTags.tagsButton) - .wait(selectors.itemTags.firstTagSelect) + .wait(selectors.itemTags.firstTagDisabled) .waitToClick(selectors.itemTax.taxButton) .waitForTextInInput(selectors.itemTax.firstClassSelect, 'general') .getInputValue(selectors.itemTax.firstClassSelect) diff --git a/e2e/paths/item-module/04_create_item_tags.spec.js b/e2e/paths/item-module/04_create_item_tags.spec.js index 19d9ef26a..e83725bfa 100644 --- a/e2e/paths/item-module/04_create_item_tags.spec.js +++ b/e2e/paths/item-module/04_create_item_tags.spec.js @@ -43,22 +43,14 @@ describe('create item tags path', () => { }); }); - it(`should create a new tag, edit another and delete a former one`, () => { + it(`should create a new tag and delete a former one`, () => { return nightmare - .waitToClick(selectors.itemTags.firstTagSelect) - .waitToClick(selectors.itemTags.firstTagSelectOptionOne) - .clearInput(selectors.itemTags.firstValueInput) - .type(selectors.itemTags.firstValueInput, 'Dark Blue') - .clearInput(selectors.itemTags.firstRelevancyInput) - .type(selectors.itemTags.firstRelevancyInput, '2') - .waitToClick(selectors.itemTags.fifthRemoveTagButton) + .waitToClick(selectors.itemTags.firstRemoveTagButton) .waitToClick(selectors.itemTags.addItemTagButton) .waitToClick(selectors.itemTags.fifthTagSelect) .waitToClick(selectors.itemTags.fifthTagSelectOptionFive) .type(selectors.itemTags.fifthValueInput, 'Thanos') .type(selectors.itemTags.fifthRelevancyInput, '1') - .clearInput(selectors.itemTags.secondRelevancyInput) - .type(selectors.itemTags.secondRelevancyInput, '5') .click(selectors.itemTags.submitItemTagsButton) .waitForSnackbar() .then(result => { @@ -71,8 +63,8 @@ describe('create item tags path', () => { .click(selectors.itemBasicData.basicDataButton) .wait(selectors.itemBasicData.nameInput) .click(selectors.itemTags.tagsButton) - .waitForTextInInput(selectors.itemTags.firstTagSelect, 'Owner') - .getInputValue(selectors.itemTags.firstTagSelect) + .waitForTextInInput(selectors.itemTags.firstTagDisabled, 'Owner') + .getInputValue(selectors.itemTags.firstTagDisabled) .then(result => { expect(result).toEqual('Owner'); }); @@ -98,19 +90,19 @@ describe('create item tags path', () => { it(`should confirm the second select is the expected one`, () => { return nightmare - .waitForTextInInput(selectors.itemTags.secondTagSelect, 'Color') - .getInputValue(selectors.itemTags.secondTagSelect) + .waitForTextInInput(selectors.itemTags.secondTagDisabled, 'Location') + .getInputValue(selectors.itemTags.secondTagDisabled) .then(result => { - expect(result).toEqual('Color'); + expect(result).toEqual('Location'); }); }); it(`should confirm the second value is the expected one`, () => { return nightmare - .waitForTextInInput(selectors.itemTags.secondValueInput, 'Dark Blue') + .waitForTextInInput(selectors.itemTags.secondValueInput, 'Gamoras hideout') .getInputValue(selectors.itemTags.secondValueInput) .then(result => { - expect(result).toEqual('Dark Blue'); + expect(result).toEqual('Gamoras hideout'); }); }); @@ -125,8 +117,8 @@ describe('create item tags path', () => { it(`should confirm the third select is the expected one`, () => { return nightmare - .waitForTextInInput(selectors.itemTags.thirdTagSelect, 'Shape') - .getInputValue(selectors.itemTags.thirdTagSelect) + .waitForTextInInput(selectors.itemTags.thirdTagDisabled, 'Shape') + .getInputValue(selectors.itemTags.thirdTagDisabled) .then(result => { expect(result).toEqual('Shape'); }); @@ -152,8 +144,8 @@ describe('create item tags path', () => { it(`should confirm the fourth select is the expected one`, () => { return nightmare - .waitForTextInInput(selectors.itemTags.fourthTagSelect, 'Power') - .getInputValue(selectors.itemTags.fourthTagSelect) + .waitForTextInInput(selectors.itemTags.fourthTagDisabled, 'Power') + .getInputValue(selectors.itemTags.fourthTagDisabled) .then(result => { expect(result).toEqual('Power'); }); @@ -179,19 +171,19 @@ describe('create item tags path', () => { it(`should confirm the fifth select is the expected one`, () => { return nightmare - .waitForTextInInput(selectors.itemTags.fifthTagSelect, 'Location') - .getInputValue(selectors.itemTags.fifthTagSelect) + .waitForTextInInput(selectors.itemTags.fifthTagDisabled, 'Color') + .getInputValue(selectors.itemTags.fifthTagDisabled) .then(result => { - expect(result).toEqual('Location'); + expect(result).toEqual('Color'); }); }); it(`should confirm the fifth value is the expected one`, () => { return nightmare - .waitForTextInInput(selectors.itemTags.fifthValueInput, 'Gamoras hideout') + .waitForTextInInput(selectors.itemTags.fifthValueInput, 'Yellow') .getInputValue(selectors.itemTags.fifthValueInput) .then(result => { - expect(result).toEqual('Gamoras hideout'); + expect(result).toEqual('Yellow'); }); }); diff --git a/e2e/paths/item-module/05_create_item_niche.spec.js b/e2e/paths/item-module/05_create_item_niche.spec.js index 588dad678..cdadc7e0f 100644 --- a/e2e/paths/item-module/05_create_item_niche.spec.js +++ b/e2e/paths/item-module/05_create_item_niche.spec.js @@ -43,13 +43,9 @@ describe('create item niche path', () => { }); }); - it(`should click create a new niche, edit another and delete a former one`, () => { + it(`should click create a new niche and delete a former one`, () => { return nightmare .waitToClick(selectors.itemNiches.addNicheButton) - .waitToClick(selectors.itemNiches.firstWarehouseSelect) - .waitToClick(selectors.itemNiches.firstWarehouseSelectSecondOption) - .clearInput(selectors.itemNiches.firstCodeInput) - .type(selectors.itemNiches.firstCodeInput, 'A2') .waitToClick(selectors.itemNiches.secondNicheRemoveButton) .waitToClick(selectors.itemNiches.thirdWarehouseSelect) .waitToClick(selectors.itemNiches.thirdWarehouseSelectFourthOption) @@ -66,21 +62,21 @@ describe('create item niche path', () => { .click(selectors.itemBasicData.basicDataButton) .wait(selectors.itemBasicData.nameInput) .click(selectors.itemNiches.nicheButton) - .waitForTextInInput(selectors.itemNiches.firstWarehouseSelect, 'Warehouse Two') - .getInputValue(selectors.itemNiches.firstWarehouseSelect) + .waitForTextInInput(selectors.itemNiches.firstWarehouseDisabled, 'Warehouse One') + .getInputValue(selectors.itemNiches.firstWarehouseDisabled) .then(result => { - expect(result).toEqual('Warehouse Two'); + expect(result).toEqual('Warehouse One'); return nightmare .getInputValue(selectors.itemNiches.firstCodeInput); }) .then(result => { - expect(result).toEqual('A2'); + expect(result).toEqual('A1'); }); }); it(`should confirm the second niche is the expected one`, () => { return nightmare - .getInputValue(selectors.itemNiches.secondWarehouseSelect) + .getInputValue(selectors.itemNiches.secondWarehouseDisabled) .then(result => { expect(result).toEqual('Warehouse Three'); return nightmare @@ -93,7 +89,7 @@ describe('create item niche path', () => { it(`should confirm the third niche is the expected one`, () => { return nightmare - .getInputValue(selectors.itemNiches.thirdWarehouseSelect) + .getInputValue(selectors.itemNiches.thirdWarehouseDisabled) .then(result => { expect(result).toEqual('Warehouse Four'); return nightmare From 7bbc83832b735aa46f576c4b209cb51ed9b4e978 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Fri, 16 Mar 2018 15:53:29 +0100 Subject: [PATCH 19/23] spanish traduction for #179 ticket notes --- client/ticket/src/locale/es.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/ticket/src/locale/es.yml b/client/ticket/src/locale/es.yml index 1f272d420..e65b6ab54 100644 --- a/client/ticket/src/locale/es.yml +++ b/client/ticket/src/locale/es.yml @@ -1 +1,6 @@ -Tickets: Tickets \ No newline at end of file +Tickets: Tickets +Notes: Notas +Observation type: Tipo de observación +Description: Descripción +The observation type must be unique: El tipo de observación debe ser único +Some fields are invalid: Algunos campos no son válidos \ No newline at end of file From 378f053b186f23f6b28bcdbddb3042770100d97f Mon Sep 17 00:00:00 2001 From: Juan Date: Sat, 17 Mar 2018 13:17:48 +0100 Subject: [PATCH 20/23] vnAutocomplete behavior modified to act like ms access combo --- .../components/autocomplete/autocomplete.html | 10 ++++----- .../src/components/drop-down/drop-down.js | 21 ++++++++++++------- client/core/src/components/popover/popover.js | 3 --- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/client/core/src/components/autocomplete/autocomplete.html b/client/core/src/components/autocomplete/autocomplete.html index 0ee10c5ae..4d04f884f 100755 --- a/client/core/src/components/autocomplete/autocomplete.html +++ b/client/core/src/components/autocomplete/autocomplete.html @@ -16,8 +16,8 @@
- - -
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/client/core/src/components/drop-down/drop-down.js b/client/core/src/components/drop-down/drop-down.js index 482297618..07a856273 100755 --- a/client/core/src/components/drop-down/drop-down.js +++ b/client/core/src/components/drop-down/drop-down.js @@ -45,6 +45,9 @@ export default class DropDown extends Component { this._search = value; this.$.model.clear(); + if (value != null) + this._activeOption = 0; + this.$timeout.cancel(this.searchTimeout); this.searchTimeout = this.$timeout(() => { this.refreshModel(); @@ -86,8 +89,8 @@ export default class DropDown extends Component { * @param {String} search The initial search term or %null */ show(search) { - this.search = search; this._activeOption = -1; + this.search = search; this.buildList(); this.$.popover.parent = this.parent; this.$.popover.show(); @@ -101,7 +104,7 @@ export default class DropDown extends Component { } /** - * Activates a option and scrolls the drop-down to that option. + * Activates an option and scrolls the drop-down to that option. * * @param {Number} option The option index */ @@ -122,7 +125,7 @@ export default class DropDown extends Component { } /** - * Activates a option. + * Activates an option. * * @param {Number} option The option index */ @@ -146,10 +149,11 @@ export default class DropDown extends Component { * @param {Number} option The option index */ selectOption(option) { - if (option != -1) { - let data = this.$.model.data; - let item = data ? data[option] : null; - let value = item ? item[this.valueField] : null; + let data = this.$.model.data; + let item = option != -1 && data ? data[option] : null; + + if (item) { + let value = item[this.valueField]; if (this.multiple) { if (!Array.isArray(this.selection)) { @@ -252,6 +256,9 @@ export default class DropDown extends Component { let nOpts = data ? data.length - 1 : 0; switch (event.keyCode) { + case 9: // Tab + this.selectOption(option); + return; case 13: // Enter this.selectOption(option); break; diff --git a/client/core/src/components/popover/popover.js b/client/core/src/components/popover/popover.js index 4e2326c77..1756bd58f 100644 --- a/client/core/src/components/popover/popover.js +++ b/client/core/src/components/popover/popover.js @@ -96,9 +96,6 @@ export default class Popover extends Component { if (this.deregisterCallback) this.deregisterCallback(); - if (this.parent) - this.parent.focus(); - if (this.onClose) this.onClose(); } From 1c8b541e83f8b81b4c6cc273434ab24fefefccca Mon Sep 17 00:00:00 2001 From: Juan Date: Sat, 17 Mar 2018 20:59:02 +0100 Subject: [PATCH 21/23] vnPopover code clean, vnSearchbar popover bugs solved --- client/core/src/components/popover/popover.js | 38 ++---------------- .../src/components/searchbar/searchbar.html | 30 +++++++------- .../src/components/searchbar/searchbar.js | 39 +++++++++---------- 3 files changed, 39 insertions(+), 68 deletions(-) diff --git a/client/core/src/components/popover/popover.js b/client/core/src/components/popover/popover.js index 1756bd58f..4df7cc115 100644 --- a/client/core/src/components/popover/popover.js +++ b/client/core/src/components/popover/popover.js @@ -88,6 +88,9 @@ export default class Popover extends Component { this.showTimeout = this.$timeout(() => { this.element.style.display = 'none'; this.showTimeout = null; + + if (this.onClose) + this.onClose(); }, 250); this.document.removeEventListener('keydown', this.docKeyDownHandler); @@ -95,9 +98,6 @@ export default class Popover extends Component { if (this.deregisterCallback) this.deregisterCallback(); - - if (this.onClose) - this.onClose(); } /** @@ -186,35 +186,3 @@ ngModule.component('vnPopover', { onClose: '&?' } }); - -class PopoverService { - constructor($document, $compile, $transitions, $rootScope) { - this.$compile = $compile; - this.$rootScope = $rootScope; - this.$document = $document; - this.stack = []; - } - show(child, parent, $scope) { - let element = this.$compile('')($scope || this.$rootScope)[0]; - let popover = element.$ctrl; - popover.parent = parent; - popover.child = child; - popover.show(); - popover.onClose = () => { - this.$document[0].body.removeChild(element); - if ($scope) $scope.$destroy(); - }; - this.$document[0].body.appendChild(element); - return popover; - } - - showComponent(componentTag, $scope, parent) { - let $newScope = $scope.$new(); - let childElement = this.$compile(`<${componentTag}/>`)($newScope)[0]; - this.show(childElement, parent, $newScope); - return childElement; - } -} -PopoverService.$inject = ['$document', '$compile', '$transitions', '$rootScope']; - -ngModule.service('vnPopover', PopoverService); diff --git a/client/salix/src/components/searchbar/searchbar.html b/client/salix/src/components/searchbar/searchbar.html index e54a00ccd..9e21968bc 100644 --- a/client/salix/src/components/searchbar/searchbar.html +++ b/client/salix/src/components/searchbar/searchbar.html @@ -1,14 +1,18 @@
- - - - - - - -
\ No newline at end of file + + + + + + + + + + diff --git a/client/salix/src/components/searchbar/searchbar.js b/client/salix/src/components/searchbar/searchbar.js index 324ddf5a4..81e71198c 100644 --- a/client/salix/src/components/searchbar/searchbar.js +++ b/client/salix/src/components/searchbar/searchbar.js @@ -1,12 +1,10 @@ import ngModule from '../../module'; export default class Controller { - constructor($element, $scope, $document, $compile, vnPopover, $timeout, $state, $transitions) { + constructor($element, $scope, $compile, $timeout, $state, $transitions) { this.element = $element[0]; - this.$scope = $scope; - this.$document = $document; + this.$ = $scope; this.$compile = $compile; - this.vnPopover = vnPopover; this.$timeout = $timeout; this.stringSearch = ''; this.$state = $state; @@ -91,23 +89,32 @@ export default class Controller { filter = this.getFiltersFromString(this.stringSearch); } - this.child = this.vnPopover.showComponent(this.popover, this.$scope, this.element); + this.$child = this.$compile(`<${this.popover}/>`)(this.$.$new()); - // XXX: ¿Existe una forma más adecuada de acceder al controlador de un componente? - var childCtrl = angular.element(this.child).isolateScope().$ctrl; + var childCtrl = this.$child.isolateScope().$ctrl; childCtrl.filter = Object.assign({}, filter); childCtrl.onSubmit = filter => this.onChildSubmit(filter); if (this.data) childCtrl.data = Object.assign({}, this.data); + event.preventDefault(); + + this.$.popover.parent = this.element; + this.$.popover.child = this.$child[0]; + this.$.popover.show(); + } + + onPopoverClose() { + this.$child.scope().$destroy(); + this.$child.remove(); + this.$child = null; } onChildSubmit(filter) { + this.$.popover.hide(); this.stringSearch = this.createStringFromObject(filter); this.clearFilter(); - this.$timeout(() => { - this.onSubmit(); - }); + this.$timeout(() => this.onSubmit()); } onSubmit() { @@ -120,12 +127,6 @@ export default class Controller { if (this.onSearch) this.onSearch(); - if (angular.element(this.child)) { - if (angular.element(this.child).scope()) - angular.element(this.child).scope().$destroy(); - angular.element(this.child).remove(); - } - delete this.child; this.pushFiltersToState(filter); } @@ -139,12 +140,10 @@ export default class Controller { let filter = JSON.parse(decodeURIComponent(this.$state.params.q)); this.stringSearch = this.createStringFromObject(filter); } - this.$timeout(() => { - this.onSubmit(); - }); + this.$timeout(() => this.onSubmit()); } } -Controller.$inject = ['$element', '$scope', '$document', '$compile', 'vnPopover', '$timeout', '$state', '$transitions']; +Controller.$inject = ['$element', '$scope', '$compile', '$timeout', '$state', '$transitions']; ngModule.component('vnSearchbar', { template: require('./searchbar.html'), From 559f5fc3ae38bf882f2d6705526ac96ff3cdd535 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Mon, 19 Mar 2018 16:29:55 +0100 Subject: [PATCH 22/23] #179 ticket observations path --- e2e/helpers/selectors.js | 23 +++++- .../01_create_ticket_observations.spec.js | 77 +++++++++++++++++++ .../common/models/ticketObservation.json | 3 +- 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 e2e/paths/ticket-module/01_create_ticket_observations.spec.js diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 497b8de64..0158b6e27 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -11,7 +11,8 @@ export default { }, moduleAccessView: { clientsSectionButton: `${components.vnModuleContainer}[ui-sref="clients"]`, - itemsSectionButton: `${components.vnModuleContainer}[ui-sref="item.index"]` + itemsSectionButton: `${components.vnModuleContainer}[ui-sref="item.index"]`, + ticketsSectionButton: `${components.vnModuleContainer}[ui-sref="ticket.list"]` }, clientsIndex: { searchClientInput: `${components.vnTextfield}`, @@ -269,5 +270,25 @@ export default { niche: `${components.vnItemSummary} > vn-horizontal:nth-child(2) > vn-one:nth-child(2) > vn-vertical > p:nth-child(2)`, botanical: `${components.vnItemSummary} > vn-horizontal:nth-child(2) > vn-one:nth-child(3) > vn-vertical > p`, barcode: `${components.vnItemSummary} > vn-horizontal:nth-child(2) > vn-one:nth-child(4) > vn-vertical > p` + }, + ticketsIndex: { + createTicketButton: `${components.vnFloatButton}`, + searchResult: `vn-ticket-item a`, + searchTicketInput: `${components.vnTextfield}`, + searchButton: `${components.vnSearchBar} > vn-icon-button > button` + }, + ticketNotes: { + notesButton: `${components.vnMenuItem}[ui-sref="ticket.card.observations"]`, + firstNoteRemoveButton: `${components.vnIcon}[icon="remove_circle_outline"]`, + addNoteButton: `${components.vnIcon}[icon="add_circle"]`, + firstNoteSelect: `${components.vnAutocomplete}[field="ticketObservation.observationTypeFk"] input`, + firstNoteSelectSecondOption: `${components.vnAutocomplete}[field="ticketObservation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`, + firstNoteDisabled: `vn-textfield[label="Observation type"] > div > input`, + firstDescriptionInput: `vn-textfield[label="Description"] > div > input`, + submitNotesButton: `${components.vnSubmit}` + }, + ticketPackages: { + packagesButton: `${components.vnMenuItem}[ui-sref="ticket.card.package.list"]`, + firstPackageSelect: `${components.vnAutocomplete}[label="Package"] input` } }; diff --git a/e2e/paths/ticket-module/01_create_ticket_observations.spec.js b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js new file mode 100644 index 000000000..dfc7053b2 --- /dev/null +++ b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js @@ -0,0 +1,77 @@ +import selectors from '../../helpers/selectors.js'; +import createNightmare from '../../helpers/helpers'; + +describe('create item niche path', () => { + const nightmare = createNightmare(); + + beforeAll(() => { + return nightmare + .waitForLogin('developer'); + }); + + it('should access to the tickets index by clicking the tickets button', () => { + return nightmare + .click(selectors.moduleAccessView.ticketsSectionButton) + .wait(selectors.ticketsIndex.createTicketButton) + .parsedUrl() + .then(url => { + expect(url.hash).toEqual('#!/ticket/list'); + }); + }); + + it('should search for the ticket with id 1', () => { + return nightmare + .wait(selectors.ticketsIndex.searchTicketInput) + .type(selectors.ticketsIndex.searchTicketInput, '1') + .click(selectors.ticketsIndex.searchButton) + .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) + .countSearchResults(selectors.ticketsIndex.searchResult) + .then(result => { + expect(result).toEqual(1); + }); + }); + + it(`should click on the search result to access to the ticket notes`, () => { + return nightmare + .waitForTextInElement(selectors.ticketsIndex.searchResult, '1') + .waitToClick(selectors.ticketsIndex.searchResult) + .waitToClick(selectors.ticketNotes.notesButton) + .waitForURL('observations') + .url() + .then(url => { + expect(url).toContain('observations'); + }); + }); + + it(`should click create a new note and delete a former one`, () => { + return nightmare + .waitToClick(selectors.ticketNotes.firstNoteRemoveButton) + .waitToClick(selectors.ticketNotes.addNoteButton) + .waitToClick(selectors.ticketNotes.firstNoteSelect) + .waitForTextInElement(selectors.ticketNotes.firstNoteSelectSecondOption, 'observation two') + .waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption) + .type(selectors.ticketNotes.firstDescriptionInput, 'description') + .click(selectors.ticketNotes.submitNotesButton) + .waitForSnackbar() + .then(result => { + expect(result).toContain('Data saved!'); + }); + }); + + it(`should confirm the note is the expected one`, () => { + return nightmare + .click(selectors.ticketPackages.packagesButton) + .wait(selectors.ticketPackages.firstPackageSelect) + .click(selectors.ticketNotes.notesButton) + .waitForTextInInput(selectors.ticketNotes.firstNoteDisabled, 'observation two') + .getInputValue(selectors.ticketNotes.firstNoteDisabled) + .then(result => { + expect(result).toEqual('observation two'); + return nightmare + .getInputValue(selectors.ticketNotes.firstDescriptionInput); + }) + .then(result => { + expect(result).toEqual('description'); + }); + }); +}); diff --git a/services/ticket/common/models/ticketObservation.json b/services/ticket/common/models/ticketObservation.json index e5b0169c1..73fb71139 100644 --- a/services/ticket/common/models/ticketObservation.json +++ b/services/ticket/common/models/ticketObservation.json @@ -3,7 +3,8 @@ "base": "VnModel", "options": { "mysql": { - "table": "ticketObservation" + "table": "ticketObservation", + "database": "vn" } }, "properties": { From e08fd21f4c83fb4aa0fff56bfb8bdd2e8e58589d Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Mon, 19 Mar 2018 17:46:28 +0100 Subject: [PATCH 23/23] #203 add isFrozen to fiscal data form --- client/client/src/fiscal-data/fiscal-data.html | 9 ++++++++- e2e/paths/client-module/12_lock_of_verified_data.spec.js | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/client/client/src/fiscal-data/fiscal-data.html b/client/client/src/fiscal-data/fiscal-data.html index b70dd319f..b0493cd25 100644 --- a/client/client/src/fiscal-data/fiscal-data.html +++ b/client/client/src/fiscal-data/fiscal-data.html @@ -89,13 +89,20 @@ + + diff --git a/e2e/paths/client-module/12_lock_of_verified_data.spec.js b/e2e/paths/client-module/12_lock_of_verified_data.spec.js index 764476e62..775e588b1 100644 --- a/e2e/paths/client-module/12_lock_of_verified_data.spec.js +++ b/e2e/paths/client-module/12_lock_of_verified_data.spec.js @@ -61,7 +61,7 @@ describe('lock verified data path', () => { .wait(selectors.clientFiscalData.verifiedDataCheckboxInput) .evaluate(selector => { return document.querySelector(selector).className; - }, 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-horizontal:nth-child(5) > vn-check:nth-child(3) > label') + }, 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-horizontal:nth-child(5) > vn-check:nth-child(4) > label') .then(result => { expect(result).toContain('is-disabled'); }); @@ -452,7 +452,7 @@ describe('lock verified data path', () => { .wait(selectors.clientFiscalData.verifiedDataCheckboxInput) .evaluate(selector => { return document.querySelector(selector).className; - }, 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-horizontal:nth-child(5) > vn-check:nth-child(3) > label') + }, 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-horizontal:nth-child(5) > vn-check:nth-child(4) > label') .then(result => { expect(result).toContain('is-disabled'); });