From: Stephen Cameron Date: Thu, 18 Apr 2019 16:14:28 +0000 (+0200) Subject: WIP #2591 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a17f1e0c6df43d8c61383b5cd10de6aa5b9c5391;p=sandvik-service-selector.git WIP #2591 @1.5 --- diff --git a/public/index.html b/public/index.html index a521976..6cce410 100644 --- a/public/index.html +++ b/public/index.html @@ -5,11 +5,11 @@ - Sandvik Service Sale + Sandvik Service Selector
diff --git a/src/components/Forms.vue b/src/components/Forms.vue index 39f9c1d..7053f44 100644 --- a/src/components/Forms.vue +++ b/src/components/Forms.vue @@ -16,7 +16,7 @@ - +

{{$t("countryInfo")}}

@@ -28,6 +28,9 @@ +
+ +
@@ -43,6 +46,11 @@ +
+

{{ $t('contactUs') }}

+

+
+
@@ -157,8 +165,6 @@ "JO": "T", "KZ": "T", "KE": "T", - "KP": "", - "KR": "T", "XK": "OR", "KW": "T", "KG": "T", @@ -199,6 +205,7 @@ "NI": "T", "NE": "T", "NG": "T", + "KP": "", "NO": "R", "OM": "T", "PK": "T", @@ -231,6 +238,7 @@ "SB": "T", "SO": "T", "ZA": "OGR", + "KR": "T", "SS": "T", "ES": "OGR", "LK": "T", @@ -316,6 +324,22 @@ } else { this.currentQuestion++; } + }, + goBack() { + // Go back while answering questions + // If we're on the first question, go back to step 1 + if (this.currentQuestion > 0) { + // When going back, we need to remove the last response, if it was the + // response from the previous question (to avoid duplicate responses) + // If the user selects "No", a response isn't recorded so that's why this + // extra check is needed. + if (this.responses[this.responses.length - 1] === this.questionsToAsk[this.currentQuestion - 1]) { + this.responses.pop(); // Remove this response from the array + } + this.currentQuestion--; + } else { + this.step = 1; + } } } } @@ -328,6 +352,26 @@ font-family: Aktiv; src: url(../assets/Aktiv.woff); } + .btn { + cursor: pointer; + transition: 300ms all ease-in-out; + font-size: 1em; + border: 1px solid white; + background: transparent; + color: white; + text-transform: uppercase; + padding: 0.5em 1.2em; + } + .btn:hover { + background-color: rgba(0,0,0,0.1); + } + .go-back { + text-align: left; + margin-top: 3em; + position: absolute; + left: 2em; + bottom: 2em; + } .container { max-width: 792px; height: 100%; @@ -354,12 +398,19 @@ min-height: 400px; display: flex; justify-content: center; - align-items: center + align-items: center; + position: relative; } .container__body.step-3 { min-height: 0; padding: 1em 0; } + .container__body a { + color: #fff; + } + .container__body a:hover { + text-decoration: none; + } .container__body--form { width: 792px; height: 100%; @@ -426,27 +477,12 @@ max-width: 295px; margin: 4em auto 0; } - .btn { - cursor: pointer; - transition: 300ms all ease-in-out; - font-size: 1em; - } - .btn:hover { - background-color: rgba(0,0,0,0.1); - } - .container__buttons--btn{ - width: 75px; - height: 75px; - border: 1px solid white; - background: transparent; - color: white; + .container__buttons--btn { font-size: 24px; } .answer{ - display: flex; - flex-direction: column; padding: 1em 0 1em 0; - flex-basis: 100%; + text-align: left; } .answer__title{ color: white; @@ -494,13 +530,20 @@ top: 10px; } - button:focus {outline:0;} - .restart{ - color: white; - background: transparent; - border: 1px solid white; - width: 100px; - height: 30px; - position: relative; + .answer-cta { + color: #fff; + border: 2px solid; + padding: 1em 1.2em; + margin-bottom: 2em; + line-height: 1.5; + } + .answer-cta-title { + text-transform: uppercase; + margin-bottom: 0.5em; + line-height: 1; + } + + button:focus { + outline: 0; } diff --git a/src/main.js b/src/main.js index 7025c72..ea7046b 100644 --- a/src/main.js +++ b/src/main.js @@ -14,11 +14,15 @@ const messages = { mainDescription: "Find the financing option that matches your needs", selectCountry:"Select your country:", countryInfo :"( Depending on country of commissioning we offer different financial services )", + ok: "OK", yes: "Yes", no: "No", + back: "Back", Proposal: "Proposal", answerTitle: "Based on your answers we propose:", restart: "Restart", + contactUs: "Contact Us", + contactUsText: "For more information or a credit request, please contact our customer finance specialists directly at sandvikcredit@sandvik.com", questions: { O: "Do you want to own your equipment from day 1?", G: "Would you prefer to own the equipment at the end of the term, like a Hire Purchase agreement?", @@ -71,7 +75,7 @@ const messages = { }, T: { "title": "", - "content": `

You selected a country where we offer trade finance. Reach out to your local Sandvik contact, they will investigate the best possible financing solution for your needs. Thank you.

` + "content": `

You selected a country where we offer trade finance. Reach out to your local Sandvik contact, they will investigate the best possible financing solution for your needs. Thank you.

` }, NotAvailable: { "title": "", @@ -79,7 +83,7 @@ const messages = { }, NoMatch: { "title": "", - "content": `

We can´t match your needs with a financing solution applicable for the selected country, please restart the product selector.

` + "content": `

Reach out to your local Sandvik contact, to discuss a financing solution that fits your specific needs.

` }, }, countries: {