Skip to content

Commit

Permalink
fix: rename docId to id
Browse files Browse the repository at this point in the history
  • Loading branch information
berntpopp committed Apr 11, 2024
1 parent 51f5d0e commit dfba8ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/CurationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/PrecurationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit dfba8ae

Please sign in to comment.