diff --git a/client/src/components/RecordingAnnotationEditor.vue b/client/src/components/RecordingAnnotationEditor.vue index 59d2b062..501a370e 100644 --- a/client/src/components/RecordingAnnotationEditor.vue +++ b/client/src/components/RecordingAnnotationEditor.vue @@ -51,7 +51,7 @@ export default defineComponent({ default: () => undefined, }, }, - emits: ['update:annotation', 'delete:annotation'], + emits: ['update:annotation', 'delete:annotation', 'submit:annotation'], setup(props, { emit }) { const { configuration, currentUser } = useState(); const speciesEdit: Ref = ref( props.annotation?.species?.map((item) => item.species_code || item.common_name) || []); @@ -105,8 +105,8 @@ export default defineComponent({ const submitAnnotation = async () => { if (props.annotation && props.recordingId) { - await submitFileAnnotation(props.annotation.id); - emit('update:annotation'); + const response = await submitFileAnnotation(props.annotation.id); + emit('submit:annotation', props.annotation, response.data.submitted); } }; diff --git a/client/src/components/RecordingAnnotations.vue b/client/src/components/RecordingAnnotations.vue index 5ae57589..6951b98a 100644 --- a/client/src/components/RecordingAnnotations.vue +++ b/client/src/components/RecordingAnnotations.vue @@ -1,5 +1,5 @@