From 34ace7f5d40c8fc873a046a46c2cdbdbda273252 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 15 Feb 2019 12:34:21 +0100 Subject: [PATCH 01/19] Strict dependency injection enabled --- front/salix/bootstrap.js | 4 +- package-lock.json | 132 +++++++++++++++++++-------------------- 2 files changed, 69 insertions(+), 67 deletions(-) diff --git a/front/salix/bootstrap.js b/front/salix/bootstrap.js index 4509463e7..2b959636d 100644 --- a/front/salix/bootstrap.js +++ b/front/salix/bootstrap.js @@ -13,5 +13,7 @@ export const bootstrap = () => { if (!_element) throw new Error('Element is not defined'); - ng.bootstrap(_element, [appName]); + ng.bootstrap(_element, [appName], { + strictDi: true + }); }; diff --git a/package-lock.json b/package-lock.json index 2d7618fbb..5b72e253f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1274,7 +1274,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -1567,7 +1567,7 @@ }, "util": { "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -1795,7 +1795,7 @@ "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { "cache-base": "^1.0.1", @@ -2167,7 +2167,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -2217,7 +2217,7 @@ }, "buffer": { "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { @@ -2392,7 +2392,7 @@ "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -2436,7 +2436,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -2573,7 +2573,7 @@ "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -2733,7 +2733,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -2807,7 +2807,7 @@ }, "colors": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "resolved": "http://registry.npmjs.org/colors/-/colors-1.1.2.tgz", "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", "dev": true }, @@ -3000,7 +3000,7 @@ }, "content-disposition": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "resolved": "http://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" }, "content-security-policy-builder": { @@ -3269,13 +3269,13 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, "regexpu-core": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "dev": true, "requires": { @@ -3286,13 +3286,13 @@ }, "regjsgen": { "version": "0.2.0", - "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", "dev": true }, "regjsparser": { "version": "0.1.5", - "resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { @@ -3795,7 +3795,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -3922,7 +3922,7 @@ "dependencies": { "fs-extra": { "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { @@ -4464,7 +4464,7 @@ }, "events": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", "dev": true }, @@ -4967,7 +4967,7 @@ }, "file-loader": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "dev": true, "requires": { @@ -5181,7 +5181,7 @@ }, "fs-access": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", "dev": true, "requires": { @@ -5961,7 +5961,7 @@ "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { "global-prefix": "^1.0.1", @@ -6004,7 +6004,7 @@ }, "globby": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "resolved": "http://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { @@ -6049,7 +6049,7 @@ }, "got": { "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { @@ -6226,7 +6226,7 @@ }, "kind-of": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "dev": true }, @@ -6410,7 +6410,7 @@ "dependencies": { "es6-promise": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", "dev": true }, @@ -7160,7 +7160,7 @@ "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "requires": { "is-relative": "^1.0.0", @@ -7209,7 +7209,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -7356,7 +7356,7 @@ }, "is-obj": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, @@ -7387,7 +7387,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -7423,7 +7423,7 @@ "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "requires": { "is-unc-path": "^1.0.0" @@ -7457,7 +7457,7 @@ "is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "requires": { "unc-path-regex": "^0.1.2" @@ -7558,7 +7558,7 @@ }, "jasmine-core": { "version": "2.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "resolved": "http://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", "dev": true }, @@ -7575,7 +7575,7 @@ "jasmine-spec-reporter": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha1-HWMq7ANBZwrTJPkrqEtLMrNeniI=", + "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", "dev": true, "requires": { "colors": "1.1.2" @@ -8059,7 +8059,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -9511,7 +9511,7 @@ }, "media-typer": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "mem": { @@ -9534,7 +9534,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -9657,7 +9657,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minstache": { @@ -9750,7 +9750,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" @@ -9758,7 +9758,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } @@ -9910,7 +9910,7 @@ }, "multipipe": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "resolved": "http://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", "dev": true, "requires": { @@ -10039,7 +10039,7 @@ }, "named-placeholders": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.1.tgz", "integrity": "sha1-O3oNJiA910s6nfTJz7gnsvuQfmQ=", "dev": true, "requires": { @@ -10048,7 +10048,7 @@ "dependencies": { "lru-cache": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz", + "resolved": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz", "integrity": "sha1-2COIrpyWC+y+oMc7uet5tsbOmus=", "dev": true } @@ -10136,7 +10136,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -11006,7 +11006,7 @@ "dependencies": { "minimist": { "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, @@ -11068,7 +11068,7 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, @@ -11084,7 +11084,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -11272,7 +11272,7 @@ }, "path-browserify": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "resolved": "http://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", "dev": true }, @@ -11567,7 +11567,7 @@ }, "pretty-bytes": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { @@ -11656,7 +11656,7 @@ }, "through2": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", "dev": true, "requires": { @@ -12119,7 +12119,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -12525,7 +12525,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -12650,7 +12650,7 @@ "dependencies": { "source-map": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { @@ -12790,7 +12790,7 @@ "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -12977,7 +12977,7 @@ "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { "define-property": "^1.0.0", @@ -13028,7 +13028,7 @@ "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { "kind-of": "^3.2.0" @@ -13358,7 +13358,7 @@ "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { "extend-shallow": "^3.0.0" @@ -13469,7 +13469,7 @@ }, "stream-browserify": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "dev": true, "requires": { @@ -13548,7 +13548,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -13634,7 +13634,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -14015,7 +14015,7 @@ }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { @@ -14185,7 +14185,7 @@ }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { @@ -14457,7 +14457,7 @@ }, "tty-browserify": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "resolved": "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, @@ -14855,7 +14855,7 @@ "useragent": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", - "integrity": "sha1-IX+UOtVAyyEoZYqyP8lg9qiMmXI=", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "dev": true, "requires": { "lru-cache": "4.1.x", @@ -15083,7 +15083,7 @@ }, "vm-browserify": { "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "resolved": "http://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", "dev": true, "requires": { @@ -15571,7 +15571,7 @@ }, "globby": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { @@ -15584,7 +15584,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } From 9a8f418c7bea24e60367a3312eb71ab23177c811 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 15 Feb 2019 13:32:07 +0100 Subject: [PATCH 02/19] Jenkinsfile fixes --- Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 754b7a288..9ae65863d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -136,8 +136,12 @@ pipeline { always { script { if (env.BRANCH_NAME == 'dev') { - junit '*/junitresults.xml' - junit 'junitresults.xml' + try { + junit '*/junitresults.xml' + junit 'junitresults.xml' + } catch (e) { + echo e.toString() + } } if (!env.GIT_COMMITTER_EMAIL) return From 8bed065f62d4dcf042732e4da50ae8af7faa8843 Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 15 Feb 2019 13:59:44 +0100 Subject: [PATCH 03/19] My team checkbox now has three states --- modules/ticket/front/search-panel/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ticket/front/search-panel/index.html b/modules/ticket/front/search-panel/index.html index 56b11304f..c8249880b 100644 --- a/modules/ticket/front/search-panel/index.html +++ b/modules/ticket/front/search-panel/index.html @@ -96,7 +96,8 @@ + field="filter.myTeam" + triple-state="true"> From 4b027f015d5ce55d94ad09219989328c0bf88215 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 15 Feb 2019 15:23:39 +0100 Subject: [PATCH 04/19] Pull request: test 1 --- front/salix/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/front/salix/index.js b/front/salix/index.js index 6788bae07..269fba65d 100644 --- a/front/salix/index.js +++ b/front/salix/index.js @@ -2,3 +2,5 @@ import './module'; import './routes'; import './components'; import './styles'; + +// XXX: Pull request: Test 1 From cb9e2284eb71e49daab48b8e324d348e5334adec Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 15 Feb 2019 17:30:22 +0100 Subject: [PATCH 05/19] styles, imports of titles and traductions added --- front/core/directives/uvc.html | 14 ++++++++------ front/core/directives/uvc.js | 7 ++++++- front/core/directives/uvc.scss | 11 +++++++++++ modules/item/front/index/index.html | 2 +- modules/item/front/index/locale/es.yml | 1 + 5 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 front/core/directives/uvc.scss create mode 100644 modules/item/front/index/locale/es.yml diff --git a/front/core/directives/uvc.html b/front/core/directives/uvc.html index be96cb35e..f7b559cd9 100644 --- a/front/core/directives/uvc.html +++ b/front/core/directives/uvc.html @@ -1,5 +1,5 @@
-
+
- - + + + +
diff --git a/front/core/directives/uvc.js b/front/core/directives/uvc.js index d880162ee..cce9e9ee5 100644 --- a/front/core/directives/uvc.js +++ b/front/core/directives/uvc.js @@ -1,5 +1,6 @@ import ngModule from '../module'; import template from './uvc.html'; +import './uvc.scss'; directive.$inject = ['$http', '$compile', 'vnApp', '$translate']; export function directive($http, $compile, vnApp, $translate) { @@ -7,12 +8,16 @@ export function directive($http, $compile, vnApp, $translate) { let allHeaders = $element[0].querySelectorAll(`vn-th[field], vn-th[th-id]`); let headerList = Array.from(allHeaders); let ids = []; + let titles = {}; headerList.forEach(header => { - ids.push(header.getAttribute('th-id') || header.getAttribute('field')); + let id = header.getAttribute('th-id') || header.getAttribute('field'); + ids.push(id); + titles[id] = header.innerText || id; }); $scope.fields = ids; + $scope.titles = titles; return headerList; } diff --git a/front/core/directives/uvc.scss b/front/core/directives/uvc.scss new file mode 100644 index 000000000..5221b8bdd --- /dev/null +++ b/front/core/directives/uvc.scss @@ -0,0 +1,11 @@ +vn-table vn-dialog[vn-id="uvc"]{ + & > div { + min-width: 18em; + align-items: center; + + } + + vn-button[label="Save"] { + margin: 0 auto; + } +} \ No newline at end of file diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html index 8480dd842..48ca536ec 100644 --- a/modules/item/front/index/index.html +++ b/modules/item/front/index/index.html @@ -61,7 +61,7 @@ {{::item.intrastat}} {{::item.origin}} {{::item.userNickname}} - {{::item.density}} + {{::item.density}} {{::item.taxClass}} Date: Fri, 15 Feb 2019 17:33:03 +0100 Subject: [PATCH 06/19] fixed ng-repeat transition --- front/salix/styles/effects.scss | 6 ++++++ modules/item/front/index/style.scss | 3 ++- modules/order/front/line/style.scss | 3 ++- modules/ticket/front/sale/style.scss | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/front/salix/styles/effects.scss b/front/salix/styles/effects.scss index 9763967c4..948b94dba 100644 --- a/front/salix/styles/effects.scss +++ b/front/salix/styles/effects.scss @@ -22,4 +22,10 @@ %active { background-color: $color-active; color: $color-active-font; +} + +// Disable ng-repeat effects +.ng-enter, .ng-leave { + -webkit-transition: none !important; + transition: none !important } \ No newline at end of file diff --git a/modules/item/front/index/style.scss b/modules/item/front/index/style.scss index a349e1f8e..1cbc88124 100644 --- a/modules/item/front/index/style.scss +++ b/modules/item/front/index/style.scss @@ -29,6 +29,7 @@ vn-item-product { vn-table { img { border-radius: 50%; - max-width: 50px; + width: 50px; + height: 50px; } } \ No newline at end of file diff --git a/modules/order/front/line/style.scss b/modules/order/front/line/style.scss index 0487a360e..31a13d592 100644 --- a/modules/order/front/line/style.scss +++ b/modules/order/front/line/style.scss @@ -2,7 +2,8 @@ vn-order-line{ vn-table { img { border-radius: 50%; - max-width: 50px; + width: 50px; + height: 50px; } } } \ No newline at end of file diff --git a/modules/ticket/front/sale/style.scss b/modules/ticket/front/sale/style.scss index a0d6d24a8..91d793290 100644 --- a/modules/ticket/front/sale/style.scss +++ b/modules/ticket/front/sale/style.scss @@ -83,7 +83,8 @@ vn-ticket-sale { vn-table { img { border-radius: 50%; - max-width: 50px; + width: 50px; + height: 50px; } } .taxes { From 3a560446347df6206252a2ca745f3a3038927bca Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sun, 17 Feb 2019 18:35:29 +0100 Subject: [PATCH 07/19] Jenkinsfile fixes --- Jenkinsfile | 26 +++++++++++++------------- front/salix/index.js | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9ae65863d..450861086 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,9 +28,6 @@ pipeline { case 'test': env.PORT = 5001 break - case 'test': - env.PORT = 5000 - break } switch (env.BRANCH_NAME) { case 'master': @@ -39,7 +36,7 @@ pipeline { case 'test': env.NODE_ENV = 'test' break - case 'dev': + default: env.NODE_ENV = 'development' break } @@ -59,9 +56,10 @@ pipeline { } } stage('Test') { - when { - branch 'dev' - } + when { not { anyOf { + branch 'test' + branch 'master' + }}} environment { NODE_ENV = "" FIREFOX_BIN = "/opt/firefox/firefox-bin" @@ -75,9 +73,10 @@ pipeline { } } stage('Build') { - when { - not { branch 'dev' } - } + when { anyOf { + branch 'test' + branch 'master' + }} environment { CREDS = credentials('docker-registry') } @@ -92,9 +91,10 @@ pipeline { } } stage('Deploy') { - when { - not { branch 'dev' } - } + when { anyOf { + branch 'test' + branch 'master' + }} environment { DOCKER_TLS_VERIFY = 1 } diff --git a/front/salix/index.js b/front/salix/index.js index 269fba65d..67e4505a4 100644 --- a/front/salix/index.js +++ b/front/salix/index.js @@ -3,4 +3,4 @@ import './routes'; import './components'; import './styles'; -// XXX: Pull request: Test 1 +// XXX: Pull request: Test 2 From 51a701c7f414f6df87ea2f28dc46461b17d1868d Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sun, 17 Feb 2019 19:29:02 +0100 Subject: [PATCH 08/19] Jenkins file fixes --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 450861086..612bf4bb4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -135,7 +135,7 @@ pipeline { post { always { script { - if (env.BRANCH_NAME == 'dev') { + if (!['master', 'test'].contains(env.BRANCH_NAME) { try { junit '*/junitresults.xml' junit 'junitresults.xml' From 98a62bed2dc506defad19c3b4acf28650f6867f4 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sun, 17 Feb 2019 19:30:35 +0100 Subject: [PATCH 09/19] Jenkinsfile fixes --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 612bf4bb4..0235a79e5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -135,7 +135,7 @@ pipeline { post { always { script { - if (!['master', 'test'].contains(env.BRANCH_NAME) { + if (!['master', 'test'].contains(env.BRANCH_NAME)) { try { junit '*/junitresults.xml' junit 'junitresults.xml' From 3b0d00332250a7a553979e3629bbdc95808aa4e7 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 18 Feb 2019 08:37:26 +0100 Subject: [PATCH 10/19] treeview refactor & zone #1140 --- front/core/components/check/check.html | 2 +- front/core/components/check/style.scss | 11 +- front/core/components/treeview/child.html | 32 ++-- front/core/components/treeview/child.js | 4 +- front/core/components/treeview/index.js | 112 +++----------- front/core/components/treeview/style.scss | 48 ++++-- .../agency/back/methods/zone-geo/getLeaves.js | 146 +++++++++++------- .../methods/zone-included/toggleIsIncluded.js | 40 ++--- modules/agency/front/calendar/index.js | 2 +- modules/agency/front/location/index.html | 4 +- modules/agency/front/location/index.js | 7 +- 11 files changed, 190 insertions(+), 218 deletions(-) diff --git a/front/core/components/check/check.html b/front/core/components/check/check.html index c2d16005a..0df887f9b 100644 --- a/front/core/components/check/check.html +++ b/front/core/components/check/check.html @@ -1,5 +1,5 @@ .mdl-checkbox { - width: initial; - } & > i { padding-left: 5px; position: absolute; - bottom: 3px; color: $color-font-secondary; - font-size: 20px !important + font-size: 20px !important; + cursor: help + } + + md-checkbox.md-checked .md-icon { + background-color: $color-main; } } diff --git a/front/core/components/treeview/child.html b/front/core/components/treeview/child.html index af5fe128b..8589790ec 100644 --- a/front/core/components/treeview/child.html +++ b/front/core/components/treeview/child.html @@ -1,24 +1,24 @@
    -
  • +
  • - - - + - - - - - - {{::item.name}} - - - +
    + + + {{::item.name}} +
  • diff --git a/front/core/components/treeview/child.js b/front/core/components/treeview/child.js index 5144a829e..b5bdb67e5 100644 --- a/front/core/components/treeview/child.js +++ b/front/core/components/treeview/child.js @@ -10,8 +10,8 @@ class Controller extends Component { this.treeview.onToggle(item); } - select(item) { - this.treeview.onSelection(item); + select(item, value) { + this.treeview.onSelection(item, value); } } diff --git a/front/core/components/treeview/index.js b/front/core/components/treeview/index.js index e732d4347..f73bf3e38 100644 --- a/front/core/components/treeview/index.js +++ b/front/core/components/treeview/index.js @@ -20,72 +20,10 @@ export default class Treeview extends Component { refresh() { this.model.refresh().then(() => { this.data = this.model.data; - console.log(this.data); - this.repaintAll(); }); } - repaintAll() { - let oldData = this.data; - oldData.forEach(node => { - this.repaintAsc(node); - this.repaintDesc(node); - }); - } - - repaintNode(node) { - this.repaintAsc(node); - this.repaintDesc(node); - } - - repaintAsc(node) { - if (!node.parent) return; - - const parent = node.parent; - if ((node.selected || node.included) && !parent.selected) { - parent.included = true; - parent.hasCheckedChilds = true; - } else if (!this.hasCheckedChilds(parent) && !this.hasCheckedParents(node)) - parent.included = false; - - // FIXME - Propagate hasCheckedCHilds - if (!node.selected && this.hasCheckedParents(node)) { - node.included = true; - parent.hasCheckedChilds = false; - } - - if (!this.hasCheckedChilds(node)) - node.hasCheckedChilds = false; - - this.repaintAsc(parent); - } - - repaintDesc(node) { - /* if (node.hasCheckedChilds) - node.included = false; */ - - if (!node.selected && this.hasCheckedChilds(node)) { - node.hasCheckedChilds = true; - node.included = true; - } else if (!node.selected && node.childs && !this.hasCheckedChilds(node)) - node.hasCheckedChilds = false; - - - const childs = node.childs || []; - for (let i = 0; i < childs.length; i++) { - childs[i].included = false; - - if (((node.selected || node.included && this.hasCheckedParents(childs[i])) && !childs[i].selected) && !node.excluded) - childs[i].included = true; - - this.repaintDesc(childs[i]); - } - - if (!node.selected && node.hasCheckedChilds) - node.included = true; - } - - hasCheckedChilds(node) { + /* hasCheckedChilds(node) { if (!node.childs) return false; const childs = node.childs; @@ -105,44 +43,34 @@ export default class Treeview extends Component { return true; return false; - } + } */ - onSelection(item) { - let canBeExcluded = this.hasCheckedChilds(item) || this.hasCheckedParents(item); - - if (!item.selected && item.included && canBeExcluded) - item.excluded = true; - else - item.excluded = false; - - item.selected = !item.selected; - - if (item.selected && item.included) - item.included = false; - - if (this.hasCheckedChilds(item)) - item.hasCheckedChilds = true; - else if (this.childs) - item.hasCheckedChilds = false; - - this.emit('selection', {item}); + onSelection(item, value) { + this.emit('selection', {item, value}); } onToggle(item) { - if (item.childs && item.childs.length == 0) - return; - - if (item.childs) + if (item.active) item.childs = undefined; else { this.model.applyFilter({}, {parentFk: item.id}).then(() => { - item.childs = this.model.data; - item.childs.forEach(child => { - child.parent = item; - }); - this.repaintNode(item); + const newData = this.model.data; + + if (item.childs) { + let childs = item.childs; + childs.forEach(child => { + let index = newData.findIndex(newChild => { + return newChild.id == child.id; + }); + newData[index] = child; + }); + } + + item.childs = newData.sort((a, b) => b.isIncluded - a.isIncluded); }); } + + item.active = !item.active; } } diff --git a/front/core/components/treeview/style.scss b/front/core/components/treeview/style.scss index cf2885e8e..40f35a1e2 100644 --- a/front/core/components/treeview/style.scss +++ b/front/core/components/treeview/style.scss @@ -2,19 +2,21 @@ vn-treeview { ul { - margin: 0; + line-height: 24px; padding: 0; + margin: 0; + li { list-style: none; cursor: pointer; .actions { - padding: 0.5em; + min-width: 24px; } .description { - padding: 0.5em + padding-left: 5px } } @@ -22,28 +24,42 @@ vn-treeview { padding: 0 1.8em; } + li > vn-horizontal { + padding: 5px + } + li > vn-horizontal:hover { background-color: $color-hover-cd } - li.selected > vn-horizontal > .description .text, - li.included > vn-horizontal > .description .text { - font-weight: bold; - color: $color-main; + li.expanded .actions > vn-icon[icon="keyboard_arrow_down"] { + transition: all 0.2s; + transform: rotate(180deg); + } + + li.collapsed .actions > vn-icon[icon="keyboard_arrow_down"] { + transition: all 0.2s; + transform: rotate(0deg); } li.included { - & > vn-horizontal > .description > vn-horizontal > vn-check { - .mdl-checkbox .mdl-checkbox__box-outline, { - border: 2px solid $color-main-medium; - } - fieldset[disabled] .mdl-checkbox .mdl-checkbox__box-outline, .mdl-checkbox.is-disabled .mdl-checkbox__box-outline { - border: 2px solid rgba(0,0,0,.26); - } - .mdl-checkbox .mdl-checkbox__tick-outline { - background: $color-main-medium; + & > vn-horizontal > .description { + color: $color-notice; + font-weight: bold; + + & > vn-check .md-icon { + background-color: $color-notice } } + + } + + li.excluded { + & > vn-horizontal > .description { + color: $color-alert; + font-weight: bold; + + } } } } diff --git a/modules/agency/back/methods/zone-geo/getLeaves.js b/modules/agency/back/methods/zone-geo/getLeaves.js index c0496f765..9f819e83a 100644 --- a/modules/agency/back/methods/zone-geo/getLeaves.js +++ b/modules/agency/back/methods/zone-geo/getLeaves.js @@ -6,12 +6,6 @@ module.exports = Self => { description: 'Returns the first shipped and landed possible for params', accessType: '', accepts: [{ - arg: 'filter', - type: 'Object', - description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', - http: {source: 'query'} - }, - { arg: 'zoneFk', type: 'Number', required: true, @@ -21,6 +15,12 @@ module.exports = Self => { type: 'Number', default: 1, required: false, + }, + { + arg: 'filter', + type: 'Object', + description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', + http: {source: 'query'} }], returns: { type: ['object'], @@ -32,64 +32,106 @@ module.exports = Self => { } }); - Self.getLeaves = async(filter, zoneFk, parentFk = 1) => { + Self.getLeaves = async(zoneFk, parentFk = 1, filter) => { let conn = Self.dataSource.connector; let stmts = []; + let geo = await Self.findById(parentFk); + + stmts.push(`DROP TEMPORARY TABLE IF EXISTS tmp.checkedChilds`); stmts.push(new ParameterizedSQL( - `SELECT lft, rgt, depth + 1 INTO @lft, @rgt, @depth - FROM zoneGeo WHERE id = ?`, [parentFk])); + `CREATE TEMPORARY TABLE tmp.checkedChilds ( + id INT, + name VARCHAR(100), + lft INT, + rgt INT, + depth BIGINT(22), + sons DECIMAL(10, 0), + isIncluded TINYINT + ) ENGINE = MEMORY`)); - stmts.push(`DROP TEMPORARY TABLE IF EXISTS tChilds`); - - let stmt = new ParameterizedSQL( - `CREATE TEMPORARY TABLE tChilds - ENGINE = MEMORY - SELECT id, lft, rgt - FROM zoneGeo pt`); - stmt.merge(conn.makeSuffix(filter)); - - if (!filter.where) { - stmt.merge(`WHERE pt.lft > @lft AND pt.rgt < @rgt - AND pt.depth = @depth`); + if (parentFk === 1) { + stmts.push(new ParameterizedSQL( + `INSERT INTO tmp.checkedChilds + SELECT + zg.id, + zg.name, + zg.lft, + zg.rgt, + zg.depth, + zg.sons, + zi.isIncluded + FROM zoneGeo zg + JOIN zoneIncluded zi ON zi.geoFk = zg.id + AND zoneFk = ?`, [zoneFk])); } - stmts.push(stmt); + let stmt = new ParameterizedSQL( + `SELECT * FROM ( + SELECT + zg.id, + zg.name, + zg.lft, + zg.rgt, + zg.depth, + zg.sons, + IF(ch.id = zg.id, isIncluded, null) isIncluded + FROM zoneGeo zg + JOIN tmp.checkedChilds ch ON zg.lft <= ch.lft AND zg.rgt >= ch.rgt + UNION ALL + SELECT + child.id, + child.name, + child.lft, + child.rgt, + child.depth, + child.sons, + zi.isIncluded + FROM zoneGeo parent + JOIN zoneGeo child ON child.lft > parent.lft + AND child.rgt < parent.rgt + AND child.depth = parent.depth + 1 + LEFT JOIN zoneIncluded zi ON zi.geoFk = child.id + AND zoneFk = ? + WHERE parent.id = ?) AS nst`, [zoneFk, parentFk]); - stmts.push(`DROP TEMPORARY TABLE IF EXISTS tZones`); - stmts.push(new ParameterizedSQL( - `CREATE TEMPORARY TABLE tZones - (INDEX (id)) - ENGINE = MEMORY - SELECT t.id - FROM tChilds t - JOIN zoneGeo zt - ON zt.lft > t.lft AND zt.rgt < t.rgt - JOIN zoneIncluded zi - ON zi.geoFk = zt.id AND zi.zoneFk = ? - GROUP BY t.id`, [zoneFk])); + // Get nodes from depth greather than Origin + stmt.merge(conn.makeSuffix(filter)); + stmt.merge('GROUP BY nst.id'); - const resultIndex = stmts.push(new ParameterizedSQL( - `SELECT - pt.id, - pt.name, - pt.lft, - pt.rgt, - pt.depth, - pt.sons, - ti.id IS NOT NULL hasCheckedChilds, - zi.geoFk IS NOT NULL AS selected, - zi.isIncluded AS excluded - FROM zoneGeo pt - LEFT JOIN vn.zoneIncluded zi - ON zi.geoFk = pt.id AND zi.zoneFk = ? - JOIN tChilds c ON c.id = pt.id - LEFT JOIN tZones ti ON ti.id = pt.id - ORDER BY selected DESC, name`, [zoneFk])) - 1; + const resultIndex = stmts.push(stmt) - 1; const sql = ParameterizedSQL.join(stmts, ';'); const result = await Self.rawStmt(sql); + const nodes = result[resultIndex]; - return result[resultIndex]; + // Get parent nodes + const parentNodes = nodes.filter(element => { + return element.depth === geo.depth + 1; + }); + + const sortedLeaves = parentNodes.sort((a, b) => b.isIncluded - a.isIncluded); + const leaves = Object.assign([], sortedLeaves); + + nestLeaves(leaves); + + function nestLeaves(elements) { + elements.forEach(element => { + element.childs = Object.assign([], getLeaves(element)); + + nestLeaves(element.childs); + }); + } + + function getLeaves(parent) { + let elements = nodes.filter(element => { + return element.lft > parent.lft && element.rgt < parent.rgt + && element.depth === parent.depth + 1; + }); + + return elements; + } + + return leaves; }; }; diff --git a/modules/agency/back/methods/zone-included/toggleIsIncluded.js b/modules/agency/back/methods/zone-included/toggleIsIncluded.js index f93df8b35..0b15a7171 100644 --- a/modules/agency/back/methods/zone-included/toggleIsIncluded.js +++ b/modules/agency/back/methods/zone-included/toggleIsIncluded.js @@ -8,8 +8,8 @@ module.exports = Self => { required: true, }, { - arg: 'geoFk', - type: 'Number', + arg: 'item', + type: 'Object', required: true, }], returns: { @@ -22,31 +22,15 @@ module.exports = Self => { } }); - Self.toggleIsIncluded = async(zoneFk, geoFk) => { - const models = Self.app.models; - const geo = await models.ZoneGeo.findById(geoFk); - const isIncluded = await Self.findOne({ - where: {zoneFk, geoFk} - }); - - const hasCheckedParents = await Self.rawSql( - `SELECT id - FROM vn.zoneGeo zt - JOIN vn.zoneIncluded zi ON zi.geoFk = zt.id - WHERE zt.lft < ? AND zt.rgt > ?`, [geo.lft, geo.rgt] - ); - const hasCheckedChilds = await Self.rawSql( - `SELECT id - FROM vn.zoneGeo zt - JOIN vn.zoneIncluded zi ON zi.geoFk = zt.id - WHERE zt.lft > ? AND zt.rgt < ?`, [geo.lft, geo.rgt] - ); - - const isExcluded = hasCheckedParents.length || hasCheckedChilds.length; - - if (isIncluded) - return Self.destroyAll({zoneFk, geoFk}); - else - return Self.upsert({zoneFk, geoFk, isIncluded: isExcluded}); + Self.toggleIsIncluded = async(zoneFk, item) => { + if (item.isIncluded === null) + return Self.destroyAll({zoneFk, geoFk: item.id}); + else { + return Self.upsert({ + zoneFk: zoneFk, + geoFk: item.id, + isIncluded: item.isIncluded + }); + } }; }; diff --git a/modules/agency/front/calendar/index.js b/modules/agency/front/calendar/index.js index f08a47601..81b07dafe 100644 --- a/modules/agency/front/calendar/index.js +++ b/modules/agency/front/calendar/index.js @@ -33,7 +33,7 @@ class Controller { res.data.forEach(holiday => { events.push({ date: holiday.dated, - color: 'blue-circle', + color: 'red', title: holiday.description || holiday.name, isRemovable: false }); diff --git a/modules/agency/front/location/index.html b/modules/agency/front/location/index.html index 27de3bc1f..4482ff52e 100644 --- a/modules/agency/front/location/index.html +++ b/modules/agency/front/location/index.html @@ -2,7 +2,7 @@ vn-id="model" url="/agency/api/ZoneGeos/getLeaves" filter="::$ctrl.filter" - params="{zoneFk: $ctrl.$stateParams.id, parentFk: 1}"> + params="{zoneFk: $ctrl.$stateParams.id}" auto-load="false">
    @@ -13,7 +13,7 @@ vn-focus> + on-selection="$ctrl.onSelection(item, value)"> diff --git a/modules/agency/front/location/index.js b/modules/agency/front/location/index.js index 92e893297..00b0159ec 100644 --- a/modules/agency/front/location/index.js +++ b/modules/agency/front/location/index.js @@ -22,11 +22,12 @@ class Controller { } } - onSelection(item) { + onSelection(item, isIncluded) { + item.isIncluded = isIncluded; const path = '/agency/api/ZoneIncludeds/toggleIsIncluded'; - const params = {geoFk: item.id, zoneFk: this.zone.id}; + const params = {zoneFk: this.zone.id, item}; this.$http.post(path, params).then(() => { - this.$scope.treeview.repaintNode(item); + }); } } From f56043e7865cecfb0312fbf2920bc3cca4efc353 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 18 Feb 2019 08:38:25 +0100 Subject: [PATCH 11/19] Jenkinsfile fixes --- Jenkinsfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0235a79e5..3d4fc2caa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,9 +36,6 @@ pipeline { case 'test': env.NODE_ENV = 'test' break - default: - env.NODE_ENV = 'development' - break } } echo "Committer: ${env.GIT_COMMITTER_EMAIL}" @@ -124,9 +121,10 @@ pipeline { } } stage('Cleanup') { - when { - not { branch 'dev' } - } + when { anyOf { + branch 'test' + branch 'master' + }} steps { sh 'docker logout $REGISTRY' } From a1364c653c6d15934e0718a570438a3939995b67 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 18 Feb 2019 08:55:58 +0100 Subject: [PATCH 12/19] Jenkinsfile fixes --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3d4fc2caa..30b549181 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,7 @@ pipeline { disableConcurrentBuilds() } environment { + PROJECT_NAME = 'salix' REGISTRY = 'registry.verdnatura.es' DOCKER_HOST_1 = 'vch1.verdnatura.es' DOCKER_HOST_2 = 'vch2.verdnatura.es' @@ -15,7 +16,7 @@ pipeline { stage('Checkout') { steps { script { - env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-') + env.COMPOSE_PROJECT_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" env.GIT_COMMITTER_EMAIL = sh( script: 'git --no-pager show -s --format="%ae"', returnStdout: true From 87fff4e3385add44e7660f9103dcd6d9d3504dbe Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 18 Feb 2019 09:14:39 +0100 Subject: [PATCH 13/19] fixed intermediate on non triple-state checkbox --- front/core/components/check/check.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/front/core/components/check/check.js b/front/core/components/check/check.js index 473128a27..bef95e29d 100644 --- a/front/core/components/check/check.js +++ b/front/core/components/check/check.js @@ -38,9 +38,10 @@ export default class Controller extends Component { } get isIntermediate() { - return this.intermediate - || this.model === null - || this.model === undefined; + if (this.intermediate || (this.tripleState && (this.model === null || this.model === undefined))) + return true; + + return false; } get isChecked() { From 13473e7bec75bbef606a7c168c758e2b04562ff7 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 18 Feb 2019 09:50:09 +0100 Subject: [PATCH 14/19] #1145 item diary no va a la linea actual --- modules/item/front/diary/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/item/front/diary/index.js b/modules/item/front/diary/index.js index c2e5e6bff..a634f3d48 100644 --- a/modules/item/front/diary/index.js +++ b/modules/item/front/diary/index.js @@ -119,8 +119,8 @@ class Controller { } else offsetTop = onPreparationLine.offsetTop - headerHeight; - body.querySelector('ui-view').scrollTop = offsetTop; - + this.$window.scrollTo(0, offsetTop); + console.log(offsetTop); this.ticketFk = null; } From f5759f131b2c56b9c7abd59071c08da2e229c9ec Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 18 Feb 2019 09:50:46 +0100 Subject: [PATCH 15/19] #1145 item diary no va a la linea actual --- modules/item/front/diary/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/item/front/diary/index.js b/modules/item/front/diary/index.js index a634f3d48..e45b8cb50 100644 --- a/modules/item/front/diary/index.js +++ b/modules/item/front/diary/index.js @@ -120,7 +120,6 @@ class Controller { offsetTop = onPreparationLine.offsetTop - headerHeight; this.$window.scrollTo(0, offsetTop); - console.log(offsetTop); this.ticketFk = null; } From cb78a6da65b8dd14bdc2528528bd2fe804af2d2b Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 18 Feb 2019 11:35:16 +0100 Subject: [PATCH 16/19] not being able to translate titles fixed --- front/core/directives/uvc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/core/directives/uvc.js b/front/core/directives/uvc.js index cce9e9ee5..45e04a27b 100644 --- a/front/core/directives/uvc.js +++ b/front/core/directives/uvc.js @@ -13,7 +13,7 @@ export function directive($http, $compile, vnApp, $translate) { headerList.forEach(header => { let id = header.getAttribute('th-id') || header.getAttribute('field'); ids.push(id); - titles[id] = header.innerText || id; + titles[id] = header.innerText || id.charAt(0).toUpperCase() + id.slice(1); }); $scope.fields = ids; From 3adc035cab712a30fb4bbc4edc002c2e448cc9cf Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 18 Feb 2019 12:54:33 +0100 Subject: [PATCH 17/19] #1121 worker.descriptor --- front/core/components/label-value/label-value.js | 15 +++++++++++++++ modules/worker/front/card/index.js | 7 +++++++ modules/worker/front/descriptor/index.html | 11 +++++++---- modules/worker/front/locale/es.yml | 4 ++-- modules/worker/front/summary/index.html | 7 ++++--- modules/worker/front/summary/index.js | 7 +++++++ 6 files changed, 42 insertions(+), 9 deletions(-) diff --git a/front/core/components/label-value/label-value.js b/front/core/components/label-value/label-value.js index ecf3bf4b3..515df45c7 100644 --- a/front/core/components/label-value/label-value.js +++ b/front/core/components/label-value/label-value.js @@ -8,23 +8,37 @@ export default class Controller { this.hasInfo = Boolean($attrs.info); this.info = $attrs.info || null; } + set label(value) { let label = this.element.querySelector('vn-label'); label.textContent = this._.instant(value); this._label = value; } + get label() { return this._label; } + set value(value) { let span = this.element.querySelector('span'); span.title = value; span.textContent = value ? value : '-'; this._value = value; } + get value() { return this._value; } + + get title() { + return this._title; + } + + set title(value) { + let span = this.element.querySelector('span'); + span.title = value; + this._title = value; + } } Controller.$inject = ['$element', '$translate', '$attrs']; @@ -32,6 +46,7 @@ ngModule.component('vnLabelValue', { controller: Controller, template: require('./label-value.html'), bindings: { + title: '@?', label: '@', value: '@' } diff --git a/modules/worker/front/card/index.js b/modules/worker/front/card/index.js index c73c9f8ec..ea1457fc8 100644 --- a/modules/worker/front/card/index.js +++ b/modules/worker/front/card/index.js @@ -25,6 +25,13 @@ class Controller { }, { relation: 'sip', scope: {fields: ['extension']} + }, { + relation: 'department', + scope: { + include: { + relation: 'department' + } + } } ] }; diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html index 315ad7c9c..696f2a22f 100644 --- a/modules/worker/front/descriptor/index.html +++ b/modules/worker/front/descriptor/index.html @@ -10,12 +10,15 @@
    -
    {{$ctrl.worker.firstName}} {{$ctrl.worker.name}}
    +
    + {{$ctrl.worker.firstName}} {{$ctrl.worker.name}} +
    + value="{{$ctrl.worker.user.name}}" + title="{{$ctrl.worker.firstName}} {{$ctrl.worker.name}}"> @@ -24,13 +27,13 @@ value="{{$ctrl.worker.client.fi}}"> + value="{{$ctrl.worker.department.department.name}}"> + value="{{$ctrl.worker.sip.extension}}">