Merge pull request #3079 from Safelite/feature/CASH-2264

CASH-2264 - Checking if we have vehicle before routing to Vehicle Damage
This commit is contained in:
mvalaiyapathi 2026-03-03 12:43:05 -05:00 committed by GitHub
commit 3f5be9ca06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,11 @@
import store from "@/store";
export function hasVehicleInfo() {
return (
store.getters.order?.vehicle.year &&
store.getters.order?.vehicle?.make &&
store.getters.order?.vehicle?.model &&
store.getters.order?.vehicle?.style &&
store.getters.order?.vehicle?.carId
);
}

View file

@ -3,6 +3,7 @@ import { getBoolFromString } from "@/helpers/boolean-helper";
import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
import { routeData } from "@/router/constants/routes";
import { isVerifiedInsurance } from "@/router/methods/helpers/requires-verified-redirect";
import { hasVehicleInfo } from "@/helpers/vehicle-helper";
import store from "@/store";
import { queryStrings } from "@/constants/query-strings";
import baseMixin from "@/mixins/base-mixin";
@ -33,7 +34,7 @@ export async function vehicleBeforeEnter(to, from) {
}
}
if (isVerifiedInsurance()) {
if (isVerifiedInsurance() && hasVehicleInfo()) {
return {
name: routeData.VEHICLE_DAMAGE.name,
replace: true,