diff --git a/src/components/architecture/crc-card.vue b/src/components/architecture/crc-card.vue index 462cf6c..b5f35e1 100644 --- a/src/components/architecture/crc-card.vue +++ b/src/components/architecture/crc-card.vue @@ -7,10 +7,12 @@ interface Props { responsabilities?: string[] collaborators?: string[] editable?: boolean + isPlayground?: boolean } const emits = defineEmits<{ (e: "submit", crc: CrcCardEntity): void + (e: "remove", crcName: string): void }>() const props = withDefaults(defineProps(), { @@ -18,6 +20,7 @@ const props = withDefaults(defineProps(), { responsabilities: () => [], collaborators: () => [], editable: false, + isPlayground: false, }) const componentName = ref(props.name) @@ -65,6 +68,10 @@ const clearCard = () => { } const submitCard = () => { + if (!componentName.value) { + return + } + emits("submit", { name: componentName.value, responsabilities: allReponsabilities.value, @@ -72,6 +79,14 @@ const submitCard = () => { }) clearCard() } + +const removeCard = () => { + if (!componentName.value) { + return + } + + emits("remove", componentName.value) +}