From babc75d89dfe9933682a8ae04036fd1c1fa87f69 Mon Sep 17 00:00:00 2001 From: David Code Howard Date: Tue, 31 Oct 2023 18:37:38 -0400 Subject: [PATCH] feat: Include measurement units in API fetch --- src/project/projectFragments.ts | 1 + src/project/projectSlice.ts | 2 ++ src/selectors.test.ts | 1 + 3 files changed, 4 insertions(+) diff --git a/src/project/projectFragments.ts b/src/project/projectFragments.ts index 29dcba9c..a67fb101 100644 --- a/src/project/projectFragments.ts +++ b/src/project/projectFragments.ts @@ -47,6 +47,7 @@ export const projectData = /* GraphQL */ ` description updatedAt archived + measurementUnits membershipList { ...projectMembershipList } diff --git a/src/project/projectSlice.ts b/src/project/projectSlice.ts index 6b67fc35..bbe43669 100644 --- a/src/project/projectSlice.ts +++ b/src/project/projectSlice.ts @@ -22,6 +22,7 @@ import { updateUsers, } from 'terraso-client-shared/account/accountSlice'; import { + MeasurementUnits, ProjectAddUserMutationInput, UserRole, } from 'terraso-client-shared/graphqlSchema/graphql'; @@ -48,6 +49,7 @@ export type Project = { memberships: Record; sites: SerializableSet; archived: boolean; + measurementUnits: MeasurementUnits; }; interface MembershipKey { diff --git a/src/selectors.test.ts b/src/selectors.test.ts index e021e6a6..757f9434 100644 --- a/src/selectors.test.ts +++ b/src/selectors.test.ts @@ -52,6 +52,7 @@ const generateProject = ( sites: siteSet, archived: false, memberships: keyBy(memberships, 'id'), + measurementUnits: 'METRIC', }; };