id what this is
This commit is contained in:
+1
-1
Submodule netcode/events updated: fc3f0e1677...1473c5c132
@@ -0,0 +1,31 @@
|
||||
import { useConceptStore } from "~/store/concepts.store";
|
||||
import type {
|
||||
ConceptCreateEvent,
|
||||
ConceptDeleteEvent,
|
||||
ConceptDisableEvent,
|
||||
ConceptEditEvent,
|
||||
ConceptEnableEvent,
|
||||
} from "../events/concept.events";
|
||||
|
||||
export const handlers = {
|
||||
create: (event: ConceptCreateEvent) => {
|
||||
const conceptStore = useConceptStore();
|
||||
conceptStore.concepts[event.concept.id] = event.concept;
|
||||
},
|
||||
edit: (event: ConceptEditEvent) => {
|
||||
const conceptStore = useConceptStore();
|
||||
conceptStore.concepts[event.concept.id].value = event.concept.value;
|
||||
},
|
||||
delete: (event: ConceptDeleteEvent) => {
|
||||
const conceptStore = useConceptStore();
|
||||
delete conceptStore.concepts[event.id];
|
||||
},
|
||||
// enable: (event: ConceptEnableEvent) => {
|
||||
// const conceptStore = useConceptStore();
|
||||
// conceptStore.concepts[event.id].enabled = true;
|
||||
// },
|
||||
// disable: (event: ConceptDisableEvent) => {
|
||||
// const conceptStore = useConceptStore();
|
||||
// conceptStore.concepts[event.id].enabled = false;
|
||||
// },
|
||||
};
|
||||
Reference in New Issue
Block a user