Skip to content

Commit

Permalink
fix: location allocations geomap data
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Nov 2, 2022
1 parent 7be5325 commit dc4b055
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/components/ToolBoxPanel/components/filters/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ export const pathnameToFilterGroups = {
filtergroups,
(fg: FilterGroupProps) => fg.name === "Components"
),
"/location/<code>/allocations/map": filter(
filtergroups,
(fg: FilterGroupProps) => fg.name === "Components"
),
"/location/<code>/eligibility": filter(
filtergroups,
(fg: FilterGroupProps) => fg.name === "Components"
Expand Down
5 changes: 5 additions & 0 deletions src/app/hooks/useGetAllVizData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ export function useGetAllVizData() {
"/grant/<code>/targets-results": grantDetailPerformanceFramework,
// Grant Performance Rating
"/grant/<code>/performance-rating": grantDetailPerformanceRating,
// Location Allocations
"/location/<code>/allocations/map": {
countries: allocationsGeomap,
multicountries: allocationsMCGeomap,
},
// Location Eligibility
"/location/<code>/eligibility": eligibilityCountry,
"/location/<code>/eligibility/table": eligibilityCountry,
Expand Down
6 changes: 5 additions & 1 deletion src/app/modules/country-detail-module/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ import { PageLoader } from "app/modules/common/page-loader";
import { PageTopSpacer } from "app/modules/common/page-top-spacer";
import { useDatasetMenuItems } from "app/hooks/useDatasetMenuItems";
import { MobileViewControl } from "app/components/Mobile/ViewsControl";
import { getAPIFormattedFilters } from "app/utils/getAPIFormattedFilters";
import { useGetAllAvailableGrants } from "app/hooks/useGetAllAvailableGrants";
import { BudgetsGeoMap } from "app/modules/viz-module/sub-modules/budgets/geomap";
import { countryDetailTabs } from "app/components/PageHeader/components/tabs/data";
import { AllocationsModule } from "app/modules/viz-module/sub-modules/allocations";
import { LocationGrants } from "app/modules/country-detail-module/sub-modules/grants";
import { LocationResults } from "app/modules/country-detail-module/sub-modules/results";
import { AllocationsGeoMap } from "app/modules/viz-module/sub-modules/allocations/geomap";
import { InvestmentsGeoMap } from "app/modules/viz-module/sub-modules/investments/geomap";
import { LocationDetailOverviewModule } from "app/modules/country-detail-module/sub-modules/overview";
import { LocationDetailDocumentsModule } from "app/modules/country-detail-module/sub-modules/documents";
Expand All @@ -33,7 +35,6 @@ import {
filtergroups,
pathnameToFilterGroups,
} from "app/components/ToolBoxPanel/components/filters/data";
import { getAPIFormattedFilters } from "app/utils/getAPIFormattedFilters";

export default function CountryDetail() {
useTitle("The Data Explorer - Location");
Expand Down Expand Up @@ -302,6 +303,9 @@ export default function CountryDetail() {
/>
</Route>
{/* Allocations */}
<Route path={`/location/:code/allocations/map`}>
<AllocationsGeoMap code={paramCode} />
</Route>
<Route path={`/location/:code/allocations`}>
<AllocationsModule
code={paramCode}
Expand Down

0 comments on commit dc4b055

Please sign in to comment.