Skip to content

Commit

Permalink
Merge pull request #1480 from IFRCGo/hotfix/operational-learning
Browse files Browse the repository at this point in the history
[Hotfix 5] - Operational learning bug fixes
  • Loading branch information
samshara authored Dec 3, 2024
2 parents a5ad667 + 9fa28db commit 1e8e5e6
Show file tree
Hide file tree
Showing 64 changed files with 1,052 additions and 607 deletions.
33 changes: 33 additions & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# go-web-app

## 7.6.6

### Patch Changes

- 8cdc946: Hide Local unit contact details on the list view for logged in users in [#1485](https://github.com/ifRCGo/go-web-app/issues/1485)
Update `tinymce-react` plugin to the latest version and enabled additional plugins, including support for lists in [#1481](https://github.com/ifRCGo/go-web-app/issues/1481)
- ecca810: Replace the from-communication-copied text of CoS Health header
- 7cf2514: Prioritize GDACS as the Primary Source for Imminent Risk Watch in [#1547](https://github.com/IFRCGo/go-web-app/issues/1547)
- 8485076: Add Organization type and Learning type filter in Operational learning in [#1469](https://github.com/IFRCGo/go-web-app/issues/1469)
- 766d98d: Auto append https:// for incomplete URLs in [#1505](https://github.com/IFRCGo/go-web-app/issues/1505)

## 7.6.5

### Patch Changes

- 478e73b: Update labels for severity control in Imminent Risk Map
Update navigation for the events in Imminent Risk Map
Fix issue displayed when opening a DREF import template
Fix submission issue when importing a DREF import file
- f82f846: Update Health Section in Catalogue of Surge Services
- ade84aa: Display ICRC Presence
- Display ICRC presence across partner countries
- Highlight key operational countries

## 7.6.4

### Patch Changes

- d85f64d: Update Imminent Events

- Hide WFP ADAM temporarily from list sources
- Show exposure control for cyclones from GDACS only

## 7.6.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "go-web-app",
"version": "7.6.3",
"version": "7.6.6",
"type": "module",
"private": true,
"license": "MIT",
Expand Down Expand Up @@ -45,7 +45,7 @@
"@ifrc-go/ui": "^1.2.1",
"@mapbox/mapbox-gl-draw": "^1.2.0",
"@sentry/react": "^7.81.1",
"@tinymce/tinymce-react": "^4.3.0",
"@tinymce/tinymce-react": "^5.1.1",
"@togglecorp/fujs": "^2.1.1",
"@togglecorp/re-map": "^0.2.0-beta-6",
"@togglecorp/toggle-form": "^2.0.4",
Expand Down
1 change: 0 additions & 1 deletion app/scripts/translatte/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ yargs(hideBin(process.argv))
});
},
async (argv) => {
console.warn(argv);
await applyMigrations(
currentDir,
argv.SOURCE_FILE as string,
Expand Down
40 changes: 28 additions & 12 deletions app/src/App/routes/SurgeRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,30 +416,30 @@ const surgeCatalogueHealthEmergencyClinic = customWrapRoute({
},
});

const surgeCatalogueHealthEruChloreaTreatment = customWrapRoute({
const surgeCatalogueHealthEruCholeraTreatment = customWrapRoute({
parent: surgeCatalogueLayout,
path: 'health/eru-chlorea-treatment',
path: 'health/eru-cholera-treatment',
component: {
render: () => import('#views/SurgeCatalogueHealthEruChloreaTreatment'),
render: () => import('#views/SurgeCatalogueHealthEruCholeraTreatment'),
props: {},
},
wrapperComponent: Auth,
context: {
title: 'Emergency Response Unit Chlorea Treatment Center',
title: 'Emergency Response Unit Cholera Treatment Center',
visibility: 'anything',
},
});

const surgeCatalogueHealthCommunityCaseManagementChlorea = customWrapRoute({
const surgeCatalogueHealthCommunityCaseManagementCholera = customWrapRoute({
parent: surgeCatalogueLayout,
path: 'health/community-case-management-chlorea',
path: 'health/community-case-management-cholera',
component: {
render: () => import('#views/SurgeCatalogueHealthCommunityCaseManagementChlorea'),
render: () => import('#views/SurgeCatalogueHealthCommunityCaseManagementCholera'),
props: {},
},
wrapperComponent: Auth,
context: {
title: 'Community Case Management of Chlorea',
title: 'Community Case Management of Cholera',
visibility: 'anything',
},
});
Expand Down Expand Up @@ -472,6 +472,20 @@ const surgeCatalogueHealthSafeDignifiedBurials = customWrapRoute({
},
});

const surgeCatalogueHealthInfectionPreventionAndControl = customWrapRoute({
parent: surgeCatalogueLayout,
path: 'health/infection-prevention-and-control',
component: {
render: () => import('#views/SurgeCatalogueHealthInfectionPreventionAndControl'),
props: {},
},
wrapperComponent: Auth,
context: {
title: 'Infection Prevention and Control',
visibility: 'anything',
},
});

const surgeCatalogueHealthCommunityManagementMalnutrition = customWrapRoute({
parent: surgeCatalogueLayout,
path: 'health/community-management-malnutrition',
Expand Down Expand Up @@ -1301,9 +1315,10 @@ function DeploymentCatalogueNavigate() {
'eru-pss-module': surgeCatalogueHealthEruPsychosocialSupport,
'community-case-management-of-malnutrition-ccmm': surgeCatalogueHealthCommunityManagementMalnutrition,
'safe-and-dignified-burials': surgeCatalogueHealthSafeDignifiedBurials,
'infection-prevention-and-control': surgeCatalogueHealthInfectionPreventionAndControl,
'community-based-surveillance-cbs': surgeCatalogueHealthCommunityBasedSurveillance,
'community-case-management-of-cholera-ccmc': surgeCatalogueHealthCommunityCaseManagementChlorea,
'eru-cholera-treatment-center': surgeCatalogueHealthEruChloreaTreatment,
'community-case-management-of-cholera-ccmc': surgeCatalogueHealthCommunityCaseManagementCholera,
'eru-cholera-treatment-center': surgeCatalogueHealthEruCholeraTreatment,
'emergency-mobile-clinic': surgeCatalogueHealthEmergencyClinic,
'maternal-newborn-health-clinic': surgeCatalogueHealthMaternalNewbornClinic,
'surgical-surge': surgeCatalogueHealthEruSurgical,
Expand Down Expand Up @@ -1457,10 +1472,11 @@ export default {
surgeCatalogueHealthEruSurgical,
surgeCatalogueHealthMaternalNewbornClinic,
surgeCatalogueHealthEmergencyClinic,
surgeCatalogueHealthEruChloreaTreatment,
surgeCatalogueHealthCommunityCaseManagementChlorea,
surgeCatalogueHealthEruCholeraTreatment,
surgeCatalogueHealthCommunityCaseManagementCholera,
surgeCatalogueHealthCommunityBasedSurveillance,
surgeCatalogueHealthSafeDignifiedBurials,
surgeCatalogueHealthInfectionPreventionAndControl,
surgeCatalogueHealthCommunityManagementMalnutrition,
surgeCatalogueHealthEruPsychosocialSupport,
surgeCatalogueInformationManagement,
Expand Down
8 changes: 4 additions & 4 deletions app/src/components/RichTextArea/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const editorOptions: Omit<RawEditorOptions, 'selector' | 'target'> = {
menubar: false, // https://www.tiny.cloud/docs/advanced/available-toolbar-buttons
statusbar: false,
paste_data_images: false,
plugins: ['advlist autolink code help link lists preview'],
toolbar: 'formatselect | bold italic superscript link | '
plugins: 'advlist autolink code help link lists preview',
toolbar: 'bold italic subscript superscript link | '
+ 'alignleft aligncenter alignright alignjustify | '
+ 'bullist numlist outdent indent | code removeformat preview | help',
contextmenu: 'formats link',
+ 'bullist numlist outdent indent | code removeformat preview fullscreen | help',
contextmenu: 'link',
// https://www.tiny.cloud/docs/configure/content-filtering/#invalid_styles
invalid_styles: { '*': 'opacity' },
};
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/domain/ExportButton/i18n.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"namespace": "common",
"strings": {
"exportTableButtonLabel": "Export",
"exportTableDownloadingButtonLabel": "Downloading... ({progress}%)",
"exportButtonLabel": "Export",
"exportDownloadingButtonLabel": "Downloading... ({progress}%)",
"pendingExportLabel": "Downloading..."
}
}
8 changes: 4 additions & 4 deletions app/src/components/domain/ExportButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function ExportButton(props: Props) {

const exportButtonLabel = useMemo(() => {
if (!pendingExport) {
return strings.exportTableButtonLabel;
return strings.exportButtonLabel;
}
if (progress) {
return resolveToComponent(
strings.exportTableDownloadingButtonLabel,
strings.exportDownloadingButtonLabel,
{
progress: (
<NumberOutput
Expand All @@ -46,8 +46,8 @@ function ExportButton(props: Props) {
}
return strings.pendingExportLabel;
}, [
strings.exportTableButtonLabel,
strings.exportTableDownloadingButtonLabel,
strings.exportButtonLabel,
strings.exportDownloadingButtonLabel,
strings.pendingExportLabel,
progress,
pendingExport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,36 @@ function colorSelector(item: SeverityLegendItem) {
interface Props {
value: LayerOptionsValue;
onChange: React.Dispatch<React.SetStateAction<LayerOptionsValue>>;

exposureAreaControlHidden?: boolean;
}

function LayerOptions(props: Props) {
const {
exposureAreaControlHidden,
value,
onChange,
} = props;

const setFieldValue = useSetFieldValue(onChange);

// FIXME: use strings
// FIXME: These are hard-coded for Gdacs source.
// Currently we are only showing severity control for Gdacs
const severityLegendItems = useMemo<SeverityLegendItem[]>(() => ([
{
severity: 'green',
label: 'Green',
label: '60 km/h',
color: COLOR_GREEN,
},
{
severity: 'orange',
label: 'Orange',
label: '90 km/h',
color: COLOR_ORANGE,
},
{
severity: 'red',
label: 'Red',
label: '120 km/h',
color: COLOR_RED,
},
{
Expand All @@ -92,28 +97,30 @@ function LayerOptions(props: Props) {
withBackground
withInvertedView
/>
<div className={styles.exposedAreaInputWrapper}>
<Switch
// FIXME: use strings
label="Exposed area to tropical storm or cyclone strength wind"
name="showExposedArea"
value={value.showExposedArea}
onChange={setFieldValue}
withInvertedView
/>
{value.showExposedArea && (
<Legend
className={styles.exposedAreaLegend}
{!exposureAreaControlHidden && (
<div className={styles.exposedAreaInputWrapper}>
<Switch
// FIXME: use strings
label="Severity:"
items={severityLegendItems}
keySelector={severitySelector}
labelSelector={labelSelector}
colorSelector={colorSelector}
labelClassName={styles.legendLabel}
label="Exposed area to tropical storm or cyclone strength wind"
name="showExposedArea"
value={value.showExposedArea}
onChange={setFieldValue}
withInvertedView
/>
)}
</div>
{value.showExposedArea && (
<Legend
className={styles.exposedAreaLegend}
// FIXME: use strings
label="Severity:"
items={severityLegendItems}
keySelector={severitySelector}
labelSelector={labelSelector}
colorSelector={colorSelector}
labelClassName={styles.legendLabel}
/>
)}
</div>
)}
<Switch
// FIXME: use strings
label="Storm track"
Expand Down
1 change: 0 additions & 1 deletion app/src/components/domain/RiskImminentEventMap/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"namespace": "common",
"strings": {
"riskImminentEventsMap": "Risk Imminent Events Map",
"backToEventsLabel": "Back to events",
"emptyImminentEventMessage": "No imminent event forecasted"
}
}
Loading

0 comments on commit 1e8e5e6

Please sign in to comment.