Skip to content

Commit 8a77594

Browse files
committed
WIP
1 parent 9d33095 commit 8a77594

51 files changed

Lines changed: 3605 additions & 417 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default defineConfig({
2424
APP_TINY_API_KEY: Schema.string(),
2525
APP_RISK_API_ENDPOINT: Schema.string({ format: 'url', protocol: true }),
2626
APP_MALAWI_RISK_WATCH_GRAPHQL_ENDPOINT: Schema.string({ format: 'url', protocol: true, tld: false }),
27+
APP_MALAWI_RISK_WATCH_ADMIN_URL: Schema.string.optional({ format: 'url', protocol: true, tld: false }),
2728
APP_SDT_URL: Schema.string.optional({ format: 'url', protocol: true, tld: false }),
2829
APP_POWER_BI_REPORT_ID_1: Schema.string.optional(),
2930
APP_SENTRY_DSN: Schema.string.optional(),

app/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"surge:teardown": "branch=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD); branch=$(echo $branch | tr ./ -); surge teardown https://ifrc-go-$branch.surge.sh"
4444
},
4545
"dependencies": {
46+
"@graphql-typed-document-node/core": "^3.2.0",
4647
"@ifrc-go/icons": "^2.0.1",
4748
"@ifrc-go/ui": "workspace:^",
4849
"@sentry/react": "^10.0.0",
@@ -57,6 +58,7 @@
5758
"diff-match-patch": "^1.0.5",
5859
"exceljs": "^4.4.0",
5960
"file-saver": "^2.0.5",
61+
"geotiff": "^3.0.5",
6062
"graphql": "^16.14.0",
6163
"html-to-image": "^1.11.13",
6264
"mapbox-gl": "^1.13.3",

app/src/components/Navbar/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
sdtUrl,
2424
} from '#config';
2525
import useAuth from '#hooks/domain/useAuth';
26+
import { FIELD_REPORT_STATUS_EARLY_WARNING } from '#utils/constants';
2627

2728
import AuthenticatedUserDropdown from './AuthenticatedUserDropdown';
2829
import CountryDropdown from './CountryDropdown';
@@ -313,7 +314,11 @@ function Navbar(props: Props) {
313314
to="fieldReportFormNew"
314315
colorVariant="primary"
315316
styleVariant="action"
316-
state={{ earlyWarning: true }}
317+
state={{
318+
initialValue: {
319+
status: FIELD_REPORT_STATUS_EARLY_WARNING,
320+
},
321+
}}
317322
withoutFullWidth
318323
>
319324
{strings.userMenuCreateEarlyActionFieldReport}

app/src/components/StepGradientBar/styles.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.step-gradient-bar {
2-
width: min(30cqi, 10rem);
2+
width: min(36cqi, 16rem);
33

44
.step {
55
flex-grow: 1;
6+
text-align: center;
67

78
.swatch {
89
height: 0.5rem;

app/src/components/domain/ActiveCountryBaseMapLayer/index.tsx

Lines changed: 60 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useMemo } from 'react';
22
import { MapLayer } from '@togglecorp/re-map';
33
import {
4+
type BackgroundLayer,
45
type FillLayer,
56
type LineLayer,
67
type SymbolLayer,
@@ -19,6 +20,18 @@ const hiddenFillLayerOptions: Omit<FillLayer, 'id'> = {
1920
},
2021
};
2122

23+
const hiddenLineLayerOptions: Omit<LineLayer, 'id'> = {
24+
type: 'line',
25+
layout: {
26+
visibility: 'none',
27+
},
28+
};
29+
30+
const backgroundLayerOptions: Omit<BackgroundLayer, 'id'> = {
31+
type: 'background',
32+
paint: { 'background-color': COLOR_WHITE },
33+
};
34+
2235
interface Props {
2336
activeCountryIso3: string | undefined | null;
2437
}
@@ -32,19 +45,11 @@ function ActiveCountryBaseMapLayer(props: Props) {
3245
layout: { visibility: 'visible' },
3346
paint: {
3447
'fill-color': [
35-
'interpolate',
36-
['linear'],
37-
['zoom'],
38-
2,
39-
[
40-
'match',
41-
['get', 'iso3'],
42-
activeCountryIso3,
43-
COLOR_ACTIVE_REGION,
44-
COLOR_LIGHT_GREY,
45-
],
46-
10,
47-
COLOR_LIGHT_GREY,
48+
'match',
49+
['get', 'iso3'],
50+
activeCountryIso3,
51+
COLOR_ACTIVE_REGION,
52+
COLOR_WHITE,
4853
],
4954
},
5055
}),
@@ -56,17 +61,11 @@ function ActiveCountryBaseMapLayer(props: Props) {
5661
type: 'line',
5762
layout: { visibility: 'visible' },
5863
paint: {
59-
'line-color': [
60-
'match',
61-
['get', 'country_iso3'],
62-
activeCountryIso3,
63-
COLOR_WHITE,
64-
COLOR_LIGHT_GREY,
65-
],
64+
'line-color': COLOR_WHITE,
6665
'line-opacity': 1,
6766
},
6867
}),
69-
[activeCountryIso3],
68+
[],
7069
);
7170

7271
const adminOneLabelLayerOptions = useMemo<Omit<SymbolLayer, 'id'>>(
@@ -89,16 +88,54 @@ function ActiveCountryBaseMapLayer(props: Props) {
8988
[activeCountryIso3],
9089
);
9190

91+
const adminZeroLabelLayerOptions = useMemo<Omit<SymbolLayer, 'id'>>(
92+
() => ({
93+
type: 'symbol',
94+
layout: {
95+
visibility: 'none',
96+
},
97+
}),
98+
[],
99+
);
100+
92101
return (
93102
<>
94103
<MapLayer
95-
layerKey="admin-0"
96-
layerOptions={adminZeroHighlightLayerOptions}
104+
layerKey="background"
105+
layerOptions={backgroundLayerOptions}
106+
/>
107+
<MapLayer
108+
layerKey="hillshade"
109+
layerOptions={hiddenFillLayerOptions}
110+
/>
111+
<MapLayer
112+
layerKey="admin-0-boundary-mask"
113+
layerOptions={hiddenLineLayerOptions}
114+
/>
115+
<MapLayer
116+
layerKey="admin-0-boundary"
117+
layerOptions={hiddenLineLayerOptions}
118+
/>
119+
<MapLayer
120+
layerKey="admin-0-boundary-disputed"
121+
layerOptions={hiddenLineLayerOptions}
97122
/>
98123
<MapLayer
99124
layerKey="admin-0-highlight"
100125
layerOptions={hiddenFillLayerOptions}
101126
/>
127+
<MapLayer
128+
layerKey="admin-0-label"
129+
layerOptions={adminZeroLabelLayerOptions}
130+
/>
131+
<MapLayer
132+
layerKey="admin-0-priority-label"
133+
layerOptions={adminZeroLabelLayerOptions}
134+
/>
135+
<MapLayer
136+
layerKey="admin-0"
137+
layerOptions={adminZeroHighlightLayerOptions}
138+
/>
102139
<MapLayer
103140
layerKey="admin-1-boundary"
104141
layerOptions={adminOneBoundaryLayerOptions}

app/src/components/domain/ImminentEventListItem/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function ImminentEventListItem(props: Props) {
7575
withDarkBackground
7676
withPadding
7777
withoutSpacingOpticalCorrection
78-
withContentWell
7978
>
8079
{children}
8180
</Container>

0 commit comments

Comments
 (0)