Skip to content

Commit

Permalink
feat(curation): Auto-expand first entity, display entity count
Browse files Browse the repository at this point in the history
Updated the CurationForm component to auto-expand the first curation
entity for user convenience. The modal's title now dynamically
displays the total count of curation entities, providing clear
feedback on the number of items being curated. This update enhances
the usability of the curation interface by streamlining the editing
process and improving at-a-glance information availability.

closes: #111
  • Loading branch information
berntpopp committed Apr 11, 2024
1 parent f6710f3 commit 51f5d0e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/CurationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
<template>
<v-card class="elevation-2">
<v-card-title>
Curation
Curation ({{ curationEntityCount }} Entities)
<HelpIcon :helpContent="helpContent" />
<v-btn icon class="add-curation-btn" @click="addCurationEntity">
<v-icon>mdi-plus</v-icon>
</v-btn>
</v-card-title>

<!-- Expansion Panels for multiple curation entities -->
<v-expansion-panels multiple>
<v-expansion-panels
multiple
open
v-model="openedPanels"
>
<v-expansion-panel v-for="(curationData, index) in curationDataArray" :key="`curation-${index}`" :title="`Curation Entity ${ index + 1 }`">
<v-expansion-panel-text>
<!-- Dynamic Field Rendering Based on Configuration -->
Expand Down Expand Up @@ -161,6 +165,7 @@ export default {
snackbarTitle: '',
snackbarColor: 'success',
helpContent: workflowConfig.stages.curation.helpConfig,
openedPanels: [0],
};
},
async created() {
Expand Down Expand Up @@ -198,6 +203,9 @@ export default {

return groups;
},
curationEntityCount() {
return this.curationDataArray.length;
},
},
methods: {
getFieldRules(field) {
Expand Down

0 comments on commit 51f5d0e

Please sign in to comment.