diff --git a/app/.env b/app/.env index 7e40b0838..b1497ad93 100644 --- a/app/.env +++ b/app/.env @@ -1,5 +1,5 @@ SKIP_PREFLIGHT_CHECK=true REACT_APP_API_MODE=server REACT_APP_API_BASE_HOST= -REACT_APP_APPLICATIONS=concepts,classifications,operations,structures -REACT_APP_VALIDATION_OPERATION_SERIES_EXTRA_MANDATORY_FIELDS=accrualPeriodicityCode,typeCode \ No newline at end of file +REACT_APP_APPLICATIONS=concepts,classifications,operations,structures,codelists +REACT_APP_VALIDATION_OPERATION_SERIES_EXTRA_MANDATORY_FIELDS=accrualPeriodicityCode,typeCode diff --git a/app/src/js/applications/classifications/item/general.js b/app/src/js/applications/classifications/item/general.js index 0ceeb9ddb..13e4a639c 100644 --- a/app/src/js/applications/classifications/item/general.js +++ b/app/src/js/applications/classifications/item/general.js @@ -66,7 +66,7 @@ export default ({ general, classificationId, secondLang, langs }) => {
  • {`${ mapping[fieldName] } : ${D.classificationItemIsValidated( - general[fieldName] + general[fieldName] === "true" )}`}
  • ); } diff --git a/app/src/js/utils/auth/no-auth/utils.js b/app/src/js/utils/auth/no-auth/utils.js index 16371fc01..7ac880516 100644 --- a/app/src/js/utils/auth/no-auth/utils.js +++ b/app/src/js/utils/auth/no-auth/utils.js @@ -1,4 +1,4 @@ -export const isAdmin = () => true; +export const isAdmin = () => true export const isContributor = () => true; export const isConceptCreator = () => true; export const filterConceptsToValidate = (concepts) => concepts; diff --git a/packages/structures/src/components/component-detail/edit.js b/packages/structures/src/components/component-detail/edit.js index b795a04b0..67cbbe10d 100644 --- a/packages/structures/src/components/component-detail/edit.js +++ b/packages/structures/src/components/component-detail/edit.js @@ -247,7 +247,7 @@ const DumbComponentDetailEdit = ({ -
    +
    {D1.label} ({lg1}) {D2.label} ({lg2}) -
    -
    + + + +
    + {D1.altLabel} ({lg1}) + +
    + +
    + {D2.altLabel} ({lg2}) + + +
    +
    diff --git a/packages/structures/src/components/component-detail/view-container.js b/packages/structures/src/components/component-detail/view-container.js index 60fb488d0..07472cb45 100644 --- a/packages/structures/src/components/component-detail/view-container.js +++ b/packages/structures/src/components/component-detail/view-container.js @@ -7,6 +7,7 @@ import { ConceptsAPI, Stores } from 'bauhaus-utilities'; import ComponentTitle from './title'; import { useSelector } from 'react-redux'; import { useParams } from 'react-router-dom'; +import * as select from 'Bauhaus/src/js/reducers'; const ViewContainer = (props) => { const secondLang = useSelector(Stores.SecondLang.getSecondLang); @@ -17,6 +18,7 @@ const ViewContainer = (props) => { const [codesLists, setCodesLists] = useState([]); const [serverSideError, setServerSideError] = useState(); const [attributes, setAttributes] = useState([]); + const langs = useSelector(state => select.getLangs(state)) const handleBack = useCallback(() => { goBack(props, '/structures/components')(); @@ -76,6 +78,7 @@ const ViewContainer = (props) => { serverSideError={serverSideError} secondLang={secondLang} attributes={attributes} + langs={langs} /> ); diff --git a/packages/structures/src/components/component-detail/view.js b/packages/structures/src/components/component-detail/view.js index 096ec1654..5130913d3 100644 --- a/packages/structures/src/components/component-detail/view.js +++ b/packages/structures/src/components/component-detail/view.js @@ -100,7 +100,8 @@ export const ComponentDetailView = ({ col = 3, publishComponent, serverSideError, - attributes + attributes, + langs: { lg1, lg2 }, }) => { useTitle(D.componentTitle, component?.labelLg1) const [codesListPanelOpened, setCodesListPanelOpened] = useState(false); @@ -181,7 +182,24 @@ export const ComponentDetailView = ({
    - +
    + + {secondLang && ( + + )} +