Skip to content
Snippets Groups Projects

Add a toggle for the iga identity check

Merged Andreas Ellewsen requested to merge iga-check-toggle into master
5 files
+ 13
3
Compare changes
  • Side-by-side
  • Inline
Files
5
  • Since we may not want to enable the identity check, it must be
    togglable. This commit adds environment variable
    REACT_APP_ENABLE_IGA_CHECK for toggling the check in the frontend, and
    django settings variable IGA_CHECK for toggling the check in the
    backend.
@@ -6,7 +6,7 @@ import { fetchJsonOpts, submitJsonOpts } from 'utils'
@@ -6,7 +6,7 @@ import { fetchJsonOpts, submitJsonOpts } from 'utils'
import CheckIcon from '@mui/icons-material/Check'
import CheckIcon from '@mui/icons-material/Check'
import { Trans, useTranslation } from 'react-i18next'
import { Trans, useTranslation } from 'react-i18next'
import { TableCell } from 'components/table'
import { TableCell } from 'components/table'
import { appInst, disableNinVerification } from 'appConfig'
import { appInst, disableNinVerification, enableIgaCheck } from 'appConfig'
interface IdentityLineProps {
interface IdentityLineProps {
text: string
text: string
@@ -85,7 +85,7 @@ const IdentityLine = ({
@@ -85,7 +85,7 @@ const IdentityLine = ({
}
}
useEffect(() => {
useEffect(() => {
if (confirmOpen && identityCheckText === null) {
if (enableIgaCheck && confirmOpen && identityCheckText === null) {
fetchIdentityCheckText(identity.id)
fetchIdentityCheckText(identity.id)
}
}
}, [confirmOpen])
}, [confirmOpen])
Loading