dev merge

This commit is contained in:
Max 2021-11-04 17:08:33 -04:00
parent 6364d81c3c
commit 2db9ccfdf0
2 changed files with 64 additions and 57 deletions

View file

@ -19,6 +19,7 @@ import radioQuestion from "@/commonComponents/radioQuestion/radioQuestion";
import Header from "@/uxComponents/header/header"; import Header from "@/uxComponents/header/header";
import { endpoints } from "@/constants/endpoints.js"; import { endpoints } from "@/constants/endpoints.js";
import globalMethods from "@/global-methods"; import globalMethods from "@/global-methods";
import axios from "axios";
export default { export default {
name: "SelectCar", name: "SelectCar",
@ -28,7 +29,7 @@ export default {
}; };
}, },
mounted() { mounted() {
return globalMethods.callHttpClient({ globalMethods.callHttpClient({
method: endpoints.GetYears.method, method: endpoints.GetYears.method,
endpoint: endpoints.GetYears.url, endpoint: endpoints.GetYears.url,
payload:{} payload:{}
@ -36,6 +37,26 @@ export default {
.then( (response) => { .then( (response) => {
this.years = response.data.Result; this.years = response.data.Result;
}); });
// Sample Call to Mockey to represent real data being sent back from the API, and how the modles are supposed to
// be prosessed and passed to child components.
axios.get("https://mockey.qa.sagaws.net/service/content/selectYear").then((response) => {
response.data.Result.forEach((m) => {
switch (m.Type) {
case this.widgetNames.PAGE_HEADING_WIDGET: {
this.pageHeader = m.Model;
break;
}
case this.widgetNames.RADIO_QUESTION_WIDGET: {
this.radioQuestion = m.Model;
break;
}
default: {
break;
}
}
})
});
}, },
methods: { methods: {
selectYear(year) { selectYear(year) {
@ -48,26 +69,5 @@ export default {
radioQuestion, radioQuestion,
Header, Header,
}, },
// Sample Call to Mockey to represent real data being sent back from the API, and how the modles are supposed to
});
})
}
}
break;
}
default: {
break;
this.radioQuestion = m.Model;
case this.widgetNames.RADIO_QUESTION_WIDGET: {
}
this.pageHeader = m.Model;
break;
case this.widgetNames.PAGE_HEADING_WIDGET: {
switch (m.Type) {
response.data.Result.forEach((m) => {
// be prosessed and passed to child components.
axios.get("https://mockey.qa.sagaws.net/service/content/selectYear").then((response) => {
}; };
</script> </script>

View file

@ -148,11 +148,11 @@ caption {
.select-car { .select-car {
height: 100vh; height: 100vh;
.select-car-form { .select-car-form, .car_info, .radio_question {
background: $white; background: $white;
height: 100%; height: 100%;
form { .list-view {
height: calc(100% - 230px); height: calc(100% - 230px);
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
@ -174,6 +174,13 @@ caption {
position: absolute; position: absolute;
} }
} }
.back-button {
margin-left: 5px;
img {
width: 20px;
}
}
} }
.slide-enter-from { .slide-enter-from {