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

add new fields to edit project form #1527

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
35 changes: 34 additions & 1 deletion client/src/components/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,37 @@ export const simpleInputs = [
type: 'text',
placeholder: 'htttps://hackforla.org/projects/',
},
];
];

export const additionalInputsForEdit = [
{
label: 'Partners',
name: 'partners',
type: 'text',
placeholder: 'partners',
},
{
label: 'Managed by Users',
trillium marked this conversation as resolved.
Show resolved Hide resolved
name: 'mangedByUsers',
type: 'text',
placeholder: 'Managed by Users'
},
{
label: 'Project Status',
name: 'projectStatus',
type: 'text',
placeholder: 'Project Status'
},
{
label: 'Google Drive ID',
name: 'googleDriveId',
type: 'text',
placeholder: 'htttps://drive.google.com/',
},
{
label: 'Created at',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo, correct field name is createdDate

name: 'createdAt',
type: 'text',
placeholder: 'Created At'
}
]
4 changes: 2 additions & 2 deletions client/src/components/manageProjects/editProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import EditMeetingTimes from './editMeetingTimes';
import CreateNewEvent from './createNewEvent';
import readableEvent from './utilities/readableEvent';
import ProjectForm from '../ProjectForm';
import { simpleInputs } from '../data';
import { simpleInputs, additionalInputsForEdit } from '../data';
import TitledBox from '../parts/boxes/TitledBox';

import { ReactComponent as EditIcon } from '../../svg/Icon_Edit.svg';
Expand Down Expand Up @@ -92,7 +92,7 @@ const EditProject = ({
/>
</div>
<ProjectForm
arr={simpleInputs}
arr={[...simpleInputs, ...additionalInputsForEdit]}
bkmorgan3 marked this conversation as resolved.
Show resolved Hide resolved
formData={formData}
projectToEdit={projectToEdit}
isEdit={true}
Expand Down
Loading