Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Website
Commits
4b061947
Commit
4b061947
authored
Oct 26, 2018
by
Viacheslav Pavlov
Browse files
several fixes after rebase, added missing translations
parent
5799f6bb
Changes
17
Hide whitespace changes
Inline
Side-by-side
locales/en/common.json
View file @
4b061947
...
...
@@ -5,12 +5,16 @@
"approve"
:
"Approve and publish"
,
"back"
:
"Back"
,
"backTo"
:
"Back to {{where, lowercase}}"
,
"backToList"
:
"Back to list"
,
"cancel"
:
"Cancel"
,
"create"
:
"Create"
,
"delete"
:
"Delete"
,
"deleteData"
:
"Delete data"
,
"edit"
:
"Edit"
,
"logout"
:
"Logout"
,
"manage"
:
"Manage"
,
"nextStep"
:
"Next step"
,
"read"
:
"Read"
,
"reject"
:
"Reject"
,
"remove"
:
"Remove"
,
"reset"
:
"Reset"
,
...
...
@@ -19,7 +23,8 @@
"saveChanges"
:
"Save changes"
,
"search"
:
"Search"
,
"sendToReview"
:
"Send to review"
,
"unpublish"
:
"Unpublish"
"unpublish"
:
"Unpublish"
,
"write"
:
"Write"
},
"csv"
:
{
"autoDetect"
:
"Auto-detect "
,
...
...
@@ -49,20 +54,34 @@
"release"
:
"Release to upload"
},
"label"
:
{
"created"
:
"Created"
,
"dateNotProvided"
:
"Date not provided"
,
"description"
:
"Description"
,
"either"
:
"Either"
,
"itemEditorWarn"
:
"Don't use the ItemsEditor for more than 100 items!"
,
"lastModified"
:
"Last modified"
,
"lastUpdated"
:
"Last updated"
,
"modified"
:
"Modified"
,
"no"
:
"No"
,
"prettyNumber"
:
"{{value, number}}"
,
"sortBy"
:
"Sort By"
,
"stepsForDataPublication"
:
"Steps for data publication completion"
,
"title"
:
"Title"
,
"UUID"
:
"UUID"
,
"yes"
:
"Yes"
},
"paginate"
:
{
"numberOfItems"
:
"{{count, number}} {{what, lowercase}}"
,
"estimatedNumberOfItems"
:
"About {{count, number}} {{what, lowercase}}"
},
"permissions"
:
{
"label"
:
"Permissions"
,
"managePermissions"
:
"Manage permissions"
,
"class"
:
"Class"
,
"objectID"
:
"Object ID"
,
"owner"
:
"Owner"
,
"inheritsPermissions"
:
"inheritsPermissions"
,
"effectivePermissions"
:
"Effective permissions"
,
"sid"
:
"Sid"
}
}
locales/en/translations.json
View file @
4b061947
...
...
@@ -102,6 +102,20 @@
}
}
},
"admin"
:
{
"menu"
:
{
"userManagement"
:
"User management"
,
"users"
:
"Users"
,
"oAuthClients"
:
"OAuth clients"
,
"requests"
:
"Requests"
,
"fileRepository"
:
"File repository"
,
"cluster"
:
"Cluster"
,
"hazelcast"
:
"Hazelcast"
,
"elasticsearch"
:
"Elasticsearch"
,
"caches"
:
"Caches"
,
"loggers"
:
"Loggers"
}
},
"common"
:
{
"Genesys PGR"
:
"Genesys PGR"
,
"Not found"
:
"Not found"
,
...
...
@@ -393,7 +407,9 @@
"modelName"
:
"Crop"
,
"modelName_plural"
:
"Crops"
,
"menu"
:
"Crops"
,
"accessionsInGenesys"
:
"Accessions in genesys"
"accessionsInGenesys"
:
"Accessions in genesys"
,
"cropDetails"
:
"{{cropName,string}} details"
,
"cropList"
:
"List of crops"
}
}
,
"institutes"
:
{
...
...
@@ -689,7 +705,8 @@
"MANAGER"
:
"Data manager"
,
"DIGITIZER"
:
"Data digitizer"
,
"COLLECTOR"
:
"Data collector"
,
"CURATOR"
:
"Data curator"
"CURATOR"
:
"Data curator"
,
"null"
:
"Not specified"
}
}
}
...
...
src/accessions/ui/DisplayPage.tsx
View file @
4b061947
...
...
@@ -123,55 +123,55 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
}
>
<
Properties
>
{
accession
.
doi
&&
<
PropertiesItem
title
=
"
accessions.public.p.display.DOI
"
><
DOI
noPrefix
value
=
{
accession
.
doi
}
/></
PropertiesItem
>
}
<
PropertiesItem
title
=
"
accessions.common.acceNumb
"
>
{
accession
.
accessionNumber
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.public.p.display.holdingInstitute
"
>
{
accession
.
doi
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.DOI
'
)
}
><
DOI
noPrefix
value
=
{
accession
.
doi
}
/></
PropertiesItem
>
}
<
PropertiesItem
title
=
{
t
(
'
accessions.common.acceNumb
'
)
}
>
{
accession
.
accessionNumber
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.holdingInstitute
'
)
}
>
<
InstituteLink
to
=
{
accession
.
institute
}
>
{
accession
.
institute
.
fullName
}
</
InstituteLink
>
<
span
>
—
</
span
>
<
CountryLink
noflag
country
=
{
accession
.
institute
.
country
}
/>
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.common.instituteCode
"
>
{
accession
.
institute
.
code
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.public.p.display.acquisitionDate
"
><
McpdDate
value
=
{
accession
.
acquisitionDate
}
/></
PropertiesItem
>
{
accession
.
countryOfOrigin
&&
<
PropertiesItem
title
=
"
accessions.common.countryOfOrigin
"
>
{
<
CountryLink
country
=
{
accession
.
countryOfOrigin
}
/>
}
</
PropertiesItem
>
}
{
accession
.
sampStat
&&
<
PropertiesItem
title
=
"
accessions.common.sampStat
"
>
{
t
(
`accessions.common.sampleStatus.
${
accession
.
sampStat
}
`
)
}
</
PropertiesItem
>
}
{
accession
.
storage
&&
accession
.
storage
.
length
>
0
&&
<
PropertiesItem
title
=
"
accessions.common.storageType
"
>
<
PropertiesItem
title
=
{
t
(
'
accessions.common.instituteCode
'
)
}
>
{
accession
.
institute
.
code
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.acquisitionDate
'
)
}
><
McpdDate
value
=
{
accession
.
acquisitionDate
}
/></
PropertiesItem
>
{
accession
.
countryOfOrigin
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.common.countryOfOrigin
'
)
}
>
{
<
CountryLink
country
=
{
accession
.
countryOfOrigin
}
/>
}
</
PropertiesItem
>
}
{
accession
.
sampStat
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.common.sampStat
'
)
}
>
{
t
(
`accessions.common.sampleStatus.
${
accession
.
sampStat
}
`
)
}
</
PropertiesItem
>
}
{
accession
.
storage
&&
accession
.
storage
.
length
>
0
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.common.storageType
'
)
}
>
{
accession
.
storage
.
map
((
storage
,
i
)
=>
(
<
div
key
=
{
storage
}
style
=
{
{
width
:
'
100%
'
,
paddingTop
:
'
.25rem
'
}
}
>
{
t
(
`accessions.common.storage.
${
storage
}
`
)
}
</
div
>
))
}
</
PropertiesItem
>
}
<
PropertiesItem
title
=
"
accessions.public.p.display.availability
"
keepEmpty
>
{
t
(
`accessions.common.available.
${
accession
.
available
}
`
)
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.public.p.display.ITPGRFAMLS
"
keepEmpty
>
{
t
(
`accessions.common.mlsStatus.
${
accession
.
mlsStatus
}
`
)
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.public.p.display.donorInstitute
"
>
{
accession
.
donorCode
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.public.p.display.donorAccessionNumber
"
>
{
accession
.
donorNumb
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.availability
'
)
}
keepEmpty
>
{
t
(
`accessions.common.available.
${
accession
.
available
}
`
)
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.ITPGRFAMLS
'
)
}
keepEmpty
>
{
t
(
`accessions.common.mlsStatus.
${
accession
.
mlsStatus
}
`
)
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.donorInstitute
'
)
}
>
{
accession
.
donorCode
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.donorAccessionNumber
'
)
}
>
{
accession
.
donorNumb
}
</
PropertiesItem
>
{
accession
.
duplSite
&&
accession
.
duplSite
.
length
>
0
&&
<
PropertiesItem
title
=
"
accessions.public.p.display.safetyDuplicationInstitute
"
>
{
accession
.
duplSite
&&
accession
.
duplSite
.
length
>
0
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.safetyDuplicationInstitute
'
)
}
>
{
accession
.
duplSite
.
map
((
duplSite
,
i
)
=>
(
<
div
key
=
{
duplSite
}
style
=
{
{
width
:
'
100%
'
,
paddingTop
:
'
.25rem
'
}
}
>
{
duplSite
}
</
div
>
))
}
</
PropertiesItem
>
}
{
accession
.
acceUrl
&&
<
PropertiesItem
title
=
"
accessions.public.p.display.accessionURL
"
><
ExternalLink
link
=
{
accession
.
acceUrl
}
/></
PropertiesItem
>
}
{
accession
.
acceUrl
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.accessionURL
'
)
}
><
ExternalLink
link
=
{
accession
.
acceUrl
}
/></
PropertiesItem
>
}
</
Properties
>
</
MainSection
>
<
PageSection
title
=
"
accessions.common.taxonomy
"
>
<
PageSection
title
=
{
t
(
'
accessions.common.taxonomy
'
)
}
>
<
Properties
>
<
PropertiesItem
title
=
"
accessions.common.genus
"
>
{
accession
.
taxonomy
.
genus
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.common.species
"
>
<
PropertiesItem
title
=
{
t
(
'
accessions.common.genus
'
)
}
>
{
accession
.
taxonomy
.
genus
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.common.species
'
)
}
>
{
accession
.
taxonomy
.
species
}
{
'
—
'
}
<
Link
to
=
{
'
/a
'
}
>
View
<
i
>
{
`
${
accession
.
taxonomy
.
genus
}
${
accession
.
taxonomy
.
species
}
`
}
</
i
>
at
{
accession
.
institute
.
code
}
</
Link
>
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.public.p.display.scientificName
"
><
SciName
taxa
=
{
accession
.
taxonomy
.
taxonNameHtml
}
/></
PropertiesItem
>
{
accession
.
crop
&&
<
PropertiesItem
title
=
"
accessions.public.p.display.cropName
"
><
CropChips
crops
=
{
accession
.
crop
.
shortName
}
/></
PropertiesItem
>
}
<
PropertiesItem
title
=
"
accessions.public.p.display.providedCropName
"
>
{
accession
.
cropName
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.scientificName
'
)
}
><
SciName
taxa
=
{
accession
.
taxonomy
.
taxonNameHtml
}
/></
PropertiesItem
>
{
accession
.
crop
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.cropName
'
)
}
><
CropChips
crops
=
{
accession
.
crop
.
shortName
}
/></
PropertiesItem
>
}
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.providedCropName
'
)
}
>
{
accession
.
cropName
}
</
PropertiesItem
>
</
Properties
>
</
PageSection
>
{
(
accession
.
donorCode
||
(
accession
.
aliases
&&
accession
.
aliases
.
length
>
0
))
&&
<
PageSection
title
=
"
accessions.public.p.display.accessionNames
"
>
<
PageSection
title
=
{
t
(
'
accessions.public.p.display.accessionNames
'
)
}
>
<
Properties
>
{
accession
.
donorCode
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.common.alias.DONORNUMB
'
)
}
>
{
accession
.
donorNumb
}
<
em
>
{
accession
.
donorCode
}
</
em
></
PropertiesItem
>
}
{
accession
.
aliases
&&
accession
.
aliases
.
map
((
alias
)
=>
(
...
...
@@ -182,9 +182,9 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
}
{
accession
.
coll
&&
<
PageSection
title
=
"
accessions.public.p.display.collectingInformation
"
>
<
PageSection
title
=
{
t
(
'
accessions.public.p.display.collectingInformation
'
)
}
>
<
Properties
>
{
accession
.
countryOfOrigin
&&
<
PropertiesItem
title
=
"
accessions.common.countryOfOrigin
"
>
{
<
CountryLink
country
=
{
accession
.
countryOfOrigin
}
/>
}
</
PropertiesItem
>
}
{
accession
.
countryOfOrigin
&&
<
PropertiesItem
title
=
{
t
(
'
accessions.common.countryOfOrigin
'
)
}
>
{
<
CountryLink
country
=
{
accession
.
countryOfOrigin
}
/>
}
</
PropertiesItem
>
}
{
accession
.
coll
.
collDate
&&
<
PropertiesItem
key
=
"collDate"
title
=
{
t
(
`accessions.common.coll.collDate`
)
}
><
McpdDate
value
=
{
accession
.
coll
.
collDate
}
/></
PropertiesItem
>
}
{
accession
.
coll
&&
[
'
collMissId
'
,
'
collNumb
'
,
'
collSite
'
,
'
collSrc
'
]
...
...
@@ -220,7 +220,7 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
</
PageSection
>
}
{
accession
.
remarks
&&
accession
.
remarks
.
length
>
0
&&
<
PageSection
title
=
"
accessions.public.p.display.remarks
"
>
{
accession
.
remarks
&&
accession
.
remarks
.
length
>
0
&&
<
PageSection
title
=
{
t
(
'
accessions.public.p.display.remarks
'
)
}
>
<
Properties
>
{
accession
.
remarks
&&
accession
.
remarks
.
map
((
remark
)
=>
(
<
PropertiesItem
key
=
{
remark
.
id
}
title
=
{
remark
.
fieldName
}
>
{
remark
.
remark
}
</
PropertiesItem
>
...
...
@@ -228,14 +228,14 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
</
Properties
>
</
PageSection
>
}
{
pdci
&&
<
PdciTable
pdci
=
{
pdci
}
title
=
"
accessions.public.p.display.pdci
"
/>
}
{
pdci
&&
<
PdciTable
pdci
=
{
pdci
}
title
=
{
t
(
'
accessions.public.p.display.pdci
'
)
}
/>
}
<
PageSection
title
=
"
accessions.public.p.display.metadata
"
>
<
PageSection
title
=
{
t
(
'
accessions.public.p.display.metadata
'
)
}
>
<
Properties
>
<
PropertiesItem
title
=
"
common:label.UUID
"
>
{
`urn:uuid:
${
accession
.
uuid
}
`
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
accessions.public.p.display.permanentURL
"
><
ExternalLink
link
=
{
`https://purl.org/germplasm/id/
${
accession
.
uuid
}
`
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
"
common:label.lastUpdated
"
><
PrettyDate
value
=
{
accession
.
lastModifiedDate
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
"
common:label.created
"
><
PrettyDate
value
=
{
accession
.
createdDate
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:label.UUID
'
)
}
>
{
`urn:uuid:
${
accession
.
uuid
}
`
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
accessions.public.p.display.permanentURL
'
)
}
><
ExternalLink
link
=
{
`https://purl.org/germplasm/id/
${
accession
.
uuid
}
`
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:label.lastUpdated
'
)
}
><
PrettyDate
value
=
{
accession
.
lastModifiedDate
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:label.created
'
)
}
><
PrettyDate
value
=
{
accession
.
createdDate
}
/></
PropertiesItem
>
</
Properties
>
</
PageSection
>
...
...
@@ -243,17 +243,17 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
{
datasets
&&
datasets
.
length
>
0
&&
<
PropertiesCard
small
title
=
"
accessions.public.p.display.associatedDatasets
"
title
=
{
t
(
'
accessions.public.p.display.associatedDatasets
'
)
}
propertyItemProps
=
{
{
keepEmpty
:
true
}
}
propertiesList
=
{
datasets
.
map
((
dataset
)
=>
({
title
:
'
dataset.common.modelName
'
,
value
:
<
DatasetLink
to
=
{
dataset
}
/>
}))
}
propertiesList
=
{
datasets
.
map
((
dataset
)
=>
({
title
:
t
(
'
dataset.common.modelName
'
)
,
value
:
<
DatasetLink
to
=
{
dataset
}
/>
}))
}
/>
}
{
subsets
&&
subsets
.
length
>
0
&&
<
PropertiesCard
small
title
=
"
accessions.public.p.display.associatedSubsets
"
title
=
{
t
(
'
accessions.public.p.display.associatedSubsets
'
)
}
propertyItemProps
=
{
{
keepEmpty
:
true
}
}
propertiesList
=
{
subsets
.
map
((
subset
)
=>
({
title
:
'
subset.common.modelName
'
,
value
:
<
SubsetLink
to
=
{
subset
}
/>
}))
}
propertiesList
=
{
subsets
.
map
((
subset
)
=>
({
title
:
t
(
'
subset.common.modelName
'
)
,
value
:
<
SubsetLink
to
=
{
subset
}
/>
}))
}
/>
}
</
GridLayout
>
...
...
src/crop/translations.json
View file @
4b061947
...
...
@@ -45,6 +45,8 @@
"modelName"
:
"Crop"
,
"modelName_plural"
:
"Crops"
,
"menu"
:
"Crops"
,
"accessionsInGenesys"
:
"Accessions in genesys"
"accessionsInGenesys"
:
"Accessions in genesys"
,
"cropDetails"
:
"{{cropName,string}} details"
,
"cropList"
:
"List of crops"
}
}
\ No newline at end of file
src/crop/ui/c/CropForm.tsx
View file @
4b061947
...
...
@@ -39,7 +39,7 @@ const CropForm = ({error, handleSubmit, initialValues, onDelete, cropNames, t})
<
Field
required
name
=
"name"
label
=
{
t
(
'
crop.admin.c.cropForm.cropTitle
'
)
}
component
=
{
TextField
}
validate
=
{
[
Validators
.
required
]
}
/>
<
div
className
=
"pb-20 pt-20"
>
<
h4
>
O
ther
n
ames
</
h4
>
<
h4
>
{
t
(
'
crop.admin.c.cropForm.o
ther
N
ames
'
)
}
</
h4
>
<
ItemsEditor
name
=
"otherNames"
itemLabel
=
{
t
(
'
crop.admin.c.cropForm.otherNames
'
)
}
addItem
=
{
onAddString
}
removeItem
=
{
onRemoveString
}
component
=
{
stringField
}
/>
</
div
>
<
div
>
{
error
&&
<
strong
>
{
error
}
</
strong
>
}
</
div
>
...
...
@@ -48,7 +48,9 @@ const CropForm = ({error, handleSubmit, initialValues, onDelete, cropNames, t})
<
div
className
=
"pt-20"
>
<
Button
variant
=
"raised"
type
=
"submit"
>
{
t
(
'
common:action.saveChanges
'
)
}
</
Button
>
{
(
initialValues
.
_permissions
&&
initialValues
.
_permissions
.
delete
)
&&
<
Button
onClick
=
{
onDelete
}
type
=
"button"
>
{
t
(
'
common:action.delete
'
)
}
</
Button
>
}
<
Link
to
=
{
`/c/
${
initialValues
.
shortName
}
`
}
><
Button
type
=
"button"
>
{
t
(
'
common:action.backTo
'
,
{
where
:
`
${
initialValues
.
name
}
details`
})
}
</
Button
></
Link
>
<
Link
to
=
{
`/c/
${
initialValues
.
shortName
?
initialValues
.
shortName
:
''
}
`
}
>
<
Button
type
=
"button"
>
{
t
(
'
common:action.backTo
'
,
{
where
:
`
${
initialValues
.
name
?
t
(
'
crop.common.cropDetails
'
,
{
cropName
:
initialValues
.
name
})
:
t
(
'
crop.common.cropList
'
)}
`
})
}
</
Button
>
</
Link
>
</
div
>
</
form
>
);
...
...
src/requests/ui/admin/DisplayPage.tsx
View file @
4b061947
...
...
@@ -63,51 +63,51 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
/>
{
request
.
body
&&
<
PageContents
>
<
MainSection
title
=
"
requests.admin.p.display.requestInformation
"
>
<
MainSection
title
=
{
t
(
'
requests.admin.p.display.requestInformation
'
)
}
>
<
Properties
>
<
PropertiesItem
title
=
"
user.common.email
"
>
{
request
.
email
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
requests.common.stateLabel
"
>
{
t
(
`requests.common.state.
${
request
.
state
}
`
)
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
common:label.created
"
><
PrettyDate
value
=
{
request
.
createdDate
}
/></
PropertiesItem
>
{
request
.
body
.
pid
&&
<
PropertiesItem
title
=
"
requests.common.typeLabel
"
>
{
t
(
`requests.common.type.
${
request
.
body
.
pid
.
type
}
`
)
}
</
PropertiesItem
>
}
{
request
.
body
.
requestInfo
&&
<
PropertiesItem
title
=
"
requests.common.purposeTypeLabel
"
>
{
t
(
`requests.common.purposeType.
${
request
.
body
.
requestInfo
.
purposeType
}
`
)
}
</
PropertiesItem
>
}
<
PropertiesItem
title
=
{
t
(
'
user.common.email
'
)
}
>
{
request
.
email
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
requests.common.stateLabel
'
)
}
>
{
t
(
`requests.common.state.
${
request
.
state
}
`
)
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:label.created
'
)
}
><
PrettyDate
value
=
{
request
.
createdDate
}
/></
PropertiesItem
>
{
request
.
body
.
pid
&&
<
PropertiesItem
title
=
{
t
(
'
requests.common.typeLabel
'
)
}
>
{
t
(
`requests.common.type.
${
request
.
body
.
pid
.
type
}
`
)
}
</
PropertiesItem
>
}
{
request
.
body
.
requestInfo
&&
<
PropertiesItem
title
=
{
t
(
'
requests.common.purposeTypeLabel
'
)
}
>
{
t
(
`requests.common.purposeType.
${
request
.
body
.
requestInfo
.
purposeType
}
`
)
}
</
PropertiesItem
>
}
{
request
.
body
.
requestInfo
&&
<
PropertiesItem
title
=
{
t
(
`requests.common.preacceptSMTA`
)
}
>
{
request
.
body
.
requestInfo
.
preacceptSMTA
?
'
Yes
'
:
'
No
'
}
</
PropertiesItem
>
}
{
request
.
body
.
requestInfo
&&
<
PropertiesItem
title
=
"
requests.admin.p.display.notes
"
>
{
request
.
body
.
requestInfo
.
notes
}
</
PropertiesItem
>
}
<
PropertiesItem
title
=
"
requests.admin.p.display.requestedAccessionIds
"
>
{
request
.
body
.
accessionIds
.
reduce
((
id
,
acc
)
=>
`
${
acc
}
,
${
id
}
`
)
}
</
PropertiesItem
>
{
request
.
body
.
requestInfo
&&
<
PropertiesItem
title
=
{
t
(
'
requests.admin.p.display.notes
'
)
}
>
{
request
.
body
.
requestInfo
.
notes
}
</
PropertiesItem
>
}
<
PropertiesItem
title
=
{
t
(
'
requests.admin.p.display.requestedAccessionIds
'
)
}
>
{
request
.
body
.
accessionIds
.
reduce
((
id
,
acc
)
=>
`
${
acc
}
,
${
id
}
`
)
}
</
PropertiesItem
>
</
Properties
>
</
MainSection
>
{
request
.
body
.
pid
&&
request
.
body
.
pid
.
type
===
'
in
'
&&
<
PageSection
title
=
"
requests.admin.p.display.recipientPIDInformation
"
>
<
PageSection
title
=
{
t
(
'
requests.admin.p.display.recipientPIDInformation
'
)
}
>
<
Properties
>
<
PropertiesItem
title
=
"
user.common.name
"
>
{
request
.
body
.
pid
.
name
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
user.common.surname
"
>
{
request
.
body
.
pid
.
surname
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
geo.common.address
"
><
Markdown
source
=
{
request
.
body
.
pid
.
address
.
replace
(
/
\n
/g
,
'
\n\n
'
)
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
"
geo.common.country
"
>
{
request
.
body
.
pid
.
country
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
user.common.phone
"
>
{
request
.
body
.
pid
.
telephone
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
user.common.email
"
>
{
request
.
body
.
pid
.
email
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
user.common.name
'
)
}
>
{
request
.
body
.
pid
.
name
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
user.common.surname
'
)
}
>
{
request
.
body
.
pid
.
surname
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
geo.common.address
'
)
}
><
Markdown
source
=
{
request
.
body
.
pid
.
address
.
replace
(
/
\n
/g
,
'
\n\n
'
)
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
geo.common.country
'
)
}
>
{
request
.
body
.
pid
.
country
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
user.common.phone
'
)
}
>
{
request
.
body
.
pid
.
telephone
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
user.common.email
'
)
}
>
{
request
.
body
.
pid
.
email
}
</
PropertiesItem
>
</
Properties
>
</
PageSection
>
}
{
request
.
body
.
pid
&&
request
.
body
.
pid
.
type
===
'
or
'
&&
<
PageSection
title
=
"
requests.admin.p.display.recipientPIDInformation
"
>
<
PageSection
title
=
{
t
(
'
requests.admin.p.display.recipientPIDInformation
'
)
}
>
<
Properties
>
<
PropertiesItem
title
=
"
user.common.name
"
>
{
request
.
body
.
pid
.
orgName
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
geo.common.address
"
><
Markdown
source
=
{
request
.
body
.
pid
.
orgAddress
.
replace
(
/
\n
/g
,
'
\n\n
'
)
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
"
geo.common.country
"
>
{
request
.
body
.
pid
.
orgCountry
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
user.common.name
'
)
}
>
{
request
.
body
.
pid
.
orgName
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
geo.common.address
'
)
}
><
Markdown
source
=
{
request
.
body
.
pid
.
orgAddress
.
replace
(
/
\n
/g
,
'
\n\n
'
)
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
geo.common.country
'
)
}
>
{
request
.
body
.
pid
.
orgCountry
}
</
PropertiesItem
>
</
Properties
>
</
PageSection
>
}
{
request
.
body
.
pid
&&
request
.
body
.
pid
.
shipAddrFlag
!==
'
s
'
&&
<
PageSection
title
=
"
requests.admin.p.display.shippingAddress
"
>
<
PageSection
title
=
{
t
(
'
requests.admin.p.display.shippingAddress
'
)
}
>
<
Properties
>
<
PropertiesItem
title
=
"
geo.common.address
"
><
Markdown
source
=
{
request
.
body
.
pid
.
shipAddress
.
replace
(
/
\n
/g
,
'
\n\n
'
)
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
"
geo.common.country
"
>
{
request
.
body
.
pid
.
shipCountry
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"
user.common.phone
"
>
{
request
.
body
.
pid
.
shipTelephone
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
geo.common.address
'
)
}
><
Markdown
source
=
{
request
.
body
.
pid
.
shipAddress
.
replace
(
/
\n
/g
,
'
\n\n
'
)
}
/></
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
geo.common.country
'
)
}
>
{
request
.
body
.
pid
.
shipCountry
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
user.common.phone
'
)
}
>
{
request
.
body
.
pid
.
shipTelephone
}
</
PropertiesItem
>
</
Properties
>
</
PageSection
>
}
{
request
.
subrequests
&&
request
.
subrequests
.
length
>
0
&&
<
PageSection
title
=
"
requests.admin.p.display.dispatchedTo
"
>
<
PageSection
title
=
{
t
(
'
requests.admin.p.display.dispatchedTo
'
)
}
>
<
Properties
>
{
request
.
subrequests
.
map
((
sub
)
=>
(
<
PropertiesItem
key
=
{
sub
.
uuid
}
title
=
{
sub
.
instCode
}
>
...
...
src/subsets/translations.json
View file @
4b061947
...
...
@@ -106,7 +106,8 @@
"MANAGER"
:
"Data manager"
,
"DIGITIZER"
:
"Data digitizer"
,
"COLLECTOR"
:
"Data collector"
,
"CURATOR"
:
"Data curator"
"CURATOR"
:
"Data curator"
,
"null"
:
"Not specified"
}
}
}
...
...
src/subsets/ui/c/SubsetDisplay.tsx
View file @
4b061947
...
...
@@ -53,7 +53,7 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
title
=
{
t
(
'
subsets.public.c.subsetDisplay.subsetCreators
'
)
}
propertiesList
=
{
subset
.
creators
.
map
((
creator
)
=>
({
title
:
t
(
`subsets.creator.role.
${
creator
.
role
}
`
),
title
:
t
(
`subsets.
common.
creator
s
.role.
${
creator
.
role
}
`
),
value
:
(<
span
><
b
>
{
creator
.
fullName
}
</
b
>
{
creator
.
institutionalAffiliation
&&
<
span
>
{
creator
.
institutionalAffiliation
}
</
span
>
}
</
span
>),
}))
}
...
...
src/subsets/ui/dashboard/subset-stepper/steps/creators/SubsetCreatorForm.tsx
View file @
4b061947
...
...
@@ -61,7 +61,7 @@ const renderRadioGroup = translate()(({input, meta, t, classes}) => {
className
=
{
classes
.
RadioGrid
}
>
{
Object
.
keys
(
CreatorRole
).
map
((
role
)
=>
(
<
FormControlLabel
value
=
{
role
}
label
=
{
t
(
`subsets.creators.role.
${
role
}
`
)
}
control
=
{
<
Radio
/>
}
/>
<
FormControlLabel
value
=
{
role
}
label
=
{
t
(
`subsets.
common.
creators.role.
${
role
}
`
)
}
control
=
{
<
Radio
/>
}
/>
))
}
</
RadioGroup
>
</
FormControl
>
...
...
src/translations.json
View file @
4b061947
...
...
@@ -101,6 +101,20 @@
}
}
},
"admin"
:
{
"menu"
:
{
"userManagement"
:
"User management"
,
"users"
:
"Users"
,
"oAuthClients"
:
"OAuth clients"
,
"requests"
:
"Requests"
,
"fileRepository"
:
"File repository"
,
"cluster"
:
"Cluster"
,
"hazelcast"
:
"Hazelcast"
,
"elasticsearch"
:
"Elasticsearch"
,
"caches"
:
"Caches"
,
"loggers"
:
"Loggers"
}
},
"common"
:
{
"Genesys PGR"
:
"Genesys PGR"
,
"Not found"
:
"Not found"
,
...
...
src/ui/common/permission/Permissions.tsx
View file @
4b061947
import
*
as
React
from
'
react
'
;
import
{
translate
}
from
'
react-i18next
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
bindActionCreators
}
from
'
redux
'
;
import
Button
from
'
@material-ui/core/Button
'
;
...
...
@@ -35,6 +36,7 @@ interface IPermissionsProps extends React.ClassAttributes<any> {
addPermission
:
(
clazz
:
string
,
id
:
number
,
sidPermissions
:
SidPermissions
)
=>
Promise
<
AclObjectIdentity
>
;
classes
:
any
;
variant
?:
'
text
'
|
'
flat
'
|
'
outlined
'
|
'
contained
'
|
'
raised
'
|
'
fab
'
|
'
extendedFab
'
;
t
:
any
;
}
class
Permissions
extends
React
.
Component
<
IPermissionsProps
,
any
>
{
...
...
@@ -86,12 +88,12 @@ class Permissions extends React.Component<IPermissionsProps, any> {
}
public
render
()
{
const
{
autocomplete
,
variant
=
'
raised
'
}
=
this
.
props
;
const
{
autocomplete
,
variant
=
'
raised
'
,
t
}
=
this
.
props
;
const
{
aclObjectIdentity
,
autocompleteObj
}
=
this
.
state
;
return
(
<
span
>
<
Button
onClick
=
{
this
.
show
}
className
=
{
this
.
props
.
classes
.
permButton
}
variant
=
{
variant
}
>
Permissions
</
Button
>
<
Button
onClick
=
{
this
.
show
}
className
=
{
this
.
props
.
classes
.
permButton
}
variant
=
{
variant
}
>
{
t
(
'
common:permissions.label
'
)
}
</
Button
>
{
this
.
state
.
open
&&
<
Dialog
open
=
{
this
.
state
.
open
}
...
...
@@ -99,16 +101,16 @@ class Permissions extends React.Component<IPermissionsProps, any> {
maxWidth
=
"md"
fullWidth
>
<
DialogTitle
>
M
anage
p
ermissions
</
DialogTitle
>
<
DialogTitle
>
{
t
(
'
common:permissions.m
anage
P
ermissions
'
)
}
</
DialogTitle
>
<
DialogContent
>
{
!
aclObjectIdentity
?
<
Loading
/>
:
<
div
>
<
Properties
>
<
PropertiesItem
title
=
"Class:"
>
{
aclObjectIdentity
.
aclClass
.
aclClass
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"O
bject
ID
:"
>
{
aclObjectIdentity
.
objectIdIdentity
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"Owner:"
>
{
aclObjectIdentity
.
ownerSid
.
sid
}
</
PropertiesItem
>
<
PropertiesItem
title
=
"I
nherits
p
ermissions
:"
>
{
`
${
aclObjectIdentity
.
entriesInheriting
}
`
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:permissions.class
'
)
}
>
{
aclObjectIdentity
.
aclClass
.
aclClass
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:permissions.o
bjectID
'
)
}
>
{
aclObjectIdentity
.
objectIdIdentity
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:permissions.owner
'
)
}
>
{
aclObjectIdentity
.
ownerSid
.
sid
}
</
PropertiesItem
>
<
PropertiesItem
title
=
{
t
(
'
common:permissions.i
nherits
P
ermissions
'
)
}
>
{
`
${
aclObjectIdentity
.
entriesInheriting
}
`
}
</
PropertiesItem
>
</
Properties
>
<
PermissionsTableForm
...
...
@@ -130,7 +132,7 @@ class Permissions extends React.Component<IPermissionsProps, any> {
</
DialogContent
>
<
DialogActions
>
<
Button
onClick
=
{
this
.
hide
}
>
Close
{
t
(
'
common:action.close
'
)
}
</
Button
>
</
DialogActions
>
</
Dialog
>
...
...
@@ -146,4 +148,4 @@ const mapDispatchToProps = (dispatch) => bindActionCreators({
autocomplete
,
},
dispatch
);
export
default
connect
(
null
,
mapDispatchToProps
)(
withStyles
(
styles
)
<
any
>
(
Permissions
));
export
default
translate
()(
connect
(
null
,
mapDispatchToProps
)(
withStyles
(
styles
)
<
any
>
(
Permissions
))
)
;
src/ui/common/permission/PermissionsTableForm.tsx
View file @
4b061947
import
*
as
React
from
'
react
'
;
import
{
translate
}
from
'
react-i18next
'
;
import
{
Field
,
FieldArray
,
reduxForm
}
from
'
redux-form
'
;
import
{
withStyles
}
from
'
@material-ui/core/styles
'
;
import
Table
from
'
@material-ui/core/Table
'
;
...
...
@@ -24,6 +25,7 @@ interface IPermissionsTableFormProps extends React.ClassAttributes<any> {
autocompleteObj
:
{[
key
:
string
]:
number
};
onInputChange
:
(
e
)
=>
void
;
inherits
?:
boolean
;
t
:
any
;
}
const
styles
=
{
...
...
@@ -158,18 +160,18 @@ class PermissionsTableForm extends React.Component<IPermissionsTableFormProps, a
})
public
render
()
{
const
{
classes
,
onInputChange
,
autocompleteObj
,
inherits
}
=
this
.
props
;
const
{
classes
,
onInputChange
,
autocompleteObj
,
inherits
,
t
}
=
this
.
props
;
return
(
<
form
>
<
Table
className
=
{
classes
.
table
}
>
<
TableHead
>
<
TableRow
>
<
TableCell
>
Sid
</
TableCell
>
<
TableCell
>
C
reate
</
TableCell
>
<
TableCell
>
Read
</
TableCell
>
<
TableCell
>
Write
</
TableCell
>
<
TableCell
>
D
elete
</
TableCell
>
<
TableCell
>
M
anage
</
TableCell
>
<
TableCell
>
{
t
(
'
common:permissions.sid
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.c
reate
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.read
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.write
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.d
elete
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.m
anage
'
)
}
</
TableCell
>
<
TableCell
/>
</
TableRow
>
</
TableHead
>
...
...
@@ -185,16 +187,16 @@ class PermissionsTableForm extends React.Component<IPermissionsTableFormProps, a
{
inherits
&&
<
div
>
<
div
className
=
{
classes
.
inheritedTitle
}
>
E
ffective
p
ermissions
</
div
>
<
div
className
=
{
classes
.
inheritedTitle
}
>
{
t
(
'
common:permissions.e
ffective
P
ermissions
'
)
}
</
div
>
<
Table
className
=
{
classes
.
table
}
>
<
TableHead
>
<
TableRow
>
<
TableCell
>
Sid
</
TableCell
>
<
TableCell
>
C
reate
</
TableCell
>
<
TableCell
>
Read
</
TableCell
>
<
TableCell
>
Write
</
TableCell
>
<
TableCell
>
D
elete
</
TableCell
>
<
TableCell
>
M
anage
</
TableCell
>
<
TableCell
>
{
t
(
'
common:permissions.sid
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.c
reate
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.read
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.write
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.d
elete
'
)
}
</
TableCell
>
<
TableCell
>
{
t
(
'
common:action.m
anage
'
)
}
</
TableCell
>
<
TableCell
/>
</
TableRow
>
</
TableHead
>
...
...
@@ -213,7 +215,7 @@ class PermissionsTableForm extends React.Component<IPermissionsTableFormProps, a
}
}
export
default
reduxForm
({
export
default
translate
()(
reduxForm
({
form
:
PERMISSION_TABLE_FORM
,