From c59ad4dd9ac5c11ecf667e365443470f278138ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 06:02:01 +0000 Subject: [PATCH 001/358] Bump qs from 6.5.2 to 6.5.3 Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a838afe8f..d7fc25822 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19150,9 +19150,9 @@ } }, "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, "engines": { "node": ">=0.6" @@ -39784,9 +39784,9 @@ "dev": true }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "query-string": { From b311bd8738d191a29c7ad3a3ebf90d0b52f08b3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Dec 2022 16:21:59 +0000 Subject: [PATCH 002/358] Bump express from 4.17.2 to 4.18.2 Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.17.2...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 495 ++++++++++++++++++++++++++++++---------------- 1 file changed, 320 insertions(+), 175 deletions(-) diff --git a/package-lock.json b/package-lock.json index a838afe8f..3b8ff4d3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5785,13 +5785,13 @@ "dev": true }, "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { "node": ">= 0.6" @@ -6857,24 +6857,27 @@ "dev": true }, "node_modules/body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, "dependencies": { - "bytes": "3.1.1", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.6", - "raw-body": "2.4.2", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, "node_modules/body-parser/node_modules/debug": { @@ -6886,17 +6889,29 @@ "ms": "2.0.0" } }, + "node_modules/body-parser/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "node_modules/body-parser/node_modules/qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" }, @@ -7196,9 +7211,9 @@ "dev": true }, "node_modules/bytes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", - "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, "engines": { "node": ">= 0.8" @@ -8074,9 +8089,9 @@ } }, "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true, "engines": { "node": ">= 0.6" @@ -9113,10 +9128,14 @@ } }, "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } }, "node_modules/detect-newline": { "version": "2.1.0", @@ -9404,7 +9423,7 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, "node_modules/ejs": { @@ -9462,7 +9481,7 @@ "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true, "engines": { "node": ">= 0.8" @@ -9993,7 +10012,7 @@ "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, "engines": { "node": ">= 0.6" @@ -10230,38 +10249,39 @@ } }, "node_modules/express": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", - "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "dependencies": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.1", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.1", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.9.6", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.17.2", - "serve-static": "1.14.2", + "send": "0.18.0", + "serve-static": "1.15.0", "setprototypeof": "1.2.0", - "statuses": "~1.5.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -10279,6 +10299,15 @@ "ms": "2.0.0" } }, + "node_modules/express/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -10286,10 +10315,13 @@ "dev": true }, "node_modules/express/node_modules/qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" }, @@ -10317,6 +10349,15 @@ } ] }, + "node_modules/express/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -10672,17 +10713,17 @@ } }, "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" }, "engines": { @@ -10701,9 +10742,18 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/finalhandler/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/find-babel-config": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.2.0.tgz", @@ -10882,7 +10932,7 @@ "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, "engines": { "node": ">= 0.6" @@ -11612,19 +11662,37 @@ "dev": true }, "node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "dependencies": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" } }, "node_modules/http-parser-js": { @@ -16707,7 +16775,7 @@ "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, "engines": { "node": ">= 0.6" @@ -17125,9 +17193,9 @@ "dev": true }, "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, "engines": { "node": ">= 0.6" @@ -17593,9 +17661,9 @@ "dev": true }, "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "dependencies": { "ee-first": "1.1.1" @@ -19225,13 +19293,13 @@ } }, "node_modules/raw-body": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", - "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dev": true, "dependencies": { - "bytes": "3.1.1", - "http-errors": "1.8.1", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, @@ -20173,24 +20241,24 @@ } }, "node_modules/send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", - "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dev": true, "dependencies": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "engines": { "node": ">= 0.8.0" @@ -20208,9 +20276,18 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/send/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -20229,6 +20306,15 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/serialize-javascript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", @@ -20299,15 +20385,15 @@ "dev": true }, "node_modules/serve-static": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", - "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.2" + "send": "0.18.0" }, "engines": { "node": ">= 0.8.0" @@ -22178,7 +22264,7 @@ "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, "engines": { "node": ">= 0.8" @@ -28975,13 +29061,13 @@ "dev": true }, "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" } }, "acorn": { @@ -29828,21 +29914,23 @@ "dev": true }, "body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, "requires": { - "bytes": "3.1.1", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.6", - "raw-body": "2.4.2", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "dependencies": { "debug": { @@ -29854,17 +29942,26 @@ "ms": "2.0.0" } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", - "dev": true + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } } } }, @@ -30123,9 +30220,9 @@ "dev": true }, "bytes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", - "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true }, "cacache": { @@ -30822,9 +30919,9 @@ } }, "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true }, "cookie-signature": { @@ -31651,9 +31748,9 @@ } }, "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true }, "detect-newline": { @@ -31897,7 +31994,7 @@ "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, "ejs": { @@ -31950,7 +32047,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true }, "end-of-stream": { @@ -32343,7 +32440,7 @@ "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true }, "event-pubsub": { @@ -32541,38 +32638,39 @@ } }, "express": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", - "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.1", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.1", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.9.6", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.17.2", - "serve-static": "1.14.2", + "send": "0.18.0", + "serve-static": "1.15.0", "setprototypeof": "1.2.0", - "statuses": "~1.5.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -32587,6 +32685,12 @@ "ms": "2.0.0" } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -32594,16 +32698,25 @@ "dev": true }, "qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", - "dev": true + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true } } }, @@ -32897,17 +33010,17 @@ } }, "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" }, "dependencies": { @@ -32923,7 +33036,13 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true } } @@ -33057,7 +33176,7 @@ "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true }, "from2": { @@ -33627,16 +33746,30 @@ "dev": true }, "http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "requires": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + } } }, "http-parser-js": { @@ -37747,7 +37880,7 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, "memory-fs": { @@ -38096,9 +38229,9 @@ "dev": true }, "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, "neo-async": { @@ -38471,9 +38604,9 @@ "dev": true }, "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "requires": { "ee-first": "1.1.1" @@ -39843,13 +39976,13 @@ "dev": true }, "raw-body": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", - "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dev": true, "requires": { - "bytes": "3.1.1", - "http-errors": "1.8.1", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" } @@ -40586,24 +40719,24 @@ "dev": true }, "send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", - "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dev": true, "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "dependencies": { "debug": { @@ -40618,11 +40751,17 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true } } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -40634,6 +40773,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true } } }, @@ -40703,15 +40848,15 @@ } }, "serve-static": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", - "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.2" + "send": "0.18.0" } }, "set-blocking": { @@ -42250,7 +42395,7 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true }, "unquote": { From f11ffede1436867ebb20a3edf2649664c1f05eea Mon Sep 17 00:00:00 2001 From: Leah Schumann <91956385+lschumann1978@users.noreply.github.com> Date: Wed, 28 Dec 2022 13:20:25 -0500 Subject: [PATCH 003/358] Revert "Merge pull request #897 from Safelite/revert-934-defect" This reverts commit a03c05717f18a5c16170d6f593f74eca3a3183e4. --- .../address-questions.spec.js | 193 ++++++------------ .../address-questions/address-questions.vue | 159 ++++++++++----- 2 files changed, 167 insertions(+), 185 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.spec.js b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.spec.js index 3a7007a0f..c8d24c57e 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.spec.js +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.spec.js @@ -5,7 +5,6 @@ import alert from "@/ux-components/alert/alert"; // Supporting Files import { mount, shallowMount } from "@vue/test-utils"; import { getMountOptions } from "@/helpers/unit-test-helper.js"; -import { storeActions } from "@/constants/store-actions"; import { storeMutations } from "@/constants/store-mutations"; import store from "@/store"; @@ -59,35 +58,6 @@ describe("address-questions.vue", () => { expect(zipCode.exists()).toBe(true); }); - test("Should set this.displayNoMatchWarning to false when it is set to true, if the model if prepopulated", async () => { - // Arrange - const newAddressModel = { - streetAddress: "foo", - city: "foo", - state: "foo", - zipCode: "55555", - }; - const wrapper = shallowMount(addressQuestions, { - propsData: { - modelValue: newAddressModel, - }, - }); - - await wrapper.setData({ - displayNoMatchWarning: true, - }); - expect(wrapper.vm.displayNoMatchWarning).toBeTruthy(); - - // Act - wrapper.vm.$options.watch.addressModel.handler.call( - wrapper.vm, - wrapper.vm.addressModel - ); - - // Assert - expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); - }); - test("Should it set this.showAddressFields to true when the model is prepopulated", async () => { // Arrange // Act @@ -239,81 +209,13 @@ describe("address-questions.vue", () => { ); // Assert - const addressModel = wrapper.vm.addressModel; - expect(addressModel.streetAddress).toEqual("1234 Test Road"); - expect(addressModel.city).toEqual("Columbus"); - expect(addressModel.state).toEqual("OH"); - expect(addressModel.zipCode).toEqual("43215"); - }); - - test("street address is entered, user chooses good result from autocomplete results => alerts are cleared", async () => { - // Arrange - const { wrapper } = setupMocks({}); - await wrapper.setData({ - addressModel: { - streetAddress: "123 Test Street", - }, - displayVerificationWarning: true, - displayNoMatchWarning: true, + wrapper.vm.$nextTick(function () { + const addressModel = wrapper.vm.addressModel; + expect(addressModel.streetAddress).toEqual("1234 Test Road"); + expect(addressModel.city).toEqual("Columbus"); + expect(addressModel.state).toEqual("OH"); + expect(addressModel.zipCode).toEqual("43215"); }); - - let alerts = wrapper.findAllComponents(alert); - alerts.forEach((alert) => expect(alert.isVisible()).toBeTruthy()); - - const selectedPlace = { - address_components: [ - { - long_name: "1234", - short_name: "1234", - types: ["street_number"], - }, - { - long_name: "Test Road", - short_name: "Test Road", - types: ["route"], - }, - { - long_name: "East Columbus", - short_name: "Columbus", - types: ["neighborhood", "political"], - }, - { - long_name: "Columbus", - short_name: "Columbus", - types: ["locality", "political"], - }, - { - long_name: "Franklin County", - short_name: "Franklin County", - types: ["administrative_area_level_2", "political"], - }, - { - long_name: "Ohio", - short_name: "OH", - types: ["administrative_area_level_1", "political"], - }, - { - long_name: "United States", - short_name: "US", - types: ["country", "political"], - }, - { - long_name: "43215", - short_name: "43215", - types: ["postal_code"], - }, - ], - }; - - // Act - autocompleteElement.dispatchEvent( - new CustomEvent("place_changed", { detail: selectedPlace }) - ); - await wrapper.vm.$nextTick(); - - // Assert - alerts = wrapper.findAllComponents(alert); - alerts.forEach((alert) => expect(alert.exists()).toBeFalsy()); }); test("street address is entered, but user clicks away => first result is selected and other fields are filled in", async () => { @@ -413,13 +315,8 @@ describe("address-questions.vue", () => { addressModel: { streetAddress: "123 Test Street", }, - displayVerificationWarning: true, - displayNoMatchWarning: true, }); - let alerts = wrapper.findAllComponents(alert); - alerts.forEach((alert) => expect(alert.isVisible()).toBeTruthy()); - const selectedPlace = place; // Act @@ -434,6 +331,7 @@ describe("address-questions.vue", () => { }); expect(verificationAlert.exists()).toBe(true); expect(verificationAlert.isVisible()).toBe(true); + const noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); expect(noMatchAlert.exists()).toBe(false); } @@ -513,12 +411,12 @@ describe("address-questions.vue", () => { }); describe("noMatch alert is cleared on address change", () => { - test("user sees noMatch warning and enters city => noMatch warning is removed", async () => { + test("user sees noMatch warning and modifies street address => noMatch warning is removed", async () => { // Arrange const { wrapper } = setupMocks({}); - wrapper.setData({ - displayNoMatchWarning: true, + await wrapper.setData({ + matchFound: false, }); await wrapper.vm.$nextTick(); @@ -526,24 +424,53 @@ describe("address-questions.vue", () => { expect(noMatchAlert.exists()).toBeTruthy(); expect(noMatchAlert.isVisible()).toBeTruthy(); - // Act + // // Act wrapper.vm.$options.watch.addressModel.handler.call(wrapper.vm, { - city: "Somewhere", + streetAddress: "LS", + }); + + // Assert + wrapper.vm.$nextTick(function () { + expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); + + noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); + expect(noMatchAlert.exists()).toBeFalsy(); + }); + }); + + test("user sees noMatch warning and enters city => noMatch warning is removed", async () => { + // Arrange + const { wrapper } = setupMocks({}); + + await wrapper.setData({ + matchFound: false, }); await wrapper.vm.$nextTick(); + let noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); + expect(noMatchAlert.exists()).toBeTruthy(); + expect(noMatchAlert.isVisible()).toBeTruthy(); + + // // Act + wrapper.vm.$options.watch.addressModel.handler.call(wrapper.vm, { + city: "LS", + }); + // Assert - expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); - noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); - expect(noMatchAlert.exists()).toBeFalsy(); + wrapper.vm.$nextTick(function () { + expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); + + noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); + expect(noMatchAlert.exists()).toBeFalsy(); + }); }); test("user sees noMatch warning and enters state => noMatch warning is removed", async () => { // Arrange const { wrapper } = setupMocks({}); - wrapper.setData({ - displayNoMatchWarning: true, + await wrapper.setData({ + matchFound: false, }); await wrapper.vm.$nextTick(); @@ -551,24 +478,26 @@ describe("address-questions.vue", () => { expect(noMatchAlert.exists()).toBeTruthy(); expect(noMatchAlert.isVisible()).toBeTruthy(); - // Act + // // Act wrapper.vm.$options.watch.addressModel.handler.call(wrapper.vm, { state: "KO", }); - await wrapper.vm.$nextTick(); // Assert - expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); - noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); - expect(noMatchAlert.exists()).toBeFalsy(); + wrapper.vm.$nextTick(function () { + expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); + + noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); + expect(noMatchAlert.exists()).toBeFalsy(); + }); }); test("user sees noMatch warning and enters zip code => noMatch warning is removed", async () => { // Arrange const { wrapper } = setupMocks({}); - wrapper.setData({ - displayNoMatchWarning: true, + await wrapper.setData({ + matchFound: false, }); await wrapper.vm.$nextTick(); @@ -576,16 +505,18 @@ describe("address-questions.vue", () => { expect(noMatchAlert.exists()).toBeTruthy(); expect(noMatchAlert.isVisible()).toBeTruthy(); - // Act + // // Act wrapper.vm.$options.watch.addressModel.handler.call(wrapper.vm, { zipCode: "12345", }); - await wrapper.vm.$nextTick(); // Assert - expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); - noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); - expect(noMatchAlert.exists()).toBeFalsy(); + wrapper.vm.$nextTick(function () { + expect(wrapper.vm.displayNoMatchWarning).toBeFalsy(); + + noMatchAlert = wrapper.findComponent({ ref: "alertNoMatchWarning" }); + expect(noMatchAlert.exists()).toBeFalsy(); + }); }); }); }); diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue index 74c1866f1..4ad515fbb 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue @@ -12,7 +12,8 @@ aria-haspopup="" hasIcon disableAutoFill - validationRules="street-address-required" /> + validationRules="street-address-required" + @keydown.enter.prevent /> @@ -109,6 +110,10 @@ export default { alertCopyVerificationWarning: "", alertHeadlineNoMatchWarning: "", alertCopyNoMatchWarning: "", + matchingIndirectly: false, + matchFound: null, // null = no attempted match, true = match was found, false = match was not found + enterPressed: false, + isAddressWatchActive: false, // Only deep watch the address model when a match was not found }; }, computed: { @@ -213,11 +218,11 @@ export default { fillInAddress ); - // Wrapping the addressField1 element in the Google Address Autocomplete object - // will cause "autocomplete='off'" which Chrome completely ignores. This event - // handler will set the value to something arbitrary so autofill doesn't work. - // https://stackoverflow.com/a/30976223 addressField1.addEventListener("focus", () => { + // Wrapping the addressField1 element in the Google Address Autocomplete object + // will cause "autocomplete='off'" which Chrome completely ignores. This event + // handler will set the value to something arbitrary so autofill doesn't work. + // https://stackoverflow.com/a/30976223 addressField1.setAttribute("autocomplete", "do-not-autofill"); // Make place results box stick to the input on scroll @@ -229,12 +234,43 @@ export default { } }); + addressField1.addEventListener("keydown", (e) => { + if (e.code === "Enter" || e.code === "NumpadEnter" || e.code === "Tab") { + if (e.code === "Tab") { + self.matchingIndirectly = true; + } else { + self.enterPressed = true; + } + + addressField1.blur(); + } else { + return; + } + }); + addressField1.addEventListener("change", () => { - const hover = document.querySelector(".pac-container .pac-item:hover"); - // if an item has been clicked, do nothing, otherwise get first solution and use Geocoder to get the place - if (hover === null) { + // NOTE: The "place_changed" event of the autocomplete fires after this and will use either the address the user had chosen + // using either the down / up arrows or the address the user was hovering over when they pressed "Enter." + + // If a match has been previously found then do nothing + // OR + // If the user pressed "Enter" then do nothing + if (self.matchFound || self.enterPressed) { + return; + } + + // Get the address that the user clicked on (if any) + const clickedAddress = document.querySelector( + ".pac-container .pac-item:hover" + ); + + // If the Street Address field changed without clicking (i.e. by pressing Tab, or clicking outside the field) + if (clickedAddress === null) { + // Fill-in the address using first item in the list. const item = document.querySelector(".pac-container .pac-item"); if (item != null) { + self.matchingIndirectly = true; + const firstResult = item.textContent; const geocoder = new window.google.maps.Geocoder(); geocoder.geocode( @@ -244,18 +280,12 @@ export default { function (results, status) { if (status === window.google.maps.GeocoderStatus.OK) { fillInAddress(results[0]); - self.displayVerificationWarning = true; - self.displayNoMatchWarning = false; } } ); } else { - self.addressModel.city = ""; - self.addressModel.state = ""; - self.addressModel.zipCode = ""; - self.showAddressFields = true; - self.displayVerificationWarning = false; - self.displayNoMatchWarning = true; + // No addresses found for the input + self.matchFound = false; } } }); @@ -266,50 +296,53 @@ export default { } if (place && place.address_components) { + self.matchFound = true; self.addressModel.streetAddress = ""; - self.showAddressFields = true; + self.$nextTick(function () { + self.showAddressFields = true; - for (const component of place.address_components) { - const componentType = component.types[0]; + for (const component of place.address_components) { + const componentType = component.types[0]; - switch (componentType) { - case "street_number": { - self.addressModel.streetAddress = component.long_name; - break; - } - case "route": { - self.addressModel.streetAddress += - " " + component.short_name; - break; - } - case "locality": { - self.addressModel.city = component.long_name; - break; - } - case "administrative_area_level_1": { - self.addressModel.state = component.short_name; - break; - } - case "postal_code": { - self.addressModel.zipCode = component.long_name; - break; + switch (componentType) { + case "street_number": { + self.addressModel.streetAddress = component.long_name; + break; + } + case "route": { + self.addressModel.streetAddress += + " " + component.short_name; + break; + } + case "locality": { + self.addressModel.city = component.long_name; + break; + } + case "administrative_area_level_1": { + self.addressModel.state = component.short_name; + break; + } + case "postal_code": { + self.addressModel.zipCode = component.long_name; + break; + } } } - } - self.displayVerificationWarning = false; - self.displayNoMatchWarning = false; + self.displayVerificationWarning = self.matchingIndirectly; + + // after showing the address fields, disable the address autocomplete + window.google.maps.event.removeListener(autocompleteListener); + window.google.maps.event.clearInstanceListeners(autocomplete); + addressField1.onchange = null; + const pacContainer = document.querySelector(".pac-container"); + if (pacContainer) { + pacContainer.remove(); + } + }); } else { self.displayVerificationWarning = true; - self.displayNoMatchWarning = false; } - - // after showing the address fields, disable the address autocomplete - window.google.maps.event.removeListener(autocompleteListener); - window.google.maps.event.clearInstanceListeners(autocomplete); - addressField1.onchange = null; - const pacContainer = document.querySelector(".pac-container"); - pacContainer.remove(); } }) .catch(() => { @@ -322,11 +355,29 @@ export default { this.setupAddressLookup(); }, watch: { - addressModel: { + matchFound: { handler(newValue) { - // Clear no match warning on address change - if (newValue.city || newValue.state || newValue.zipCode) { + if (!newValue) { + this.displayNoMatchWarning = true; + + this.addressModel.city = ""; + this.addressModel.state = ""; + this.addressModel.zipCode = ""; + this.showAddressFields = true; + this.displayVerificationWarning = false; + + this.$nextTick(function () { + // Only deep watch the Address Model after a failed match + this.isAddressWatchActive = true; + }); + } + }, + }, + addressModel: { + handler() { + if (this.isAddressWatchActive) { this.displayNoMatchWarning = false; + this.isAddressWatchActive = false; } }, deep: true, From a292b7c8439a281660ed67e215c9c571ec958fbf Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 28 Dec 2022 14:42:17 -0500 Subject: [PATCH 004/358] CSR-997 | new serivce-location page initial setup for the new service-location page, just has header, subheader, footer so far. also created test file --- .../service-location/service-location.spec.js | 3 + .../service-location/service-location.vue | 65 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/layouts/service-location/service-location.spec.js create mode 100644 src/layouts/service-location/service-location.vue diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js new file mode 100644 index 000000000..85555dd59 --- /dev/null +++ b/src/layouts/service-location/service-location.spec.js @@ -0,0 +1,3 @@ +describe("service-location.vue", () => { + test.todo("test this"); +}); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue new file mode 100644 index 000000000..f853727a5 --- /dev/null +++ b/src/layouts/service-location/service-location.vue @@ -0,0 +1,65 @@ + + + From 7c6dea90beba674213c0b5959bae0853128d7354 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 5 Jan 2023 11:36:45 -0500 Subject: [PATCH 005/358] Remove code for camera vin capture. --- .../textbox-question/textbox-question.vue | 53 +------------------ src/constants/store-actions.js | 1 - src/layouts/vin-lookup/vin-lookup.vue | 1 - 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index 7e247b9ba..957f59f36 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -6,12 +6,7 @@ class="form-label" :class="[questionAlignment === 'center' ? 'text-center w-100 mb-5' : '']" v-html="labelText"> -
+
{{ errorMessage }} @@ -83,7 +70,6 @@ export default { questionAlignment: String, // Left or center. Left is default. cornerStyle: String, // Rounded or square. Square is default. includeSearchIcon: Boolean, - includeCameraIcon: Boolean, }, setup(props) { const propsClone = Object.assign({}, props); @@ -120,18 +106,6 @@ export default { errors, }; }, - methods: { - async submitImage(e) { - await this.dispatchStoreAction(storeActions.LOOKUP_VIN_BY_IMAGE, e.target.files[0]) - .then((response) => { - document.getElementById(this.inputId).value = response.data; - }) - .catch((error) => { - console.log(error); - }); - e.target.value = null; - }, - }, computed: { questionText() { return this.getCmsContent(this.cmsWidgetName, "QuestionText"); @@ -209,31 +183,6 @@ export default { display: flex; } } - &.has-camera-icon { - label { - &.camera-icon-input { - position: absolute; - top: 50%; - transform: translateY(-50%); - right: 1rem; - background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.9774 16.5228C17.3559 16.5228 15.1864 18.6621 15.1864 21.3476C15.1864 24.0331 17.3107 26.1724 19.9774 26.1724C22.6441 26.1724 24.7684 24.0331 24.7684 21.3476C24.7684 18.6621 22.6441 16.5228 19.9774 16.5228Z' fill='%231574A1'/%3E%3Cpath d='M38.4181 7.23725H29.8701C29.1469 2.64 24.7684 0 19.9774 0C15.1864 0 10.8531 2.64 10.0847 7.23725H1.58192C0.723164 7.23725 0 7.96553 0 8.83035V33.7738C0 34.6387 0.723164 35.3669 1.58192 35.3669H38.4181C39.2768 35.3669 40 34.6387 40 33.7738V8.83035C40 7.96553 39.2768 7.23725 38.4181 7.23725ZM19.9774 29.7683C15.3672 29.7683 11.5706 25.9904 11.5706 21.3021C11.5706 16.6138 15.3672 12.8814 19.9774 12.8814C24.5876 12.8814 28.3842 16.6593 28.3842 21.3476C28.3842 26.0359 24.6328 29.7683 19.9774 29.7683ZM36.565 14.5655H33.0395V11.0152H36.565V14.5655Z' fill='%231574A1'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: center; - width: 2rem; - height: 100%; - display: flex; - border: none; - background-color: transparent; - &:hover { - cursor: pointer; - } - input[type="file"] { - position: absolute; - left: -9999px; - } - } - } - } } input { &.has-icon { diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 3d9307914..428280d40 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -19,7 +19,6 @@ const storeActions = { LOOKUP_VEHICLE_BY_VIN: "lookupVehicleByVin", LOOKUP_VIN_BY_PLATE: "lookupVinByPlate", LOOKUP_VIN_BY_ADDRESS: "lookupVinByAddress", - LOOKUP_VIN_BY_IMAGE: "lookupVinByImage", GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions", GET_PARTS: "getParts", GET_WIPERS: "getWipers", diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 77c5caa4c..990fd0658 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -19,7 +19,6 @@ validationRules="vin-required|vin-format" :isDisabled="vinPopulatedOnPageLoad" maxLength="17" - includeCameraIcon :mask="vinMask" />
From 2531f12ac3ce483b53cf0d467703934326016a41 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 5 Jan 2023 11:42:03 -0500 Subject: [PATCH 006/358] Remove unneeded method. --- src/store/index.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 1a9356629..0755d5f37 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -522,15 +522,6 @@ export const actions = { }, }); }, - lookupVinByImage(context, image) { - const data = new FormData(); - data.append("file", image); - return globalMethods.callSimpleHttpClient({ - method: endpoints.LookupVinByImage.method, - endpoint: endpoints.LookupVinByImage.url, - payload: data, - }); - }, getVehicleMakes(context, { year }) { return globalMethods.callHttpClient({ method: endpoints.GetVehicleMakes.method, From b3fa9684391376096123ecb06de4423a278f6906 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 5 Jan 2023 11:45:16 -0500 Subject: [PATCH 007/358] Remove unneeded code. --- src/constants/endpoints.js | 4 ---- src/global-methods.js | 19 ------------------- 2 files changed, 23 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 3bba311a1..9f4c60d61 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -122,10 +122,6 @@ const endpoints = { url: "/experiments/api/v1/experiments/run", method: "POST", }, - LookupVinByImage: { - url: "https://slimagetovin.azurewebsites.net/home/FindVIN", - method: "POST", - }, }; export { endpoints }; diff --git a/src/global-methods.js b/src/global-methods.js index 90d7f2cb6..14e5cca0e 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -53,25 +53,6 @@ export default { }); }, - callSimpleHttpClient({ method, endpoint, payload }) { - return new Promise((resolve, reject) => { - axios({ - method: method, - url: endpoint, - data: payload, - crossDomain: true, - headers: { "Access-Control-Allow-Origin": "*" }, - }).then( - (response) => { - return resolve(response); - }, - (error) => { - return reject(error.response); - } - ); - }); - }, - /* istanbul ignore next */ callMockHttpClient({ method, endpoint }) { // For Mock use only! From ca306c76a4edd0968965829f9a5fca38ea90d012 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Fri, 6 Jan 2023 09:25:59 -0500 Subject: [PATCH 008/358] CSR-1041: update logic to fix issue --- src/mixins/vehicle-questions-mixin.js | 37 ++++++++------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index dc1cf0a71..93e57daeb 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -473,35 +473,18 @@ export default { fmgPageValues.PART_QUESTIONS ); - let currentPartsOrQuestions = null; + const allPartsOrQuestions = [ + ...(pageDataCapabilityQuestions?.partsOrQuestions || []), + ...(pageDataMoldingQuestions?.partsOrQuestions || []), + ...(pageDataVehicleParts?.partsOrQuestions || []), + ...(pageDataPartQuestions?.partsOrQuestions || []), + ]; - if ( - this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) && - !!pageDataCapabilityQuestions - ) { - currentPartsOrQuestions = pageDataCapabilityQuestions?.partsOrQuestions; - } else if ( - this.currentPageComesAfterPage(currentPage, fmgPageValues.MOLDING_QUESTIONS) && - !!pageDataMoldingQuestions - ) { - currentPartsOrQuestions = pageDataMoldingQuestions?.partsOrQuestions; - } else if ( - this.currentPageComesAfterPage(currentPage, fmgPageValues.VEHICLE_PARTS) && - !!pageDataVehicleParts - ) { - currentPartsOrQuestions = pageDataVehicleParts?.partsOrQuestions; - } else if ( - this.currentPageComesAfterPage(currentPage, fmgPageValues.PARTS_QUESTIONS) && - !!pageDataPartQuestions - ) { - currentPartsOrQuestions = pageDataPartQuestions?.partsOrQuestions; - } - - const hasPartQuestions = this.hasPartQuestions(currentPartsOrQuestions); + const hasPartQuestions = this.hasPartQuestions(allPartsOrQuestions); const hasGlassLocationWithMultipleParts = - this.hasGlassLocationWithMultipleParts(currentPartsOrQuestions); - const hasChildPartQuestions = this.hasChildPartQuestions(currentPartsOrQuestions); - const hasCapabilityQuestions = this.hasCapabilityQuestions(currentPartsOrQuestions); + this.hasGlassLocationWithMultipleParts(allPartsOrQuestions); + const hasChildPartQuestions = this.hasChildPartQuestions(allPartsOrQuestions); + const hasCapabilityQuestions = this.hasCapabilityQuestions(allPartsOrQuestions); const skipVinLookup = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE); const vin = self.$store.getters.vehicle.vin; From a950382d1529ff26e4a3ec1a02bfdbfa6b9fed51 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Fri, 13 Jan 2023 14:01:19 -0500 Subject: [PATCH 009/358] Add position: absolute to input to fix gap between input and outline. --- src/common-components/base-input-button/base-input-button.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common-components/base-input-button/base-input-button.vue b/src/common-components/base-input-button/base-input-button.vue index 91b36c348..5cc7d3836 100644 --- a/src/common-components/base-input-button/base-input-button.vue +++ b/src/common-components/base-input-button/base-input-button.vue @@ -207,5 +207,6 @@ input { opacity: 0; height: 0.1px; // NOTE: cannot be zero or Safari can't put focus on it width: 0; + position: absolute; } From 22092de90badafc9fe657330854a9db3fda39b40 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Fri, 13 Jan 2023 15:12:04 -0500 Subject: [PATCH 010/358] Fix missing (not displaying) chevron for where's my vin toggle. --- src/layouts/vin-lookup/vin-information/vin-information.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/vin-lookup/vin-information/vin-information.vue b/src/layouts/vin-lookup/vin-information/vin-information.vue index e5b87ebad..9571cb5eb 100644 --- a/src/layouts/vin-lookup/vin-information/vin-information.vue +++ b/src/layouts/vin-lookup/vin-information/vin-information.vue @@ -65,7 +65,8 @@ export default { background-position: right center; margin-left: 0.5rem; width: 16px; - height: auto; + height: 9px; + display: inline-flex; } &.active:after { transform: rotate(180deg); From 95f9be0480f90175451b623c9ed9dc32e1eb6779 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Mon, 16 Jan 2023 15:07:24 -0500 Subject: [PATCH 011/358] Revert "Merge pull request #937 from Safelite/feature/reverting-csr-1050" This reverts commit 416bed076f1a822e6ab71a8ead8422e82831f261. --- .../funnel-sub-header/funnel-sub-header.vue | 8 ++++++-- src/common-components/text-block/text-block.vue | 2 +- src/layouts/estimate/estimate.vue | 6 +++--- src/layouts/quote/quote.vue | 17 +++++++++++------ src/ux-components/text-link/text-link.vue | 5 ++--- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/common-components/funnel-sub-header/funnel-sub-header.vue b/src/common-components/funnel-sub-header/funnel-sub-header.vue index ba977c55a..356e6fb0e 100644 --- a/src/common-components/funnel-sub-header/funnel-sub-header.vue +++ b/src/common-components/funnel-sub-header/funnel-sub-header.vue @@ -1,5 +1,5 @@ diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 7aea041e9..3a82b0362 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -19,17 +19,16 @@ - + :footerButtonText="mobileLocationDisplayText" + @footer-button-event="saveMobileLocationData"> + + + @@ -106,6 +105,9 @@ export default { input.focus(); }); }, + saveMobileLocationData() { + + }, }, computed: { getModalId() { diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index e3b9a767a..478ac8766 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,7 +22,6 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" @footer-button-event="setZip"> -
-
From c9736f6d4ba921c86c9bbceed9ddb07fce73eeb8 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Fri, 27 Jan 2023 14:08:49 -0500 Subject: [PATCH 099/358] CSR-1012 | content group modals on quote page --- .../content-group-modal.vue | 24 --------- src/layouts/quote/quote.vue | 14 ++--- .../mobile-location-modal-questions.vue | 11 ++-- .../vehicle-protected-question.vue | 4 +- .../service-zip-modal-question.vue | 54 +++++++++---------- 5 files changed, 39 insertions(+), 68 deletions(-) diff --git a/src/fmg-components/content-group-modal/content-group-modal.vue b/src/fmg-components/content-group-modal/content-group-modal.vue index ab0bdee86..f0d2ba75a 100644 --- a/src/fmg-components/content-group-modal/content-group-modal.vue +++ b/src/fmg-components/content-group-modal/content-group-modal.vue @@ -60,27 +60,3 @@ export default { }, }; - - diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 21f5753bb..620310d5e 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -29,11 +29,11 @@ digital cmsWidgetName="quoteDisclaimer" justifyText="left" typeStyle="caption" - class="mt-7" /> - - - - + class="mt-4" /> + + + + - + @@ -49,7 +49,7 @@ import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; import { storeActions } from "@/constants/store-actions.js"; import baseMixin from "@/mixins/base-mixin.js"; -import TextBlock from '../../../digital-components/text-block/text-block.vue'; +import TextBlock from "../../../digital-components/text-block/text-block.vue"; // Define Validation Rules defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED)); @@ -105,9 +105,7 @@ export default { input.focus(); }); }, - saveMobileLocationData() { - - }, + saveMobileLocationData() {}, }, computed: { getModalId() { @@ -127,7 +125,6 @@ export default { this.$emit("update:modelValue", newValue); }, }, - }, mounted() {}, components: { @@ -135,7 +132,7 @@ export default { modal, addressQuestions, vehicleProtectedQuestion, - textBlock + textBlock, }, }; diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue index b8c795d5f..68dc5e7b4 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue @@ -18,7 +18,7 @@ export default { name: "vehicle-protected-question", data() { return { - answers: [ "Yes", "No" ], + answers: ["Yes", "No"], }; }, props: { @@ -50,4 +50,4 @@ export default { }, }, }; - \ No newline at end of file + diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 478ac8766..be33ddb86 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,31 +22,31 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" @footer-button-event="setZip"> - - - + + + @@ -152,9 +152,7 @@ export default { if (this.serviceZip && this.serviceZip != 0) { return this.serviceZipState + ", " + this.serviceZip; } - return ( - this.getCmsContent(this.cmsWidgetName, "SubheaderText") || "Enter your service ZIP" - ); + return this.getCmsContent(this.cmsWidgetName, "SubheaderText"); }, footerButtonText() { return this.getCmsContent(this.cmsWidgetName, "FooterText"); From 3abb66cf8edeff5cacd364afd960d58beb2a83d1 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 27 Jan 2023 16:15:35 -0500 Subject: [PATCH 100/358] Got the programmatic opening of modals working on quote page, still need to handle the buttonQuestion issue --- .../button-question/button-question.vue | 4 ++ .../content-group-modal.vue | 4 +- src/layouts/quote/quote.vue | 18 ++++--- .../service-package-question.vue | 4 +- .../service-package-radio.vue | 12 ++++- .../mobile-location-modal-questions.vue | 11 ++-- .../vehicle-protected-question.vue | 4 +- .../service-zip-modal-question.vue | 50 +++++++++---------- 8 files changed, 62 insertions(+), 45 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..7defb5b5d 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -53,6 +53,7 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com :lastValuePushedToGa="lastValuePushedToGa" :setLastValuePushedToGa="setLastValuePushedToGa" :suppressError="suppressError" + @openModal="openModal" v-model="selectedValues" /> @@ -214,6 +215,9 @@ export default { setLastValuePushedToGa(lastValuePushedToGa) { this.lastValuePushedToGa = lastValuePushedToGa; }, + openModal(modalName) { + this.$emit("openModal", modalName); + } }, components: { listButton, diff --git a/src/fmg-components/content-group-modal/content-group-modal.vue b/src/fmg-components/content-group-modal/content-group-modal.vue index ab0bdee86..d9d9da937 100644 --- a/src/fmg-components/content-group-modal/content-group-modal.vue +++ b/src/fmg-components/content-group-modal/content-group-modal.vue @@ -48,11 +48,11 @@ export default { }, methods: { openModal() { - this.$refs[this.ModalName()].openModal(); + this.$refs[this.ModalName].openModal(); }, footerButtonClick() { - this.$refs[this.ModalName()].closeModal(); + this.$refs[this.ModalName].closeModal(); }, }, components: { diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 5a65933b0..b5eb3ff6e 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -1,4 +1,3 @@ -digital @@ -141,6 +142,7 @@ export default { shouldDisplayTierTwoPackage() { return this.frontWipersApplicableForTierTwo || this.rearWiperApplicableForTierTwo; }, + }, methods: { processIfStatements, diff --git a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue index 9738d3dde..8286efde7 100644 --- a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue +++ b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue @@ -29,12 +29,19 @@ + @@ -88,6 +95,9 @@ export default { .split(/(?:)|(?:<\/li>)/g) .filter((lineItem) => lineItem); }, + openModal(modalName) { + this.$emit("openModal", modalName); + } }, }; diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 3a82b0362..6fa8728ba 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -27,7 +27,7 @@ ref="addressQuestions" v-model="mobileQuestionModel.addressQuestions" captureApartmentNumberOrBusinessName="true" /> - + @@ -49,7 +49,7 @@ import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; import { storeActions } from "@/constants/store-actions.js"; import baseMixin from "@/mixins/base-mixin.js"; -import TextBlock from '../../../digital-components/text-block/text-block.vue'; +import TextBlock from "../../../digital-components/text-block/text-block.vue"; // Define Validation Rules defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED)); @@ -105,9 +105,7 @@ export default { input.focus(); }); }, - saveMobileLocationData() { - - }, + saveMobileLocationData() {}, }, computed: { getModalId() { @@ -127,7 +125,6 @@ export default { this.$emit("update:modelValue", newValue); }, }, - }, mounted() {}, components: { @@ -135,7 +132,7 @@ export default { modal, addressQuestions, vehicleProtectedQuestion, - textBlock + textBlock, }, }; diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue index b8c795d5f..68dc5e7b4 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue @@ -18,7 +18,7 @@ export default { name: "vehicle-protected-question", data() { return { - answers: [ "Yes", "No" ], + answers: ["Yes", "No"], }; }, props: { @@ -50,4 +50,4 @@ export default { }, }, }; - \ No newline at end of file + diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 478ac8766..687afa6a6 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,31 +22,31 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" @footer-button-event="setZip"> - - - + + + From 6e5b98058a01da78230c227659a4205eeaf9cfe6 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 30 Jan 2023 15:39:50 -0500 Subject: [PATCH 101/358] CSR-896 Fix regex to error on more than one dot in email address prior to domain extension. --- .../address-lookup/customer-questions/customer-questions.vue | 2 +- src/layouts/estimate/estimate.vue | 2 +- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index 5c8ee6b4e..f73d21b9c 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -56,7 +56,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 0f8508921..e92a0bc9f 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 5b7c0b568..1abf2daf7 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 6db8736c3..b5a39b310 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -145,7 +145,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); From 10e1c9a17293e982d045e81b8a4c47e8244aa9a2 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 30 Jan 2023 16:59:15 -0500 Subject: [PATCH 102/358] Update regex. --- .../address-lookup/customer-questions/customer-questions.vue | 2 +- src/layouts/estimate/estimate.vue | 2 +- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index f73d21b9c..172973e28 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -56,7 +56,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index e92a0bc9f..2efff8d21 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 1abf2daf7..9714e2ead 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index b5a39b310..e118f9664 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -145,7 +145,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); From 9817c7d3282a456ddbca89590c11a915fe5dcffa Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 31 Jan 2023 08:26:18 -0500 Subject: [PATCH 103/358] Add dash to regex. --- .../address-lookup/customer-questions/customer-questions.vue | 2 +- src/layouts/estimate/estimate.vue | 2 +- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index 172973e28..f0b2e9b33 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -56,7 +56,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 2efff8d21..c6d691e16 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 9714e2ead..afa442e09 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index e118f9664..e48f0e42b 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -145,7 +145,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); From 9f363c5ed9007a5b2121916a08a82cab9866060a Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 31 Jan 2023 08:37:14 -0500 Subject: [PATCH 104/358] Checkpoint - Quote page models now opening programatically --- .../button-question/button-question.vue | 9 +++++---- .../address-questions/address-questions.vue | 6 ------ .../service-package-question.vue | 4 ++-- .../service-package-radio/service-package-radio.vue | 12 +++++++----- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 7defb5b5d..7472c95f5 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -53,7 +53,7 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com :lastValuePushedToGa="lastValuePushedToGa" :setLastValuePushedToGa="setLastValuePushedToGa" :suppressError="suppressError" - @openModal="openModal" + @nestedComponentEvent="handleNestedComponentEvent" v-model="selectedValues" /> @@ -215,9 +215,10 @@ export default { setLastValuePushedToGa(lastValuePushedToGa) { this.lastValuePushedToGa = lastValuePushedToGa; }, - openModal(modalName) { - this.$emit("openModal", modalName); - } + handleNestedComponentEvent(event) { + const eventName = event.eventName; + this.$emit(`${eventName}`, event.args); + }, }, components: { listButton, diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue index ff7fb0d9a..ff8e7d7a7 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue @@ -320,7 +320,6 @@ export default { } function fillInAddress(place) { - console.log("fillInAddress"); if (!place) { place = autocomplete.getPlace(); } @@ -416,11 +415,6 @@ export default { } }, }, - "addressModel.streetAddress": { - handler(newValue, oldValue) { - console.log(`I got changed from ${oldValue} to ${newValue}`); - }, - }, }, components: { textboxQuestion, diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 25a0dfb2f..b0f3c1023 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -1,5 +1,6 @@ diff --git a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue index 83f430792..e806ac261 100644 --- a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue +++ b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue @@ -33,7 +33,7 @@ :text="getRouterLinkDisplayTextFromCopy(copy)" href="#!" @click-event=" - $emit('nestedComponentEvent', { + $emit('buttonEvent', { eventName: 'openModal', args: getRouterLinkRouteFromCopy(copy), }) From b0ff984f75a9ef78c87e6299e60b9e602f592daf Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 1 Feb 2023 14:42:10 -0500 Subject: [PATCH 112/358] CSR-1156 move css to appropriate pages. --- .../button-question/button-question.vue | 18 ------------------ .../questions-page-layout.vue | 3 ++- src/layouts/vehicle-parts/vehicle-parts.vue | 10 ++++++++++ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..ec73b348b 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -255,22 +255,4 @@ export default { text-align: center; } } - -.vehicle-parts { - .question-text { - span { - font-size: 0.875rem; - text-align: left; - margin: 0 0 0.5rem 0; - } - } - .question-text { - margin: 0; - } - fieldset { - .ui-radio { - margin: 0; - } - } -} diff --git a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue index f6bb2a656..a900cfba9 100644 --- a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue +++ b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue @@ -98,9 +98,10 @@ export default { .questions-page { .question-text { margin-bottom: 0.5rem; - span { + font-size: 0.875rem; text-align: left; + margin: 0 0 0.5rem 0; } } } diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 5723cd0a8..6df0b7393 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -227,3 +227,13 @@ export default { }, }; + + From bc617b8d793fcf84fc741e193c7313da495fba78 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 2 Feb 2023 13:43:56 -0500 Subject: [PATCH 113/358] Revert "CSR-1156 move css to appropriate pages." This reverts commit b0ff984f75a9ef78c87e6299e60b9e602f592daf. --- .../button-question/button-question.vue | 18 ++++++++++++++++++ .../questions-page-layout.vue | 3 +-- src/layouts/vehicle-parts/vehicle-parts.vue | 10 ---------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index ec73b348b..4c60b0708 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -255,4 +255,22 @@ export default { text-align: center; } } + +.vehicle-parts { + .question-text { + span { + font-size: 0.875rem; + text-align: left; + margin: 0 0 0.5rem 0; + } + } + .question-text { + margin: 0; + } + fieldset { + .ui-radio { + margin: 0; + } + } +} diff --git a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue index a900cfba9..f6bb2a656 100644 --- a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue +++ b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue @@ -98,10 +98,9 @@ export default { .questions-page { .question-text { margin-bottom: 0.5rem; + span { - font-size: 0.875rem; text-align: left; - margin: 0 0 0.5rem 0; } } } diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 6df0b7393..5723cd0a8 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -227,13 +227,3 @@ export default { }, }; - - From db056adf44f8a005780b4f96c3158e6d1fa73d5e Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 2 Feb 2023 13:59:41 -0500 Subject: [PATCH 114/358] CSR-1157 button question change from ISS --- src/digital-components/button-question/button-question.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..e874a40f6 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -209,7 +209,7 @@ export default { }, methods: { formatString(str) { - return str?.replaceAll(" ", "-"); + return String(str).replaceAll(" ", "-"); }, setLastValuePushedToGa(lastValuePushedToGa) { this.lastValuePushedToGa = lastValuePushedToGa; From 5c3937798b9e49a802d554cae704b54eeae277aa Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 2 Feb 2023 15:46:08 -0500 Subject: [PATCH 115/358] Remove unused css. This reverts commit b0ff984f75a9ef78c87e6299e60b9e602f592daf. --- .../button-question/button-question.vue | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..ec73b348b 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -255,22 +255,4 @@ export default { text-align: center; } } - -.vehicle-parts { - .question-text { - span { - font-size: 0.875rem; - text-align: left; - margin: 0 0 0.5rem 0; - } - } - .question-text { - margin: 0; - } - fieldset { - .ui-radio { - margin: 0; - } - } -} From 6ee2e80a23c9b6918ad0176ab4b252fd5356b150 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 2 Feb 2023 16:16:15 -0500 Subject: [PATCH 116/358] CSR-976 always nav back to vin-lookup when vin exists --- src/mixins/vehicle-questions-mixin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 93e57daeb..32739426f 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -493,6 +493,11 @@ export default { ? navigationScenarios.CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS : navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; + if (vin) { + backNavigationScenario = + navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; + } + if ( hasCapabilityQuestions && this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) From adeba5d936c8d873e29e7423aa2a1a9070e93644 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 3 Feb 2023 09:46:54 -0500 Subject: [PATCH 117/358] CSR-976 cleanup back vin condition --- src/mixins/vehicle-questions-mixin.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 32739426f..718f8fc50 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -485,19 +485,13 @@ export default { this.hasGlassLocationWithMultipleParts(allPartsOrQuestions); const hasChildPartQuestions = this.hasChildPartQuestions(allPartsOrQuestions); const hasCapabilityQuestions = this.hasCapabilityQuestions(allPartsOrQuestions); - const skipVinLookup = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE); const vin = self.$store.getters.vehicle.vin; let backNavigationScenario = - !vin || vin === "" || skipVinLookup + !vin || vin === "" ? navigationScenarios.CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS : navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; - if (vin) { - backNavigationScenario = - navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; - } - if ( hasCapabilityQuestions && this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) From 31d787d62d8231d08878efeafb79ca4fd670b899 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Fri, 3 Feb 2023 10:55:12 -0500 Subject: [PATCH 118/358] Refactor method, add prop. --- .../button-question/button-question.vue | 39 +++++++++++++++---- .../glass-part-question.vue | 1 + src/layouts/vehicle-parts/vehicle-parts.vue | 2 +- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index ec73b348b..7e32f6f08 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -5,7 +5,10 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com :class=" isOverflowScrollable ? 'button-question button-question-overflow' : 'button-question' "> -
+
{{ questionText }}
@@ -123,6 +126,7 @@ export default { useTextForValue: Boolean, valueToLogType: String, additionalButtonStyling: String, + isSmallQuestionText: Boolean, }, beforeMount() { if (this.buttonTypeObject) { @@ -136,13 +140,15 @@ export default { }, computed: { getFieldSetClasses() { - if (this.isOverflowScrollable) { - return "container-fluid overflow-scroll position-absolute px-5 pt-1 py-0"; - } else if (this.buttonTypeString == "listCard") { - return "w-100"; - } else { - return ""; - } + const baseClasses = this.isOverflowScrollable + ? "container-fluid overflow-scroll position-absolute px-5 pt-1 py-0" + : this.buttonTypeString == "listCard" + ? "w-100" + : ""; + const withSmallQuestionClass = this.isSmallQuestionText + ? baseClasses + " small-question-text" + : baseClasses; + return withSmallQuestionClass; }, getComponentLoopWrapperClasses() { let classes; @@ -255,4 +261,21 @@ export default { text-align: center; } } +.small-question-text { + &.question-text { + span { + font-size: 0.875rem; + text-align: left; + margin: 1rem 0 0.5rem 0; + } + } + &.question-text { + margin: 0; + } + & fieldset { + .ui-radio { + margin: 0; + } + } +} diff --git a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue index a6f5e3f0a..7317b743d 100644 --- a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue +++ b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue @@ -25,6 +25,7 @@ textPosition="text-start" :loaderEnabled="false" isRequired + isSmallQuestionText :groupName="`${glassLocation}-${glassName}-${selectedTint}`" :validationRules="partValidationRules" />
diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 5723cd0a8..56ac2ed15 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -1,6 +1,6 @@ + + diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 6102373aa..dbce77065 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -30,9 +30,9 @@ v-model="mobileLocationQuestionModel.addressQuestions" captureApartmentNumberOrBusinessName="true" /> + cmsWidgetName="VehicleProtectedQuestionWidget" /> @@ -55,7 +55,6 @@ import baseMixin from "@/mixins/base-mixin.js"; // Define Validation Rules - export default { name: "mobile-location-modal-questions", emits: ["update:modelValue"], // The component emits an event @@ -68,9 +67,9 @@ export default { const modalForm = useForm(); return { - modalForm, - } - }, + modalForm, + }; + }, props: { modelValue: { type: Object, @@ -100,7 +99,7 @@ export default { }, mobileLocationLinkText() { return this.getCmsContent(this.cmsWidgetName, "BodyText"); - }, + }, getModalId() { return "#" + this.modalWidgetName; }, @@ -139,7 +138,6 @@ export default { } else { this.$refs.mobileLocationModal.resetButtonStyle(); } - }, }, @@ -169,5 +167,4 @@ export default { .address-questions { margin-top: 0em; } - diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue index 45b80caa6..3f7636fd1 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue @@ -10,8 +10,6 @@ isRequired /> - - diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 262d6e769..50090769a 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,7 +22,8 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" :headerText="textboxQuestionPrompt" - @footer-button-event="setZip"> + @footer-button-event="setZip" + :modalForm="modalForm"> Date: Mon, 6 Feb 2023 13:48:05 -0500 Subject: [PATCH 123/358] Prettified --- src/digital-components/modal/modal.vue | 6 +++--- .../mobile-location-modal-questions.vue | 2 +- .../service-zip-modal-question.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index b90449ffb..89ff1f8ed 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -60,9 +60,9 @@ export default { async validateAndEmit() { const validationResult = await this.modalForm.validate(); if (validationResult.valid) { - this.$emit('footer-button-event'); - } - + this.$emit("footer-button-event"); + } + this.resetButtonStyle(); }, resetButtonStyle() { diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index fc898fdfb..5dab5edf0 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -123,7 +123,7 @@ export default { this.$refs.mobileLocationModal.closeModal(); }, async setMobileLocation() { - this.closeModal(); + this.closeModal(); }, }, components: { diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 50090769a..d06c4dfda 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -132,7 +132,7 @@ export default { this.resetAlerts(); const zipCodeData = await this.getZipCodeData(this.serviceZipCodeInput); - + if (!zipCodeData.isValid) { this.displayInvalidZipAlert = true; } else if (!zipCodeData.isServiceable) { From 97d347f9c82340f9f12383141e79585b8220f343 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 7 Feb 2023 13:50:24 -0500 Subject: [PATCH 124/358] CSR-1077 supporting items changes This was required to get repair orders to load when the customer didn't progress past the parts page to quote. the load wouldn't have any parts and no chips to indicate repair. --- src/layouts/estimate/estimate.vue | 19 +++++++++++++ .../service-package-question.vue | 28 ++++++++++--------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index f46034412..36a52a2ff 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -223,6 +223,25 @@ export default { } else if (this.$store.getters.order.referralNumber?.length === 6) { await this.navigateForwardWithSingleCarMatch(); } else if (this.isRepair) { + const supportingItemsPromise = await this.dispatchStoreAction( + storeActions.GET_SUPPORTING_ITEMS + ); + + const promiseResultMap = [ + { + resultKey: "supportingItems", + promise: supportingItemsPromise, + }, + ]; + + const resultMap = await settleAllPromises(promiseResultMap); + + this.dispatchStoreAction( + this.storeActions.SAVE_SUPPORTING_ITEMS, + resultMap.supportingItems, + false + ); + // call saveSession here - navigateWithSaving saves too late in the flow await saveSession({}); return this.$router.navigateWithoutSaving( diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 4f543064c..796da19e9 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -42,7 +42,7 @@ export default { }, watch: { availableLineItems() { - if (this.$store.getters.lineItems.supportingItems) { + if (this.$store.getters.lineItems.vaps) { this.selectDefaultPackage(); } }, @@ -212,18 +212,20 @@ export default { selectDefaultPackage() { const vapsFromStore = this.$store.getters.lineItems.vaps; let lowestTierForPackage = packageNames.TIER_ONE; - vapsFromStore.every((vapsItem) => { - let lowestTierForThisItem = this.getLowestTierForThisItem(vapsItem); - if (lowestTierForThisItem === packageNames.TIER_THREE) { - lowestTierForPackage = packageNames.TIER_THREE; - return false; - } else if (lowestTierForThisItem === packageNames.TIER_TWO) { - lowestTierForPackage = packageNames.TIER_TWO; - return true; - } else { - return true; - } - }); + if (vapsFromStore.length > 0) { + vapsFromStore.every((vapsItem) => { + let lowestTierForThisItem = this.getLowestTierForThisItem(vapsItem); + if (lowestTierForThisItem === packageNames.TIER_THREE) { + lowestTierForPackage = packageNames.TIER_THREE; + return false; + } else if (lowestTierForThisItem === packageNames.TIER_TWO) { + lowestTierForPackage = packageNames.TIER_TWO; + return true; + } else { + return true; + } + }); + } this.selectedPackageName = lowestTierForPackage; }, getLowestTierForThisItem(vapsItem) { From c8e7bc79ee87ef7113383bfc45494c504e974f17 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 7 Feb 2023 13:56:31 -0500 Subject: [PATCH 125/358] CSR-1166 | Update navigation rules with Quote page --- src/helpers/heritage-integration/navigation-helper.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 6fa248c63..0e756a8a4 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -28,7 +28,11 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}, existingHerita // If navigating to a specific page, and that page is not part of the vin pages. // Return that page, so that it can navigate like normal. - if (toRoute.query[queryStrings.FMG_PAGE] !== undefined && !isVinRelatedPage(toRoute)) { + if ( + toRoute.query[queryStrings.FMG_PAGE] !== undefined && + toRoute.query[queryStrings.FMG_PAGE] !== fmgPageValues.QUOTE && + !isVinRelatedPage(toRoute) + ) { return overrideYmmsDirectionIfNeeded(toRoute); } @@ -107,6 +111,7 @@ async function getLatestPageForRedirection() { const capabilityQuestionsComponent = await getLazyLoadedComponent( fmgPageValues.CAPABILITY_QUESTIONS ); + const quoteComponent = await getLazyLoadedComponent(fmgPageValues.QUOTE); const skipVin = await skipVinLookup(); @@ -121,7 +126,9 @@ async function getLatestPageForRedirection() { } else if (!estimateComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.VEHICLE_DAMAGE; } else { - if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) { + if (quoteComponent.methods.arePagePrerequisitesValid()) { + return fmgPageValues.QUOTE; + } else if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.CAPABILITY_QUESTIONS; } else if (moldingQuestionsComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.MOLDING_QUESTIONS; From 66f1a0039fafe24aac3bede89c12639bfdefb94b Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Tue, 7 Feb 2023 14:36:07 -0500 Subject: [PATCH 126/358] CSR-1012 | modal loader and improved validation --- src/digital-components/modal/modal.spec.js | 65 ++++--------------- src/digital-components/modal/modal.vue | 10 ++- .../content-group-modal.spec.js | 63 +++++++++++++++++- .../service-zip-modal-question.vue | 10 ++- 4 files changed, 90 insertions(+), 58 deletions(-) diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index 2664accfa..40c1fd44a 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -1,68 +1,31 @@ import { shallowMount } from "@vue/test-utils"; import Modal from "./modal"; +const modalId = "modal-one"; +const footerButtonText = "Sample footer text here."; +const headerText = "Sample header text here."; + describe("modal.vue", () => { - it("Should display header text when HeaderText is defined in the CMS", async () => { - // Act + it("Should display footer button text when footerButtonText is defined", async () => { const wrapper = shallowMount(Modal, { - mixins: [mockMixin], props: { - cmsWidgetName: "test", + modalId: modalId, + footerButtonText: footerButtonText, }, attachTo: document.body, }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["HeaderText"])); + expect(wrapper.html()).toEqual(expect.stringContaining(footerButtonText)); }); - it("Should display subheader text when SubheaderText is defined in the CMS", async () => { - // Act + it("Should display modal header text when headerText is defined", async () => { const wrapper = shallowMount(Modal, { - mixins: [mockMixin], props: { - cmsWidgetName: "test", + modalId: modalId, + footerButtonText: footerButtonText, + headerText: headerText, }, attachTo: document.body, }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["SubheaderText"])); - }); - - it("Should insert image url when Image is defined in the CMS", async () => { - // Act - const wrapper = shallowMount(Modal, { - mixins: [mockMixin], - props: { - cmsWidgetName: "test", - }, - attachTo: document.body, - }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["Image"])); - }); - - it("Should display body text when BodyText is defined in the CMS", async () => { - // Act - const wrapper = shallowMount(Modal, { - mixins: [mockMixin], - props: { - cmsWidgetName: "test", - }, - attachTo: document.body, - }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["BodyText"])); - }); + expect(wrapper.html()).toEqual(expect.stringContaining(headerText)); + }); }); - -const mockMixin = { - methods: { - getCmsContent: jest.fn((widgetName, cmsFieldName) => { - return mockCmsContent[cmsFieldName]; - }), - }, -}; - -const mockCmsContent = { - HeaderText: "Sample header text here.", - SubheaderText: "Sample subheader text here.", - Image: "https://www.sampleImage.sample", - BodyText: "Sample body text here.", - FooterText: "Sample footer text here.", -}; diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 89ff1f8ed..0a87d1633 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -30,7 +30,7 @@ isPrimary class="w-100" ref="buttonMain" - suppressLoader + loaderColor="white" :buttonText="footerButtonText" @click-event="validateAndEmit" /> @@ -58,8 +58,12 @@ export default { }, methods: { async validateAndEmit() { - const validationResult = await this.modalForm.validate(); - if (validationResult.valid) { + if (this.modalForm) { + const validationResult = await this.modalForm.validate(); + if (validationResult.valid) { + this.$emit("footer-button-event"); + } + } else { this.$emit("footer-button-event"); } diff --git a/src/fmg-components/content-group-modal/content-group-modal.spec.js b/src/fmg-components/content-group-modal/content-group-modal.spec.js index 81946c2d0..a8058b2d5 100644 --- a/src/fmg-components/content-group-modal/content-group-modal.spec.js +++ b/src/fmg-components/content-group-modal/content-group-modal.spec.js @@ -1,3 +1,64 @@ +import { mount } from "@vue/test-utils"; +import contentGroupModal from "./content-group-modal"; + describe("content-group-modal.vue", () => { - test.todo("test this"); + it("Should display header text when HeaderText is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["HeaderText"])); + }); + + it("Should display subheader text when SubheaderText is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["SubheaderText"])); + }); + + it("Should insert image url when Image is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["Image"])); + }); + + it("Should display body text when BodyText is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["BodyText"])); + }); }); + +const mockMixin = { + methods: { + getCmsContent: jest.fn((widgetName, cmsFieldName) => { + return mockCmsContent[cmsFieldName]; + }), + }, +}; + +const mockCmsContent = { + HeaderText: "Sample header text here.", + SubheaderText: "Sample subheader text here.", + Image: "https://www.sampleImage.sample", + BodyText: "Sample body text here.", + FooterText: "Sample footer text here.", +}; diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index d06c4dfda..8f0cbd049 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,7 +22,7 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" :headerText="textboxQuestionPrompt" - @footer-button-event="setZip" + @footer-button-event="setZipCode" :modalForm="modalForm"> Date: Wed, 8 Feb 2023 08:22:03 -0500 Subject: [PATCH 127/358] Added code to enable / disable the Footer Button --- src/digital-components/modal/modal.vue | 30 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 89ff1f8ed..e206dd3e3 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -32,7 +32,8 @@ ref="buttonMain" suppressLoader :buttonText="footerButtonText" - @click-event="validateAndEmit" /> + @click-event="validateAndEmit" + :class="isFooterButtonDisabled && 'form-test-invalid'" /> @@ -42,6 +43,7 @@ - \ No newline at end of file From 663682c7a423cec23cbcbfb99b16911a2336731e Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 7 Mar 2023 14:05:15 -0500 Subject: [PATCH 231/358] Added service-type-location component to page --- .../service-location/service-location.vue | 70 +++++++++++++------ 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 777cbde74..e274c120b 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -4,23 +4,32 @@ - - - +
+ + + + +
+ @@ -29,11 +38,15 @@ // Components import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; import mobileLocationModalQuestions from "@/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions"; +import serviceTypeQuestion from "@/layouts/service-location/service-type-question/service-type-question"; import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; -import { Form } from "vee-validate"; +import { Form, defineRule } from "vee-validate"; +import { required, regex } from "@/helpers/validation-rules"; +import { errorMessages } from "@/constants/error-messages"; + import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; @@ -53,6 +66,7 @@ export default { isZipServiceableMobile: null, isZipServiceableInShop: null, mobileFeePart: null, + selectedServiceType: null }; }, async beforeRouteEnter(to, from, next) { @@ -129,11 +143,12 @@ export default { }, methods: { arePagePrerequisitesValid() { - return ( - store.getters.lineItems.supportingItems !== null && - store.getters.order.serviceLocation.zipCode !== null && - store.getters.payment.isInsurance !== null - ); + return true; + // return ( + // store.getters.lineItems.supportingItems !== null && + // store.getters.order.serviceLocation.zipCode !== null && + // store.getters.payment.isInsurance !== null + // ); }, setData(mobileFeePart) { if (mobileFeePart) { @@ -179,6 +194,7 @@ export default { }, components: { serviceZipModalQuestion, + serviceTypeQuestion, mobileLocationModalQuestions, funnelHeader, funnelFooter, @@ -188,3 +204,11 @@ export default { }, }; + + \ No newline at end of file From f6625a6bec484faec3bd9f9717dd815a5b2ca664 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 7 Mar 2023 14:05:42 -0500 Subject: [PATCH 232/358] CSR-1227 fix missing error state on quote page. --- src/styles/common-error-styles.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/styles/common-error-styles.scss b/src/styles/common-error-styles.scss index 8129702fc..97ee939b2 100644 --- a/src/styles/common-error-styles.scss +++ b/src/styles/common-error-styles.scss @@ -136,6 +136,18 @@ html { } } } + //Quote page radio button group + .package-main { + .package-wrapper { + .has-error { + input[type="radio"] { + + .package-label { + border: 1px solid $red; + } + } + } + } + } //Restore to default style if alert box is present .alertError { .has-error { From 54533921035ca7a1fe8c8a9d7917f8e8b698921f Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 7 Mar 2023 14:09:54 -0500 Subject: [PATCH 233/358] Added transition element to mobile-location-modal-questions component --- .../mobile-location-modal-questions.vue | 88 ++++++++++--------- 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 0aa64594d..4308d2b04 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -1,47 +1,51 @@ From 04efdfcd0f031667f272c04816d4643f40ed8265 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 8 Mar 2023 10:11:48 -0500 Subject: [PATCH 235/358] temp chkin --- .../mobile-location-modal-questions.vue | 1 - .../service-location/service-location.vue | 24 +++++++++++-------- .../service-type-question.vue | 13 ++++++++-- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 0aa64594d..598af5438 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -130,7 +130,6 @@ export default { modalFooterText() { return this.getCmsContent(this.modalWidgetName, "FooterText"); }, - addressModel: { get: function () { return this.modelValue.addressQuestions; diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index e274c120b..37a79d9c8 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -13,10 +13,11 @@ modalWidgetName="ServiceZipModalWidget" /> - + - @@ -43,9 +43,7 @@ import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; -import { Form, defineRule } from "vee-validate"; -import { required, regex } from "@/helpers/validation-rules"; -import { errorMessages } from "@/constants/error-messages"; +import { Form } from "vee-validate"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; @@ -66,7 +64,7 @@ export default { isZipServiceableMobile: null, isZipServiceableInShop: null, mobileFeePart: null, - selectedServiceType: null + selectedServiceType: null, }; }, async beforeRouteEnter(to, from, next) { @@ -113,6 +111,8 @@ export default { this.state = newValue.state; this.zipCode = newValue.zipCode; this.isServiceable = newValue.isServiceable; + + console.log(this); }, }, mobileLocationQuestions: { @@ -176,6 +176,10 @@ export default { }); }, resetMobileLocation(updatedServiceZipCode) { + if (!this.$refs.mobileLocationModalQuestions) { + return; + } + this.streetAddress = ""; this.apartmentNumberOrBusinessName = ""; this.city = ""; @@ -210,5 +214,5 @@ export default { & > span { text-align: center; } -} - \ No newline at end of file +} + diff --git a/src/layouts/service-location/service-type-question/service-type-question.vue b/src/layouts/service-location/service-type-question/service-type-question.vue index 359e44547..528f7487b 100644 --- a/src/layouts/service-location/service-type-question/service-type-question.vue +++ b/src/layouts/service-location/service-type-question/service-type-question.vue @@ -17,6 +17,8 @@ diff --git a/src/constants/scheduling.js b/src/constants/scheduling.js new file mode 100644 index 000000000..5e819a7a4 --- /dev/null +++ b/src/constants/scheduling.js @@ -0,0 +1,16 @@ +const monthsOfYear = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", +]; + +export { monthsOfYear }; \ No newline at end of file diff --git a/src/layouts/demo-date-picker/demo-date-picker.vue b/src/layouts/demo-date-picker/demo-date-picker.vue index dead25731..8799d012a 100644 --- a/src/layouts/demo-date-picker/demo-date-picker.vue +++ b/src/layouts/demo-date-picker/demo-date-picker.vue @@ -3,11 +3,17 @@
- -
- - + +
@@ -33,11 +39,27 @@ import baseMixin from "@/mixins/base-mixin"; export default { name: "demo-date-picker", - // data() { - // return { - // todayDate: new Date(), - // }; - // }, + data() { + return { + selectedDate: null, + // selectedDate: { // USE THIS FORMAT FOR A PRE-SELECTED DATE ON LOAD + // year: 2023, + // month: 3, // use 1-based index for months + // date: 21, + // }, + mockSelectableDatesData: [ + { year: 2023, month: 3, date: 4 }, + { year: 2023, month: 3, date: 5 }, + { year: 2023, month: 3, date: 22 }, + { year: 2023, month: 4, date: 13 }, + { year: 2023, month: 4, date: 14 }, + { year: 2023, month: 4, date: 26 }, + { year: 2023, month: 5, date: 21 }, + { year: 2023, month: 5, date: 23 }, + { year: 2023, month: 5, date: 25 }, + ], + }; + }, computed: { todayDate() { const today = new Date(); @@ -48,12 +70,16 @@ export default { arePagePrerequisitesValid() { return true; }, + getAvailableDates(startDate, endDate) { + this.mockSelectableDatesData.push(endDate); + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + // temporary test method that adds endDate to list of selectable dates + return this.mockSelectableDatesData; + }, }, components: { datePicker, funnelHeader, - vehicleBanner, - funnelSubHeader, }, }; From 4d8dc49f97935effdfc70094ca885c3de1e1d7e1 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 15 Mar 2023 09:47:20 -0400 Subject: [PATCH 273/358] WIP --- src/constants/endpoints.js | 4 + .../service-location-helper.js | 3 +- .../mobile-location-modal-questions.vue | 2 +- .../service-location/service-location.vue | 43 +++++++--- .../service-type-question.vue | 83 ++++++++++++------- src/store/index.js | 3 +- 6 files changed, 92 insertions(+), 46 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 0a67c8c96..fc94132d9 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -78,6 +78,10 @@ const endpoints = { url: "/parts/api/v1/parts/mobile-fee", method: "GET", }, + GetServiceabilityDetails: { + url: "/location/serviceability-details", + method: "GET", + }, GetSupportingItems: { url: "/parts/api/v1/parts/supporting-items", method: "POST", diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js index 444147b72..157c28f2b 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js @@ -30,7 +30,6 @@ export async function getPricedMobileFeePart(serviceZipCode) { } export async function getServiceabilityDetails(serviceZipCode, lineItems) { - // Get the Mobile Fee Part const serviceabilityDetails = await baseMixin.methods.dispatchStoreAction( storeActions.GET_SERVICEABILITY_DETAILS, @@ -40,6 +39,6 @@ export async function getServiceabilityDetails(serviceZipCode, lineItems) { }, false ); - const temp = Promise.resolve(serviceabilityDetails) + return Promise.resolve(serviceabilityDetails); } diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index ac1be453d..531f17acf 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -90,7 +90,7 @@ export default { default: () => ({}), }, isZipServiceableMobile: Boolean, - isZipServiceableInShop: Boolean, + isZipServiceableInshop: Boolean, linkWidgetName: String, modalWidgetName: String, alertNonServiceableZipWidgetName: String, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 0fe9e54af..889094264 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -19,6 +19,10 @@ alertClass="alert-warning" /> { - this.zipContainsMilitaryBase = r.containsMilitaryBase; + zipCode: { + async handler(newValue, oldValue) { + if (newValue !== oldValue) { + baseMixin.methods.getZipCodeData(newValue).then((r) => { + this.zipContainsMilitaryBase = r.containsMilitaryBase; + }); + } + + const lineItems = store.getters.order.lineItems; + const serviceabilityDetails = await getServiceabilityDetails({ + serviceZipCode: newValue, + lineItems: lineItems, }); + + this.setServiceabilityDetails(serviceabilityDetails.data); } - }, + } }, components: { alert, diff --git a/src/layouts/service-location/service-type-question/service-type-question.vue b/src/layouts/service-location/service-type-question/service-type-question.vue index f3f73415e..f75ce94cf 100644 --- a/src/layouts/service-location/service-type-question/service-type-question.vue +++ b/src/layouts/service-location/service-type-question/service-type-question.vue @@ -29,8 +29,8 @@ export default { validationRules: String, cmsWidgetName: String, isGlassServiceableMobile: Boolean, - isGlassServiceableInShop: Boolean, - isRecalibrationServiceableInShop: Boolean, + isGlassServiceableInshop: Boolean, + isRecalibrationServiceableInshop: Boolean, isRecalibrationServiceableMobile: Boolean, }, setup() { @@ -49,40 +49,54 @@ export default { }, answersToDisplay() { let filteredAnswers; - if ( - this.isGlassServiceableMobile && - this.isRecalibrationServiceableMobile && - this.isGlassServiceableInShop && - this.isRecalibrationServiceableInShop - ) { + if (this.serviceability == "All") { filteredAnswers = this.answersFromCms; - } else if ( - this.isGlassServiceableMobile && - this.isRecalibrationServiceableMobile && - !this.isGlassServiceableInShop && - !this.isRecalibrationServiceableInShop - ) { - filteredAnswers = this.answersFromCms.filter( - (answer) => answer.Name == "InShop" || answer.Name == "DropOff" - ); - } else if ( - this.isGlassServiceableInShop && - this.isRecalibrationServiceableInShop && - !this.isGlassServiceableMobile && - !this.isRecalibrationServiceableMobile - ) { + } else if (this.serviceability == "MobileOnly") { filteredAnswers = this.answersFromCms.filter((answer) => answer.Name == "Mobile"); - } else if ( - !this.isGlassServiceableInShop && - !this.isRecalibrationServiceableInShop && - !this.isGlassServiceableMobile && - !this.isRecalibrationServiceableMobile - ) { + } else if (this.serviceability == "InshopOnly") { + filteredAnswers = this.answersFromCms.filter( + (answer) => answer.Name == "Inshop" || answer.Name == "DropOff" + ); + } else if (this.serviceability == "None") { filteredAnswers = []; } return filteredAnswers; }, + serviceability() { + let result; + if ( + this.isGlassServiceableMobile && + this.isRecalibrationServiceableMobile && + this.isGlassServiceableInshop && + this.isRecalibrationServiceableInshop + ) { + result = "All"; + } else if ( + !this.isGlassServiceableInshop && + !this.isRecalibrationServiceableInshop && + this.isGlassServiceableMobile && + this.isRecalibrationServiceableMobile + ) { + result = "MobileOnly" + } else if ( + this.isGlassServiceableInshop && + this.isRecalibrationServiceableInshop && + !this.isGlassServiceableMobile && + !this.isRecalibrationServiceableMobile + ) { + result = "InshopOnly" + } else if ( + !this.isGlassServiceableInshop && + !this.isRecalibrationServiceableInshop && + !this.isGlassServiceableMobile && + !this.isRecalibrationServiceableMobile + ) { + result = "None" + } + + return result; + }, selectedValues: { get: function () { return this.modelValue; @@ -92,6 +106,17 @@ export default { }, }, }, + watch: { + serviceability: { + handler(newValue, oldValue) { + if (newValue == "MobileOnly") { + this.selectedValues = "Mobile"; + } else { + this.selectedValues = null; + } + } + } + }, components: { buttonQuestion, }, diff --git a/src/store/index.js b/src/store/index.js index b7f3fcf03..5a0e86846 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -931,8 +931,9 @@ export const actions = { method: endpoints.GetServiceabilityDetails.method, //TODO: Remove Mocky Endpoints //endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable - endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInShop + //endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop //endpoint: "https://run.mocky.io/v3/e2eaa097-6ea5-4906-af53-901edaa94939", // ForcedMobile + endpoint: "https://run.mocky.io/v3/1811a1fe-12a7-48f3-939e-d10a9b77dd25", // All Options }); }, From 2ddd4dc416975731af366e3532cd7a7fa447dea2 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Wed, 15 Mar 2023 09:59:20 -0400 Subject: [PATCH 274/358] CSR-886: format changes and update dependencies --- src/constants/scheduling.js | 2 +- .../date-picker/date-picker.vue | 102 +++++++++++------- .../demo-date-picker/demo-date-picker.vue | 6 +- 3 files changed, 68 insertions(+), 42 deletions(-) diff --git a/src/constants/scheduling.js b/src/constants/scheduling.js index 5e819a7a4..c656ac60a 100644 --- a/src/constants/scheduling.js +++ b/src/constants/scheduling.js @@ -13,4 +13,4 @@ const monthsOfYear = [ "December", ]; -export { monthsOfYear }; \ No newline at end of file +export { monthsOfYear }; diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index 9ff0f5cf7..27426cde0 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -11,7 +11,9 @@
{{ month.monthLabel }} {{ month.yearNum.toString() }}
-
+
= Available
@@ -46,7 +48,13 @@
- + @@ -83,7 +91,8 @@ export default { modelValue: { type: Object, }, - todayOverrideDateString: { // only used for unit tests to override today's date + todayOverrideDateString: { + // only used for unit tests to override today's date type: String, default: null, }, @@ -125,7 +134,7 @@ export default { if (this.isInitialView) { this.isInitialView = false; // 1st click removes hidden styling } else { - this.addMonthData(); // 2nd click adds 1 month data + this.addMonthData(); // 2nd click adds 1 month data } }, setCalendarData() { @@ -135,10 +144,10 @@ export default { // first 0, then 1 for (let i = 0; i <= this.monthsAfterToLoadOffset; i++) { months.push(this.getMonthData(i)); - } + } } else if (this.calendarViewDirection === "past") { // first 0, then -1 - for (let i = 0; i >= (0 - this.monthsAfterToLoadOffset); i--) { + for (let i = 0; i >= 0 - this.monthsAfterToLoadOffset; i--) { months.unshift(this.getMonthData(i)); } } else { @@ -162,28 +171,29 @@ export default { const datesArray = []; const todayDateNum = this.todayDate.getDate(); - if (typeof offset !== 'undefined') { // offset only passed during initial setup with setCalendarData + if (typeof offset !== "undefined") { + // offset only passed during initial setup with setCalendarData yearNum = this.todayDate.getFullYear(); monthIndex = this.todayDate.getMonth() + offset; - if (direction === "future" && offset > 0) { + if (direction === "future" && offset > 0) { while (monthIndex > 11) { monthIndex = monthIndex - 12; yearNum++; } - } else if (direction === "past" && offset < 0) { + } else if (direction === "past" && offset < 0) { while (monthIndex < 0) { monthIndex = 12 + monthIndex; yearNum--; } } - - } else { // used only when adding an additional month + } else { + // used only when adding an additional month if (direction === "future") { // get last day of current calendar data const lastMonthInCalendarData = this.calendarData[this.calendarData.length - 1]; - + if (lastMonthInCalendarData.monthIndex === 11) { monthIndex = 0; yearNum = lastMonthInCalendarData.yearNum + 1; @@ -195,7 +205,7 @@ export default { if (direction === "past") { // get last day of current calendar data const firstMonthInCalendarData = this.calendarData[0]; - + if (firstMonthInCalendarData.monthIndex === 0) { monthIndex = 11; yearNum = firstMonthInCalendarData.yearNum - 1; @@ -204,39 +214,51 @@ export default { yearNum = firstMonthInCalendarData.yearNum; } } - } const todayDayIndex = this.todayDate.getDay(); // get day of week index of today (0-6) - currentWeekStartDateNum = todayDayIndex > todayDateNum ? 1 : todayDateNum - todayDayIndex; // FUTURE + currentWeekStartDateNum = + todayDayIndex > todayDateNum ? 1 : todayDateNum - todayDayIndex; // FUTURE const monthEndDate = new Date(yearNum, monthIndex + 1, 0); // BOTH let monthEndDateNum = monthEndDate.getDate(); // BOTH currentWeekEndDateNum = todayDateNum + 6 - todayDayIndex; // PAST, aka Sat. (ok if it's larger than the month end?) - if (offset === 0 && direction === "past" && monthEndDateNum > currentWeekEndDateNum) monthEndDateNum = currentWeekEndDateNum; // PAST - const monthStartDateNum = (offset === 0 && direction === "future") ? currentWeekStartDateNum : 1; // FUTURE + if (offset === 0 && direction === "past" && monthEndDateNum > currentWeekEndDateNum) + monthEndDateNum = currentWeekEndDateNum; // PAST + const monthStartDateNum = + offset === 0 && direction === "future" ? currentWeekStartDateNum : 1; // FUTURE const monthStartDate = new Date(yearNum, monthIndex, monthStartDateNum); // BOTH const startDateDayIndex = monthStartDate.getDay(); // FUTURE const endDateDayIndex = monthEndDate.getDay(); // PAST - if (typeof offset !== 'undefined') { + if (typeof offset !== "undefined") { + if (offset === 0 && direction === "future") + firstMonthDayTally = monthStartDateNum - startDateDayIndex; // FUTURE (starts low, counts up) + if (offset === 0 && direction === "past") + firstMonthDayTally = currentWeekEndDateNum; // PAST (starts high, counts down) - if (offset === 0 && direction === "future") firstMonthDayTally = monthStartDateNum - startDateDayIndex; // FUTURE (starts low, counts up) - if (offset === 0 && direction === "past") firstMonthDayTally = currentWeekEndDateNum; // PAST (starts high, counts down) - - while (direction === "future" && offset === 0 && firstMonthDayTally < monthEndDateNum) { // FUTURE + while ( + direction === "future" && + offset === 0 && + firstMonthDayTally < monthEndDateNum + ) { + // FUTURE firstMonthDayTally = firstMonthDayTally + 7; this.initialViewRowsTally++; } - while (direction === "past" && offset === 0 && firstMonthDayTally > monthStartDateNum) { // PAST + while ( + direction === "past" && + offset === 0 && + firstMonthDayTally > monthStartDateNum + ) { + // PAST firstMonthDayTally = firstMonthDayTally - 7; this.initialViewRowsTally++; } - if (Math.abs(offset) === 1) { - + if (Math.abs(offset) === 1) { if (this.initialViewRowsTally < this.initialViewRowsToShow) { - initialViewEndDate = 6 - startDateDayIndex + monthStartDateNum; // FUTURE + initialViewEndDate = 6 - startDateDayIndex + monthStartDateNum; // FUTURE initialViewStartDate = monthEndDateNum - endDateDayIndex; // PAST this.initialViewRowsTally++; } else { @@ -248,15 +270,14 @@ export default { initialViewStartDate = initialViewStartDate - 7; this.initialViewRowsTally++; } - } - + } } - + if (this.selectableDates === "custom") { const monthStart = { year: yearNum, month: monthIndex + 1, - date: (offset === 0) ? todayDateNum : monthStartDateNum, + date: offset === 0 ? todayDateNum : monthStartDateNum, }; const monthEnd = { year: monthEndDate.getFullYear(), @@ -270,7 +291,8 @@ export default { // populate datesArray for (let i = monthStartDateNum; i <= monthEndDateNum; i++) { let dayClasses = ""; - const thisDate = { // NOTE: uses monthNum (1-based), NOT monthIndex (0-based) + const thisDate = { + // NOTE: uses monthNum (1-based), NOT monthIndex (0-based) year: yearNum, month: monthIndex + 1, date: i, @@ -284,10 +306,10 @@ export default { if (offset === 0 && i > todayDateNum && direction === "past") { dayClasses += "unavailable-day"; } - if (Math.abs(offset) === 1&& direction === "future" && i > initialViewEndDate) { + if (Math.abs(offset) === 1 && direction === "future" && i > initialViewEndDate) { dayClasses += "day-hidden"; } - if (Math.abs(offset) === 1&& direction === "past" && i < initialViewStartDate) { + if (Math.abs(offset) === 1 && direction === "past" && i < initialViewStartDate) { dayClasses += "day-hidden"; } if (this.selectableDates === "custom" && this.isSelectableDate(thisDate)) { @@ -334,8 +356,13 @@ export default { return isSelectable; }, updateSelectableDates(monthStart, monthEnd) { - this.customSelectableDatesCallback(monthStart, monthEnd)?.forEach(newObj => { - const index = this.selectableDatesData.findIndex(obj => obj.year === newObj.year && obj.month === newObj.month && obj.date === newObj.date); + this.customSelectableDatesCallback(monthStart, monthEnd)?.forEach((newObj) => { + const index = this.selectableDatesData.findIndex( + (obj) => + obj.year === newObj.year && + obj.month === newObj.month && + obj.date === newObj.date + ); if (index === -1) this.selectableDatesData.push(newObj); }); }, @@ -344,7 +371,6 @@ export default { + \ No newline at end of file From d704eee8e8e6b7b113e7db3b2d7f0733398f8d88 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 15 Mar 2023 10:17:11 -0400 Subject: [PATCH 277/358] WIP --- .../service-location/service-location.vue | 4 ++-- .../service-type-question.vue | 21 ++++++------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 889094264..3e8f506d5 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -263,8 +263,8 @@ export default { }); this.setServiceabilityDetails(serviceabilityDetails.data); - } - } + }, + }, }, components: { alert, diff --git a/src/layouts/service-location/service-type-question/service-type-question.vue b/src/layouts/service-location/service-type-question/service-type-question.vue index f75ce94cf..b8f82d35c 100644 --- a/src/layouts/service-location/service-type-question/service-type-question.vue +++ b/src/layouts/service-location/service-type-question/service-type-question.vue @@ -17,8 +17,6 @@ + + From 6039bacf0da8765f0223d20b8f078bf42262397c Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:34:31 -0400 Subject: [PATCH 286/358] Added SERVCE_ADDRESS_REQUIRED Error Msg --- src/constants/error-messages.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 739698861..5631b44c7 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -18,7 +18,6 @@ const errorMessages = { LAST_NAME_REQUIRED: "Please enter your last name", EMAIL_ADDRESS_REQUIRED: "Please enter your email address", EMAIL_ADDRESS_FORMAT: "Please enter a valid email address", - SERVICE_ADDRESS_REQUIRED: "Please enter your service address", SERVICE_ZIP_REQUIRED: "Please enter your service ZIP", SERVICE_ZIP_FORMAT: "Please enter a valid service ZIP", VIN_REQUIRED: "Please enter your VIN", From 0a78965a3772642813a105f543d16ec54f4e0c9f Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:34:31 -0400 Subject: [PATCH 287/358] Revert "Added SERVCE_ADDRESS_REQUIRED Error Msg" This reverts commit 6039bacf0da8765f0223d20b8f078bf42262397c. --- src/constants/error-messages.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 5631b44c7..739698861 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -18,6 +18,7 @@ const errorMessages = { LAST_NAME_REQUIRED: "Please enter your last name", EMAIL_ADDRESS_REQUIRED: "Please enter your email address", EMAIL_ADDRESS_FORMAT: "Please enter a valid email address", + SERVICE_ADDRESS_REQUIRED: "Please enter your service address", SERVICE_ZIP_REQUIRED: "Please enter your service ZIP", SERVICE_ZIP_FORMAT: "Please enter a valid service ZIP", VIN_REQUIRED: "Please enter your VIN", From 80d5f9597077f64afba637883283b1fcf37e1092 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:50:05 -0400 Subject: [PATCH 288/358] Clean up --- .../mobile-location-modal-questions.vue | 40 ----------------- .../service-location/service-location.vue | 45 +++---------------- 2 files changed, 6 insertions(+), 79 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 46cb51d13..586e1c6de 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -22,9 +22,6 @@ cmsWidgetName="MobileFeeDisclaimerWidget" typeStyle="caption" /> -
- {{ errorMessage }} -
+ modalWidgetName="MobileLocationModalWidget" /> @@ -43,7 +42,7 @@ import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; -import { Form, defineRule } from "vee-validate"; +import { Form } from "vee-validate"; // Supporting files import baseMixin from "@/mixins/base-mixin.js"; @@ -51,24 +50,8 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; -import { errorMessages } from "@/constants/error-messages"; import store from "@/store"; -defineRule("service-address-required", (value) => { - const isValid = - value.addressQuestions.streetAddress !== "" && - value.addressQuestions.city !== "" && - value.addressQuestions.state !== "" && - value.addressQuestions.zipCode !== "" && - value.isVehicleProtected !== null; - - if (!isValid) { - return errorMessages.SERVICE_ADDRESS_REQUIRED; - } - - return isValid; -}); - export default { name: "service-location", data() { @@ -156,12 +139,6 @@ export default { this.state = newValue.addressQuestions.state; this.zipCode = newValue.addressQuestions.zipCode; this.isVehicleProtected = newValue.isVehicleProtected; - - // setErrors({ - // mobileLocationQuestions: "" - // }); - - //this.$refs.theForm.setTouched({}); }, }, shouldDisableForwardAction() { @@ -170,7 +147,6 @@ export default { }, methods: { arePagePrerequisitesValid() { - return ( store.getters.lineItems.supportingItems !== null && store.getters.order.serviceLocation.zipCode !== null && @@ -212,9 +188,9 @@ export default { }, }, watch: { - zipCode(newValue, oldValue) { - if (newValue !== oldValue) { - baseMixin.methods.getZipCodeData(newValue).then((r) => { + zipCode(current, previous) { + if (current !== previous) { + baseMixin.methods.getZipCodeData(current).then((r) => { this.zipContainsMilitaryBase = r.containsMilitaryBase; }); } @@ -232,12 +208,3 @@ export default { }, }; - - From 1bc00e31e713cfef5f0e928c269713237aeacab1 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:50:05 -0400 Subject: [PATCH 289/358] Revert "Clean up" This reverts commit 80d5f9597077f64afba637883283b1fcf37e1092. --- .../mobile-location-modal-questions.vue | 40 +++++++++++++++++ .../service-location/service-location.vue | 45 ++++++++++++++++--- 2 files changed, 79 insertions(+), 6 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 586e1c6de..46cb51d13 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -22,6 +22,9 @@ cmsWidgetName="MobileFeeDisclaimerWidget" typeStyle="caption" /> +
+ {{ errorMessage }} +
+ modalWidgetName="MobileLocationModalWidget" + validationRules="service-address-required"/> @@ -42,7 +43,7 @@ import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; -import { Form } from "vee-validate"; +import { Form, defineRule } from "vee-validate"; // Supporting files import baseMixin from "@/mixins/base-mixin.js"; @@ -50,8 +51,24 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; +import { errorMessages } from "@/constants/error-messages"; import store from "@/store"; +defineRule("service-address-required", (value) => { + const isValid = + value.addressQuestions.streetAddress !== "" && + value.addressQuestions.city !== "" && + value.addressQuestions.state !== "" && + value.addressQuestions.zipCode !== "" && + value.isVehicleProtected !== null; + + if (!isValid) { + return errorMessages.SERVICE_ADDRESS_REQUIRED; + } + + return isValid; +}); + export default { name: "service-location", data() { @@ -139,6 +156,12 @@ export default { this.state = newValue.addressQuestions.state; this.zipCode = newValue.addressQuestions.zipCode; this.isVehicleProtected = newValue.isVehicleProtected; + + // setErrors({ + // mobileLocationQuestions: "" + // }); + + //this.$refs.theForm.setTouched({}); }, }, shouldDisableForwardAction() { @@ -147,6 +170,7 @@ export default { }, methods: { arePagePrerequisitesValid() { + return ( store.getters.lineItems.supportingItems !== null && store.getters.order.serviceLocation.zipCode !== null && @@ -188,9 +212,9 @@ export default { }, }, watch: { - zipCode(current, previous) { - if (current !== previous) { - baseMixin.methods.getZipCodeData(current).then((r) => { + zipCode(newValue, oldValue) { + if (newValue !== oldValue) { + baseMixin.methods.getZipCodeData(newValue).then((r) => { this.zipContainsMilitaryBase = r.containsMilitaryBase; }); } @@ -208,3 +232,12 @@ export default { }, }; + + From be31530bfa9990cae45781afa51714f775742936 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:50:05 -0400 Subject: [PATCH 290/358] Revert "Revert "Clean up"" This reverts commit 1bc00e31e713cfef5f0e928c269713237aeacab1. --- .../mobile-location-modal-questions.vue | 40 ----------------- .../service-location/service-location.vue | 45 +++---------------- 2 files changed, 6 insertions(+), 79 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 46cb51d13..586e1c6de 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -22,9 +22,6 @@ cmsWidgetName="MobileFeeDisclaimerWidget" typeStyle="caption" /> -
- {{ errorMessage }} -
+ modalWidgetName="MobileLocationModalWidget" /> @@ -43,7 +42,7 @@ import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; -import { Form, defineRule } from "vee-validate"; +import { Form } from "vee-validate"; // Supporting files import baseMixin from "@/mixins/base-mixin.js"; @@ -51,24 +50,8 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; -import { errorMessages } from "@/constants/error-messages"; import store from "@/store"; -defineRule("service-address-required", (value) => { - const isValid = - value.addressQuestions.streetAddress !== "" && - value.addressQuestions.city !== "" && - value.addressQuestions.state !== "" && - value.addressQuestions.zipCode !== "" && - value.isVehicleProtected !== null; - - if (!isValid) { - return errorMessages.SERVICE_ADDRESS_REQUIRED; - } - - return isValid; -}); - export default { name: "service-location", data() { @@ -156,12 +139,6 @@ export default { this.state = newValue.addressQuestions.state; this.zipCode = newValue.addressQuestions.zipCode; this.isVehicleProtected = newValue.isVehicleProtected; - - // setErrors({ - // mobileLocationQuestions: "" - // }); - - //this.$refs.theForm.setTouched({}); }, }, shouldDisableForwardAction() { @@ -170,7 +147,6 @@ export default { }, methods: { arePagePrerequisitesValid() { - return ( store.getters.lineItems.supportingItems !== null && store.getters.order.serviceLocation.zipCode !== null && @@ -212,9 +188,9 @@ export default { }, }, watch: { - zipCode(newValue, oldValue) { - if (newValue !== oldValue) { - baseMixin.methods.getZipCodeData(newValue).then((r) => { + zipCode(current, previous) { + if (current !== previous) { + baseMixin.methods.getZipCodeData(current).then((r) => { this.zipContainsMilitaryBase = r.containsMilitaryBase; }); } @@ -232,12 +208,3 @@ export default { }, }; - - From 521937c388c2805f05a1539a4c45a89f03c9da5e Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:34:31 -0400 Subject: [PATCH 291/358] Revert "Revert "Added SERVCE_ADDRESS_REQUIRED Error Msg"" This reverts commit 0a78965a3772642813a105f543d16ec54f4e0c9f. --- src/constants/error-messages.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 739698861..5631b44c7 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -18,7 +18,6 @@ const errorMessages = { LAST_NAME_REQUIRED: "Please enter your last name", EMAIL_ADDRESS_REQUIRED: "Please enter your email address", EMAIL_ADDRESS_FORMAT: "Please enter a valid email address", - SERVICE_ADDRESS_REQUIRED: "Please enter your service address", SERVICE_ZIP_REQUIRED: "Please enter your service ZIP", SERVICE_ZIP_FORMAT: "Please enter a valid service ZIP", VIN_REQUIRED: "Please enter your VIN", From 2e7de50c967ca5c457ddac2081fa5417f2e1b8c5 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:34:31 -0400 Subject: [PATCH 292/358] Revert "Added SERVCE_ADDRESS_REQUIRED Error Msg" This reverts commit 6039bacf0da8765f0223d20b8f078bf42262397c. --- src/constants/error-messages.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 5631b44c7..739698861 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -18,6 +18,7 @@ const errorMessages = { LAST_NAME_REQUIRED: "Please enter your last name", EMAIL_ADDRESS_REQUIRED: "Please enter your email address", EMAIL_ADDRESS_FORMAT: "Please enter a valid email address", + SERVICE_ADDRESS_REQUIRED: "Please enter your service address", SERVICE_ZIP_REQUIRED: "Please enter your service ZIP", SERVICE_ZIP_FORMAT: "Please enter a valid service ZIP", VIN_REQUIRED: "Please enter your VIN", From a0ab81acaad470453cd77a618029a22123c16a09 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 17 Mar 2023 14:42:28 -0400 Subject: [PATCH 293/358] Revert "WIP" This reverts commit d4a938f3c3f540c3ef6b81671d0ca799bdb42fd3. --- src/constants/error-messages.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 739698861..5631b44c7 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -18,7 +18,6 @@ const errorMessages = { LAST_NAME_REQUIRED: "Please enter your last name", EMAIL_ADDRESS_REQUIRED: "Please enter your email address", EMAIL_ADDRESS_FORMAT: "Please enter a valid email address", - SERVICE_ADDRESS_REQUIRED: "Please enter your service address", SERVICE_ZIP_REQUIRED: "Please enter your service ZIP", SERVICE_ZIP_FORMAT: "Please enter a valid service ZIP", VIN_REQUIRED: "Please enter your VIN", From 4c60dc054f40b8e241a16ac26762460a34d25df4 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 10:30:36 -0400 Subject: [PATCH 294/358] Added autocomplete and city reset for validation --- .../mobile-location-modal-questions.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 586e1c6de..9ba81f14a 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -158,6 +158,8 @@ export default { // on the service-zip-modal-question component this.$refs[this.modalName].form.resetForm({ values: { + autocomplete: updatedServiceZipCodeInfo.streetAddress, + city: updatedServiceZipCodeInfo.city, state: updatedServiceZipCodeInfo.state, zipCode: updatedServiceZipCodeInfo.zipCode, isVehicleProtected: updatedServiceZipCodeInfo.isVehicleProtected, @@ -197,6 +199,8 @@ export default { this.internalModel = deepClone(newValue); this.resetComponent({ + autocomplete: updatedServiceZipCodeInfo.streetAddress, + city: updatedServiceZipCodeInfo.city, state: newValue.addressQuestions.state, zipCode: newValue.addressQuestions.zipCode, isVehicleProtected: newValue.isVehicleProtected, From 14541d110c0ddcd0216eb76e4ea6ba4a61dfcdbf Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 16 Mar 2023 16:00:08 -0400 Subject: [PATCH 295/358] Updates for emitting contains military zip --- .../service-location/service-location.spec.js | 12 ++++++---- .../service-location/service-location.vue | 22 +++++++------------ .../service-zip-modal-question.vue | 3 +++ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 0653e91f0..b48fa2f06 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -319,11 +319,15 @@ describe("service-location.vue", () => { state: "OH", }; - // Assert - wrapper.setData({ zipCode: newServiceZipCodeQuestion.zipCode }); - wrapper.vm.$nextTick(() => { - expect(wrapper.vm.zipContainsMilitaryBase).toBe(true); + const serviceZipCodeComponent = wrapper.findComponent({ + ref: "serviceZipCodeQuestion", }); + + // Act + serviceZipCodeComponent.vm.$emit("updated-contains-military-base", true); + + // Assert + expect(wrapper.vm.zipContainsMilitaryBase).toBe(true); }); }); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 58f440708..732b0f0b1 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -10,7 +10,8 @@ :mobileFeePart="mobileFeePart" @updated-mobile-fee-part="setMobileFeePart" linkWidgetName="ServiceZipLinkWidget" - modalWidgetName="ServiceZipModalWidget" /> + modalWidgetName="ServiceZipModalWidget" + @updated-contains-military-base="setContainsMilitaryBase" /> @@ -141,9 +142,6 @@ export default { this.isVehicleProtected = newValue.isVehicleProtected; }, }, - shouldDisableForwardAction() { - return this.zipContainsMilitaryBase; - }, }, methods: { arePagePrerequisitesValid() { @@ -158,6 +156,11 @@ export default { this.mobileFeePart = mobileFeePart; } }, + setContainsMilitaryBase(val) { + if (this.zipContainsMilitaryBase !== val) { + this.zipContainsMilitaryBase = val; + } + }, getServiceAddressFromStore() { return store.getters.order.serviceLocation.address; }, @@ -187,15 +190,6 @@ export default { navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal }); }, }, - watch: { - zipCode(current, previous) { - if (current !== previous) { - baseMixin.methods.getZipCodeData(current).then((r) => { - this.zipContainsMilitaryBase = r.containsMilitaryBase; - }); - } - }, - }, components: { alert, serviceZipModalQuestion, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 0d2c35000..1b665b5d5 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -44,6 +44,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi export default { name: "service-zip-modal-question", emits: ["update:modelValue", "updated-mobile-fee-part"], + emits: ["updated-contains-military-base"], data() { return { internalModel: this.copyModel(this.modelValue), @@ -160,6 +161,8 @@ export default { // Update the page level model this.$emit("update:modelValue", this.internalModel); + this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); + this.closeModal(); } }, From 12c5d684d800df90f87a9e4aabb6c64160413573 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 10:46:02 -0400 Subject: [PATCH 296/358] Minor correction to previous commit --- .../mobile-location-modal-questions.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 9ba81f14a..2974254b3 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -199,7 +199,7 @@ export default { this.internalModel = deepClone(newValue); this.resetComponent({ - autocomplete: updatedServiceZipCodeInfo.streetAddress, + streetAddress: updatedServiceZipCodeInfo.streetAddress, city: updatedServiceZipCodeInfo.city, state: newValue.addressQuestions.state, zipCode: newValue.addressQuestions.zipCode, From c4f0624f10783aef909cd85a9b557229460b106d Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 16 Mar 2023 16:49:14 -0400 Subject: [PATCH 297/358] Contains Military zip emit on Location questions modal --- .../mobile-location-modal-questions.vue | 2 ++ src/layouts/service-location/service-location.vue | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 586e1c6de..78d1cc672 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -65,6 +65,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi export default { name: "mobile-location-modal-questions", emits: ["update:modelValue", "updated-mobile-fee-part"], + emits: ["update:modelValue", "updated-zip-code", "updated-contains-military-base"], // The component emits an event data() { return { internalModel: deepClone(this.modelValue), @@ -187,6 +188,7 @@ export default { // Update the page level model this.$emit("update:modelValue", this.internalModel); + this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); this.closeModal(); } }, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 732b0f0b1..5969ac216 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -10,12 +10,12 @@ :mobileFeePart="mobileFeePart" @updated-mobile-fee-part="setMobileFeePart" linkWidgetName="ServiceZipLinkWidget" - modalWidgetName="ServiceZipModalWidget" + modalWidgetName="ServiceZipModalWidget" @updated-contains-military-base="setContainsMilitaryBase" /> + modalWidgetName="MobileLocationModalWidget" + @updated-contains-military-base="setContainsMilitaryBase" /> Date: Mon, 20 Mar 2023 10:49:12 -0400 Subject: [PATCH 298/358] Updates after merge --- .../mobile-location-modal-questions.vue | 3 +-- .../service-zip-modal-question/service-zip-modal-question.vue | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 78d1cc672..8773b5daf 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -64,8 +64,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi export default { name: "mobile-location-modal-questions", - emits: ["update:modelValue", "updated-mobile-fee-part"], - emits: ["update:modelValue", "updated-zip-code", "updated-contains-military-base"], // The component emits an event + emits: ["update:modelValue", "updated-mobile-fee-part", "updated-contains-military-base"], // The component emits an event data() { return { internalModel: deepClone(this.modelValue), diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 1b665b5d5..174b74523 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -43,8 +43,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi export default { name: "service-zip-modal-question", - emits: ["update:modelValue", "updated-mobile-fee-part"], - emits: ["updated-contains-military-base"], + emits: ["update:modelValue", "updated-mobile-fee-part", "updated-contains-military-base"], data() { return { internalModel: this.copyModel(this.modelValue), From 9fd6a08dd8ea1f71bfae6aa3f3821c20312e1629 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 20 Mar 2023 11:00:31 -0400 Subject: [PATCH 299/358] remove comment that was removed previously --- .../mobile-location-modal-questions.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 8773b5daf..85726aebd 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -64,7 +64,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi export default { name: "mobile-location-modal-questions", - emits: ["update:modelValue", "updated-mobile-fee-part", "updated-contains-military-base"], // The component emits an event + emits: ["update:modelValue", "updated-mobile-fee-part", "updated-contains-military-base"], data() { return { internalModel: deepClone(this.modelValue), From e0a57916750417890b95240d22e107b8fff7f156 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 14:15:51 -0400 Subject: [PATCH 300/358] Another correction for previous commit --- .../mobile-location-modal-questions.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 2974254b3..5261d81e0 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -199,8 +199,8 @@ export default { this.internalModel = deepClone(newValue); this.resetComponent({ - streetAddress: updatedServiceZipCodeInfo.streetAddress, - city: updatedServiceZipCodeInfo.city, + streetAddress: newValue.addressQuestions.streetAddress, + city: newValue.addressQuestions.city, state: newValue.addressQuestions.state, zipCode: newValue.addressQuestions.zipCode, isVehicleProtected: newValue.isVehicleProtected, From c37487042e483f9d1e763ad01efe8fe5652d4810 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Fri, 24 Mar 2023 12:50:38 -0400 Subject: [PATCH 301/358] Only process zipcode on change. --- .../service-zip-modal-question.vue | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 174b74523..5d9631442 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -140,28 +140,34 @@ export default { }, async setZipCode() { - this.resetAlerts(); + if (this.internalModel.zipCode !== this.modelValue.zipCode) + { + this.resetAlerts(); - const zipCodeData = await this.getZipCodeData(this.internalModel.zipCode); + const zipCodeData = await this.getZipCodeData(this.internalModel.zipCode); - if (!zipCodeData.isValid) { - this.displayInvalidZipAlert = true; - this.focusOnZipInput(); - this.resetModalButtonStyle(); - } else { - this.internalModel.state = zipCodeData.state; + if (!zipCodeData.isValid) { + this.displayInvalidZipAlert = true; + this.focusOnZipInput(); + this.resetModalButtonStyle(); + } else { + this.internalModel.state = zipCodeData.state; - // retrieve mobile fee part - const serviceZipCode = this.internalModel.zipCode; - const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); + // retrieve mobile fee part + const serviceZipCode = this.internalModel.zipCode; + const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); - // emit it to parent - this.$emit("updated-mobile-fee-part", mobileFeePart); + // emit it to parent + this.$emit("updated-mobile-fee-part", mobileFeePart); - // Update the page level model - this.$emit("update:modelValue", this.internalModel); - this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); + // Update the page level model + this.$emit("update:modelValue", this.internalModel); + this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); + this.closeModal(); + } + } + else { this.closeModal(); } }, From cfeed1ff28a2733009d5b250f5c109ba3861194a Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Fri, 24 Mar 2023 13:37:59 -0400 Subject: [PATCH 302/358] formatting --- .../service-zip-modal-question.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 5d9631442..3861ff01d 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -140,8 +140,7 @@ export default { }, async setZipCode() { - if (this.internalModel.zipCode !== this.modelValue.zipCode) - { + if (this.internalModel.zipCode !== this.modelValue.zipCode) { this.resetAlerts(); const zipCodeData = await this.getZipCodeData(this.internalModel.zipCode); @@ -166,8 +165,7 @@ export default { this.closeModal(); } - } - else { + } else { this.closeModal(); } }, From df2665a2ce0a9a1a8dbf34b902daa69e1d48bbc5 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 24 Mar 2023 13:44:31 -0400 Subject: [PATCH 303/358] Technical review changes --- src/constants/error-messages.js | 1 + src/digital-components/modal/modal.vue | 15 +++++---- .../textbox-question/textbox-question.vue | 28 +++++++++++++++-- .../mobile-location-modal-questions.vue | 13 +++++++- .../service-location/service-location.vue | 31 ++++++++++++++++--- .../service-zip-modal-question.vue | 2 +- 6 files changed, 74 insertions(+), 16 deletions(-) diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 5631b44c7..3c3f776c1 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -25,6 +25,7 @@ const errorMessages = { "Invalid VIN. Please make sure that you entered the correct 17-digit, alpha-numeric number. VINs do not contain the letters I, O, or Q", OPTION_REQUIRED: "Please select an option", VEHICLE_REQUIRED: "Please select a vehicle", + MOBILE_LOCATION_REQUIRED: "Please enter your service address", }; export { errorMessages }; diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index a18881796..e10f437d3 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -60,14 +60,17 @@ export default { setup() { const modalId = `modal-${crypto.randomUUID()}`; - const form = useForm(); + const { meta, validate, resetForm } = useForm(); + const isFormTouched = useIsFormTouched(); const isFormDirty = useIsFormDirty(); const isFormValid = useIsFormValid(); return { modalId, - form, + meta, + validate, + resetForm, isFormTouched, isFormDirty, isFormValid, @@ -75,7 +78,7 @@ export default { }, methods: { async validateAndEmit() { - const validationResult = await this.form.validate(); + const validationResult = await this.validate(); if (validationResult.valid) { this.$emit("footer-button-event"); } else { @@ -103,10 +106,10 @@ export default { }, computed: { isFooterButtonDisabled() { - if (!this.isFormTouched) { - return !this.isFormValid; + if (!this.meta.touched) { + return !this.meta.valid; } - return !this.isFormDirty || !this.isFormValid; + return !this.meta.dirty || !this.meta.valid; }, }, components: { diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 2766e2cd9..335c47a60 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -1,11 +1,19 @@ @@ -74,6 +88,8 @@ export default { questionAlignment: String, // Left or center. Left is default. cornerStyle: String, // Rounded or square. Square is default. includeSearchIcon: Boolean, + hideInput: Boolean, + centerErrorMessage: Boolean, }, setup(props) { const inputId = !props.customInputId ? `input-${crypto.randomUUID()}` : props.customInputId; @@ -142,6 +158,12 @@ export default { From 25d03a1c0ac2178bda18d6312f2b137b7d4551fe Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 27 Mar 2023 10:31:54 -0400 Subject: [PATCH 308/358] Removed unused watch statement --- src/layouts/service-location/service-location.vue | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 8b3042678..261e84521 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -216,15 +216,6 @@ export default { navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal }); }, }, - watch: { - zipCode(newValue, oldValue) { - if (newValue !== oldValue) { - baseMixin.methods.getZipCodeData(newValue).then((r) => { - this.zipContainsMilitaryBase = r.containsMilitaryBase; - }); - } - }, - }, components: { alert, serviceZipModalQuestion, From 6b25e8ea47601f60edb7981e30695fa89b90f09d Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 27 Mar 2023 13:22:32 -0400 Subject: [PATCH 309/358] Merge outstanding changes --- .../mobile-location-modal-questions.vue | 14 ++++++++++---- src/layouts/service-location/service-location.vue | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index a319a85b9..d0128bcd3 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -61,7 +61,11 @@ import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location // Helpers import { deepClone } from "@/layouts/service-location/helpers/object-cloning-helper/object-cloning-helper"; -import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; + +import { + getPricedMobileFeePart, + getServiceabilityDetails, +} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; export default { name: "mobile-location-modal-questions", @@ -187,13 +191,15 @@ export default { } else { // retrieve mobile fee part const serviceZipCode = this.internalModel.addressQuestions.zipCode; - const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); - + + // retrieve serviceability details + const serviceabilityDetails = await getServiceabilityDetails(serviceZipCode); + // update content related to service zip code this.$emit("updated-mobile-fee-part", mobileFeePart); this.$emit("updated-serviceability", serviceabilityDetails.data); - this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); + this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); // Update the page level model this.$emit("update:modelValue", this.internalModel); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index b049bb0cb..4eaad2cbb 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -37,6 +37,7 @@ linkWidgetName="MobileLocationLinkWidget" modalWidgetName="MobileLocationModalWidget" /> Date: Mon, 27 Mar 2023 13:31:26 -0400 Subject: [PATCH 310/358] Patched in missing Military code --- src/layouts/service-location/service-location.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 4eaad2cbb..6b059079f 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -10,6 +10,7 @@ :mobileFeePart="mobileFeePart" @updated-mobile-fee-part="setMobileFeePart" @updated-serviceability="setServiceabilityDetails" + @updated-contains-military-base="setContainsMilitaryBase" linkWidgetName="ServiceZipLinkWidget" modalWidgetName="ServiceZipModalWidget" /> From 31355e1e735888a3b3283a099614b735592a14e1 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 27 Mar 2023 13:37:30 -0400 Subject: [PATCH 311/358] added comment --- .../service-zip-modal-question/service-zip-modal-question.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index ed4a3ea69..0698fc340 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -149,6 +149,8 @@ export default { // retrieve mobile fee part const serviceZipCode = this.internalModel.zipCode; const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); + + // retrieve serviceability details const serviceabilityDetails = await getServiceabilityDetails(serviceZipCode); // update content related to service zip code From 902cd698582cb44c5fb93bd609faf81336b55df2 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 28 Mar 2023 08:28:55 -0400 Subject: [PATCH 312/358] WIP --- src/layouts/service-location/service-location.vue | 8 ++++---- .../service-type-question/service-type-question.vue | 11 +++++++++-- src/store/index.js | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 6b059079f..e6613cda8 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -190,10 +190,10 @@ export default { }, }, showMilitaryZipAlert() { - return ( - this.zipContainsMilitaryBase && - (this.isZipServiceableMobile == null || this.isZipServiceableMobile === true) - ); + const isZipServiceableMobile = + this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; + + return this.zipContainsMilitaryBase && isZipServiceableMobile; }, }, methods: { diff --git a/src/layouts/service-location/service-type-question/service-type-question.vue b/src/layouts/service-location/service-type-question/service-type-question.vue index b74ad989f..d8ba9e864 100644 --- a/src/layouts/service-location/service-type-question/service-type-question.vue +++ b/src/layouts/service-location/service-type-question/service-type-question.vue @@ -55,8 +55,13 @@ export default { return filteredAnswers; }, serviceability() { - const mobileAvailable = - this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; + let mobileAvailable; + if (this.IsRecalibrationServiceableMobile == null) { + mobileAvailable = this.isGlassServiceableMobile; + } else { + mobileAvailable = this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; + } + const inshopAvailable = this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop; @@ -87,6 +92,8 @@ export default { handler(newValue) { if (newValue == "MobileOnly") { this.selectedValues = "Mobile"; + } else { + this.selectedValues = null; } }, }, diff --git a/src/store/index.js b/src/store/index.js index 413d2f8b0..24d9e5b84 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -43,6 +43,7 @@ const getDefaultState = () => { state: null, zipCode: null, zipCodeCtu: null, + serviceType: null, }, customer: { emailAddress: null, From 04854a455cf3fbe1d1d589fe2a1a60f271ce7fc7 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 28 Mar 2023 08:39:54 -0400 Subject: [PATCH 313/358] WIP --- .../service-type-question/service-type-question.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-type-question/service-type-question.vue b/src/layouts/service-location/service-type-question/service-type-question.vue index d8ba9e864..4f1a36ac7 100644 --- a/src/layouts/service-location/service-type-question/service-type-question.vue +++ b/src/layouts/service-location/service-type-question/service-type-question.vue @@ -59,7 +59,8 @@ export default { if (this.IsRecalibrationServiceableMobile == null) { mobileAvailable = this.isGlassServiceableMobile; } else { - mobileAvailable = this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; + mobileAvailable = + this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; } const inshopAvailable = From 0bde42e0d2cda395b5be2aad279d20cf1763107c Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 28 Mar 2023 13:20:12 -0400 Subject: [PATCH 314/358] WIP --- src/digital-components/modal/modal.vue | 4 ++-- .../mobile-location-modal-questions.vue | 4 ++++ src/layouts/service-location/service-location.vue | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 32a00ad15..ba7e60eb6 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -29,7 +29,7 @@ Date: Tue, 28 Mar 2023 13:47:09 -0400 Subject: [PATCH 315/358] Updated existing unit tests --- src/digital-components/modal/modal.spec.js | 4 +- .../mobile-location-modal-questions.spec.js | 14 +++++++ .../service-location/service-location.spec.js | 14 +++++++ .../service-zip-modal-question.spec.js | 14 +++++++ .../modal-button-main.spec.js | 38 +++++++++---------- 5 files changed, 63 insertions(+), 21 deletions(-) diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index a948fe99a..e4d8692d4 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -92,7 +92,7 @@ describe("modal.vue", () => { wrapper.vm.resetButtonStyle = resetButtonStyle; // Act - const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); + const buttonMain = wrapper.findComponent({ ref: "modalButtonMain" }); await buttonMain.trigger("click-event"); // Assert @@ -124,7 +124,7 @@ describe("modal.vue", () => { wrapper.vm.resetButtonStyle = resetButtonStyle; // Act - const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); + const buttonMain = wrapper.findComponent({ ref: "modalButtonMain" }); await buttonMain.trigger("click-event"); // Assert diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js index fbea693b9..66bd93799 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js @@ -110,12 +110,26 @@ const mockGetPricedMobileFeePart = (mockServiceZipCode) => { return Promise.resolve(mobileFeePart); }; +const mockGetServiceabilityDetails = (mockServiceZipCode) => { + const serviceabilityDetails = { + isGlassServiceableInshop: true, + isRecalibrationServiceableInshop: true, + isGlassServiceableMobile: true, + isRecalibrationServiceableMobile: true, + }; + + return Promise.resolve(serviceabilityDetails); +}; + jest.mock( "@/layouts/service-location/helpers/service-location-helper/service-location-helper", () => ({ getPricedMobileFeePart: jest.fn((mockServiceZipCode) => { return mockGetPricedMobileFeePart(mockServiceZipCode); }), + getServiceabilityDetails: jest.fn((mockServiceZipCode) => { + return mockGetServiceabilityDetails(mockServiceZipCode); + }), }) ); diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index b48fa2f06..2a056c4d1 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -32,12 +32,26 @@ const mockGetPricedMobileFeePart = (mockServiceZipCode) => { return Promise.resolve(mobileFeePart); }; +const mockGetServiceabilityDetails = (mockServiceZipCode) => { + const serviceabilityDetails = { + isGlassServiceableInshop: true, + isRecalibrationServiceableInshop: true, + isGlassServiceableMobile: true, + isRecalibrationServiceableMobile: true, + }; + + return Promise.resolve(serviceabilityDetails); +}; + jest.mock( "@/layouts/service-location/helpers/service-location-helper/service-location-helper", () => ({ getPricedMobileFeePart: jest.fn((mockServiceZipCode) => { return mockGetPricedMobileFeePart(mockServiceZipCode); }), + getServiceabilityDetails: jest.fn((mockServiceZipCode) => { + return mockGetServiceabilityDetails(mockServiceZipCode); + }), }) ); diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js index 407e129cf..6c9cf42f5 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -33,12 +33,26 @@ const mockGetPricedMobileFeePart = (mockServiceZipCode) => { return Promise.resolve(mobileFeePart); }; +const mockGetServiceabilityDetails = (mockServiceZipCode) => { + const serviceabilityDetails = { + isGlassServiceableInshop: true, + isRecalibrationServiceableInshop: true, + isGlassServiceableMobile: true, + isRecalibrationServiceableMobile: true, + }; + + return Promise.resolve(serviceabilityDetails); +}; + jest.mock( "@/layouts/service-location/helpers/service-location-helper/service-location-helper", () => ({ getPricedMobileFeePart: jest.fn((mockServiceZipCode) => { return mockGetPricedMobileFeePart(mockServiceZipCode); }), + getServiceabilityDetails: jest.fn((mockServiceZipCode) => { + return mockGetServiceabilityDetails(mockServiceZipCode); + }), }) ); diff --git a/src/ux-components/modal-button-main/modal-button-main.spec.js b/src/ux-components/modal-button-main/modal-button-main.spec.js index 41e244a72..bd3587f22 100644 --- a/src/ux-components/modal-button-main/modal-button-main.spec.js +++ b/src/ux-components/modal-button-main/modal-button-main.spec.js @@ -1,21 +1,21 @@ import { shallowMount } from "@vue/test-utils"; -import buttonMain from "./button-main"; +import modalButtonMain from "./modal-button-main"; import { getMountOptions } from "@/helpers/unit-test-helper.js"; import { nextTick } from "vue"; -describe("buttonMain.vue", () => { +describe("modal-button-main.vue", () => { it("Should return btn-primary class", () => { // Arrange/Act const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { isPrimary: true, }, }) ); const button = wrapper.find("button"); - + // Assert expect(button.attributes("class")).toContain("btn-primary"); }); @@ -23,9 +23,9 @@ describe("buttonMain.vue", () => { it("Should return aria-disabled state", () => { // Arrange/Act const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { isDisabled: true, }, }) @@ -39,9 +39,9 @@ describe("buttonMain.vue", () => { it("Should return loader color", async () => { // Arrange const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { loaderColor: "blue", loaderEnabled: true, }, @@ -60,9 +60,9 @@ describe("buttonMain.vue", () => { it("Should return loader position", async () => { // Arrange const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { loaderPosition: "right", loaderEnabled: true, }, @@ -81,9 +81,9 @@ describe("buttonMain.vue", () => { it("Should set 'isLoaderDisplayed' to false when calling 'removeLoader'", async () => { // Arrange const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { loaderPosition: "right", loaderEnabled: true, }, @@ -106,9 +106,9 @@ describe("buttonMain.vue", () => { it("Should set 'isLoaderDisplayed' to false when calling 'resetButtonStyle'", async () => { // Arrange const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { loaderPosition: "right", loaderEnabled: true, }, @@ -130,9 +130,9 @@ describe("buttonMain.vue", () => { it("Should emit 'click-event' event when clicking if the button is enabled", async () => { // Arrange const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { loaderPosition: "right", loaderEnabled: true, isDisabled: false, @@ -154,9 +154,9 @@ describe("buttonMain.vue", () => { it("Should not emit 'click-event' event when clicking if the button is disabled", async () => { // Arrange const wrapper = shallowMount( - buttonMain, + modalButtonMain, setupMocks({ - props: { + propsData: { loaderPosition: "right", loaderEnabled: true, isDisabled: true, From 1639045d748524cf8ce9f0b7add773d8cae741a0 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 29 Mar 2023 07:46:42 -0400 Subject: [PATCH 316/358] Unit tests completed --- .../service-type-question.spec.js | 186 +++++++++++++++++- .../modal-button-main.spec.js | 2 +- 2 files changed, 186 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-type-question/service-type-question.spec.js b/src/layouts/service-location/service-type-question/service-type-question.spec.js index 3d0843e10..13b727c54 100644 --- a/src/layouts/service-location/service-type-question/service-type-question.spec.js +++ b/src/layouts/service-location/service-type-question/service-type-question.spec.js @@ -1 +1,185 @@ -test.todo("some test to be written in the future"); +import { shallowMount } from "@vue/test-utils"; +import { getMountOptions } from "@/helpers/unit-test-helper.js"; +import serviceTypeQuestion from "./service-type-question"; + +const mockCmsContent = { + QuestionText: "Choose a service option:", + Answers: [ + { + AnswerImageUrl: "", + Name: "Mobile", + SubText: "", + SubWidgetName: "", + Text: "Mobile", + }, + { + AnswerImageUrl: "", + Name: "Inshop", + SubText: "", + SubWidgetName: "", + Text: "In-shop", + }, + { + AnswerImageUrl: "", + Name: "DropOff", + SubText: "", + SubWidgetName: "", + Text: "Drop-off", + }, + ], +}; + +const cmsWidgetName = "ServiceTypeQuestionWidget"; +const mockMixin = { + methods: { + getCmsContent: jest.fn((widgetName, cmsFieldName) => { + if (widgetName === cmsWidgetName) { + return mockCmsContent[cmsFieldName]; + } + + return null; + }), + }, +}; + +describe("service-type-question.vue", () => { + it("Should display all options if both in-shop and mobile are available", async () => { + // Arrange/Act + const { wrapper } = setupMocks({ + mixins: [mockMixin], + props: { + cmsWidgetName: cmsWidgetName, + isGlassServiceableInshop: true, + isRecalibrationServiceableInshop: true, + isGlassServiceableMobile: true, + isRecalibrationServiceableMobile: true, + }, + mountOptions: { + attachTo: document.body, + }, + }); + + // Assert + expect(wrapper.vm.answersToDisplay).toEqual([ + { + AnswerImageUrl: "", + Name: "Mobile", + SubText: "", + SubWidgetName: "", + Text: "Mobile", + }, + { + AnswerImageUrl: "", + Name: "Inshop", + SubText: "", + SubWidgetName: "", + Text: "In-shop", + }, + { + AnswerImageUrl: "", + Name: "DropOff", + SubText: "", + SubWidgetName: "", + Text: "Drop-off", + }, + ]); + }); + + it("Should display only the In-Shop and Drop-Off answers when only in-shop service is available", async () => { + // Arrange/Act + const { wrapper } = setupMocks({ + mixins: [mockMixin], + props: { + cmsWidgetName: cmsWidgetName, + isGlassServiceableInshop: true, + isRecalibrationServiceableInshop: true, + isGlassServiceableMobile: false, + isRecalibrationServiceableMobile: false, + }, + mountOptions: { + attachTo: document.body, + }, + }); + + // Assert + expect(wrapper.vm.answersToDisplay).toEqual([ + { + AnswerImageUrl: "", + Name: "Inshop", + SubText: "", + SubWidgetName: "", + Text: "In-shop", + }, + { + AnswerImageUrl: "", + Name: "DropOff", + SubText: "", + SubWidgetName: "", + Text: "Drop-off", + }, + ]); + }); + + it("Should display only the Mobile answer when only mobile service is available", async () => { + // Arrange/Act + const { wrapper } = setupMocks({ + mixins: [mockMixin], + props: { + cmsWidgetName: cmsWidgetName, + isGlassServiceableInshop: false, + isRecalibrationServiceableInshop: false, + isGlassServiceableMobile: true, + isRecalibrationServiceableMobile: true, + }, + mountOptions: { + attachTo: document.body, + }, + }); + + // Assert + expect(wrapper.vm.answersToDisplay).toEqual([ + { + AnswerImageUrl: "", + Name: "Mobile", + SubText: "", + SubWidgetName: "", + Text: "Mobile", + }, + ]); + }); + + it("Should display no answers if neither in-shop nor mobile service are available", async () => { + // Arrange/Act + const { wrapper } = setupMocks({ + mixins: [mockMixin], + props: { + cmsWidgetName: cmsWidgetName, + isGlassServiceableInshop: false, + isRecalibrationServiceableInshop: false, + isGlassServiceableMobile: false, + isRecalibrationServiceableMobile: false, + }, + mountOptions: { + attachTo: document.body, + }, + }); + + // Assert + expect(wrapper.vm.answersToDisplay).toEqual([]); + }); +}); + +function setupMocks({ mountOptions, mixins, props, isShallowMount = true }) { + const resultingMountOptions = getMountOptions({ + ...mountOptions, + mixins, + }); + + if (props) resultingMountOptions.propsData = props; + + const wrapper = isShallowMount + ? shallowMount(serviceTypeQuestion, resultingMountOptions) + : mount(serviceTypeQuestion, resultingMountOptions); + + return { wrapper }; +} diff --git a/src/ux-components/modal-button-main/modal-button-main.spec.js b/src/ux-components/modal-button-main/modal-button-main.spec.js index bd3587f22..f212d8ec3 100644 --- a/src/ux-components/modal-button-main/modal-button-main.spec.js +++ b/src/ux-components/modal-button-main/modal-button-main.spec.js @@ -15,7 +15,7 @@ describe("modal-button-main.vue", () => { }) ); const button = wrapper.find("button"); - + // Assert expect(button.attributes("class")).toContain("btn-primary"); }); From 67154e9192c1e5c4704eb23cdfa9afe622078351 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 29 Mar 2023 09:21:02 -0400 Subject: [PATCH 317/358] WIP --- .../service-location/service-location.vue | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index d8167ad57..d4f632374 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -16,7 +16,12 @@ + Date: Wed, 29 Mar 2023 13:05:38 -0400 Subject: [PATCH 318/358] Restored Mocky endpoints while we're waiting for CSR-1104 to be 100% completed --- src/store/index.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 24d9e5b84..7b6b64283 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -928,13 +928,23 @@ export const actions = { }, getServiceabilityDetails(context, { serviceZipCode }) { - const lineItems = context.getters.order.lineItems; - const lineItemsToSend = [...lineItems.supportingItems]; - const encodedLineItems = encodeURIComponent(JSON.stringify(lineItemsToSend)); - return globalMethods.callHttpClient({ + return globalMethods.callMockHttpClient({ method: endpoints.GetServiceabilityDetails.method, - endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}`, + //TODO: Remove Mocky Endpoints + //endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable + //endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop + //endpoint: "https://run.mocky.io/v3/e2eaa097-6ea5-4906-af53-901edaa94939", // ForcedMobile + endpoint: "https://run.mocky.io/v3/1811a1fe-12a7-48f3-939e-d10a9b77dd25", // All Options }); + + // TODO: Restore this when CSR-1104 is 100% complete + // const lineItems = context.getters.order.lineItems; + // const lineItemsToSend = [...lineItems.supportingItems]; + // const encodedLineItems = encodeURIComponent(JSON.stringify(lineItemsToSend)); + // return globalMethods.callHttpClient({ + // method: endpoints.GetServiceabilityDetails.method, + // endpoint: `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&lineItems=${encodedLineItems}`, + // }); }, getSupportingItems(context) { From 23d433931d792184a984a2b9029d6818ed364021 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 29 Mar 2023 15:34:52 -0400 Subject: [PATCH 319/358] Pull serviceability logic up to service-location page. --- .../service-location/service-location.vue | 28 +++++++---- .../service-type-question.vue | 46 +++++-------------- 2 files changed, 31 insertions(+), 43 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index d8167ad57..2b166e830 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -20,10 +20,8 @@ alertClass="alert-warning" /> answer.Name == "Mobile"); - } else if (this.serviceability == "InshopOnly") { + } else if (this.isServiceableInshop) { filteredAnswers = this.answersFromCms.filter( (answer) => answer.Name == "Inshop" || answer.Name == "DropOff" ); - } else if (this.serviceability == "None") { + } else { filteredAnswers = []; } return filteredAnswers; }, - serviceability() { - let mobileAvailable; - if (this.IsRecalibrationServiceableMobile == null) { - mobileAvailable = this.isGlassServiceableMobile; - } else { - mobileAvailable = - this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; - } - - const inshopAvailable = - this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop; - - let result; - if (inshopAvailable && mobileAvailable) { - result = "All"; - } else if (inshopAvailable && !mobileAvailable) { - result = "InshopOnly"; - } else if (!inshopAvailable && mobileAvailable) { - result = "MobileOnly"; - } else if (!inshopAvailable && !mobileAvailable) { - result = "None"; - } - - return result; - }, selectedValues: { get: function () { return this.modelValue; @@ -87,11 +60,14 @@ export default { this.$emit("update:modelValue", newValue); }, }, + isMobileOnly() { + return this.isServiceableMobile && !this.isServiceableInshop; + }, }, watch: { - serviceability: { + isMobileOnly: { handler(newValue) { - if (newValue == "MobileOnly") { + if (newValue) { this.selectedValues = "Mobile"; } else { this.selectedValues = null; From e244e264199f82431ea407f7dce591ad4b6e550b Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 29 Mar 2023 15:43:56 -0400 Subject: [PATCH 320/358] Added non-cms version of the alert --- src/layouts/service-location/service-location.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 2b166e830..256ce6bc1 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -18,6 +18,12 @@ cmsWidgetName="AlertMilitaryBaseZipWidget" v-if="showMilitaryZipAlert" alertClass="alert-warning" /> + Date: Wed, 29 Mar 2023 15:53:16 -0400 Subject: [PATCH 321/358] Update to proper cms widget. --- src/layouts/service-location/service-location.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 256ce6bc1..774aafd87 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -20,8 +20,7 @@ alertClass="alert-warning" /> Date: Wed, 29 Mar 2023 16:50:46 -0400 Subject: [PATCH 322/358] Update tests based on changes to logic. --- .../service-type-question.spec.js | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/layouts/service-location/service-type-question/service-type-question.spec.js b/src/layouts/service-location/service-type-question/service-type-question.spec.js index 13b727c54..f4f48a77d 100644 --- a/src/layouts/service-location/service-type-question/service-type-question.spec.js +++ b/src/layouts/service-location/service-type-question/service-type-question.spec.js @@ -49,10 +49,8 @@ describe("service-type-question.vue", () => { mixins: [mockMixin], props: { cmsWidgetName: cmsWidgetName, - isGlassServiceableInshop: true, - isRecalibrationServiceableInshop: true, - isGlassServiceableMobile: true, - isRecalibrationServiceableMobile: true, + isServiceableInshop: true, + isServiceableMobile: true, }, mountOptions: { attachTo: document.body, @@ -91,10 +89,8 @@ describe("service-type-question.vue", () => { mixins: [mockMixin], props: { cmsWidgetName: cmsWidgetName, - isGlassServiceableInshop: true, - isRecalibrationServiceableInshop: true, - isGlassServiceableMobile: false, - isRecalibrationServiceableMobile: false, + isServiceableInshop: true, + isServiceableMobile: false, }, mountOptions: { attachTo: document.body, @@ -126,10 +122,8 @@ describe("service-type-question.vue", () => { mixins: [mockMixin], props: { cmsWidgetName: cmsWidgetName, - isGlassServiceableInshop: false, - isRecalibrationServiceableInshop: false, - isGlassServiceableMobile: true, - isRecalibrationServiceableMobile: true, + isServiceableInshop: false, + isServiceableMobile: true, }, mountOptions: { attachTo: document.body, @@ -154,10 +148,8 @@ describe("service-type-question.vue", () => { mixins: [mockMixin], props: { cmsWidgetName: cmsWidgetName, - isGlassServiceableInshop: false, - isRecalibrationServiceableInshop: false, - isGlassServiceableMobile: false, - isRecalibrationServiceableMobile: false, + isServiceableInshop: false, + isServiceableMobile: false, }, mountOptions: { attachTo: document.body, From 67e67a1ff945f713a392be4742ec33efdc37e6ee Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 30 Mar 2023 08:04:39 -0400 Subject: [PATCH 323/358] Tech review changes --- src/digital-components/modal/modal.vue | 2 +- .../modal-button-main.spec.js | 0 .../modal-button-main/modal-button-main.vue | 0 .../address-questions/address-questions.vue | 3 ++ .../appointment-type-question.spec.js} | 10 +++---- .../appointment-type-question.vue} | 4 +-- .../mobile-location-modal-questions.vue | 2 +- .../service-location/service-location.vue | 30 +++++++++++-------- src/store/index.js | 9 ------ 9 files changed, 30 insertions(+), 30 deletions(-) rename src/{ => digital-components/modal}/ux-components/modal-button-main/modal-button-main.spec.js (100%) rename src/{ => digital-components/modal}/ux-components/modal-button-main/modal-button-main.vue (100%) rename src/layouts/service-location/{service-type-question/service-type-question.spec.js => appointment-type-question/appointment-type-question.spec.js} (94%) rename src/layouts/service-location/{service-type-question/service-type-question.vue => appointment-type-question/appointment-type-question.vue} (97%) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index ba7e60eb6..3bd0721f2 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -41,7 +41,7 @@ diff --git a/src/store/index.js b/src/store/index.js index 2dbc7b2cc..abcf231f0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -931,8 +931,8 @@ export const actions = { return globalMethods.callMockHttpClient({ method: endpoints.GetServiceabilityDetails.method, //TODO: Remove Mocky Endpoints - endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable - //endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop + //endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable + endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop //endpoint: "https://run.mocky.io/v3/e2eaa097-6ea5-4906-af53-901edaa94939", // ForcedMobile //endpoint: "https://run.mocky.io/v3/1811a1fe-12a7-48f3-939e-d10a9b77dd25", // All Options }); From 40bc9b9a75321b32f81b805b6abad5e9f5bb551d Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 31 Mar 2023 10:31:25 -0400 Subject: [PATCH 334/358] Completed unit tests --- .../service-location/service-location.spec.js | 79 +++++++++++++++++++ .../service-location/service-location.vue | 11 ++- src/store/index.js | 4 +- 3 files changed, 89 insertions(+), 5 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index b0a06b16f..1cea19cb9 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -323,6 +323,30 @@ describe("service-location.vue", () => { expect(wrapper.vm.mobileLocationQuestions).toStrictEqual(newMobileLocationQuestions); }); + test("resets appointment type selection when service zip code is updated by service zip modal", () => { + // Arrange + const { wrapper } = setupMocks({}); + wrapper.vm.$refs.mobileLocationModalQuestions.resetComponent = jest.fn(); + wrapper.vm.$refs.serviceZipCodeQuestion.resetMobileFeePart = jest.fn(); + + const newServiceZipCodeQuestion = { + zipCode: "61606", + state: "IL", + }; + + wrapper.vm.selectedAppointmentType = "Inshop"; + + const serviceZipCodeComponent = wrapper.findComponent({ + ref: "serviceZipCodeQuestion", + }); + + // Act + serviceZipCodeComponent.vm.$emit("update:modelValue", newServiceZipCodeQuestion); + + // Assert + expect(wrapper.vm.selectedAppointmentType).toStrictEqual(null); + }); + test("displays military zip message when zip is updated", () => { // Arrange const { wrapper } = setupMocks({}); @@ -437,6 +461,61 @@ describe("service-location.vue", () => { // Assert expect(wrapper.vm.serviceZipCodeQuestion).toStrictEqual(newServiceZipCodeInfo); }); + + test("resets appointment type selection when service zip code is updated by mobile location modal when Mobile is not selected", () => { + // Arrange + const { wrapper } = setupMocks({}); + wrapper.vm.$refs.mobileLocationModalQuestions.resetComponent = jest.fn(); + wrapper.vm.$refs.serviceZipCodeQuestion.resetMobileFeePart = jest.fn(); + + const newServiceZipCodeQuestion = { + zipCode: "61606", + state: "IL", + }; + + wrapper.vm.selectedAppointmentType = "Dropoff"; + + const serviceZipCodeComponent = wrapper.findComponent({ + ref: "serviceZipCodeQuestion", + }); + + // Act + serviceZipCodeComponent.vm.$emit("update:modelValue", newServiceZipCodeQuestion); + + // Assert + expect(wrapper.vm.selectedAppointmentType).toStrictEqual(null); + }); + + test("does not reset appointment type selection when service zip code is updated by mobile location modal when Mobile is selected", () => { + // Arrange + const { wrapper } = setupMocks({}); + const appointmentTypeMobile = "Mobile"; + wrapper.vm.$refs.mobileLocationModalQuestions.resetComponent = jest.fn(); + wrapper.vm.$refs.serviceZipCodeQuestion.resetMobileFeePart = jest.fn(); + + const mobileLocationQuestions = { + addressQuestions: { + streetAddress: "555 Some Street", + apartmentNumberOrBusinessName: "", + city: "Westerville", + state: "OH", + zipCode: "43081", + }, + isVehicleProtected: "YesAnswer", + }; + + wrapper.vm.selectedAppointmentType = "Mobile"; + + const mobileLocationComponent = wrapper.findComponent({ + ref: "mobileLocationModalQuestions", + }); + + // Act + mobileLocationComponent.vm.$emit("update:modelValue", mobileLocationQuestions); + + // Assert + expect(wrapper.vm.selectedAppointmentType).toStrictEqual(appointmentTypeMobile); + }); }); describe("serviceability logic", () => { diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 69b4f4926..49572dbda 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -169,6 +169,7 @@ export default { set: function (newValue) { if (newValue.zipCode !== this.zipCode) { this.resetMobileLocation(); + this.selectedAppointmentType = null; } this.state = newValue.state; @@ -198,11 +199,12 @@ export default { this.isVehicleProtected = newValue.isVehicleProtected; this.mobileLocationValidationField = "isValid"; + + if ((newValue.zipCode !== this.zipCode) && !this.selectedAppointmentType == "Mobile") { + this.selectedAppointmentType = null; + } }, }, - displayMilitaryZipAlert() { - return this.zipContainsMilitaryBase && this.isServiceableMobile; - }, isServiceableMobile() { if (this.isRecalibrationServiceableMobile !== null) { return this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; @@ -217,6 +219,9 @@ export default { return this.isGlassServiceableInshop; } }, + displayMilitaryZipAlert() { + return this.zipContainsMilitaryBase && this.isServiceableMobile; + }, displayServiceableMobileOnly() { return this.isServiceableMobile && !this.isServiceableInshop; }, diff --git a/src/store/index.js b/src/store/index.js index 2dbc7b2cc..6da7550a2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -931,10 +931,10 @@ export const actions = { return globalMethods.callMockHttpClient({ method: endpoints.GetServiceabilityDetails.method, //TODO: Remove Mocky Endpoints - endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable + //endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable //endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInshop //endpoint: "https://run.mocky.io/v3/e2eaa097-6ea5-4906-af53-901edaa94939", // ForcedMobile - //endpoint: "https://run.mocky.io/v3/1811a1fe-12a7-48f3-939e-d10a9b77dd25", // All Options + endpoint: "https://run.mocky.io/v3/1811a1fe-12a7-48f3-939e-d10a9b77dd25", // All Options }); // TODO: Restore this when CSR-1104 is 100% complete From b06ee56d27661752574d5c4f6ba6405e2cfc19bf Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 31 Mar 2023 13:41:46 -0400 Subject: [PATCH 335/358] Prettified --- src/layouts/service-location/service-location.spec.js | 8 ++++---- src/layouts/service-location/service-location.vue | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 1cea19cb9..28a8ca473 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -345,7 +345,7 @@ describe("service-location.vue", () => { // Assert expect(wrapper.vm.selectedAppointmentType).toStrictEqual(null); - }); + }); test("displays military zip message when zip is updated", () => { // Arrange @@ -461,7 +461,7 @@ describe("service-location.vue", () => { // Assert expect(wrapper.vm.serviceZipCodeQuestion).toStrictEqual(newServiceZipCodeInfo); }); - + test("resets appointment type selection when service zip code is updated by mobile location modal when Mobile is not selected", () => { // Arrange const { wrapper } = setupMocks({}); @@ -485,7 +485,7 @@ describe("service-location.vue", () => { // Assert expect(wrapper.vm.selectedAppointmentType).toStrictEqual(null); }); - + test("does not reset appointment type selection when service zip code is updated by mobile location modal when Mobile is selected", () => { // Arrange const { wrapper } = setupMocks({}); @@ -515,7 +515,7 @@ describe("service-location.vue", () => { // Assert expect(wrapper.vm.selectedAppointmentType).toStrictEqual(appointmentTypeMobile); - }); + }); }); describe("serviceability logic", () => { diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 49572dbda..ac1334fcb 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -200,7 +200,10 @@ export default { this.mobileLocationValidationField = "isValid"; - if ((newValue.zipCode !== this.zipCode) && !this.selectedAppointmentType == "Mobile") { + if ( + newValue.zipCode !== this.zipCode && + !this.selectedAppointmentType == "Mobile" + ) { this.selectedAppointmentType = null; } }, From 8daa078c299967c324a0dac4fc2abfd1185b600a Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 4 Apr 2023 15:11:38 -0400 Subject: [PATCH 336/358] Add text link rendering to alert + hook into opening modal. --- .../service-location/service-location.vue | 6 ++++- src/ux-components/alert/alert.vue | 23 ++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 6c8ef58d1..846a1731e 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -30,6 +30,7 @@ class="my-4" cmsWidgetName="AlertRecalNoMobileWidget" v-if="displayRecalibrationWarning" + @text-link-clicked="openModalAction" alertClass="alert-warning" />

@@ -40,11 +51,13 @@ From f87a64380bd85d3ca58ecbb849dcaa6e7d3b720c Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 4 Apr 2023 16:38:49 -0400 Subject: [PATCH 337/358] Add recalibration-checking logic. --- src/layouts/service-location/service-location.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 846a1731e..577120c85 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -232,9 +232,13 @@ export default { return this.isGlassServiceableInshop; } }, + isDualOrStaticRecalibration() { + const supportingItems = store.getters.lineItems.supportingItems; + + return supportingItems.some((item) => item.partNumber === "RECAL STATIC" || item.partNumber === "RECAL DUAL"); + }, displayRecalibrationWarning() { - //TODO: Check lineItems for static or dual recalibration. - return true; + return this.isDualOrStaticRecalibration; }, displayServiceableInshopOnly() { return ( From 572831254d60ee1e3a0bb7c245971f1fade06409 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 5 Apr 2023 08:57:01 -0400 Subject: [PATCH 338/358] Formatting --- src/layouts/service-location/service-location.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 577120c85..800f7ee52 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -234,8 +234,10 @@ export default { }, isDualOrStaticRecalibration() { const supportingItems = store.getters.lineItems.supportingItems; - - return supportingItems.some((item) => item.partNumber === "RECAL STATIC" || item.partNumber === "RECAL DUAL"); + + return supportingItems.some( + (item) => item.partNumber === "RECAL STATIC" || item.partNumber === "RECAL DUAL" + ); }, displayRecalibrationWarning() { return this.isDualOrStaticRecalibration; From fb0280fa1820e25a3c651a4f4e09dda54036073a Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Wed, 5 Apr 2023 10:56:34 -0400 Subject: [PATCH 339/358] CSR-1129: create schedule page, put date picker on it --- jest.config.js | 3 +- src/constants/error-messages.js | 1 + .../date-picker/date-picker.vue | 473 +++++++++--------- src/router/index.js | 1 - src/router/router-constants/fmgPage-values.js | 1 + .../router-constants/navigation-scenarios.js | 3 + src/router/router-constants/routing-table.js | 13 + 7 files changed, 260 insertions(+), 235 deletions(-) diff --git a/jest.config.js b/jest.config.js index ceeb6f781..3186939df 100644 --- a/jest.config.js +++ b/jest.config.js @@ -15,9 +15,10 @@ module.exports = { "!src/layouts/vehicle-damage/windshield-options/windshield-options.vue", "!src/layouts/reveal/**/*.vue", "!src/ux-components/text-link/**/*.vue", - "!src/common-components/date-picker/**/*.vue", // Temp until unit tests completed + "!src/common-components/date-picker/**/*.vue", // git statuTemp until unit tests completed "!src/layouts/vin-lookup/**/*.vue", //Temporary for Quote page testing "!src/common-components/funnel-header/menu-modal/**/*.vue", + "!src/layouts/schedule/*.vue", // Temp test exclusion while in development // END ], // ! means exclude from coverage. testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 3c3f776c1..810929d20 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -26,6 +26,7 @@ const errorMessages = { OPTION_REQUIRED: "Please select an option", VEHICLE_REQUIRED: "Please select a vehicle", MOBILE_LOCATION_REQUIRED: "Please enter your service address", + DATE_REQUIRED: "Please select a date", }; export { errorMessages }; diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index e3b5ff5d1..813708b66 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -1,5 +1,5 @@