From 97d9402c24b4230def9d6e3b2862cbe01013e7bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Wed, 16 Oct 2024 11:14:33 +0200 Subject: [PATCH] pkp/pkp-lib#7495 workflow store refactor to have separate version for OMP and OJS --- src/components/Container/Page.vue | 2 + .../ChapterManager/ChapterManager.vue | 21 + .../PublicationFormatManager.vue | 21 + .../RepresentativeManager.vue | 19 + src/pages/dashboard/dashboardPageStore.js | 3 +- .../{Workflow.vue => WorkflowPage.vue} | 80 +- src/pages/workflow/WorkflowPageOMP.vue | 15 + .../components/header/WorkflowWorkTypeOMP.vue | 52 ++ .../publication/WorkflowMarketingForm.vue | 42 ++ .../publication/WorkflowPublicationForm.vue | 4 +- .../composables/useWorkflowActions.js | 18 + .../useWorkflowConfig/useWorkflowConfigOJS.js | 156 ++++ .../useWorkflowConfig/useWorkflowConfigOMP.js | 157 ++++ .../workflowConfigAuthorOJS.js | 361 +++++++++ .../workflowConfigAuthorOMP.js} | 129 +--- .../workflowConfigEditorialOJS.js} | 123 +-- .../workflowConfigEditorialOMP.js | 707 ++++++++++++++++++ .../useWorkflowDataSubmissionPublication.js | 56 ++ .../composables/useWorkflowDecisions.js | 143 +++- .../workflow/composables/useWorkflowItems.js | 36 + .../workflow/composables/useWorkflowMenu.js | 56 ++ .../useWorkflowNavigationConfig.js | 340 --------- .../useWorkflowNavigation.js | 4 + .../useWorkflowNavigationConfigOJS.js | 312 ++++++++ .../useWorkflowNavigationConfigOMP.js | 338 +++++++++ .../composables/useWorkflowPermissions.js | 126 ++++ src/pages/workflow/workflowStore.js | 415 +--------- src/pages/workflow/workflowStoreOMP.js | 275 +++++++ src/utils/defineComponentStore.js | 8 +- src/utils/wrapActionFns.js | 8 + 30 files changed, 2984 insertions(+), 1043 deletions(-) create mode 100644 src/managers/ChapterManager/ChapterManager.vue create mode 100644 src/managers/PublicationFormatManager/PublicationFormatManager.vue create mode 100644 src/managers/RepresentativeManager/RepresentativeManager.vue rename src/pages/workflow/{Workflow.vue => WorkflowPage.vue} (51%) create mode 100644 src/pages/workflow/WorkflowPageOMP.vue create mode 100644 src/pages/workflow/components/header/WorkflowWorkTypeOMP.vue create mode 100644 src/pages/workflow/components/publication/WorkflowMarketingForm.vue create mode 100644 src/pages/workflow/composables/useWorkflowConfig/useWorkflowConfigOJS.js create mode 100644 src/pages/workflow/composables/useWorkflowConfig/useWorkflowConfigOMP.js create mode 100644 src/pages/workflow/composables/useWorkflowConfig/workflowConfigAuthorOJS.js rename src/pages/workflow/composables/{useWorkflowAuthorConfig.js => useWorkflowConfig/workflowConfigAuthorOMP.js} (75%) rename src/pages/workflow/composables/{useWorkflowEditorialConfig.js => useWorkflowConfig/workflowConfigEditorialOJS.js} (86%) create mode 100644 src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOMP.js create mode 100644 src/pages/workflow/composables/useWorkflowDataSubmissionPublication.js create mode 100644 src/pages/workflow/composables/useWorkflowItems.js create mode 100644 src/pages/workflow/composables/useWorkflowMenu.js delete mode 100644 src/pages/workflow/composables/useWorkflowNavigationConfig.js create mode 100644 src/pages/workflow/composables/useWorkflowNavigationConfig/useWorkflowNavigation.js create mode 100644 src/pages/workflow/composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOJS.js create mode 100644 src/pages/workflow/composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOMP.js create mode 100644 src/pages/workflow/composables/useWorkflowPermissions.js create mode 100644 src/pages/workflow/workflowStoreOMP.js create mode 100644 src/utils/wrapActionFns.js diff --git a/src/components/Container/Page.vue b/src/components/Container/Page.vue index eb857f93d..ff17f0a50 100644 --- a/src/components/Container/Page.vue +++ b/src/components/Container/Page.vue @@ -1,6 +1,7 @@ diff --git a/src/managers/PublicationFormatManager/PublicationFormatManager.vue b/src/managers/PublicationFormatManager/PublicationFormatManager.vue new file mode 100644 index 000000000..a75621b10 --- /dev/null +++ b/src/managers/PublicationFormatManager/PublicationFormatManager.vue @@ -0,0 +1,21 @@ + + diff --git a/src/managers/RepresentativeManager/RepresentativeManager.vue b/src/managers/RepresentativeManager/RepresentativeManager.vue new file mode 100644 index 000000000..54924a25d --- /dev/null +++ b/src/managers/RepresentativeManager/RepresentativeManager.vue @@ -0,0 +1,19 @@ + + diff --git a/src/pages/dashboard/dashboardPageStore.js b/src/pages/dashboard/dashboardPageStore.js index 7fbcc04a3..b968826cc 100644 --- a/src/pages/dashboard/dashboardPageStore.js +++ b/src/pages/dashboard/dashboardPageStore.js @@ -20,7 +20,6 @@ import {useReviewActivityLogic} from './composables/useReviewActivityLogic'; import {useSubmission} from '@/composables/useSubmission'; import DashboardModalFilters from '@/pages/dashboard/modals/DashboardModalFilters.vue'; -import Workflow from '@/pages/workflow/Workflow.vue'; const {t, tk} = useLocalize(); @@ -330,7 +329,7 @@ export const useDashboardPageStore = defineComponentStore( function openWorkflowModal(submissionId) { queryParamsUrl.workflowSubmissionId = submissionId; openSideModal( - Workflow, + 'WorkflowPage', { submissionId, pageInitConfig, diff --git a/src/pages/workflow/Workflow.vue b/src/pages/workflow/WorkflowPage.vue similarity index 51% rename from src/pages/workflow/Workflow.vue rename to src/pages/workflow/WorkflowPage.vue index 23c4a86b7..031e9e804 100644 --- a/src/pages/workflow/Workflow.vue +++ b/src/pages/workflow/WorkflowPage.vue @@ -1,7 +1,7 @@