diff --git a/src/components/CurationForm.vue b/src/components/CurationForm.vue index 1dbdbb2..ede5e3c 100644 --- a/src/components/CurationForm.vue +++ b/src/components/CurationForm.vue @@ -265,9 +265,8 @@ export default { // Add precuration data as nested object using document id as key if (this.precurationDetails && this.precurationDetails.id) { - const precurationDocId = this.precurationDetails.id; // Creating a nested object with docId as key - data['precurationDetails'] = { [precurationDocId]: this.precurationDetails }; + data['precurationDetails'] = { [this.precurationDetails.id]: this.precurationDetails }; } return data; diff --git a/src/components/PrecurationForm.vue b/src/components/PrecurationForm.vue index 16ec426..44f89aa 100644 --- a/src/components/PrecurationForm.vue +++ b/src/components/PrecurationForm.vue @@ -285,7 +285,7 @@ export default { } // Emit an event to indicate successful submission, including the docId - this.$emit('precuration-accepted', { docId, ...this.precurationData }); + this.$emit('precuration-accepted', { id: docId, ...this.precurationData }); } catch (error) { this.showSnackbar('Error', error.message || "There was an error submitting the precuration", 'error'); }