Skip to content

Commit

Permalink
pkp/pkp-lib#10598 Remove the workflow store duplications across diffe…
Browse files Browse the repository at this point in the history
…rent apps for now as they are common enough
  • Loading branch information
jardakotesovec committed Dec 19, 2024
1 parent c5b2ffd commit ccd51cd
Show file tree
Hide file tree
Showing 7 changed files with 399 additions and 807 deletions.
63 changes: 61 additions & 2 deletions src/pages/workflow/WorkflowPageOJS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,72 @@
</template>

<script setup>
import {markRaw} from 'vue';
import WorkflowPage from './WorkflowPage.vue';
import {useWorkflowStore} from './workflowStoreOJS';
import {useWorkflowStore} from './workflowStore';
import FileManager from '@/managers/FileManager/FileManager.vue';
import ReviewerManager from '@/managers/ReviewerManager/ReviewerManager.vue';
import DiscussionManager from '@/managers/DiscussionManager/DiscussionManager.vue';
import ContributorManager from '@/managers/ContributorManager/ContributorManager.vue';
import ParticipantManager from '@/managers/ParticipantManager/ParticipantManager.vue';
import GalleyManager from '@/managers/GalleyManager/GalleyManager.vue';
import WorkflowActionButton from './components/action/WorkflowActionButton.vue';
import WorkflowRecommendOnlyControls from './components/action/WorkflowRecommendOnlyControls.vue';
import WorkflowRecommendOnlyListingRecommendations from './components/secondary/WorkflowRecommendOnlyListingRecommendations.vue';
import WorkflowNotificationDisplay from './components/primary/WorkflowNotificationDisplay.vue';
import WorkflowListingEmails from './components/primary/WorkflowListingEmails.vue';
import WorkflowPaymentDropdown from './components/header/WorkflowPaymentDropdown.vue';
import WorkflowPublicationForm from './components/publication/WorkflowPublicationForm.vue';
import WorkflowPublicationJats from './components/publication/WorkflowPublicationJats.vue';
import WorkflowPublicationVersionControl from './components/publication/WorkflowPublicationVersionControl.vue';
import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowChangeSubmissionLanguage.vue';
import WorkflowPrimaryBasicMetadata from './components/primary/WorkflowPrimaryBasicMetadata.vue';
import WorkflowSubmissionStatus from './components/primary/WorkflowSubmissionStatus.vue';
import WorkflowPublicationEditDisabled from './components/publication/WorkflowPublicationEditDisabled.vue';
import {useWorkflowConfigOJS as useWorkflowConfig} from './composables/useWorkflowConfig/useWorkflowConfigOJS';
import {useWorkflowNavigationConfigOJS as useWorkflowNavigationConfig} from './composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOJS';
const props = defineProps({
submissionId: {type: Number, required: true},
pageInitConfig: {type: Object, required: true},
});
useWorkflowStore(props);
const Components = markRaw({
FileManager,
ReviewerManager,
DiscussionManager,
ContributorManager,
ParticipantManager,
GalleyManager,
WorkflowActionButton,
WorkflowRecommendOnlyControls,
WorkflowRecommendOnlyListingRecommendations,
WorkflowNotificationDisplay,
WorkflowListingEmails,
WorkflowPaymentDropdown,
WorkflowPrimaryBasicMetadata,
WorkflowPublicationForm,
WorkflowPublicationJats,
WorkflowPublicationVersionControl,
WorkflowChangeSubmissionLanguage,
WorkflowSubmissionStatus,
WorkflowPublicationEditDisabled,
});
const store = useWorkflowStore({
props,
Components,
useWorkflowConfig,
useWorkflowNavigationConfig,
});
store.setExpandedKeys([
'workflow',
'publication',
'marketing',
`workflow_${pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW}`,
]);
</script>
69 changes: 67 additions & 2 deletions src/pages/workflow/WorkflowPageOMP.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,78 @@
</template>

<script setup>
import {markRaw} from 'vue';
import WorkflowPage from './WorkflowPage.vue';
import {useWorkflowStore} from './workflowStoreOMP';
import {useWorkflowStore} from './workflowStore';
import {useWorkflowConfigOMP as useWorkflowConfig} from './composables/useWorkflowConfig/useWorkflowConfigOMP';
import {useWorkflowNavigationConfigOMP as useWorkflowNavigationConfig} from './composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOMP';
import FileManager from '@/managers/FileManager/FileManager.vue';
import ReviewerManager from '@/managers/ReviewerManager/ReviewerManager.vue';
import DiscussionManager from '@/managers/DiscussionManager/DiscussionManager.vue';
import ContributorManager from '@/managers/ContributorManager/ContributorManager.vue';
import ParticipantManager from '@/managers/ParticipantManager/ParticipantManager.vue';
import GalleyManager from '@/managers/GalleyManager/GalleyManager.vue';
import ChapterManager from '@/managers/ChapterManager/ChapterManager.vue';
import PublicationFormatManager from '@/managers/PublicationFormatManager/PublicationFormatManager.vue';
import RepresentativeManager from '@/managers/RepresentativeManager/RepresentativeManager.vue';
import WorkflowMarketingForm from './components/publication/WorkflowMarketingForm.vue';
import WorkflowWorkTypeOMP from './components/header/WorkflowWorkTypeOMP.vue';
import WorkflowActionButton from './components/action/WorkflowActionButton.vue';
import WorkflowRecommendOnlyControls from './components/action/WorkflowRecommendOnlyControls.vue';
import WorkflowRecommendOnlyListingRecommendations from './components/secondary/WorkflowRecommendOnlyListingRecommendations.vue';
import WorkflowNotificationDisplay from './components/primary/WorkflowNotificationDisplay.vue';
import WorkflowListingEmails from './components/primary/WorkflowListingEmails.vue';
import WorkflowPublicationForm from './components/publication/WorkflowPublicationForm.vue';
import WorkflowPublicationVersionControl from './components/publication/WorkflowPublicationVersionControl.vue';
import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowChangeSubmissionLanguage.vue';
import WorkflowPrimaryBasicMetadata from './components/primary/WorkflowPrimaryBasicMetadata.vue';
import WorkflowSubmissionStatus from './components/primary/WorkflowSubmissionStatus.vue';
import WorkflowPublicationEditDisabled from './components/publication/WorkflowPublicationEditDisabled.vue';
const props = defineProps({
submissionId: {type: Number, required: true},
pageInitConfig: {type: Object, required: true},
});
useWorkflowStore(props);
const Components = markRaw({
FileManager,
ReviewerManager,
DiscussionManager,
ContributorManager,
ParticipantManager,
GalleyManager,
ChapterManager,
RepresentativeManager,
PublicationFormatManager,
WorkflowActionButton,
WorkflowRecommendOnlyControls,
WorkflowRecommendOnlyListingRecommendations,
WorkflowNotificationDisplay,
WorkflowListingEmails,
WorkflowPrimaryBasicMetadata,
WorkflowPublicationForm,
WorkflowPublicationVersionControl,
WorkflowChangeSubmissionLanguage,
WorkflowSubmissionStatus,
WorkflowPublicationEditDisabled,
WorkflowMarketingForm,
WorkflowWorkTypeOMP,
});
const store = useWorkflowStore({
props,
Components,
useWorkflowConfig,
useWorkflowNavigationConfig,
});
store.setExpandedKeys([
'workflow',
'publication',
'marketing',
`workflow_${pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW}`,
`workflow_${pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW}`,
]);
</script>
52 changes: 50 additions & 2 deletions src/pages/workflow/WorkflowPageOPS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,61 @@
</template>

<script setup>
import {markRaw} from 'vue';
import WorkflowPage from './WorkflowPage.vue';
import {useWorkflowStore} from './workflowStoreOPS';
import {useWorkflowStore} from './workflowStore';
import {useWorkflowConfigOPS as useWorkflowConfig} from './composables/useWorkflowConfig/useWorkflowConfigOPS';
import {useWorkflowNavigationConfigOPS as useWorkflowNavigationConfig} from './composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOPS';
import FileManager from '@/managers/FileManager/FileManager.vue';
import ReviewerManager from '@/managers/ReviewerManager/ReviewerManager.vue';
import DiscussionManager from '@/managers/DiscussionManager/DiscussionManager.vue';
import ContributorManager from '@/managers/ContributorManager/ContributorManager.vue';
import ParticipantManager from '@/managers/ParticipantManager/ParticipantManager.vue';
import GalleyManager from '@/managers/GalleyManager/GalleyManager.vue';
import WorkflowActionButton from './components/action/WorkflowActionButton.vue';
import WorkflowActionChangeDecision from './components/action/WorkflowActionChangeDecision.vue';
import WorkflowNotificationDisplay from './components/primary/WorkflowNotificationDisplay.vue';
import WorkflowPublicationForm from './components/publication/WorkflowPublicationForm.vue';
import WorkflowPublicationVersionControl from './components/publication/WorkflowPublicationVersionControl.vue';
import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowChangeSubmissionLanguage.vue';
import WorkflowPrimaryBasicMetadata from './components/primary/WorkflowPrimaryBasicMetadata.vue';
import WorkflowPublicationRelationDropdownOPS from './components/publication/WorkflowPublicationRelationDropdownOPS.vue';
import WorkflowSubmissionStatus from './components/primary/WorkflowSubmissionStatus.vue';
import WorkflowPublicationEditDisabled from './components/publication/WorkflowPublicationEditDisabled.vue';
const props = defineProps({
submissionId: {type: Number, required: true},
pageInitConfig: {type: Object, required: true},
});
useWorkflowStore(props);
const Components = markRaw({
FileManager,
ReviewerManager,
DiscussionManager,
ContributorManager,
ParticipantManager,
GalleyManager,
WorkflowActionButton,
WorkflowActionChangeDecision,
WorkflowNotificationDisplay,
WorkflowPrimaryBasicMetadata,
WorkflowPublicationForm,
WorkflowPublicationRelationDropdownOPS,
WorkflowPublicationVersionControl,
WorkflowChangeSubmissionLanguage,
WorkflowSubmissionStatus,
WorkflowPublicationEditDisabled,
});
const store = useWorkflowStore({
props,
Components,
useWorkflowConfig,
useWorkflowNavigationConfig,
});
store.setExpandedKeys(['workflow', 'publication']);
</script>
Loading

0 comments on commit ccd51cd

Please sign in to comment.