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

20 lines
647 B
TypeScript

import { useRespiratoryGearStore } from "@/stores/admin/unit/respiratoryGear/respiratoryGear";
export async function setRespiratoryGearId(to: any, from: any, next: any) {
const respiratoryGearStore = useRespiratoryGearStore();
respiratoryGearStore.activeRespiratoryGear = to.params?.respiratoryGearId ?? null;
//useXYStore().$reset();
next();
}
export async function resetRespiratoryGearStores(to: any, from: any, next: any) {
const respiratoryGearStore = useRespiratoryGearStore();
respiratoryGearStore.activeRespiratoryGear = null;
respiratoryGearStore.activeRespiratoryGearObj = null;
//useXYStore().$reset();
next();
}