From 831d4f8ecd859957b31f10180fbc22410fc54d1b Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 4 Mar 2025 09:38:04 -0500 Subject: [PATCH] CASH-276 CASH-276 initial changes to add heavy truck --- src/constants/store-mutations.js | 1 + src/constants/vehicle-categories.js | 6 +++ src/layouts/vehicle/vehicle.vue | 73 +++++++++++++++++++++++++++-- src/store/index.js | 19 +++++++- 4 files changed, 93 insertions(+), 6 deletions(-) diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index dceeac63e..a88f5dddb 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -9,6 +9,7 @@ const storeMutations = { UPDATE_MAKE: "updateMake", UPDATE_MODEL: "updateModel", UPDATE_STYLE: "updateStyle", + UPDATE_VEHICLE_SUBTYPE: "updateVehicleSubType", UPDATE_CAR_ID: "updateCarId", UPDATE_VEHICLE_CATEGORY: "updateVehicleCategory", UPDATE_VEHICLE_IMAGE_URL: "updateVehicleImageUrl", diff --git a/src/constants/vehicle-categories.js b/src/constants/vehicle-categories.js index 37ffcf5e1..9300f47e2 100644 --- a/src/constants/vehicle-categories.js +++ b/src/constants/vehicle-categories.js @@ -9,3 +9,9 @@ const vehicleCategories = { }; export { vehicleCategories }; + +const vehicleSubTypes = { + HEAVY_TRUCK: "HEAVY TRUCK", +}; + +export { vehicleSubTypes }; diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index 12e7268fa..4edccc675 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -48,6 +48,19 @@ validationRules="style-required" placeHolderText="Select style" customDropdownId="styleQuestionField" /> + +
+
+ +
+ @@ -557,4 +615,9 @@ export default { margin-top: 1.5rem; margin-bottom: 0; } +.separator-line { + grid-area: 2/1/2/8; + border-top: 1px solid $gray-500; + margin: 0.5rem 0; +} diff --git a/src/store/index.js b/src/store/index.js index 3408c0b26..2f3772255 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -61,6 +61,7 @@ const getDefaultState = () => { make: null, model: null, style: null, + vehicleSubType: null, carId: null, category: null, vin: null, @@ -210,6 +211,9 @@ export const mutations = { updateStyle(state, style) { state.order.vehicle.style = style; }, + updateVehicleSubType(state, vehicleSubType) { + state.order.vehicle.vehicleSubType = vehicleSubType; + }, updateCarId(state, carId) { state.order.vehicle.carId = carId; }, @@ -2121,6 +2125,7 @@ export const actions = { model: vehicle.model, style: vehicle.style, vin: vehicle.vin, + vehicleSubType: vehicle.vehicleSubType, registration: { firstName: vehicle.registration.firstName, lastName: vehicle.registration.lastName, @@ -2330,7 +2335,18 @@ export const actions = { // Vehicle saveVehicle( context, - { year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor } + { + year, + make, + model, + style, + vehicleSubType, + carId, + category, + imageUrl, + imageVifNumber, + imageVifColor, + } ) { if ( context.state.order.vehicle.year != year || @@ -2346,6 +2362,7 @@ export const actions = { context.commit(storeMutations.UPDATE_MAKE, make); context.commit(storeMutations.UPDATE_MODEL, model); context.commit(storeMutations.UPDATE_STYLE, style); + context.commit(storeMutations.UPDATE_VEHICLE_SUBTYPE, vehicleSubType); context.commit(storeMutations.UPDATE_CAR_ID, carId); context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);