changed to new structure
This commit is contained in:
parent
5cbb6f4228
commit
170eff0ed8
34 changed files with 173 additions and 268 deletions
57
src/App.vue
57
src/App.vue
|
|
@ -1,18 +1,53 @@
|
|||
<template>
|
||||
<!-- Comment -->
|
||||
|
||||
<div class="container-lg">
|
||||
<router-view />
|
||||
</div>
|
||||
<router-view></router-view>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="text-center text-secondary fs-5 mb-4">Select a year to get started</p>
|
||||
<p class="text-center fs-6 fw-bold">What year is your vehichle?</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<buttonPrimary />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<radioCard radioLabel="Windshield" radioImage="windshield-damage.svg" altText="Windshield" groupName="damageKey" radioID="windshield" />
|
||||
<radioCard radioLabel="Side Window" radioImage="side-window-damage.svg" altText="Side Window" groupName="damageKey" radioID="sidewindow" />
|
||||
<radioCard radioLabel="Back Glass" radioImage="back-glass-damage.svg" altText="Back Glass" groupName="damageKey" radioID="backglass" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<buttonPrimary buttonText="Primary" buttonType="btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<buttonPrimary buttonText="Primary Focus" buttonType="btn-primary-focus" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<buttonPrimary buttonText="Disabled" buttonType="disabled" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<a href="#">Text Link</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import buttonPrimary from '@/uxComponents/buttonPrimary/buttonPrimary';
|
||||
import radioCard from '@/uxComponents/radioCard/radioCard';
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
|
||||
}
|
||||
name: 'App',
|
||||
components: {
|
||||
buttonPrimary,
|
||||
radioCard
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
0
src/commonComponents/baseTemplate/baseTemplate.spec.js
Normal file
0
src/commonComponents/baseTemplate/baseTemplate.spec.js
Normal file
0
src/commonComponents/carAttributes/carAttributes.spec.js
Normal file
0
src/commonComponents/carAttributes/carAttributes.spec.js
Normal file
|
|
@ -2,7 +2,7 @@
|
|||
<form class="list-view d-flex">
|
||||
<div class="car_list">
|
||||
<div v-for="attritbute in attritbutes" :key="attritbute" class="mb-2">
|
||||
<Button
|
||||
<buttonPrimary
|
||||
:buttonText="attritbute"
|
||||
v-on:click="selectAttribute(attritbute)"
|
||||
buttonType="btn-funnel"
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Button from '@/sharedcomponents/Buttons/Button';
|
||||
import buttonPrimary from '@/uxComponents/buttonPrimary/buttonPrimary';
|
||||
|
||||
export default {
|
||||
name: 'CarAttributes',
|
||||
|
|
@ -22,7 +22,7 @@ export default {
|
|||
selectAttribute: Function
|
||||
},
|
||||
components: {
|
||||
Button
|
||||
buttonPrimary
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<baseTemplate
|
||||
:currentCarInfo="year + ' ' + make + ' ' + model"
|
||||
neededCarInfo="What is your damage?"
|
||||
>
|
||||
<div class="damage-section text-center">
|
||||
<div class="choose-damage row">
|
||||
<div class="col">
|
||||
<imageButton
|
||||
btnImg="windshield-damage.svg"
|
||||
altText="Windshield"
|
||||
damageTitle="Windshield"
|
||||
ariaLabel="Windshield"
|
||||
v-on:click="chooseDamage('windshield')"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<imageButton
|
||||
btnImg="side-window-damage.svg"
|
||||
altText="Side Window"
|
||||
damageTitle="Side door"
|
||||
ariaLabel="Side door"
|
||||
v-on:click="chooseDamage('side-window')"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<imageButton
|
||||
btnImg="back-glass-damage.svg"
|
||||
altText="Back Glass"
|
||||
damageTitle="Back glass"
|
||||
ariaLabel="Back glass"
|
||||
v-on:click="chooseDamage('side-glass')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<div v-if="damage" class="how-bad mt-3">
|
||||
<span class="text-center fs-6 fw-bold">How bad is it?</span>
|
||||
<div class="choose-how-bad row mt-2">
|
||||
<div class="col">
|
||||
<imageButton
|
||||
btnImg="windshield-damage.svg"
|
||||
altText="Windshield"
|
||||
damageTitle="Windshield"
|
||||
ariaLabel="Windshield"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<imageButton
|
||||
btnImg="side-window-damage.svg"
|
||||
altText="Side Window"
|
||||
damageTitle="Side door"
|
||||
ariaLabel="Side door"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<div class="next-action row">
|
||||
<div class="col">
|
||||
<div v-on:click="goBack" class="change">
|
||||
<span>Change Vehicle</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</baseTemplate>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseTemplate from '../BaseTemplate';
|
||||
import imageButton from '@/sharedcomponents/Buttons/ImageButton'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'SelectCar',
|
||||
computed: {
|
||||
...mapState(['year', 'make', 'model'])
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
damage: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseDamage(damage){
|
||||
this.damage = damage
|
||||
console.log(this.damage)
|
||||
},
|
||||
goBack(){
|
||||
this.$store.state.slideTransition = 'slide_reverse';
|
||||
this.$store.commit('removeStyle')
|
||||
this.$router.push(`/select-style?year=${this.$store.state.year}&make=${this.$store.state.make}`);
|
||||
}
|
||||
},
|
||||
components: {
|
||||
baseTemplate,
|
||||
imageButton
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<template>
|
||||
<div class="home">
|
||||
<h1>Home</h1>
|
||||
<router-link to="/select-year">SelectCar</router-link>
|
||||
</div>
|
||||
</template>
|
||||
0
src/layouts/home/home.spec.js
Normal file
0
src/layouts/home/home.spec.js
Normal file
0
src/layouts/notFound/notFound.spec.js
Normal file
0
src/layouts/notFound/notFound.spec.js
Normal file
0
src/layouts/selectDamage/selectDamage.spec.js
Normal file
0
src/layouts/selectDamage/selectDamage.spec.js
Normal file
75
src/layouts/selectDamage/selectDamage.vue
Normal file
75
src/layouts/selectDamage/selectDamage.vue
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<div>
|
||||
<baseTemplate :currentCarInfo="year + ' ' + make + ' ' + model" neededCarInfo="What is your damage?">
|
||||
<div class="damage-section text-center">
|
||||
<div class="choose-damage row">
|
||||
<div class="col">
|
||||
<radioCard />
|
||||
</div>
|
||||
<div class="col">
|
||||
<radioCard />
|
||||
</div>
|
||||
<div class="col">
|
||||
<radioCard />
|
||||
</div>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<div v-if="damage" class="how-bad mt-3">
|
||||
<span class="text-center fs-6 fw-bold">How bad is it?</span>
|
||||
<div class="choose-how-bad row mt-2">
|
||||
<div class="col">
|
||||
<radioCard />
|
||||
</div>
|
||||
<div class="col">
|
||||
<radioCard />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<div class="next-action row">
|
||||
<div class="col">
|
||||
<div v-on:click="goBack" class="change">
|
||||
<span>Change Vehicle</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</baseTemplate>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseTemplate from '@/commonComponents/baseTemplate/baseTemplate';
|
||||
import radioCard from '@/uxComponents/radioCard/radioCard';
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'SelectCar',
|
||||
computed: {
|
||||
...mapState(['year', 'make', 'model'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
damage: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseDamage(damage) {
|
||||
this.damage = damage
|
||||
console.log(this.damage)
|
||||
},
|
||||
goBack() {
|
||||
this.$store.state.slideTransition = 'slide_reverse';
|
||||
this.$store.commit('removeStyle')
|
||||
this.$router.push(`/select-style?year=${this.$store.state.year}&make=${this.$store.state.make}`);
|
||||
}
|
||||
},
|
||||
components: {
|
||||
baseTemplate,
|
||||
radioCard
|
||||
}
|
||||
}
|
||||
</script>
|
||||
0
src/layouts/selectMake/selectMake.spec.js
Normal file
0
src/layouts/selectMake/selectMake.spec.js
Normal file
|
|
@ -5,7 +5,7 @@
|
|||
neededCarInfo="What make is your vehicle?"
|
||||
:backFunction="goBack"
|
||||
>
|
||||
<CarAttributes
|
||||
<carAttributes
|
||||
:attritbutes="makes"
|
||||
:selectAttribute="selectMake"
|
||||
/>
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baseTemplate from '../BaseTemplate';
|
||||
import CarAttributes from './CarAttributes'
|
||||
import baseTemplate from '@/commonComponents/baseTemplate/baseTemplate';
|
||||
import carAttributes from '@/commonComponents/carAttributes/carAttributes';
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
export default {
|
||||
|
|
@ -34,7 +34,7 @@ export default {
|
|||
},
|
||||
components: {
|
||||
baseTemplate,
|
||||
CarAttributes
|
||||
carAttributes
|
||||
}
|
||||
}
|
||||
</script>
|
||||
0
src/layouts/selectModel/selectModel.spec.js
Normal file
0
src/layouts/selectModel/selectModel.spec.js
Normal file
|
|
@ -5,7 +5,7 @@
|
|||
:neededCarInfo="'What is the model of your ' + make + '?'"
|
||||
:backFunction="goBack"
|
||||
>
|
||||
<CarAttributes
|
||||
<carAttributes
|
||||
:attritbutes="models"
|
||||
:selectAttribute="selectModel"
|
||||
/>
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baseTemplate from '../BaseTemplate';
|
||||
import CarAttributes from './CarAttributes'
|
||||
import baseTemplate from '@/commonComponents/baseTemplate/baseTemplate';
|
||||
import carAttributes from '@/commonComponents/carAttributes/carAttributes';
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
|
|
@ -34,7 +34,7 @@ export default {
|
|||
},
|
||||
components: {
|
||||
baseTemplate,
|
||||
CarAttributes
|
||||
carAttributes
|
||||
}
|
||||
}
|
||||
</script>
|
||||
0
src/layouts/selectStyle/selectStyle.spec.js
Normal file
0
src/layouts/selectStyle/selectStyle.spec.js
Normal file
|
|
@ -5,7 +5,7 @@
|
|||
:neededCarInfo="'What style is your ' + model + '?'"
|
||||
:backFunction="goBack"
|
||||
>
|
||||
<CarAttributes
|
||||
<carAttributes
|
||||
:attritbutes="styles"
|
||||
:selectAttribute="selectStyle"
|
||||
/>
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baseTemplate from '../BaseTemplate';
|
||||
import CarAttributes from './CarAttributes'
|
||||
import baseTemplate from '@/commonComponents/baseTemplate/baseTemplate';
|
||||
import carAttributes from '@/commonComponents/carAttributes/carAttributes';
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
|
|
@ -34,7 +34,7 @@ export default {
|
|||
},
|
||||
components: {
|
||||
baseTemplate,
|
||||
CarAttributes
|
||||
carAttributes
|
||||
}
|
||||
}
|
||||
</script>
|
||||
0
src/layouts/selectYear/selectYear.spec.js
Normal file
0
src/layouts/selectYear/selectYear.spec.js
Normal file
|
|
@ -4,7 +4,7 @@
|
|||
currentCarInfo="Select a year to get started"
|
||||
neededCarInfo="What year is your vehicle?"
|
||||
>
|
||||
<CarAttributes
|
||||
<carAttributes
|
||||
:attritbutes="years"
|
||||
:selectAttribute="selectYear"
|
||||
/>
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baseTemplate from '../BaseTemplate';
|
||||
import CarAttributes from './CarAttributes'
|
||||
import baseTemplate from '@/commonComponents/baseTemplate/baseTemplate';
|
||||
import carAttributes from '@/commonComponents/carAttributes/carAttributes';
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
|
|
@ -36,7 +36,7 @@ export default {
|
|||
},
|
||||
components: {
|
||||
baseTemplate,
|
||||
CarAttributes
|
||||
carAttributes
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { createWebHistory, createRouter } from "vue-router";
|
||||
import { getRouteData } from "@/router/dynamic-routing/route-compile.js";
|
||||
import NotFound from "@/layouts/NotFound.vue";
|
||||
import Home from "@/layouts/Home.vue";
|
||||
import NotFound from "@/layouts/notFound/notFound.vue";
|
||||
import Home from "@/layouts/home/home.vue";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
<template>
|
||||
<button
|
||||
type="button"
|
||||
class="btn"
|
||||
v-bind:class="[(this.buttonType === 'btn-funnel' ? ['btn-funnel', 'border', 'rounded', 'w-100', 'text-start'] : this.buttonType)]"
|
||||
v-on:click="this.buttonType === 'btn-funnel' ? showLoader() : null"
|
||||
>
|
||||
{{ this.buttonText }}
|
||||
|
||||
|
||||
<!-- Spinner for funnel Button -->
|
||||
<div v-if="this.buttonType === 'btn-funnel' && this.isLoading" class="spinner-border spinner-border-sm text-success" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'button',
|
||||
props: {
|
||||
buttonText: String,
|
||||
buttonType: String
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showLoader(){
|
||||
this.isLoading = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<template>
|
||||
<button class="btn-damage d-flex flex-column align-items-center rounded-3 h-100" v-bind:aria-label="ariaLabel">
|
||||
<img class="px-1 pt-3 pb-1 mt-auto" v-bind:src="require(`@/assets/img/icons/${btnImg}`)" v-bind:alt="altText"/>
|
||||
<p class="mt-auto">{{damageTitle}}</p>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'imageButton',
|
||||
props: ['btnImg', 'altText', 'damageTitle', 'ariaLabel']
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
describe("HeaderNav.vue", () => {
|
||||
|
||||
test("Some Example Test == True", () => {
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
|
||||
})
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<template>
|
||||
<div class="container my-4">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<nav class="navbar navbar-expand-lg navbar-light p-0">
|
||||
<div class="container-fluid d-flex align-items-end px-0">
|
||||
<a href="#">
|
||||
<img class="logo" src="@/assets/img/logo.svg" alt="Safelite" aria-current="page">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
||||
<ul class="navbar-nav d-flex align-items-lg-end ms-3">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle px-0 px-lg-4 py-2 py-lg-0 link-secondary lh-1" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Services
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<li><a class="dropdown-item" href="#">Service 1</a></li>
|
||||
<li><a class="dropdown-item" href="#">Service 2</a></li>
|
||||
<li><a class="dropdown-item" href="#">Service 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item lh-1">
|
||||
<a class="nav-link px-0 px-lg-4 py-2 py-lg-0 link-secondary" href="#">Locations</a>
|
||||
</li>
|
||||
<li class="nav-item lh-1">
|
||||
<a class="nav-link px-0 px-lg-4 py-2 py-lg-0 link-secondary" href="#">We're Hiring</a>
|
||||
</li>
|
||||
<li class="nav-item lh-1">
|
||||
<a class="nav-link px-0 px-lg-4 py-2 py-lg-0 link-secondary" href="#">My Appointment</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HeaderNav'
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<template>
|
||||
<div><!-- Add helper classes to wrapper div if margin is needed -->
|
||||
<!-- Hide label but still accessible to screen reader with .visually-hidden -->
|
||||
<label for="exampleFormControlInput1" class="form-label visually-hidden">Email address</label>
|
||||
<input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name@example.com">
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<template>
|
||||
<div class="col-4 mb-3">
|
||||
<button class="btn-damage d-flex flex-column align-items-center rounded-3 h-100" v-bind:aria-label="ariaLabel">
|
||||
<img class="px-1 pt-3 pb-1 mt-auto" v-bind:src="require(`@/assets/img/icons/${btnText}`)" v-bind:alt="altText"/>
|
||||
<p class="mt-auto">{{damageTitle}}</p>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'imageButton',
|
||||
props: ['btnText', 'altText', 'damageTitle', 'ariaLabel']
|
||||
}
|
||||
</script>
|
||||
0
src/uxComponents/buttonPrimary/buttonPrimary.spec.js
Normal file
0
src/uxComponents/buttonPrimary/buttonPrimary.spec.js
Normal file
31
src/uxComponents/buttonPrimary/buttonPrimary.vue
Normal file
31
src/uxComponents/buttonPrimary/buttonPrimary.vue
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<template>
|
||||
<button type="button" class="btn" v-bind:class="[(this.buttonType === 'btn-funnel' ? ['btn-funnel', 'border', 'rounded', 'w-100', 'text-start'] : this.buttonType)]" v-on:click="this.buttonType === 'btn-funnel' ? showLoader() : null">
|
||||
{{ this.buttonText }}
|
||||
|
||||
<!-- Spinner for funnel Button -->
|
||||
<div v-if="this.buttonType === 'btn-funnel' && this.isLoading" class="spinner-border spinner-border-sm text-success" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'button',
|
||||
props: {
|
||||
buttonText: String,
|
||||
buttonType: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showLoader() {
|
||||
this.isLoading = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
0
src/uxComponents/confetti/confetti.spec.js
Normal file
0
src/uxComponents/confetti/confetti.spec.js
Normal file
0
src/uxComponents/radioCard/radioCard.spec.js
Normal file
0
src/uxComponents/radioCard/radioCard.spec.js
Normal file
Loading…
Reference in a new issue