ff-admin/src/router/unit/vehicle.ts

21 lines
519 B
TypeScript
Raw Normal View History

2025-03-26 16:56:07 +01:00
import { useVehicleStore } from "@/stores/admin/unit/vehicle/vehicle";
export async function setVehicleId(to: any, from: any, next: any) {
const VehicleStore = useVehicleStore();
VehicleStore.activeVehicle = to.params?.vehicleId ?? null;
//useXYStore().$reset();
next();
}
export async function resetVehicleStores(to: any, from: any, next: any) {
const VehicleStore = useVehicleStore();
VehicleStore.activeVehicle = null;
VehicleStore.activeVehicleObj = null;
//useXYStore().$reset();
next();
}