diff --git a/src/views/Home/AlertsMap/Map/index.tsx b/src/views/Home/AlertsMap/Map/index.tsx index 3968bc69..ff9c2709 100644 --- a/src/views/Home/AlertsMap/Map/index.tsx +++ b/src/views/Home/AlertsMap/Map/index.tsx @@ -100,6 +100,7 @@ query Admin1WithAlerts( public { id country(pk: $country) { + id admin1s(alertFilters: $alertFilters) { id ifrcGoId diff --git a/src/views/Home/AlertsMap/Sidebar/Admin1Alerts/index.tsx b/src/views/Home/AlertsMap/Sidebar/Admin1Alerts/index.tsx index 38f16e88..e3093e16 100644 --- a/src/views/Home/AlertsMap/Sidebar/Admin1Alerts/index.tsx +++ b/src/views/Home/AlertsMap/Sidebar/Admin1Alerts/index.tsx @@ -66,6 +66,7 @@ query Admin1Alerts( items { id info { + id event categoryDisplay } diff --git a/src/views/Home/AlertsMap/Sidebar/AlertDetail/index.tsx b/src/views/Home/AlertsMap/Sidebar/AlertDetail/index.tsx index d22b8756..f1a568e4 100644 --- a/src/views/Home/AlertsMap/Sidebar/AlertDetail/index.tsx +++ b/src/views/Home/AlertsMap/Sidebar/AlertDetail/index.tsx @@ -48,7 +48,9 @@ query AlertInfo($alert: ID!) { public { id alert(pk: $alert) { + id info { + id event categoryDisplay category @@ -58,7 +60,6 @@ query AlertInfo($alert: ID!) { urgencyDisplay severityDisplay certaintyDisplay - id } infos { id @@ -86,18 +87,19 @@ query AlertInfo($alert: ID!) { valueName } areas { + id polygons { - value id + value alertInfoAreaId } - id } categoryDisplay } sender sent admin1s { + id isUnknown } url @@ -105,7 +107,6 @@ query AlertInfo($alert: ID!) { scope restriction references - id } } } diff --git a/src/views/Home/AlertsMap/Sidebar/CountryAlerts/index.tsx b/src/views/Home/AlertsMap/Sidebar/CountryAlerts/index.tsx index 4bf81269..b0fe7244 100644 --- a/src/views/Home/AlertsMap/Sidebar/CountryAlerts/index.tsx +++ b/src/views/Home/AlertsMap/Sidebar/CountryAlerts/index.tsx @@ -47,6 +47,7 @@ query CountryAlerts( items { id info { + id event categoryDisplay } diff --git a/src/views/Home/AlertsMap/Sidebar/CountryDetail/index.tsx b/src/views/Home/AlertsMap/Sidebar/CountryDetail/index.tsx index 37517af3..aac0fd6f 100644 --- a/src/views/Home/AlertsMap/Sidebar/CountryDetail/index.tsx +++ b/src/views/Home/AlertsMap/Sidebar/CountryDetail/index.tsx @@ -39,18 +39,18 @@ query CountryDetail($countryId: ID!) { public { id country(pk: $countryId) { + id bbox name iso3 ifrcGoId alertCount admin1s { + id countryId filteredAlertCount - id name } - id } } } diff --git a/src/views/Home/AlertsMap/i18n.json b/src/views/Home/AlertsMap/i18n.json index c3a56356..65d71519 100644 --- a/src/views/Home/AlertsMap/i18n.json +++ b/src/views/Home/AlertsMap/i18n.json @@ -5,6 +5,7 @@ "mapViewAllSources": "View All Sources", "ongoingAlertCountries": "Ongoing Alert Countries", "backToAlertsLabel": "Back to Alerts", - "alertViewDetails": "View Details" + "alertViewDetails": "View Details", + "alertInfo": "The IFRC AlertHub shows warnings from authoritative agencies in countries. These warnings have a start time (when the event might happen) and an end time (when it's expected to be over). You'll only see warnings that are happening right now (their start time has already passed) but aren't finished yet (their end time hasn't come yet)." } } diff --git a/src/views/Home/AlertsMap/index.tsx b/src/views/Home/AlertsMap/index.tsx index 3492e87c..dc332049 100644 --- a/src/views/Home/AlertsMap/index.tsx +++ b/src/views/Home/AlertsMap/index.tsx @@ -8,7 +8,10 @@ import { useQuery, } from '@apollo/client'; import { ChevronRightLineIcon } from '@ifrc-go/icons'; -import { Container } from '@ifrc-go/ui'; +import { + Container, + InfoPopup, +} from '@ifrc-go/ui'; import { useTranslation } from '@ifrc-go/ui/hooks'; import { resolveToString } from '@ifrc-go/ui/utils'; import { @@ -59,9 +62,11 @@ query CountryAlertsCount ($filters: AlertFilter){ alerts(filters: $filters) { count items { + id country { id name + filteredAlertCount alertCount } } @@ -121,7 +126,7 @@ export function Component() { }, ); - const alertQueryVariables = useMemo<{ filters: AlertFilter}>(() => ({ + const alertQueryVariables = useMemo<{ filters: AlertFilter }>(() => ({ filters: filter, }), [ filter, @@ -167,7 +172,15 @@ export function Component() { return ( + {heading} + + + )} withHeaderBorder childrenContainerClassName={styles.mainContent} actions={( diff --git a/src/views/Home/AlertsMap/styles.module.css b/src/views/Home/AlertsMap/styles.module.css index 9228571c..357c506e 100644 --- a/src/views/Home/AlertsMap/styles.module.css +++ b/src/views/Home/AlertsMap/styles.module.css @@ -3,6 +3,11 @@ position: relative; flex-direction: column; + .alert-info { + align-items: flex-end; + font-size: var(--go-ui-font-size-md); + } + .main-content { .alerts-map { grid-column: span 2; @@ -43,4 +48,4 @@ text-decoration: underline; color: var(--go-ui-color-primary-red); } -} +} \ No newline at end of file diff --git a/src/views/Home/AlertsTable/index.tsx b/src/views/Home/AlertsTable/index.tsx index 9bb1f23b..ad59042b 100644 --- a/src/views/Home/AlertsTable/index.tsx +++ b/src/views/Home/AlertsTable/index.tsx @@ -56,6 +56,7 @@ const ALERT_INFORMATIONS = gql` $filters: AlertFilter, ) { public { + id alerts(pagination: $pagination, filters: $filters, order:$order) { limit offset