17 lines
440 B
TypeScript
17 lines
440 B
TypeScript
|
import { useProtocolStore } from "@/stores/admin/protocol";
|
||
|
|
||
|
export async function setProtocolId(to: any, from: any, next: any) {
|
||
|
const protocol = useProtocolStore();
|
||
|
protocol.activeProtocol = to.params?.protocolId ?? null;
|
||
|
|
||
|
next();
|
||
|
}
|
||
|
|
||
|
export async function resetProtocolStores(to: any, from: any, next: any) {
|
||
|
const protocol = useProtocolStore();
|
||
|
protocol.activeProtocol = null;
|
||
|
protocol.activeProtocolObj = null;
|
||
|
|
||
|
next();
|
||
|
}
|