import classNames from 'classnames';
import { orderBy } from 'lodash';
import * as React from 'react';
+import { FormattedMessage } from 'react-intl';
import { getBranches } from '../../../../../../api/branches';
import { getRegulatoryReportUrl } from '../../../../../../api/regulatory-report';
+import DocLink from '../../../../../../components/common/DocLink';
import { ButtonLink } from '../../../../../../components/controls/buttons';
import Select, { LabelValueSelectOption } from '../../../../../../components/controls/Select';
+import { Alert } from '../../../../../../components/ui/Alert';
import {
getBranchLikeDisplayName,
isBranch,
value={branchLikesOptions.find((o) => o.value === selectedBranch)}
/>
</div>
+ <Alert variant="info">
+ <div>
+ {translate('regulatory_page.available_branches_info.only_keep_when_inactive')}
+ </div>
+ <div>
+ <FormattedMessage
+ id="regulatory_page.available_branches_info.more_info"
+ defaultMessage={translate('regulatory_page.available_branches_info.more_info')}
+ values={{
+ doc_link: (
+ <DocLink to="/analyzing-source-code/branches/branch-analysis/#inactive-branches">
+ {translate('regulatory_page.available_branches_info.more_info.doc_link')}
+ </DocLink>
+ ),
+ }}
+ />
+ </div>
+ </Alert>
<div className="modal-field big-spacer-top">
{downloadStarted && (
<div>
expect(await screen.findByText('regulatory_report.page')).toBeInTheDocument();
expect(screen.getByText('regulatory_report.description1')).toBeInTheDocument();
expect(screen.getByText('regulatory_report.description2')).toBeInTheDocument();
+ expect(
+ screen.getByText('regulatory_page.available_branches_info.only_keep_when_inactive')
+ ).toBeInTheDocument();
+ expect(screen.getByText('regulatory_page.available_branches_info.more_info')).toBeInTheDocument();
const branchSelect = screen.getByRole('combobox', { name: 'regulatory_page.select_branch' });
expect(branchSelect).toBeInTheDocument();
regulatory_report.description2=The generation and download of the report may take a few minutes.
regulatory_page.download_start.sentence=Your download should start shortly. This may take some time.
regulatory_page.select_branch=Select Branch
+regulatory_page.available_branches_info.only_keep_when_inactive=Only branches marked as "Keep when inactive" are available.
+regulatory_page.available_branches_info.more_info=For further details, please check the {doc_link}.
+regulatory_page.available_branches_info.more_info.doc_link=related documentation
#------------------------------------------------------------------------------
#