protocol data stores
This commit is contained in:
parent
8664836a20
commit
41b300fb72
15 changed files with 259 additions and 31 deletions
|
@ -1,9 +1,18 @@
|
|||
import { useProtocolStore } from "@/stores/admin/protocol";
|
||||
import { useProtocolAgendaStore } from "@/stores/admin/protocolAgenda";
|
||||
import { useProtocolDecisionStore } from "@/stores/admin/protocolDecision";
|
||||
import { useProtocolPresenceStore } from "@/stores/admin/protocolPresence";
|
||||
import { useProtocolVotingStore } from "@/stores/admin/protocolVoting";
|
||||
|
||||
export async function setProtocolId(to: any, from: any, next: any) {
|
||||
const protocol = useProtocolStore();
|
||||
protocol.activeProtocol = to.params?.protocolId ?? null;
|
||||
|
||||
useProtocolAgendaStore().$reset();
|
||||
useProtocolDecisionStore().$reset();
|
||||
useProtocolPresenceStore().$reset();
|
||||
useProtocolVotingStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
|
@ -12,5 +21,10 @@ export async function resetProtocolStores(to: any, from: any, next: any) {
|
|||
protocol.activeProtocol = null;
|
||||
protocol.activeProtocolObj = null;
|
||||
|
||||
useProtocolAgendaStore().$reset();
|
||||
useProtocolDecisionStore().$reset();
|
||||
useProtocolPresenceStore().$reset();
|
||||
useProtocolVotingStore().$reset();
|
||||
|
||||
next();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue