diff --git a/app/components/component-xpub-review/CHANGELOG.md b/app/components/component-review/CHANGELOG.md similarity index 100% rename from app/components/component-xpub-review/CHANGELOG.md rename to app/components/component-review/CHANGELOG.md diff --git a/app/components/component-xpub-review/README.md b/app/components/component-review/README.md similarity index 100% rename from app/components/component-xpub-review/README.md rename to app/components/component-review/README.md diff --git a/app/components/component-xpub-review/package.json b/app/components/component-review/package.json similarity index 100% rename from app/components/component-xpub-review/package.json rename to app/components/component-review/package.json diff --git a/app/components/component-review/src/components/DecisionPage.js b/app/components/component-review/src/components/DecisionPage.js new file mode 100644 index 0000000000000000000000000000000000000000..a692fa913fc8f465ab94cd1d54fc1a89954a717d --- /dev/null +++ b/app/components/component-review/src/components/DecisionPage.js @@ -0,0 +1,466 @@ +import React from 'react' +import moment from 'moment' + +import { Tabs } from '@pubsweet/ui' +import { Formik } from 'formik' +import gql from 'graphql-tag' +import { useMutation, useQuery } from '@apollo/react-hooks' +import DecisionForm from './decision/DecisionForm' +import DecisionReviews from './decision/DecisionReviews' +import AssignEditorsReviewers from './assignEditors/AssignEditorsReviewers' +import AssignEditor from './assignEditors/AssignEditor' +import ReviewMetadata from './metadata/ReviewMetadata' +import Decision from './decision/Decision' +// import EditorSection from './EditorSection' +import { AdminSection, Columns, Manuscript, Chat, TabsContainer } from './style' + +// const addEditor = (manuscript, label) => ({ +// content: <EditorSection manuscript={manuscript} />, +// key: manuscript.id, +// label, +// }) + +import { Spinner } from '../../../shared' + +import { getCommentContent } from './review/util' +import MessageContainer from '../../../component-chat/src' + +const reviewFields = ` + id + created + updated + comments { + type + content + files { + id + created + label + filename + fileType + mimeType + size + url + } + } + isDecision + recommendation + user { + id + username + } +` + +const fragmentFields = ` + id + created + files { + id + created + label + filename + fileType + mimeType + size + url + } + reviews { + ${reviewFields} + } + decision + teams { + id + name + role + object { + objectId + objectType + } + members { + id + user { + id + username + } + status + } + } + status + meta { + title + source + abstract + declarations { + openData + openPeerReview + preregistered + previouslySubmitted + researchNexus + streamlinedReview + } + articleSections + articleType + history { + type + date + } + notes { + notesType + content + } + keywords + } + submission + suggestions { + reviewers { + opposed + suggested + } + editors { + opposed + suggested + } + } +` + +const query = gql` + query($id: ID!) { + currentUser { + id + username + admin + } + + manuscript(id: $id) { + ${fragmentFields} + manuscriptVersions { + ${fragmentFields} + } + channels { + id + type + topic + } + } + } +` + +const updateReviewMutationQuery = gql` + mutation($id: ID, $input: ReviewInput) { + updateReview(id: $id, input: $input) { + ${reviewFields} + } + } +` + +const uploadReviewFilesMutation = gql` + mutation($file: Upload!) { + upload(file: $file) { + url + } + } +` + +const createFileMutation = gql` + mutation($file: Upload!) { + createFile(file: $file) { + id + created + label + filename + fileType + mimeType + size + url + } + } +` + +const submitMutation = gql` + mutation($id: ID!, $input: String) { + submitManuscript(id: $id, input: $input) { + id + ${fragmentFields} + } + } +` + +const updateCacheForFileCreation = (proxy, { data: { createFile } }) => { + const data = proxy.readQuery({ + query, + variables: { + id: match.params.version, + }, + }) + + data.manuscript.reviews.map(review => { + if (review.id === file.objectId) { + review.comments.map(comment => { + if (comment.type === createFile.fileType) { + comment.files = [createFile] + } + return comment + }) + } + return review + }) + + proxy.writeQuery({ query, data }) +} + +// const createFile = file => { + +// mutate({ +// variables: { +// file, +// }, +// update: +// }, + +// + +const dateLabel = date => moment(date).format('YYYY-MM-DD') + +const decisionSections = ({ + manuscript, + handleSubmit, + isValid, + updateReview, + uploadFile, +}) => { + const decisionSections = [] + const manuscriptVersions = manuscript.manuscriptVersions || [] + manuscriptVersions.forEach(manuscript => { + decisionSections.push({ + content: ( + <> + <ReviewMetadata manuscript={manuscript} /> + <DecisionReviews manuscript={manuscript} /> + <Decision + review={manuscript.reviews.find(review => review.isDecision)} + /> + </> + ), + key: manuscript.id, + label: dateLabel(manuscript.updated), + }) + }, []) + + if (manuscript.status !== 'revising') { + decisionSections.push({ + content: ( + <> + <AdminSection key="assign-editors"> + <AssignEditorsReviewers + AssignEditor={AssignEditor} + manuscript={manuscript} + /> + </AdminSection> + <AdminSection key="review-metadata"> + <ReviewMetadata manuscript={manuscript} /> + </AdminSection> + <AdminSection key="decision-review"> + <DecisionReviews manuscript={manuscript} /> + </AdminSection> + <AdminSection key="decision-form"> + <DecisionForm + handleSubmit={handleSubmit} + isValid={isValid} + updateReview={updateReview} + uploadFile={uploadFile} + /> + </AdminSection> + </> + ), + key: manuscript.id, + label: dateLabel(), + }) + } + + return decisionSections +} + +const editorSections = ({ manuscript }) => { + const editorSections = [] + const manuscriptVersions = manuscript.manuscriptVersions || [] + manuscriptVersions.forEach(manuscript => { + editorSections.push(addEditor(manuscript, dateLabel(manuscript.updated))) + }, []) + + if (manuscript.status !== 'revising') { + editorSections.push(addEditor(manuscript, dateLabel())) + } +} + +const DecisionPage = ({ match }) => { + // Hooks from the old world + const [completeDecision] = useMutation(submitMutation, { + refetchQueries: [query], + }) + const [updateReviewMutation] = useMutation(updateReviewMutationQuery) + + // File upload + const [uploadReviewFiles] = useMutation(uploadReviewFilesMutation) + + const { loading, error, data } = useQuery(query, { + variables: { + id: match.params.version, + }, + }) + + if (loading) return <Spinner /> + if (error) return `Error! ${error.message}` + + const manuscript = data.manuscript + const channelId = manuscript.channels.find(c => c.type === 'editorial').id + + const uploadFile = (file, updateReview, type) => + uploadReviewFiles({ + variables: { + file, + }, + }).then(({ data }) => { + const newFile = { + url: data.upload.url, + filename: file.name, + size: file.size, + object: 'Review', + objectId: updateReview.id, + fileType: type, + } + createFile(newFile) + }) + + const updateReview = (data, file) => { + const reviewData = { + isDecision: true, + manuscriptId: manuscript.id, + } + + if (data.comment) { + reviewData.comments = [data.comment] + } + + if (data.recommendation) { + reviewData.recommendation = data.recommendation + } + + const review = manuscript.reviews.find(review => review.isDecision) || {} + return updateReviewMutation({ + variables: { + id: review.id || undefined, + input: reviewData, + }, + update: (proxy, { data: { updateReview } }) => { + const data = proxy.readQuery({ + query, + variables: { + id: manuscript.id, + }, + }) + const reviewIndex = data.manuscript.reviews.findIndex( + review => review.id === updateReview.id, + ) + if (reviewIndex < 0) { + data.manuscript.reviews.push(updateReview) + } else { + data.manuscript.reviews[reviewIndex] = updateReview + } + proxy.writeQuery({ query, data }) + }, + }) + } + // }, + // }).then(() => { + // history.push('/dashboard') + // }) + // } + + // + + // console.log(props) + + const initialValues = (manuscript.reviews && + manuscript.reviews.find(review => review.isDecision)) || { + comments: [], + recommendation: null, + } + + return ( + <Columns> + <Manuscript> + <Formik + displayName="decision" + handleSubmit={( + props, + { props: { completeDecision, history, manuscript } }, + ) => { + completeDecision({ + variables: { + id: manuscript.id, + input: JSON.stringify({ + decision: manuscript.reviews.find(review => review.isDecision) + .recommendation, + }), + }, + }) + }} + // isInitialValid={({ manuscript }) => { + // const rv = + // manuscript.reviews.find(review => review.isDecision) || {} + // const isRecommendation = rv.recommendation != null + // const isCommented = getCommentContent(rv, 'note') !== '' + + // return isCommented && isRecommendation + // }} + initialValues={initialValues} + validate={(values, props) => { + const errors = {} + if (getCommentContent(values, 'note') === '') { + errors.comments = 'Required' + } + + if (values.recommendation === null) { + errors.recommendation = 'Required' + } + return errors + }} + > + {props => ( + // Temp + /* <Tabs + activeKey={editorSections[editorSections.length - 1].key} + sections={editorSections} + title="Versions" + /> */ + <Tabs + activeKey={ + decisionSections({ + manuscript, + handleSubmit: props.handleSubmit, + isValid: props.isValid, + updateReview, + uploadFile, + })[decisionSections.length - 1].key + } + sections={decisionSections({ + manuscript, + handleSubmit: props.handleSubmit, + isValid: props.isValid, + updateReview, + uploadFile, + })} + title="Versions" + /> + )} + </Formik> + </Manuscript> + + <Chat> + <MessageContainer channelId={channelId} /> + </Chat> + </Columns> + ) +} + +export default DecisionPage diff --git a/app/components/component-xpub-review/src/components/ReviewPage.js b/app/components/component-review/src/components/ReviewPage.js similarity index 100% rename from app/components/component-xpub-review/src/components/ReviewPage.js rename to app/components/component-review/src/components/ReviewPage.js diff --git a/app/components/component-xpub-review/src/components/ReviewersPage.js b/app/components/component-review/src/components/ReviewersPage.js similarity index 100% rename from app/components/component-xpub-review/src/components/ReviewersPage.js rename to app/components/component-review/src/components/ReviewersPage.js diff --git a/app/components/component-xpub-review/src/components/assignEditors/AssignEditor.js b/app/components/component-review/src/components/assignEditors/AssignEditor.js similarity index 100% rename from app/components/component-xpub-review/src/components/assignEditors/AssignEditor.js rename to app/components/component-review/src/components/assignEditors/AssignEditor.js diff --git a/app/components/component-xpub-review/src/components/assignEditors/AssignEditor.md b/app/components/component-review/src/components/assignEditors/AssignEditor.md similarity index 100% rename from app/components/component-xpub-review/src/components/assignEditors/AssignEditor.md rename to app/components/component-review/src/components/assignEditors/AssignEditor.md diff --git a/app/components/component-review/src/components/assignEditors/AssignEditorsReviewers.js b/app/components/component-review/src/components/assignEditors/AssignEditorsReviewers.js new file mode 100644 index 0000000000000000000000000000000000000000..7929a339c38023707057c2c4cbefa90dbcffaaa0 --- /dev/null +++ b/app/components/component-review/src/components/assignEditors/AssignEditorsReviewers.js @@ -0,0 +1,27 @@ +import React from 'react' +import styled from 'styled-components' +import { Action } from '@pubsweet/ui' +import { + Roles, + Container, + SectionHeader, + SectionRowGrid, + Title, +} from '../style' + +const AssignEditorsReviewers = ({ manuscript, AssignEditor }) => ( + <Container> + <SectionHeader> + <Title>Assign Editors</Title> + </SectionHeader> + <SectionRowGrid> + <AssignEditor manuscript={manuscript} teamRole="seniorEditor" /> + <AssignEditor manuscript={manuscript} teamRole="handlingEditor" /> + + <Action to={`/journal/versions/${manuscript.id}/reviewers`}> + Assign Reviewers + </Action> + </SectionRowGrid> + </Container> +) +export default AssignEditorsReviewers diff --git a/app/components/component-xpub-review/src/components/decision/Decision.js b/app/components/component-review/src/components/decision/Decision.js similarity index 100% rename from app/components/component-xpub-review/src/components/decision/Decision.js rename to app/components/component-review/src/components/decision/Decision.js diff --git a/app/components/component-xpub-review/src/components/decision/Decision.md b/app/components/component-review/src/components/decision/Decision.md similarity index 100% rename from app/components/component-xpub-review/src/components/decision/Decision.md rename to app/components/component-review/src/components/decision/Decision.md diff --git a/app/components/component-xpub-review/src/components/decision/DecisionForm.js b/app/components/component-review/src/components/decision/DecisionForm.js similarity index 81% rename from app/components/component-xpub-review/src/components/decision/DecisionForm.js rename to app/components/component-review/src/components/decision/DecisionForm.js index 6bffe7fb988bf3e30ba4b9575d977087d330817d..a96542cc3f389736c2bf9de28e5624d3549c954a 100644 --- a/app/components/component-xpub-review/src/components/decision/DecisionForm.js +++ b/app/components/component-review/src/components/decision/DecisionForm.js @@ -19,10 +19,18 @@ import { createComments, } from '../review/util' -import AdminSection from '../atoms/AdminSection' +import { + AdminSection, + Container, + Title, + SectionHeader, + SectionRowGrid, + SectionRow, + SectionAction, +} from '../style' const NoteDecision = (updateReview, uploadFile) => props => ( - <AdminSection> + <> <Field component={NoteInput} name="comments" @@ -34,7 +42,7 @@ const NoteDecision = (updateReview, uploadFile) => props => ( updateReview={updateReview} uploadFile={uploadFile} /> - </AdminSection> + </> ) const NoteInput = ({ @@ -46,6 +54,7 @@ const NoteInput = ({ key="note-input" onBlur={() => {}} onChange={value => { + console.log(values) const { updateIndex, comment } = createComments( values, { @@ -61,7 +70,6 @@ const NoteInput = ({ ) }} placeholder="Write/paste your decision letter here, or upload it using the upload button on the right." - title="Decision" value={getCommentContent({ comments: field.value }, 'note')} /> ) @@ -126,32 +134,34 @@ const RecommendationInput = ({ } const DecisionForm = ({ handleSubmit, uploadFile, updateReview, isValid }) => ( - <form onSubmit={handleSubmit}> - <AdminSection key="note"> - <div name="note"> - <FieldArray - component={NoteDecision(updateReview, uploadFile)} - key="comments-array" - name="comments" - /> - </div> - </AdminSection> - - <AdminSection key="recommendation"> + <Container> + {/* <form onSubmit={handleSubmit}> */} + <SectionHeader> + <Title>Decision</Title> + </SectionHeader> + <SectionRow key="note"> + <FieldArray + component={NoteDecision(updateReview, uploadFile)} + key="comments-array" + name="comments" + /> + </SectionRow> + <SectionRowGrid> <Field component={RecommendationInput} name="recommendation" updateReview={updateReview} validate={required} /> - </AdminSection> - <AdminSection key="submit"> - <Button disabled={!isValid} primary type="submit"> - Submit - </Button> - </AdminSection> - </form> + <SectionAction key="submit"> + <Button disabled={!isValid} primary type="submit"> + Submit + </Button> + </SectionAction> + </SectionRowGrid> + {/* </form> */} + </Container> ) export default DecisionForm diff --git a/app/components/component-xpub-review/src/components/decision/DecisionLayout.md b/app/components/component-review/src/components/decision/DecisionLayout.md similarity index 100% rename from app/components/component-xpub-review/src/components/decision/DecisionLayout.md rename to app/components/component-review/src/components/decision/DecisionLayout.md diff --git a/app/components/component-xpub-review/src/components/decision/DecisionReview.js b/app/components/component-review/src/components/decision/DecisionReview.js similarity index 100% rename from app/components/component-xpub-review/src/components/decision/DecisionReview.js rename to app/components/component-review/src/components/decision/DecisionReview.js diff --git a/app/components/component-xpub-review/src/components/decision/DecisionReview.md b/app/components/component-review/src/components/decision/DecisionReview.md similarity index 100% rename from app/components/component-xpub-review/src/components/decision/DecisionReview.md rename to app/components/component-review/src/components/decision/DecisionReview.md diff --git a/app/components/component-xpub-review/src/components/decision/DecisionReviews.js b/app/components/component-review/src/components/decision/DecisionReviews.js similarity index 96% rename from app/components/component-xpub-review/src/components/decision/DecisionReviews.js rename to app/components/component-review/src/components/decision/DecisionReviews.js index d888b77284bcf0fedc96f7a6b9c23f9f2554abc1..7dd592f0a07a420905f8e37449f23217b7b43f31 100644 --- a/app/components/component-xpub-review/src/components/decision/DecisionReviews.js +++ b/app/components/component-review/src/components/decision/DecisionReviews.js @@ -7,10 +7,13 @@ import DecisionReview from './DecisionReview' // member => member.user.id === currentUser.id, // )[0] || {} // return status + const getCompletedReviews = (manuscript, currentUser) => { const team = manuscript.teams.find(team => team.role === 'reviewerEditor') || {} - + if (!team.members) { + return null + } const currentMember = team.members.find(m => m.user.id === currentUser.id) return currentMember && currentMember.status } diff --git a/app/components/component-xpub-review/src/components/decision/DecisionReviews.md b/app/components/component-review/src/components/decision/DecisionReviews.md similarity index 100% rename from app/components/component-xpub-review/src/components/decision/DecisionReviews.md rename to app/components/component-review/src/components/decision/DecisionReviews.md diff --git a/app/components/component-xpub-review/src/components/decision/EditorSection.js b/app/components/component-review/src/components/decision/EditorSection.js similarity index 88% rename from app/components/component-xpub-review/src/components/decision/EditorSection.js rename to app/components/component-review/src/components/decision/EditorSection.js index 0cc4d1d318680f530af1faf097088a59a6839a7e..43670899d7c2aa0f40a8234a3faf35f3065febf3 100644 --- a/app/components/component-xpub-review/src/components/decision/EditorSection.js +++ b/app/components/component-review/src/components/decision/EditorSection.js @@ -3,8 +3,7 @@ import { Wax /*, CreateSchema */ } from 'wax-prosemirror-core' // import { XpubSchema } from 'wax-prosemirror-schema' // import 'wax-prosemirror-themes/themes/default-theme.css' -import { EditorWrapper } from '../molecules/EditorWrapper' -import { Info } from '../molecules/Info' +import { EditorWrapper, Info } from '../style' const options = { // schema: new CreateSchema(XpubSchema), diff --git a/app/components/component-xpub-review/src/components/index.js b/app/components/component-review/src/components/index.js similarity index 100% rename from app/components/component-xpub-review/src/components/index.js rename to app/components/component-review/src/components/index.js diff --git a/app/components/component-review/src/components/metadata/ReviewMetadata.js b/app/components/component-review/src/components/metadata/ReviewMetadata.js new file mode 100644 index 0000000000000000000000000000000000000000..4dfda4931ddd0872d68cce0ed1f4efe5e4eefe52 --- /dev/null +++ b/app/components/component-review/src/components/metadata/ReviewMetadata.js @@ -0,0 +1,117 @@ +import React from 'react' +import styled from 'styled-components' +import { get } from 'lodash' +import { Attachment } from '@pubsweet/ui' +// import { grid } from '@pubsweet/ui-toolkit' + +import form from '../../../../../storage/forms/submit.json' + +import { + Container, + Title, + SectionHeader, + SectionRow, + SectionRowGrid, +} from '../style' + +const Heading = styled.span` + font-weight: inherit; + padding: 0 1em 0 0; + white-space: nowrap; +` + +// const MetadataRow = styled.div` +// padding: ${grid(2)} ${grid(3)}; +// ` + +// const Metadata = styled.div` +// div { +// display: flex; +// flex-direction: row; +// // justify-content: flex-start; +// } +// ` + +const Cell = styled.span` + padding: 0; + grid-column: span 2 / span 2; +` + +const getNote = (notes, type) => + notes.find(note => note.notesType === type) || {} + +const getDeclarations = (manuscript, field) => + ((manuscript.meta || {}).declarations || {})[field] + +const getSupplementaryFiles = supplementary => + (supplementary || []).filter(file => file.fileType === 'supplementary') || [] + +const showFieldData = (manuscript, fieldName) => { + const data = get(manuscript, fieldName) + return Array.isArray(data) ? data.join(', ') : data +} +// Due to migration to new Data Model +// Attachement component needs different data structure to work +// needs to change the pubsweet ui Attachement to support the new Data Model +const filesToAttachment = file => ({ + name: file.filename, + url: file.url, +}) + +const ReviewMetadata = ({ manuscript: rawManuscript }) => { + // Parse submission metadata JSON for display purposes + const manuscript = { + ...rawManuscript, + submission: JSON.parse(rawManuscript.submission), + } + + const sortedFormElements = form.children.sort((a, b) => + parseInt(a.order || '0') > parseInt(b.order | '0') ? 1 : -1, + ) + + return ( + <Container> + <SectionHeader> + <Title>Metadata</Title> + </SectionHeader> + + {sortedFormElements.map(element => ( + <SectionRowGrid key={element.id}> + <Heading>{element.shortDescription || element.title}</Heading> + <Cell>{showFieldData(manuscript, element.name)}</Cell> + </SectionRowGrid> + ))} + <SectionRowGrid> + <Heading>Special Instructions</Heading> + <Cell> + {getNote(manuscript.meta.notes || [], 'specialInstructions') + .content || 'None'} + </Cell> + </SectionRowGrid> + {getSupplementaryFiles(manuscript.files).length > 0 && ( + <SectionRowGrid> + <Heading> + {getSupplementaryFiles(manuscript.files).length} supplementary{' '} + {getSupplementaryFiles(manuscript.files).length === 1 + ? 'file' + : 'files'} + : + </Heading> + {!!getSupplementaryFiles(manuscript.files).length && ( + <Cell> + {getSupplementaryFiles(manuscript.files).map(file => ( + <Attachment + file={filesToAttachment(file)} + key={file.url} + uploaded + /> + ))} + </Cell> + )} + </SectionRowGrid> + )} + </Container> + ) +} + +export default ReviewMetadata diff --git a/app/components/component-xpub-review/src/components/metadata/ReviewMetadata.md b/app/components/component-review/src/components/metadata/ReviewMetadata.md similarity index 100% rename from app/components/component-xpub-review/src/components/metadata/ReviewMetadata.md rename to app/components/component-review/src/components/metadata/ReviewMetadata.md diff --git a/app/components/component-xpub-review/src/components/review/Review.js b/app/components/component-review/src/components/review/Review.js similarity index 100% rename from app/components/component-xpub-review/src/components/review/Review.js rename to app/components/component-review/src/components/review/Review.js diff --git a/app/components/component-xpub-review/src/components/review/Review.md b/app/components/component-review/src/components/review/Review.md similarity index 100% rename from app/components/component-xpub-review/src/components/review/Review.md rename to app/components/component-review/src/components/review/Review.md diff --git a/app/components/component-xpub-review/src/components/review/ReviewForm.js b/app/components/component-review/src/components/review/ReviewForm.js similarity index 98% rename from app/components/component-xpub-review/src/components/review/ReviewForm.js rename to app/components/component-review/src/components/review/ReviewForm.js index 8d5ce88681bb90f7a14449b86a417a638613ba61..02a1a386f88374b996a8a02863a3263e3d776b24 100644 --- a/app/components/component-xpub-review/src/components/review/ReviewForm.js +++ b/app/components/component-review/src/components/review/ReviewForm.js @@ -13,7 +13,7 @@ import { import { JournalContext } from 'xpub-journal' import { getCommentFiles, stripHtml, createComments } from './util' -import AdminSection from '../atoms/AdminSection' +import { AdminSection } from '../style' const AttachmentsInput = ({ field, diff --git a/app/components/component-xpub-review/src/components/review/ReviewForm.md b/app/components/component-review/src/components/review/ReviewForm.md similarity index 100% rename from app/components/component-xpub-review/src/components/review/ReviewForm.md rename to app/components/component-review/src/components/review/ReviewForm.md diff --git a/app/components/component-xpub-review/src/components/review/ReviewLayout.js b/app/components/component-review/src/components/review/ReviewLayout.js similarity index 95% rename from app/components/component-xpub-review/src/components/review/ReviewLayout.js rename to app/components/component-review/src/components/review/ReviewLayout.js index 89a5695715082581f34b732b2f29742163de858a..af44325b13295a81394b75f7de9bc4012bbc067a 100644 --- a/app/components/component-xpub-review/src/components/review/ReviewLayout.js +++ b/app/components/component-review/src/components/review/ReviewLayout.js @@ -7,7 +7,7 @@ import ReviewForm from './ReviewForm' import ReviewMetadata from '../metadata/ReviewMetadata' import Review from './Review' import EditorSection from '../decision/EditorSection' -import { Columns, Manuscript, Admin } from '../atoms/Columns' +import { Columns, Manuscript, AdminSection } from '../style' const addEditor = (manuscript, label) => ({ content: <EditorSection manuscript={manuscript} />, @@ -86,13 +86,13 @@ const ReviewLayout = ({ /> </Manuscript> - <Admin> + <AdminSection> <Tabs activeKey={reviewSections[reviewSections.length - 1].key} sections={reviewSections} title="Versions" /> - </Admin> + </AdminSection> </Columns> ) } diff --git a/app/components/component-xpub-review/src/components/review/ReviewLayout.md b/app/components/component-review/src/components/review/ReviewLayout.md similarity index 100% rename from app/components/component-xpub-review/src/components/review/ReviewLayout.md rename to app/components/component-review/src/components/review/ReviewLayout.md diff --git a/app/components/component-xpub-review/src/components/review/util.js b/app/components/component-review/src/components/review/util.js similarity index 100% rename from app/components/component-xpub-review/src/components/review/util.js rename to app/components/component-review/src/components/review/util.js diff --git a/app/components/component-xpub-review/src/components/reviewers/Reviewer.js b/app/components/component-review/src/components/reviewers/Reviewer.js similarity index 100% rename from app/components/component-xpub-review/src/components/reviewers/Reviewer.js rename to app/components/component-review/src/components/reviewers/Reviewer.js diff --git a/app/components/component-xpub-review/src/components/reviewers/Reviewer.md b/app/components/component-review/src/components/reviewers/Reviewer.md similarity index 100% rename from app/components/component-xpub-review/src/components/reviewers/Reviewer.md rename to app/components/component-review/src/components/reviewers/Reviewer.md diff --git a/app/components/component-xpub-review/src/components/reviewers/ReviewerContainer.js b/app/components/component-review/src/components/reviewers/ReviewerContainer.js similarity index 100% rename from app/components/component-xpub-review/src/components/reviewers/ReviewerContainer.js rename to app/components/component-review/src/components/reviewers/ReviewerContainer.js diff --git a/app/components/component-xpub-review/src/components/reviewers/ReviewerForm.js b/app/components/component-review/src/components/reviewers/ReviewerForm.js similarity index 100% rename from app/components/component-xpub-review/src/components/reviewers/ReviewerForm.js rename to app/components/component-review/src/components/reviewers/ReviewerForm.js diff --git a/app/components/component-xpub-review/src/components/reviewers/ReviewerForm.md b/app/components/component-review/src/components/reviewers/ReviewerForm.md similarity index 100% rename from app/components/component-xpub-review/src/components/reviewers/ReviewerForm.md rename to app/components/component-review/src/components/reviewers/ReviewerForm.md diff --git a/app/components/component-xpub-review/src/components/reviewers/Reviewers.js b/app/components/component-review/src/components/reviewers/Reviewers.js similarity index 100% rename from app/components/component-xpub-review/src/components/reviewers/Reviewers.js rename to app/components/component-review/src/components/reviewers/Reviewers.js diff --git a/app/components/component-xpub-review/src/components/reviewers/Reviewers.md b/app/components/component-review/src/components/reviewers/Reviewers.md similarity index 100% rename from app/components/component-xpub-review/src/components/reviewers/Reviewers.md rename to app/components/component-review/src/components/reviewers/Reviewers.md diff --git a/app/components/component-review/src/components/style.js b/app/components/component-review/src/components/style.js new file mode 100644 index 0000000000000000000000000000000000000000..9593456c30778d065dc3861d753282ad31510433 --- /dev/null +++ b/app/components/component-review/src/components/style.js @@ -0,0 +1,104 @@ +import styled from 'styled-components' +import { th, grid } from '@pubsweet/ui-toolkit' + +export const Columns = styled.div` + display: grid; + // grid-column-gap: 2em; + grid-template-areas: 'manuscript chat'; + grid-template-columns: 3fr 2fr; + justify-content: center; + overflow: hidden; + height: 100vh; +` + +export const Manuscript = styled.div` + grid-area: manuscript; + overflow-y: scroll; + background: ${th('colorBackgroundHue')}; + padding: ${grid(2)}; +` + +export const Chat = styled.div` + border-left: 1px solid ${th('colorFurniture')}; + grid-area: chat; + height: 100vh; + // overflow-y: scroll; + display: flex; +` + +export const AdminSection = styled.div` + margin-bottom: calc(${th('gridUnit')} * 3); +` + +export const Roles = styled.div` + display: flex; + flex-direction: row; + justify-content: space-around; + font-size: 0.8em; + margin-bottom: 0.6em; + margin-left: 0.5em; + margin-top: 0; + padding-left: 1.5em; + text-transform: uppercase; +` + +export const Role = styled.div` + display: flex; + + &:not(:last-of-type) { + margin-right: 3em; + } +` + +export const Info = styled.span` + padding: 0; + margin: 0; + list-style: none; + display: flex; + align-items: center; + justify-content: center; + height: 500px; +` + +export const EditorWrapper = styled.div` + .wax-container { + position: relative; + .main-editor { + margin: 3% 0 0 0; + } + } +` + +export const Container = styled.div` + max-width: 90rem; + box-shadow: ${th('boxShadow')}; + background-color: ${th('colorBackground')}; + border-radius: ${th('borderRadius')}; + // padding: ${grid(2)} ${grid(3)}; +` + +export const Title = styled.h2` + font-size: ${th('fontSizeHeading5')}; + font-weight: 500; +` + +export const SectionHeader = styled.div` + padding: ${grid(2)} ${grid(3)}; + border-bottom: 1px solid ${th('colorFurniture')}; +` + +export const SectionRow = styled.div` + border-bottom: 1px solid ${th('colorFurniture')}; + padding: ${grid(2)} ${grid(3)}; +` + +export const SectionRowGrid = styled(SectionRow)` + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-gap: ${grid(2)}; +` + +export const SectionAction = styled.div` + grid-column: 3; + justify-self: end; +` diff --git a/app/components/component-xpub-review/src/index.js b/app/components/component-review/src/index.js similarity index 100% rename from app/components/component-xpub-review/src/index.js rename to app/components/component-review/src/index.js diff --git a/app/components/component-xpub-review/src/components/DecisionPage.js b/app/components/component-xpub-review/src/components/DecisionPage.js deleted file mode 100644 index 434893e77baba631ddfb5e8fa35ec6ad905d3bb8..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/DecisionPage.js +++ /dev/null @@ -1,351 +0,0 @@ -import { compose, withProps } from 'recompose' -import { graphql } from '@apollo/react-hoc' -import gql from 'graphql-tag' -import { withFormik } from 'formik' -import { withLoader } from 'pubsweet-client' -import { getCommentContent } from './review/util' - -import DecisionLayout from './decision/DecisionLayout' - -// import { dashboard } from '../../../component-xpub-dashboard/src/graphql/queries' - -// /graphql/queries/' - -const reviewFields = ` - id - created - updated - comments { - type - content - files { - id - created - label - filename - fileType - mimeType - size - url - } - } - isDecision - recommendation - user { - id - username - } -` - -const fragmentFields = ` - id - created - files { - id - created - label - filename - fileType - mimeType - size - url - } - reviews { - ${reviewFields} - } - decision - teams { - id - name - role - object { - objectId - objectType - } - members { - id - user { - id - username - } - status - } - } - status - meta { - title - source - abstract - declarations { - openData - openPeerReview - preregistered - previouslySubmitted - researchNexus - streamlinedReview - } - articleSections - articleType - history { - type - date - } - notes { - notesType - content - } - keywords - } - submission - suggestions { - reviewers { - opposed - suggested - } - editors { - opposed - suggested - } - } -` - -const query = gql` - query($id: ID!) { - currentUser { - id - username - admin - } - - manuscript(id: $id) { - ${fragmentFields} - manuscriptVersions { - ${fragmentFields} - } - channel { - id - name - } - } - } -` - -const updateReviewMutation = gql` - mutation($id: ID, $input: ReviewInput) { - updateReview(id: $id, input: $input) { - ${reviewFields} - } - } -` - -const uploadReviewFilesMutation = gql` - mutation($file: Upload!) { - upload(file: $file) { - url - } - } -` - -const createFileMutation = gql` - mutation($file: Upload!) { - createFile(file: $file) { - id - created - label - filename - fileType - mimeType - size - url - } - } -` - -const submitMutation = gql` - mutation($id: ID!, $input: String) { - submitManuscript(id: $id, input: $input) { - id - ${fragmentFields} - } - } -` - -export default compose( - graphql(query, { - options: ({ match }) => ({ - variables: { - id: match.params.version, - }, - }), - }), - graphql(uploadReviewFilesMutation, { name: 'uploadReviewFilesMutation' }), - graphql(updateReviewMutation, { name: 'updateReviewMutation' }), - graphql(createFileMutation, { - props: ({ mutate, ownProps: { match } }) => ({ - createFile: file => { - mutate({ - variables: { - file, - }, - update: (proxy, { data: { createFile } }) => { - const data = proxy.readQuery({ - query, - variables: { - id: match.params.version, - }, - }) - - data.manuscript.reviews.map(review => { - if (review.id === file.objectId) { - review.comments.map(comment => { - if (comment.type === createFile.fileType) { - comment.files = [createFile] - } - return comment - }) - } - return review - }) - - proxy.writeQuery({ query, data }) - }, - }) - }, - }), - }), - graphql(submitMutation, { - props: ({ mutate, ownProps }) => ({ - completeDecision: ({ history, manuscript }) => { - mutate({ - variables: { - id: manuscript.id, - input: JSON.stringify({ - decision: manuscript.reviews.find(review => review.isDecision) - .recommendation, - }), - }, - refetchQueries: [ - { - query, - }, - ], - // update: (proxy, { data: { submitManuscript } }) => { - // const data = proxy.readQuery({ - // query, - // variables: { - // id: manuscript.id, - // }, - // }) - // // TODO: Remove trick to replace existing manuscript - // data.manuscript.status = submitManuscript.status - // proxy.writeQuery({ query, data }) - // }, - }).then(() => { - history.push('/dashboard') - }) - }, - }), - }), - withLoader(), - withProps( - ({ - currentUser, - manuscript, - createFile, - updateReviewMutation, - uploadReviewFilesMutation, - match: { - params: { journal }, - }, - }) => ({ - journal: { id: journal }, - updateReview: (data, file) => { - const reviewData = { - isDecision: true, - manuscriptId: manuscript.id, - } - - if (data.comment) { - reviewData.comments = [data.comment] - } - - if (data.recommendation) { - reviewData.recommendation = data.recommendation - } - - const review = - manuscript.reviews.find(review => review.isDecision) || {} - return updateReviewMutation({ - variables: { - id: review.id || undefined, - input: reviewData, - }, - update: (proxy, { data: { updateReview } }) => { - const data = proxy.readQuery({ - query, - variables: { - id: manuscript.id, - }, - }) - const reviewIndex = data.manuscript.reviews.findIndex( - review => review.id === updateReview.id, - ) - if (reviewIndex < 0) { - data.manuscript.reviews.push(updateReview) - } else { - data.manuscript.reviews[reviewIndex] = updateReview - } - proxy.writeQuery({ query, data }) - }, - }) - }, - uploadFile: (file, updateReview, type) => - uploadReviewFilesMutation({ - variables: { - file, - }, - }).then(({ data }) => { - const newFile = { - url: data.upload.url, - filename: file.name, - size: file.size, - object: 'Review', - objectId: updateReview.id, - fileType: type, - } - createFile(newFile) - }), - }), - ), - withFormik({ - mapPropsToValues: props => - (props.manuscript.reviews && - props.manuscript.reviews.find(review => review.isDecision)) || { - comments: [], - recommendation: null, - }, - isInitialValid: ({ manuscript }) => { - const rv = manuscript.reviews.find(review => review.isDecision) || {} - const isRecommendation = rv.recommendation != null - const isCommented = getCommentContent(rv, 'note') !== '' - - return isCommented && isRecommendation - }, - validate: (values, props) => { - const errors = {} - if (getCommentContent(values, 'note') === '') { - errors.comments = 'Required' - } - - if (values.recommendation === null) { - errors.recommendation = 'Required' - } - return errors - }, - displayName: 'decision', - handleSubmit: ( - props, - { props: { completeDecision, history, manuscript } }, - ) => completeDecision({ history, manuscript }), - }), -)(DecisionLayout) diff --git a/app/components/component-xpub-review/src/components/assignEditors/AssignEditorsReviewers.js b/app/components/component-xpub-review/src/components/assignEditors/AssignEditorsReviewers.js deleted file mode 100644 index 0ccdaac2ccaa4fceae1fbdfbbfef2137e4442272..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/assignEditors/AssignEditorsReviewers.js +++ /dev/null @@ -1,24 +0,0 @@ -import React, { useContext } from 'react' -import styled from 'styled-components' -import { Link } from 'react-router-dom' -import { JournalContext } from 'xpub-journal' -import { Roles } from '../molecules/Roles' - -const Root = styled.div`` -const Title = styled.div`` - -const AssignEditorsReviewers = ({ manuscript, AssignEditor }) => { - return ( - <Root> - <Title>Assign Editors</Title> - <Roles> - <AssignEditor manuscript={manuscript} teamRole="seniorEditor" /> - <AssignEditor manuscript={manuscript} teamRole="handlingEditor" /> - </Roles> - <Link to={`/journal/versions/${manuscript.id}/reviewers`}> - Assign Reviewers - </Link> - </Root> - ) -} -export default AssignEditorsReviewers diff --git a/app/components/component-xpub-review/src/components/atoms/AdminSection.js b/app/components/component-xpub-review/src/components/atoms/AdminSection.js deleted file mode 100644 index a78c83a7940e8a25709eedbc68c24b0da2d5abea..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/atoms/AdminSection.js +++ /dev/null @@ -1,8 +0,0 @@ -import styled from 'styled-components' -import { th } from '@pubsweet/ui-toolkit' - -const AdminSection = styled.div` - margin-bottom: calc(${th('gridUnit')} * 3); -` - -export default AdminSection diff --git a/app/components/component-xpub-review/src/components/atoms/Columns.js b/app/components/component-xpub-review/src/components/atoms/Columns.js deleted file mode 100644 index cae6f5ae6049f4ead86705ac19f96ae466018c03..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/atoms/Columns.js +++ /dev/null @@ -1,26 +0,0 @@ -import styled from 'styled-components' - -const Columns = styled.div` - display: grid; - // grid-column-gap: 2em; - grid-template-areas: 'manuscript chat'; - grid-template-columns: 3fr 2fr; - justify-content: center; - overflow: hidden; - height: 100vh; -` - -const Manuscript = styled.div` - grid-area: manuscript; - overflow-y: scroll; -` - -const Chat = styled.div` - border-left: 1px solid black; - grid-area: chat; - height: 100vh; - // overflow-y: scroll; - display: flex; -` - -export { Columns, Manuscript, Chat } diff --git a/app/components/component-xpub-review/src/components/decision/DecisionForm.md b/app/components/component-xpub-review/src/components/decision/DecisionForm.md deleted file mode 100644 index 71222d66e3beea80c4c083ee18be52bbf7570e4f..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/decision/DecisionForm.md +++ /dev/null @@ -1,51 +0,0 @@ -A form for entering a decision on a version of a project. - -```js -const { withFormik } = require('formik') - -const manuscript = { - id: faker.random.uuid(), - meta: { - title: faker.lorem.sentence(25), - abstract: faker.lorem.sentence(100), - articleType: 'original-research', - declarations: { - openData: 'yes', - openPeerReview: 'no', - preregistered: 'yes', - previouslySubmitted: 'yes', - researchNexus: 'no', - streamlinedReview: 'no', - }, - }, - decision: { - id: faker.random.uuid(), - comments: { type: 'note', content: 'this needs review' }, - created: 'Thu Oct 11 2018', - open: false, - recommendation: '<p>This is a decision</p>', - user: { identities: [] }, - }, - reviews: [ - { - comments: { content: 'this needs review' }, - created: 'Thu Oct 11 2018', - open: false, - recommendation: '', - user: { identities: [] }, - }, - ], -} - -const ConnectedDecisionForm = withFormik({ - initialValues: {}, - mapPropsToValues: ({ manuscript }) => manuscript, - displayName: 'decision', - handleSubmit: (props, { props: { onSubmit, history } }) => - onSubmit(props, { history }), -})(DecisionForm) -;<ConnectedDecisionForm - manuscript={manuscript} - uploadFile={() => new XMLHttpRequest()} -/> -``` diff --git a/app/components/component-xpub-review/src/components/decision/DecisionLayout.js b/app/components/component-xpub-review/src/components/decision/DecisionLayout.js deleted file mode 100644 index e908ef93873df6c22437304de8a7e74fc5ebd210..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/decision/DecisionLayout.js +++ /dev/null @@ -1,110 +0,0 @@ -import React from 'react' -import moment from 'moment' - -import { Tabs } from '@pubsweet/ui' -import DecisionForm from './DecisionForm' -import DecisionReviews from './DecisionReviews' -import AssignEditorsReviewers from '../assignEditors/AssignEditorsReviewers' -import AssignEditor from '../assignEditors/AssignEditor' -import ReviewMetadata from '../metadata/ReviewMetadata' -import Decision from './Decision' -// import EditorSection from './EditorSection' -import { Columns, Manuscript, Chat } from '../atoms/Columns' -import AdminSection from '../atoms/AdminSection' -// const addEditor = (manuscript, label) => ({ -// content: <EditorSection manuscript={manuscript} />, -// key: manuscript.id, -// label, -// }) -import MessageContainer from '../../../../component-chat/src' - -const DecisionLayout = ({ - handleSubmit, - updateReview, - uploadFile, - manuscript, - isValid, -}) => { - const decisionSections = [] - const editorSections = [] - const manuscriptVersions = manuscript.manuscriptVersions || [] - manuscriptVersions.forEach(manuscript => { - const submittedMoment = moment(manuscript.updated) - const label = submittedMoment.format('YYYY-MM-DD') - - decisionSections.push({ - content: ( - <div> - <ReviewMetadata manuscript={manuscript} /> - <DecisionReviews manuscript={manuscript} /> - <Decision - review={manuscript.reviews.find(review => review.isDecision)} - /> - </div> - ), - key: manuscript.id, - label, - }) - - // editorSections.push(addEditor(manuscript, label)) - }, []) - - const submittedMoment = moment() - const label = submittedMoment.format('YYYY-MM-DD') - if (manuscript.status !== 'revising') { - decisionSections.push({ - content: ( - <div> - <AdminSection key="assign-editors"> - <AssignEditorsReviewers - AssignEditor={AssignEditor} - manuscript={manuscript} - /> - </AdminSection> - <AdminSection key="review-metadata"> - <ReviewMetadata manuscript={manuscript} /> - </AdminSection> - <AdminSection key="decision-review"> - <DecisionReviews manuscript={manuscript} /> - </AdminSection> - <AdminSection key="decision-form"> - <DecisionForm - handleSubmit={handleSubmit} - isValid={isValid} - updateReview={updateReview} - uploadFile={uploadFile} - /> - </AdminSection> - </div> - ), - key: manuscript.id, - label, - }) - - // editorSections.push(addEditor(manuscript, label)) - } - - return ( - <Columns> - <Manuscript> - Temp - {/* <Tabs - activeKey={editorSections[editorSections.length - 1].key} - sections={editorSections} - title="Versions" - /> */} - <Tabs - activeKey={decisionSections[decisionSections.length - 1].key} - sections={decisionSections} - title="Versions" - /> - </Manuscript> - - <Chat> - <MessageContainer channelId={manuscript.channel.id} /> - </Chat> - </Columns> - ) -} - -export default DecisionLayout diff --git a/app/components/component-xpub-review/src/components/metadata/ReviewMetadata.js b/app/components/component-xpub-review/src/components/metadata/ReviewMetadata.js deleted file mode 100644 index 2d06726f183d28174037e0236f9129eb42988913..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/metadata/ReviewMetadata.js +++ /dev/null @@ -1,148 +0,0 @@ -import React from 'react' -import styled from 'styled-components' - -import { Attachment } from '@pubsweet/ui' - -const Root = styled.div`` - -const Title = styled.div`` - -const Heading = styled.span` - font-weight: inherit; - padding: 0 1em 0 0; - white-space: nowrap; - text-align: right; - flex-grow: 0; - flex-shrink: 0; - flex-basis: 50%; -` -const Metadata = styled.div` - div { - display: flex; - flex-direction: row; - justify-content: flex-start; - } -` - -const Cell = styled.span` - padding: 0; - flex-grow: 0; - flex-shrink: 0; - flex-basis: 50%; -` - -const getNote = (notes, type) => - notes.find(note => note.notesType === type) || {} - -const getDeclarations = (manuscript, field) => - ((manuscript.meta || {}).declarations || {})[field] - -const getSupplementaryFiles = supplementary => - (supplementary || []).filter(file => file.fileType === 'supplementary') || [] - -// Due to migration to new Data Model -// Attachement component needs different data structure to work -// needs to change the pubsweet ui Attachement to support the new Data Model -const filesToAttachment = file => ({ - name: file.filename, - url: file.url, -}) - -const ReviewMetadata = ({ manuscript }) => ( - <Root> - <Title>Metadata</Title> - - <Metadata> - <div> - <Heading>Open Peer Review :</Heading> - <Cell> - {getDeclarations(manuscript, 'openPeerReview') === 'yes' - ? 'Yes' - : 'No'} - </Cell> - </div> - <div> - <Heading>Streamlined Review :</Heading> - <Cell> - {getDeclarations(manuscript, 'streamlinedReview') === 'yes' - ? 'Please view supplementary uploaded files' - : 'No'} - </Cell> - </div> - <div> - <Heading>Part of Research Nexus :</Heading> - <Cell> - {getDeclarations(manuscript, 'researchNexus') === 'yes' - ? 'Yes' - : 'No'} - </Cell> - </div> - <div> - <Heading>Pre-registered :</Heading> - <Cell> - {getDeclarations(manuscript, 'preregistered') === 'yes' - ? 'Yes' - : 'No'} - </Cell> - </div> - <div> - <Heading>Suggested Reviewers :</Heading> - <Cell> - {((manuscript.suggestions || {}).reviewers || {}).suggested || 'None'} - </Cell> - </div> - <div> - <Heading>Opposed Reviewers :</Heading> - <Cell> - {((manuscript.suggestions || {}).reviewers || {}).opposed || 'None'} - </Cell> - </div> - <div> - <Heading>Suggested Editors :</Heading> - <Cell> - {((manuscript.suggestions || {}).editors || {}).suggested || 'None'} - </Cell> - </div> - <div> - <Heading>Opposed Editors :</Heading> - <Cell> - {((manuscript.suggestions || {}).editors || {}).opposed || 'None'} - </Cell> - </div> - <div> - <Heading>Special Instructions :</Heading> - <Cell> - {getNote(manuscript.meta.notes || [], 'specialInstructions') - .content || 'None'} - </Cell> - </div> - {getSupplementaryFiles(manuscript.files).length > 0 && ( - <div> - <Heading> - {getSupplementaryFiles(manuscript.files).length} supplementary{' '} - {getSupplementaryFiles(manuscript.files).length === 1 - ? 'file' - : 'files'} - : - </Heading> - {!!getSupplementaryFiles(manuscript.files).length && ( - <Cell> - {getSupplementaryFiles(manuscript.files).map(file => ( - <Attachment - file={filesToAttachment(file)} - key={file.url} - uploaded - /> - ))} - </Cell> - )} - </div> - )} - <Title>Additional metadata</Title> - {// TODO - JSON.stringify(JSON.parse(manuscript.submission), null, 2)} - </Metadata> - </Root> -) - -export default ReviewMetadata diff --git a/app/components/component-xpub-review/src/components/molecules/EditorWrapper.js b/app/components/component-xpub-review/src/components/molecules/EditorWrapper.js deleted file mode 100644 index 8db6b31efc82249ef9301905e75ad91c7d95a619..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/molecules/EditorWrapper.js +++ /dev/null @@ -1,12 +0,0 @@ -import styled from 'styled-components' - -const EditorWrapper = styled.div` - .wax-container { - position: relative; - .main-editor { - margin: 3% 0 0 0; - } - } -` - -export { EditorWrapper } diff --git a/app/components/component-xpub-review/src/components/molecules/Info.js b/app/components/component-xpub-review/src/components/molecules/Info.js deleted file mode 100644 index ce196e93b7a44292b7357a6a5e9b67f4395a0f9a..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/molecules/Info.js +++ /dev/null @@ -1,13 +0,0 @@ -import styled from 'styled-components' - -const Info = styled.span` - padding: 0; - margin: 0; - list-style: none; - display: flex; - align-items: center; - justify-content: center; - height: 500px; -` - -export { Info } diff --git a/app/components/component-xpub-review/src/components/molecules/Roles.js b/app/components/component-xpub-review/src/components/molecules/Roles.js deleted file mode 100644 index d7499552f13d0f3d101dab4c1cac89e315e19be1..0000000000000000000000000000000000000000 --- a/app/components/component-xpub-review/src/components/molecules/Roles.js +++ /dev/null @@ -1,23 +0,0 @@ -import styled from 'styled-components' - -const Roles = styled.div` - display: flex; - flex-direction: row; - justify-content: space-around; - font-size: 0.8em; - margin-bottom: 0.6em; - margin-left: 0.5em; - margin-top: 0; - padding-left: 1.5em; - text-transform: uppercase; -` - -const Role = styled.div` - display: flex; - - &:not(:last-of-type) { - margin-right: 3em; - } -` - -export { Roles, Role }