CSR-1129: create schedule page, put date picker on it

This commit is contained in:
Adam Caouette 2023-04-05 10:56:34 -04:00
parent 6c8438beac
commit fb0280fa18
7 changed files with 260 additions and 235 deletions

View file

@ -15,9 +15,10 @@ module.exports = {
"!src/layouts/vehicle-damage/windshield-options/windshield-options.vue", "!src/layouts/vehicle-damage/windshield-options/windshield-options.vue",
"!src/layouts/reveal/**/*.vue", "!src/layouts/reveal/**/*.vue",
"!src/ux-components/text-link/**/*.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/layouts/vin-lookup/**/*.vue", //Temporary for Quote page testing
"!src/common-components/funnel-header/menu-modal/**/*.vue", "!src/common-components/funnel-header/menu-modal/**/*.vue",
"!src/layouts/schedule/*.vue", // Temp test exclusion while in development
// END // END
], // ! means exclude from coverage. ], // ! means exclude from coverage.
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],

View file

@ -26,6 +26,7 @@ const errorMessages = {
OPTION_REQUIRED: "Please select an option", OPTION_REQUIRED: "Please select an option",
VEHICLE_REQUIRED: "Please select a vehicle", VEHICLE_REQUIRED: "Please select a vehicle",
MOBILE_LOCATION_REQUIRED: "Please enter your service address", MOBILE_LOCATION_REQUIRED: "Please enter your service address",
DATE_REQUIRED: "Please select a date",
}; };
export { errorMessages }; export { errorMessages };

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="date-picker" :class="calendarViewDirection"> <div class="date-picker text-center" :class="calendarViewDirection">
<fieldset v-if="months"> <fieldset v-if="months">
<legend class="sr-only">Date Picker</legend> <legend class="sr-only">Date Picker</legend>
<div <div
@ -51,7 +51,7 @@
<button <button
v-if="calendarViewDirection === 'future'" v-if="calendarViewDirection === 'future'"
type="button" type="button"
class="btn-link" class="btn btn-link"
@click="goForward"> @click="goForward">
View more dates View more dates
</button> </button>
@ -371,6 +371,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.date-picker {
.calendar-grid-container { .calendar-grid-container {
margin: 0 auto; margin: 0 auto;
max-width: 414px; max-width: 414px;
@ -575,6 +576,10 @@ export default {
} }
} }
} }
.btn-link {
font-weight: 500;
text-underline-offset: 4px;
}
.past { .past {
.calendar-grid-container { .calendar-grid-container {
.month-year { .month-year {
@ -631,4 +636,6 @@ export default {
} }
} }
} }
}
</style> </style>

View file

@ -29,7 +29,6 @@ import { experimentTriggers } from "../constants/experiments";
import { applicationConfig } from "../constants/application-config"; import { applicationConfig } from "../constants/application-config";
// Components // Components
import quote from "@/layouts/quote/quote.vue";
import datePicker from "@/digital-components/date-picker/date-picker.vue"; import datePicker from "@/digital-components/date-picker/date-picker.vue";
import demoDatePicker from "@/layouts/demo-date-picker/demo-date-picker.vue"; import demoDatePicker from "@/layouts/demo-date-picker/demo-date-picker.vue";

View file

@ -16,6 +16,7 @@ const fmgPageValues = {
QUOTE: "quote", QUOTE: "quote",
SERVICE_LOCATION: "service-location", SERVICE_LOCATION: "service-location",
HERITAGE: "heritage", HERITAGE: "heritage",
SCHEDULE: "schedule",
}; };
export { fmgPageValues }; export { fmgPageValues };

View file

@ -45,6 +45,9 @@ const navigationScenarios = {
CLICKED_BACK_WITH_CAPABILITY_QUESTIONS: "CLICKED_BACK_WITH_CAPABILITY_QUESTIONS", CLICKED_BACK_WITH_CAPABILITY_QUESTIONS: "CLICKED_BACK_WITH_CAPABILITY_QUESTIONS",
CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS: "CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS", CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS: "CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS",
CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS: "CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS", CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS: "CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS",
// Scheduling
SELECTED_LOCATION: "SELECTED_LOCATION",
}; };
export { navigationScenarios }; export { navigationScenarios };

View file

@ -420,6 +420,19 @@ const routingTable = function (store) {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationFmgPageValue: fmgPageValues.QUOTE, destinationFmgPageValue: fmgPageValues.QUOTE,
}, },
{
scenario: navigationScenarios.SELECTED_LOCATION,
destinationFmgPageValue: fmgPageValues.SCHEDULE,
},
],
},
{
fmgPageValue: fmgPageValues.SCHEDULE,
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
destinationFmgPageValue: fmgPageValues.SERVICE_LOCATION,
},
], ],
}, },
]; ];