20 lines
519 B
TypeScript
20 lines
519 B
TypeScript
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();
|
|
}
|