-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #549 from IQSS/feat/545-edit-collection-page
Edit Collection page
- Loading branch information
Showing
88 changed files
with
9,885 additions
and
1,909 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
packages/design-system/src/lib/components/dropdown-button/dropdown-header/DropdownHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
import { PropsWithChildren } from 'react' | ||
import { Dropdown } from 'react-bootstrap' | ||
|
||
export function DropdownHeader({ children }: PropsWithChildren) { | ||
return <Dropdown.Header>{children}</Dropdown.Header> | ||
interface DropdownHeaderProps { | ||
className?: string | ||
children: React.ReactNode | ||
} | ||
|
||
export function DropdownHeader({ className, children }: DropdownHeaderProps) { | ||
return <Dropdown.Header className={className}>{children}</Dropdown.Header> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,4 @@ | ||
{ | ||
"pageTitle": "Create Collection", | ||
"fields": { | ||
"hostCollection": { | ||
"label": "Host Collection", | ||
"description": "The collection which contains this data.", | ||
"required": "Host Collection is required" | ||
}, | ||
"name": { | ||
"label": "Collection Name", | ||
"description": "The project, department, university, professor, or journal this collection will contain data for.", | ||
"required": "Collection Name is required" | ||
}, | ||
"affiliation": { | ||
"label": "Affiliation", | ||
"description": "The organization with which this collection is affiliated." | ||
}, | ||
"alias": { | ||
"label": "Identifier", | ||
"description": "Short name used for the URL of this collection.", | ||
"required": "Identifier is required", | ||
"invalid": { | ||
"format": "Identifier is not valid. Valid characters are a-Z, 0-9, '_', and '-'.", | ||
"maxLength": "Identifier must be at most {{maxLength}} characters." | ||
}, | ||
"suggestion": "Psst... try this" | ||
}, | ||
"storage": { | ||
"label": "Storage", | ||
"description": "A storage service to be used for datasets in this collection." | ||
}, | ||
"type": { | ||
"label": "Category", | ||
"description": "The type that most closely reflects this collection.", | ||
"required": "Category is required" | ||
}, | ||
"description": { | ||
"label": "Description", | ||
"description": "A summary describing the purpose, nature or scope of this collection.", | ||
"subLabel": "This field supports only certain <htmlTooltip>HTML tags</htmlTooltip>.", | ||
"htmlAllowedTags": "<a>, <b>, <blockquote>, <br>, <code>, <del>, <dd>, <dl>, <dt>, <em>, <hr>, <h1>-<h3>, <i>, <img>, <kbd>, <li>, <ol>, <p>, <pre>, <s>, <sup>, <sub>, <strong>, <strike>, <u>, <ul>" | ||
}, | ||
"contacts": { | ||
"label": "Email", | ||
"description": "The email address(es) of the contact(s) for the collection.", | ||
"required": "Email is required", | ||
"invalid": "Email is not a valid email" | ||
}, | ||
"metadataFields": { | ||
"sectionLabel": "Metadata Fields", | ||
"helperText": "Choose the metadata fields to use in dataset templates and when adding a dataset to this collection.", | ||
"useMetadataFieldsFrom": "Use metadata fields from", | ||
"inputLevelsTable": { | ||
"hideTableAriaLabel": "Hide input levels table", | ||
"requiredByDataverse": "Required by Dataverse", | ||
"hidden": "Hidden", | ||
"optional": "Optional", | ||
"required": "Required", | ||
"conditionallyRequired": "Conditionally Required" | ||
} | ||
}, | ||
"browseSearchFacets": { | ||
"label": "Browse/Search Facets", | ||
"helperText": "Choose and order the metadata fields to use as facets when browsing this collection.", | ||
"useBrowseSearchFacetsFrom": "Use browse/search facets from", | ||
"selectedFacets": "Selected" | ||
} | ||
}, | ||
"confirmResetModal": { | ||
"title": "Reset Modifications", | ||
"warning": "Are you sure you want to reset the selected metadata fields? If you do this, any customizations (hidden, required, optional) you have done will no longer appear.", | ||
"continue": "Continue", | ||
"cancel": "Cancel" | ||
}, | ||
"submitStatus": { | ||
"success": "Collection created successfully." | ||
}, | ||
"formButtons": { | ||
"save": "Create Collection", | ||
"cancel": "Cancel" | ||
}, | ||
"notAllowedToCreateCollection": "You do not have permissions to create a collection within this collection." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"pageTitle": "Edit Collection", | ||
"notAllowedToEditCollection": "You do not have permissions to edit this collection.", | ||
"infoAlert": { | ||
"heading": "Edit Collection", | ||
"text": "Edit your collection and click Save Changes. Asterisks indicate required fields." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface CollectionContact { | ||
email: string | ||
displayOrder: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface CollectionInputLevel { | ||
datasetFieldName: string | ||
include: boolean | ||
required: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export enum CollectionType { | ||
RESEARCHERS = 'RESEARCHERS', | ||
RESEARCH_PROJECTS = 'RESEARCH_PROJECTS', | ||
JOURNALS = 'JOURNALS', | ||
ORGANIZATIONS_INSTITUTIONS = 'ORGANIZATIONS_INSTITUTIONS', | ||
TEACHING_COURSES = 'TEACHING_COURSES', | ||
UNCATEGORIZED = 'UNCATEGORIZED', | ||
LABORATORY = 'LABORATORY', | ||
RESEARCH_GROUP = 'RESEARCH_GROUP', | ||
DEPARTMENT = 'DEPARTMENT' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { WriteError } from '@iqss/dataverse-client-javascript' | ||
import { CollectionRepository } from '../repositories/CollectionRepository' | ||
import { CollectionDTO } from './DTOs/CollectionDTO' | ||
|
||
export async function editCollection( | ||
collectionRepository: CollectionRepository, | ||
updatedCollection: CollectionDTO, | ||
collectionId: string | ||
): Promise<void> { | ||
return collectionRepository.edit(collectionId, updatedCollection).catch((error: WriteError) => { | ||
throw error | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.