21 lines
551 B
TypeScript
21 lines
551 B
TypeScript
|
import { useEquipmentStore } from "@/stores/admin/unit/equipment/equipment";
|
||
|
|
||
|
export async function setEquipmentId(to: any, from: any, next: any) {
|
||
|
const EquipmentStore = useEquipmentStore();
|
||
|
EquipmentStore.activeEquipment = to.params?.equipmentId ?? null;
|
||
|
|
||
|
//useXYStore().$reset();
|
||
|
|
||
|
next();
|
||
|
}
|
||
|
|
||
|
export async function resetEquipmentStores(to: any, from: any, next: any) {
|
||
|
const EquipmentStore = useEquipmentStore();
|
||
|
EquipmentStore.activeEquipment = null;
|
||
|
EquipmentStore.activeEquipmentObj = null;
|
||
|
|
||
|
//useXYStore().$reset();
|
||
|
|
||
|
next();
|
||
|
}
|