Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requested Changes [post-workshop] for the "Add Dataset" View #1064

Open
wants to merge 1 commit into
base: task/digital-rocks
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const DataFilesAddProjectModal = () => {
type: 'PROJECTS_CREATE',
payload: {
title: values.title,
description: values.description || null,
description: values.description, // Ensure this is included
members: members.map((member) => ({
username: member.user.username,
access: member.access,
Expand All @@ -84,7 +84,7 @@ const DataFilesAddProjectModal = () => {
onCreate,
},
});
};
};

const onAdd = (newUser) => {
setMembers([...members, newUser]);
Expand All @@ -101,7 +101,12 @@ const DataFilesAddProjectModal = () => {
.min(3, 'Title must be at least 3 characters')
.max(150, 'Title must be at most 150 characters')
.required('Please enter a title.'),
description: Yup.string()
.min(200, 'Description must be at least 200 characters')
.max(300, 'Description must be at most 300 characters')
.required('Please enter a description.'),
});


return (
<>
Expand All @@ -113,7 +118,7 @@ const DataFilesAddProjectModal = () => {
>
{' '}
<Formik
initialValues={{ title: '' }}
initialValues={{ title: '', description: '' }}
onSubmit={addproject}
validationSchema={validationSchema}
>
Expand All @@ -122,25 +127,36 @@ const DataFilesAddProjectModal = () => {
Add {sharedWorkspacesDisplayName}
</ModalHeader>
<ModalBody>
<FormField
<FormField
name="title"
label={
<div>
{sharedWorkspacesDisplayName} Title{' '}
<small>
<em>(Maximum 150 characters)</em>
</small>
<br />
<small style={{ color: '#666' }}>
<em>The title should be descriptive and distinctive from related publications.</em>
</small>
</div>
}
/>
{DataFilesAddProjectModalAddon && (
<DataFilesAddProjectModalAddon />
)}
<DataFilesProjectMembers
members={members}
onAdd={onAdd}
onRemove={onRemove}
<FormField
name="description"
label={
<div>
Dataset Description{' '}
<br />
<small style={{ color: '#666' }}>
<em>Provide 200-300 words clearly describing the data as an independent output; do not copy related publication abstract.</em>
</small>
</div>
}
type="textarea"
/>
{DataFilesAddProjectModalAddon && <DataFilesAddProjectModalAddon />}
<DataFilesProjectMembers members={members} onAdd={onAdd} onRemove={onRemove} />
</ModalBody>
<ModalFooter>
{error ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const DataFilesProjectMembers = ({
};

const memberColumn = {
Header: 'Members',
Header: 'Authors',
headerStyle: { textAlign: 'left' },
accessor: 'user',
className: 'project-members__cell',
Expand Down
Loading