diff --git a/src/components/view/submit-modal/submit-modal.js b/src/components/view/submit-modal/submit-modal.js index 8851230..e3f6753 100644 --- a/src/components/view/submit-modal/submit-modal.js +++ b/src/components/view/submit-modal/submit-modal.js @@ -9,10 +9,11 @@ import { ModalActions, ModalContent, ModalTitle, + NoticeBox, } from '@dhis2/ui' import PropTypes from 'prop-types' import React, { useEffect, useState } from 'react' -import { useExchangeContext } from '../../../context/index.js' +import { useExchangeContext, useUserContext } from '../../../context/index.js' import { Warning } from '../../common/index.js' import styles from './submit-modal.module.css' import { SuccessContent } from './success-content.js' @@ -146,6 +147,7 @@ const ConfirmModalContent = ({ exchange, requests, onClose, onSubmit }) => { // this is very wordy, but did not have luck with i18nextscanner picking up from more compact versions... let reportTranslationsString const { systemInfo } = useConfig() + const { hasSkipAuditInfoAuthority } = useUserContext() const reportCount = requests.length const exchangeName = exchange?.displayName const exchangeURL = @@ -153,6 +155,7 @@ const ConfirmModalContent = ({ exchange, requests, onClose, onSubmit }) => { ? systemInfo?.contextPath : exchange?.target?.api?.url const exchangeHostName = exchangeURL?.split('//')[1] ?? exchangeURL // remove protocol + const exchangeSkipAudit = Boolean(exchange?.target?.request?.skipAudit) if (exchange?.target?.type === 'INTERNAL') { if (requests.length > 1) { @@ -212,6 +215,17 @@ const ConfirmModalContent = ({ exchange, requests, onClose, onSubmit }) => { })} + + {exchangeSkipAudit && !hasSkipAuditInfoAuthority && ( +