Skip to content

Commit 43325c2

Browse files
committed
fix: add link to the old ops learning dashboard
1 parent 5ee9004 commit 43325c2

File tree

5 files changed

+9
-68
lines changed

5 files changed

+9
-68
lines changed

app/src/views/OperationalLearning/PreparednessOperationalLearning/i18n.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/src/views/OperationalLearning/PreparednessOperationalLearning/index.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

app/src/views/OperationalLearning/PreparednessOperationalLearning/styles.module.css

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/src/views/OperationalLearning/i18n.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"extractCount": "{count} extract",
1919
"extractsCount": "{count} extracts",
2020
"failedToCreateExport": "Failed to generate export.",
21-
"disclaimerMessage": "This is an updated implementation of the Operational Learning project started by the DREF and PER teams at IFRC. The previous dashboard can be found {button}.",
21+
"disclaimerMessage": "This is an updated implementation of the Operational Learning project started by the DREF and PER teams at IFRC. The previous dashboard can be found {link}.",
2222
"here": "here",
2323
"beta": "beta"
2424
}

app/src/views/OperationalLearning/index.tsx

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@ import {
1212
DismissableTextOutput,
1313
Header,
1414
List,
15-
Modal,
1615
Tab,
1716
TabList,
1817
TabPanel,
1918
Tabs,
2019
TextOutput,
2120
} from '@ifrc-go/ui';
22-
import {
23-
useBooleanState,
24-
useTranslation,
25-
} from '@ifrc-go/ui/hooks';
21+
import { useTranslation } from '@ifrc-go/ui/hooks';
2622
import {
2723
hasSomeDefinedValue,
2824
numericIdSelector,
@@ -42,6 +38,7 @@ import Papa from 'papaparse';
4238

4339
import ExportButton from '#components/domain/ExportButton';
4440
import { type RegionOption } from '#components/domain/RegionSelectInput';
41+
import Link from '#components/Link';
4542
import Page from '#components/Page';
4643
import { type components } from '#generated/types';
4744
import useCountry, { Country } from '#hooks/domain/useCountry';
@@ -61,14 +58,13 @@ import {
6158

6259
import Filters, { type FilterValue } from './Filters';
6360
import KeyInsights from './KeyInsights';
64-
import PreparednessOperationalLearning from './PreparednessOperationalLearning';
6561
import Summary, { type Props as SummaryProps } from './Summary';
6662

6763
import i18n from './i18n.json';
6864
import styles from './styles.module.css';
6965

7066
type SummaryStatusEnum = components<'read'>['schemas']['OpsLearningSummaryStatusEnum'];
71-
67+
const opsLearningDashboardURL = 'https://app.powerbi.com/view?r=eyJrIjoiMTM4Y2ZhZGEtNGZmMS00ODZhLWFjZjQtMTE2ZTIyYTI0ODc4IiwidCI6ImEyYjUzYmU1LTczNGUtNGU2Yy1hYjBkLWQxODRmNjBmZDkxNyIsImMiOjh9&pageName=ReportSectionfa0be9512521e929ae4a';
7268
const SUMMARY_STATUS_PENDING = 1 satisfies SummaryStatusEnum;
7369
const SUMMARY_STATUS_STARTED = 2 satisfies SummaryStatusEnum;
7470
const SUMMARY_STATUS_SUCCESS = 3 satisfies SummaryStatusEnum;
@@ -107,14 +103,6 @@ export function Component() {
107103
const [query, setQuery] = useState<QueryType>();
108104
const [filterPristine, setFilterPristine] = useState(true);
109105

110-
const [
111-
showOldOpsLearningModal,
112-
{
113-
setTrue: setShowOldOpsLearningModalTrue,
114-
setFalse: setShowOldOpsLearningModalFalse,
115-
},
116-
] = useBooleanState(false);
117-
118106
const {
119107
rawFilter,
120108
filter,
@@ -316,15 +304,14 @@ export function Component() {
316304
info={resolveToComponent(
317305
strings.disclaimerMessage,
318306
{
319-
button: (
320-
<Button
321-
className={styles.button}
322-
name={undefined}
323-
onClick={setShowOldOpsLearningModalTrue}
307+
link: (
308+
<Link
309+
href={opsLearningDashboardURL}
310+
external
324311
variant="tertiary"
325312
>
326313
{strings.here}
327-
</Button>
314+
</Link>
328315
),
329316
},
330317
)}
@@ -532,15 +519,6 @@ export function Component() {
532519
</Container>
533520
</Tabs>
534521
</Container>
535-
{showOldOpsLearningModal && (
536-
<Modal
537-
heading={strings.operationalLearningHeading}
538-
onClose={setShowOldOpsLearningModalFalse}
539-
size="full"
540-
>
541-
<PreparednessOperationalLearning />
542-
</Modal>
543-
)}
544522
</Page>
545523
);
546524
}

0 commit comments

Comments
 (0)