diff --git a/js/components/record/Record.js b/js/components/record/Record.js index 6ec3ac62..3cfe955d 100644 --- a/js/components/record/Record.js +++ b/js/components/record/Record.js @@ -9,10 +9,11 @@ import HorizontalInput from "../HorizontalInput"; import RecordForm from "./RecordForm"; import RecordProvenance from "./RecordProvenance"; import RequiredAttributes from "./RequiredAttributes"; -import {ACTION_STATUS, ALERT_TYPES, ROLE} from "../../constants/DefaultConstants"; +import {ACTION_STATUS, ALERT_TYPES, EXTENSION_CONSTANTS, ROLE} from "../../constants/DefaultConstants"; import AlertMessage from "../AlertMessage"; import {LoaderCard, LoaderSmall} from "../Loader"; import {processTypeaheadOptions} from "./TypeaheadAnswer"; +import {EXTENSIONS} from "../../../config"; class Record extends React.Component { constructor(props) { @@ -105,17 +106,31 @@ class Record extends React.Component { const {record, recordSaved, formgen} = this.props; return
- -
} + _renderRoleSpecificButtons() { + return <> + {EXTENSIONS === EXTENSION_CONSTANTS.SUPPLIER && + <> + + + + } + {EXTENSIONS === EXTENSION_CONSTANTS.OPERATOR && + } + ; + } + _renderInstitution() { const record = this.props.record; if (!record.institution) { diff --git a/js/constants/DefaultConstants.js b/js/constants/DefaultConstants.js index a0839700..6284dfc2 100644 --- a/js/constants/DefaultConstants.js +++ b/js/constants/DefaultConstants.js @@ -118,3 +118,8 @@ export const MediaType = { EXCEL: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", JSON: "application/json" } + +export const EXTENSION_CONSTANTS = { + SUPPLIER: "supplier", + OPERATOR: "operator" +}