remove concept

This commit is contained in:
2025-05-06 14:25:09 +02:00
parent 1259e48681
commit ae373b3528
4 changed files with 0 additions and 209 deletions
-31
View File
@@ -1,31 +0,0 @@
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;
// },
};