diff --git a/backend/src/usecases/dashboard/get-volunteer-monthly-news.usecase.ts b/backend/src/usecases/dashboard/get-volunteer-monthly-news.usecase.ts index a84a9486..a1e16f6b 100644 --- a/backend/src/usecases/dashboard/get-volunteer-monthly-news.usecase.ts +++ b/backend/src/usecases/dashboard/get-volunteer-monthly-news.usecase.ts @@ -53,12 +53,12 @@ export class GetVolunteerMonthlyNewsStatisticsUsecase await this.actionsArchiveFacade.countDocumentStatusUpdatesBetweenDates( volunteerIds, ); - // get number of organization access requests - statisticsResponse.numberOfOrganizationUpdates = - await this.actionsArchiveFacade.countActivityRequestsUpdatesBetweenDates( - user.id, - ); } + // get number of organization access requests + statisticsResponse.numberOfOrganizationUpdates = + await this.actionsArchiveFacade.countActivityRequestsUpdatesBetweenDates( + user.id, + ); return statisticsResponse; } diff --git a/mobile/src/components/Statistics.tsx b/mobile/src/components/Statistics.tsx index c84205b4..618abd4b 100644 --- a/mobile/src/components/Statistics.tsx +++ b/mobile/src/components/Statistics.tsx @@ -69,6 +69,7 @@ const Statistics = ({ navigation }: { navigation: any }) => { backgroundColor="color-primary-50" onPress={onEventsCardPress} /> + {userProfile?.activeOrganization && ( <> { backgroundColor="color-primary-50" onPress={onDocumentsCardPress} /> - )} + + )} diff --git a/mobile/src/screens/News.tsx b/mobile/src/screens/News.tsx index dcd24927..4985c7c0 100644 --- a/mobile/src/screens/News.tsx +++ b/mobile/src/screens/News.tsx @@ -187,7 +187,10 @@ const News = ({ navigation, route }: any) => { const activeOrganization = userProfile?.myOrganizations.find( (org) => org.id === item.organizationId, ); - setActiveOrganization(activeOrganization as IOrganizationVolunteer); + + if (activeOrganization) { + setActiveOrganization(activeOrganization as IOrganizationVolunteer); + } switchOrganization({ organizationId: item.organizationId as string }); if (type === NewsType.LOGGED_HOURS) {