protocol base views
This commit is contained in:
parent
f453bdc7d3
commit
c1e9784b4a
14 changed files with 708 additions and 24 deletions
16
src/router/protocolGuard.ts
Normal file
16
src/router/protocolGuard.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue