diff --git a/src/managers/ContributorManager/ContributorManager.vue b/src/managers/ContributorManager/ContributorManager.vue index dd48b6527..5d14ec031 100644 --- a/src/managers/ContributorManager/ContributorManager.vue +++ b/src/managers/ContributorManager/ContributorManager.vue @@ -12,7 +12,6 @@ import ContributorsListPanel from '@/components/ListPanel/contributors/Contribut const props = defineProps({ submission: {type: Object, required: true}, publication: {type: Object, required: true}, - contributorForm: {type: Object, required: true}, canEdit: {type: Boolean, required: true}, }); diff --git a/src/managers/ContributorManager/contributorManagerStore.js b/src/managers/ContributorManager/contributorManagerStore.js index 785d40739..516e8292e 100644 --- a/src/managers/ContributorManager/contributorManagerStore.js +++ b/src/managers/ContributorManager/contributorManagerStore.js @@ -5,6 +5,7 @@ import {useUrl} from '@/composables/useUrl'; import {useLocalize} from '@/composables/useLocalize'; import {useForm} from '@/composables/useForm'; import {useDataChanged} from '@/composables/useDataChanged'; +import {useDashboardPageStore} from '@/pages/dashboard/dashboardPageStore.js'; export const useContributorManagerStore = defineComponentStore( 'contributorManager', @@ -15,7 +16,11 @@ export const useContributorManagerStore = defineComponentStore( `submissions/${props.submission.id}/publications/__publicationId__`, ); - const {form, setLocales} = useForm(props.contributorForm); + const dashboardStore = useDashboardPageStore(); + + const {form, setLocales} = useForm( + dashboardStore.componentForms.contributorForm, + ); setLocales(props.submission.metadataLocales); diff --git a/src/pages/dashboard/DashboardPage.vue b/src/pages/dashboard/DashboardPage.vue index e9e6db820..3b58c8e8d 100644 --- a/src/pages/dashboard/DashboardPage.vue +++ b/src/pages/dashboard/DashboardPage.vue @@ -65,8 +65,8 @@ const props = defineProps({ selectRevisionDecisionForm: {type: Object, required: true}, /** Form for selection type of revision for recommending editor */ selectRevisionRecommendationForm: {type: Object, required: true}, - /** Form for Contributor manager */ - contributorForm: {type: Object, required: true}, + /** Forms used by managers or other components within dashboard/workflow */ + componentForms: {type: Object, required: true}, /** List of Views */ views: { type: Array, @@ -102,4 +102,3 @@ const store = useDashboardPageStore(props); @apply bg-secondary p-0; } -./components/DashboardActiveFilters.vue diff --git a/src/pages/dashboard/dashboardPageStore.js b/src/pages/dashboard/dashboardPageStore.js index b968826cc..7fb681a76 100644 --- a/src/pages/dashboard/dashboardPageStore.js +++ b/src/pages/dashboard/dashboardPageStore.js @@ -441,6 +441,8 @@ export const useDashboardPageStore = defineComponentStore( getReviewActivityIndicatorProps, getReviewActivityIndicatorPopoverProps, + // Expose component forms, so managers and other dashboard/workflow component can access them + componentForms: pageInitConfig.componentForms, _workflowActionFns, }; }, diff --git a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOJS.js b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOJS.js index 40761d9a2..5f4c10d01 100644 --- a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOJS.js +++ b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOJS.js @@ -297,7 +297,6 @@ export const PublicationConfig = { props: { submission: submission, publication: selectedPublication, - contributorForm: pageInitConfig.contributorForm, }, }, ]; diff --git a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOMP.js b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOMP.js index ef98ee477..07fe8b848 100644 --- a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOMP.js +++ b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOMP.js @@ -297,7 +297,6 @@ export const PublicationConfig = { props: { submission: submission, publication: selectedPublication, - contributorForm: pageInitConfig.contributorForm, }, }, ]; diff --git a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js index c39e09c57..8f4f02b13 100644 --- a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js +++ b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js @@ -701,7 +701,6 @@ export const PublicationConfig = { props: { submission: submission, publication: selectedPublication, - contributorForm: pageInitConfig.contributorForm, canEdit: permissions.canEditPublication, }, }, diff --git a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOMP.js b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOMP.js index 38eaa597f..b1f1f44db 100644 --- a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOMP.js +++ b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOMP.js @@ -553,7 +553,6 @@ export const PublicationConfig = { props: { submission: submission, publication: selectedPublication, - contributorForm: pageInitConfig.contributorForm, canEditPublication: permissions.canEditPublication, }, },