diff --git a/src/components/Wrapper.js b/src/components/Wrapper.js index 26be4c62115deae54dd2b2aef3bdbf0f6ed496de..78e610542bf5f5d91a9575842ade94036b50a170 100644 --- a/src/components/Wrapper.js +++ b/src/components/Wrapper.js @@ -2,6 +2,8 @@ import React from 'react' import { Provider } from 'react-redux' import { reducer as formReducer } from 'redux-form' import { createStore, combineReducers } from 'redux' +import { JournalProvider } from 'pubsweet-component-xpub-app' +import journal from '../config/journal' import 'xpub-fonts' import classes from './Wrapper.local.scss' @@ -14,9 +16,11 @@ const store = createStore(rootReducer) const Wrapper = ({ children }) => ( <Provider store={store}> - <div className={classes.root}> - {children} - </div> + <JournalProvider journal={journal}> + <div className={classes.root}> + {children} + </div> + </JournalProvider> </Provider> ) diff --git a/src/config/journal/article-sections.js b/src/config/journal/article-sections.js new file mode 100644 index 0000000000000000000000000000000000000000..3f797b098741359ce4f54e473919585a2f64189a --- /dev/null +++ b/src/config/journal/article-sections.js @@ -0,0 +1,30 @@ +export default [ + { + value: 'cognitive-psychology', + label: 'Cognitive Psychology' + }, + { + value: 'social-psychology', + label: 'Social Psychology' + }, + { + value: 'personality-psychology', + label: 'Personality Psychology' + }, + { + value: 'developmental-psychology', + label: 'Developmental Psychology' + }, + { + value: 'clinical-psychology', + label: 'Clinical Psychology' + }, + { + value: 'organizational-behavior', + label: 'Organizational Behavior' + }, + { + value: 'methodology', + label: 'Methodology and Research Practice' + }, +] diff --git a/src/config/journal/article-types.js b/src/config/journal/article-types.js new file mode 100644 index 0000000000000000000000000000000000000000..9a456260fc2644fa543b90bed5bb351af41f14bb --- /dev/null +++ b/src/config/journal/article-types.js @@ -0,0 +1,18 @@ +export default [ + { + value: 'original-research', + label: 'Original Research Report' + }, + { + value: 'review', + label: 'Review' + }, + { + value: 'opinion', + label: 'Opinion/Commentary' + }, + { + value: 'registered-report', + label: 'Registered Report' + }, +] diff --git a/src/config/journal/decisions.js b/src/config/journal/decisions.js new file mode 100644 index 0000000000000000000000000000000000000000..7b9e6dabf698f0ab0c07537a724679d6d8db7b41 --- /dev/null +++ b/src/config/journal/decisions.js @@ -0,0 +1,22 @@ +export default { + accept: { + label: 'Accept', + color: 'green', + message: 'The submission has been accepted for publication' + }, + minor: { + label: 'Minor revisions', + color: 'orange', + message: 'The submission will be accepted for publication after minor changes' + }, + major: { + label: 'Major revisions', + color: 'yellow', + message: 'The requested changes must be made before submission for review' + }, + reject: { + label: 'Reject', + color: 'red', + message: 'The submission is not acceptable for publication' + }, +} diff --git a/src/config/journal/declarations.js b/src/config/journal/declarations.js new file mode 100644 index 0000000000000000000000000000000000000000..803db14edec42d89c903fbade1f6c6943def29fc --- /dev/null +++ b/src/config/journal/declarations.js @@ -0,0 +1,28 @@ +export default { + questions: [ + { + id: 'openData', + legend: 'Data is open' + }, + { + id: 'previouslySubmitted', + legend: 'Previously submitted' + }, + { + id: 'openPeerReview', + legend: 'Open peer review' + }, + { + id: 'streamlinedReview', + legend: 'Streamlined review' + }, + { + id: 'researchNexus', + legend: 'Submitted as part of the research nexus?' + }, + { + id: 'preregistered', + legend: 'Pre-registered?' + } + ] +} diff --git a/src/config/journal/editors.js b/src/config/journal/editors.js new file mode 100644 index 0000000000000000000000000000000000000000..a3af69f0bba715db1f757b70efa0a37b6e755519 --- /dev/null +++ b/src/config/journal/editors.js @@ -0,0 +1,32 @@ +export default { + managingEditor: [ + { + user: 1, + name: "Managing Editor One" + }, + { + user: 2, + name: "Managing Editor Two" + } + ], + seniorEditor: [ + { + user: 3, + name: "Senior Editor One" + }, + { + user: 4, + name: "Senior Editor Two" + } + ], + handlingEditor: [ + { + user: 5, + name: "Handling Editor One" + }, + { + user: 6, + name: "Handling Editor Two" + } + ] +} diff --git a/src/config/journal/index.js b/src/config/journal/index.js new file mode 100644 index 0000000000000000000000000000000000000000..89df1dc3493fcb8486ef0731da7e342ca58f8b0d --- /dev/null +++ b/src/config/journal/index.js @@ -0,0 +1,8 @@ +export { default as metadata } from './metadata' +export { default as declarations } from './declarations' +export { default as decisions } from './decisions' +export { default as recommendations } from './recommendations' +export { default as sections } from './sections' +export { default as articleSections } from './article-sections' +export { default as articleTypes } from './article-types' +export { default as editors } from './editors' diff --git a/src/config/journal/metadata.js b/src/config/journal/metadata.js new file mode 100644 index 0000000000000000000000000000000000000000..db9d6d8e0070761bb9f75849d9db540cda6fa7c7 --- /dev/null +++ b/src/config/journal/metadata.js @@ -0,0 +1,4 @@ +export default { + name: 'Example Journal', + issn: '1234-1234' +} diff --git a/src/config/journal/recommendations.js b/src/config/journal/recommendations.js new file mode 100644 index 0000000000000000000000000000000000000000..d297f484d96cc5bd42f912fd43adf8a81cf156f6 --- /dev/null +++ b/src/config/journal/recommendations.js @@ -0,0 +1,14 @@ +export default [ + { + value: 'accept', + label: 'Accept', + }, + { + value: 'revise', + label: 'Revise', + }, + { + value: 'reject', + label: 'Reject', + } +] diff --git a/src/config/journal/roles.js b/src/config/journal/roles.js new file mode 100644 index 0000000000000000000000000000000000000000..17420307448c51618a351691035b55a7b6007a92 --- /dev/null +++ b/src/config/journal/roles.js @@ -0,0 +1,6 @@ +export default { + author: 'Author', + seniorEditor: 'Senior Editor', + managingEditor: 'Managing Editor', + handlingEditor: 'Handling Editor', +} diff --git a/src/config/journal/sections.js b/src/config/journal/sections.js new file mode 100644 index 0000000000000000000000000000000000000000..419171898b0abb22f9c5917684de31809de75cb2 --- /dev/null +++ b/src/config/journal/sections.js @@ -0,0 +1,6 @@ +export default [ + { + id: 'submissions', + label: 'My Submissions' + } +]