Skip to content

Commit

Permalink
#351: added project type support
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxue1123 committed Nov 12, 2024
1 parent 98aab1d commit 4ca2639
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/ProjectForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class ProjectForm extends Form {
is_token_holder: false,
is_public: false,
is_locked: false,
project_type: "research",
allOptions: [
"show_project_owners",
"show_project_members",
Expand Down Expand Up @@ -129,6 +130,7 @@ class ProjectForm extends Form {
is_owner: Joi.boolean(),
is_token_holder: Joi.boolean(),
is_public: Joi.string().required().label("Public"),
project_type: Joi.string().required().label("Project Type"),
is_locked: Joi.boolean(),
allOptions: Joi.array(),
selectedOptions: Joi.array(),
Expand Down Expand Up @@ -265,6 +267,7 @@ class ProjectForm extends Form {
is_owner: project.memberships.is_owner,
is_token_holder: project.memberships.is_token_holder,
is_public: project.is_public ? "Yes" : "No",
project_type: project.project_type,
is_locked: project.is_locked,
allOptions: [
"show_project_owners",
Expand Down Expand Up @@ -744,12 +747,14 @@ class ProjectForm extends Form {
{this.renderWysiwyg("description", "Description", canUpdate)}
{this.renderSelect("facility", "Facility", canUpdate, data.facility, portalData.facilityOptions)}
{this.renderSelect("is_public", "Public", canUpdate, data.is_public, publicOptions, portalData.helperText.publicProjectDescription)}
{this.renderSelect("project_type", "Project Type", canUpdate, data.project_type, portalData.projectTypeOptions)}
{
data.is_public === "Yes" &&
this.renderInputCheckBoxes("preferences", "Privacy Preferences",
canUpdate, optionsDisplayMapping,
portalData.helperText.privacyPreferencesDescription
)}
)
}
</form>
<ProjectBasicInfoTable
project={data}
Expand Down
8 changes: 8 additions & 0 deletions src/styles/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1325,3 +1325,11 @@ div:has(> #multiselectContainerReact) {
--bs-alert-bg: #ddeaf2 !important;
--bs-alert-border-color: #d0e2ec !important;
}

.btn-primary, .btn-secondary {
--bs-btn-color: #fff !important;
}

.btn-outline-primary, .btn-outline-secondary {
--bs-btn-hover-color: #fff !important;
}

0 comments on commit 4ca2639

Please sign in to comment.