diff --git a/.prettierignore b/.prettierignore index fbbdb2bbe1..2498c50f8e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,5 +2,5 @@ cypress/tests/**/* lib/pkp/cypress/**/* cypress/support/**/* plugins/themes/default/**/* - +schemas/**/*.json package.json diff --git a/classes/components/forms/dashboard/SubmissionFilters.php b/classes/components/forms/dashboard/SubmissionFilters.php new file mode 100644 index 0000000000..f45018cca2 --- /dev/null +++ b/classes/components/forms/dashboard/SubmissionFilters.php @@ -0,0 +1,41 @@ +addPage(['id' => 'default', 'submitButton' => null]) + ->addGroup(['id' => 'default', 'pageId' => 'default']) + ->addSectionFields() + ->addAssignedTo() + ->addCategories() + ->addDaysSinceLastActivity() + ; + } + + +} diff --git a/classes/components/forms/publication/RelationForm.php b/classes/components/forms/publication/RelationForm.php index 6d358eb262..538c1432a6 100644 --- a/classes/components/forms/publication/RelationForm.php +++ b/classes/components/forms/publication/RelationForm.php @@ -30,9 +30,8 @@ class RelationForm extends FormComponent * Constructor * * @param string $action URL to submit the form to - * @param Publication $publication The publication to change settings for */ - public function __construct($action, $publication) + public function __construct($action) { $this->action = $action; $this->locales = []; @@ -41,7 +40,7 @@ public function __construct($action, $publication) $this->addField(new FieldOptions('relationStatus', [ 'label' => __('publication.relation.label'), 'type' => 'radio', - 'value' => (int) $publication->getData('relationStatus'), + 'value' => null, 'options' => [ [ 'value' => Publication::PUBLICATION_RELATION_NONE, @@ -55,7 +54,7 @@ public function __construct($action, $publication) ])) ->addField(new FieldText('vorDoi', [ 'label' => __('publication.relation.vorDoi'), - 'value' => $publication->getData('vorDoi'), + 'value' => null, 'size' => 'large', 'showWhen' => ['relationStatus', Publication::PUBLICATION_RELATION_PUBLISHED], ])); diff --git a/js/load.js b/js/load.js index 2cd52939aa..c238e08e0e 100644 --- a/js/load.js +++ b/js/load.js @@ -18,6 +18,7 @@ import PkpLoad from '../lib/pkp/js/load.js'; import Container from '@/components/Container/Container.vue'; import AdvancedSearchReviewerContainer from '@/components/Container/AdvancedSearchReviewerContainer.vue'; import Page from '@/components/Container/Page.vue'; +import WorkflowPageOPS from '@/pages/workflow/WorkflowPageOPS.vue'; import AccessPage from '@/components/Container/AccessPage.vue'; import AddContextContainer from '@/components/Container/AddContextContainer.vue'; import AdminPage from '@/components/Container/AdminPage.vue'; @@ -34,6 +35,10 @@ import StatsUsersPage from '@/components/Container/StatsUsersPage.vue'; import SubmissionWizardPage from '@/components/Container/SubmissionWizardPageOPS.vue'; import WorkflowPage from '@/components/Container/WorkflowPageOPS.vue'; +// Helper for initializing and tracking Vue controllers +import VueRegistry from '../lib/pkp/js/classes/VueRegistry.js'; +VueRegistry.registerComponent('WorkflowPage', WorkflowPageOPS); + // Expose Vue, the registry and controllers in a global var window.pkp = Object.assign(PkpLoad, window.pkp || {}, { controllers: { diff --git a/pages/dashboard/DashboardHandlerNext.php b/pages/dashboard/DashboardHandlerNext.php new file mode 100644 index 0000000000..2a90002e19 --- /dev/null +++ b/pages/dashboard/DashboardHandlerNext.php @@ -0,0 +1,75 @@ +getState('pageInitConfig'); + $pageInitConfig['componentForms']['relationForm'] = $relationForm->getConfig(); + $templateMgr->setState(['pageInitConfig' => $pageInitConfig]); + + $templateMgr->assign([ + 'pageComponent' => 'Page', + ]); + + $templateMgr->setConstants([ + + ]); + } + + + protected function getSubmissionFiltersForm($userRoles, $context) + { + + $sections = Repo::section() + ->getCollector() + ->filterByContextIds([$context->getId()]) + ->getMany(); + + $categories = Repo::category() + ->getCollector() + ->filterByContextIds([$context->getId()]) + ->getMany(); + + return new SubmissionFilters( + $context, + $userRoles, + $sections, + $categories + ); + } + + +} diff --git a/pages/dashboard/index.php b/pages/dashboard/index.php new file mode 100644 index 0000000000..68b4361162 --- /dev/null +++ b/pages/dashboard/index.php @@ -0,0 +1,29 @@ +