diff --git a/frontend/src/components/Pagination/PaginationMobile.tsx b/frontend/src/components/Pagination/PaginationMobile.tsx
index 662a488fe2..3b0a9274ca 100644
--- a/frontend/src/components/Pagination/PaginationMobile.tsx
+++ b/frontend/src/components/Pagination/PaginationMobile.tsx
@@ -47,7 +47,13 @@ export const PaginationMobile = ({
onClick={handlePageBack}
icon={}
/>
-
+
{t('components.pagination.paginationMobile.currentPageCount', {
currentPage,
totalPageCount,
diff --git a/frontend/src/features/admin-form/responses/ChartsPage/ChartsPage.tsx b/frontend/src/features/admin-form/responses/ChartsPage/ChartsPage.tsx
index 90ee8b7581..240eb58b9d 100644
--- a/frontend/src/features/admin-form/responses/ChartsPage/ChartsPage.tsx
+++ b/frontend/src/features/admin-form/responses/ChartsPage/ChartsPage.tsx
@@ -1,6 +1,6 @@
import { useTranslation } from 'react-i18next'
import { useLocation } from 'react-router-dom'
-import { Box, Container, Divider, Stack } from '@chakra-ui/react'
+import { Box, Container, Divider, Flex, Stack } from '@chakra-ui/react'
import { useFeatureValue } from '@growthbook/growthbook-react'
import { featureFlags } from '~shared/constants'
@@ -91,24 +91,38 @@ export const ChartsPage = (): JSX.Element => {
) : (
<>
- }
- ctaText={t(
- 'features.adminForm.responses.charts.chartsPage.secretKeyVerification.ctaText',
- )}
- label={t(
- 'features.adminForm.responses.charts.chartsPage.secretKeyVerification.label',
- )}
- />
-
-
-
-
-
-
-
-
+
+
+ }
+ ctaText={t(
+ 'features.adminForm.responses.charts.chartsPage.secretKeyVerification.ctaText',
+ )}
+ label={t(
+ 'features.adminForm.responses.charts.chartsPage.secretKeyVerification.label',
+ )}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
>
)
}
diff --git a/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/UnlockedChartsContainer.tsx b/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/UnlockedChartsContainer.tsx
index 2036b81bd8..b6868b59b3 100644
--- a/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/UnlockedChartsContainer.tsx
+++ b/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/UnlockedChartsContainer.tsx
@@ -134,7 +134,11 @@ export const UnlockedChartsContainer = () => {
.filter(isNonEmpty)
return (
- <>
+
{
)}
/>
)}
- >
+
)
}
diff --git a/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/components/EmptyChartsContainer.tsx b/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/components/EmptyChartsContainer.tsx
index 7acae7c99d..4b05f6d376 100644
--- a/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/components/EmptyChartsContainer.tsx
+++ b/frontend/src/features/admin-form/responses/ChartsPage/UnlockedCharts/components/EmptyChartsContainer.tsx
@@ -1,4 +1,4 @@
-import { Box, Container, Divider, Stack, Text } from '@chakra-ui/react'
+import { Box, Divider, Flex, Stack, Text } from '@chakra-ui/react'
import { ChartsSvgr } from '../assets/svgr/ChartsSvgr'
@@ -12,7 +12,13 @@ export const EmptyChartsContainer = ({
subtitle: string
}): JSX.Element => {
return (
-
+
{title}
@@ -26,6 +32,6 @@ export const EmptyChartsContainer = ({
-
+
)
}
diff --git a/frontend/src/features/admin-form/responses/FeedbackPage/EmptyFeedback/EmptyFeedback.tsx b/frontend/src/features/admin-form/responses/FeedbackPage/EmptyFeedback/EmptyFeedback.tsx
index 00c57eaa9b..7089e6a120 100644
--- a/frontend/src/features/admin-form/responses/FeedbackPage/EmptyFeedback/EmptyFeedback.tsx
+++ b/frontend/src/features/admin-form/responses/FeedbackPage/EmptyFeedback/EmptyFeedback.tsx
@@ -10,7 +10,14 @@ export const EmptyFeedback = (): JSX.Element => {
const { t } = useTranslation()
return (
-
+
{t('features.adminForm.feedback.emptyFeedback.noFeedbackYet')}
diff --git a/frontend/src/features/admin-form/responses/FeedbackPage/FeedbackPage.tsx b/frontend/src/features/admin-form/responses/FeedbackPage/FeedbackPage.tsx
index 1745edca85..f27582b871 100644
--- a/frontend/src/features/admin-form/responses/FeedbackPage/FeedbackPage.tsx
+++ b/frontend/src/features/admin-form/responses/FeedbackPage/FeedbackPage.tsx
@@ -2,15 +2,7 @@ import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { UseMutationResult } from 'react-query'
import { useParams } from 'react-router-dom'
-import {
- Box,
- ButtonGroup,
- Container,
- Flex,
- Grid,
- Icon,
- Text,
-} from '@chakra-ui/react'
+import { Box, ButtonGroup, Flex, Grid, Icon, Text } from '@chakra-ui/react'
import { ProcessedFeedbackMeta, ProcessedIssueMeta } from '~shared/types'
@@ -188,29 +180,24 @@ export const FeedbackPage = (): JSX.Element => {
if (issueProps.count === 0 && reviewProps.count === 0) {
return
}
-
return (
-
-
-
+
{currentFeedbackType === FeedbackType.Issues ? (
{
translations={reviewProps.translations}
/>
)}
-
-
+
+
+ {' '}
-
+
+ {' '}
{
isMobile={isMobile}
/>
-
+ {' '}
{
onPageChange={setCurrentPage}
/>
-
+
)
}
diff --git a/frontend/src/features/admin-form/responses/FormResultsLayout.tsx b/frontend/src/features/admin-form/responses/FormResultsLayout.tsx
index 326bf8e7d5..ece008156a 100644
--- a/frontend/src/features/admin-form/responses/FormResultsLayout.tsx
+++ b/frontend/src/features/admin-form/responses/FormResultsLayout.tsx
@@ -1,16 +1,89 @@
-import { Outlet } from 'react-router-dom'
-import { Flex } from '@chakra-ui/react'
+import { useCallback } from 'react'
+import { Outlet, useLocation, useNavigate, useParams } from 'react-router-dom'
+import { Box, Flex, Spacer, Tabs } from '@chakra-ui/react'
+
+import {
+ ACTIVE_ADMINFORM_RESULTS_ROUTE_REGEX,
+ ADMINFORM_RESULTS_SUBROUTE,
+ ADMINFORM_ROUTE,
+ RESULTS_CHARTS_SUBROUTE,
+ RESULTS_FEEDBACK_SUBROUTE,
+ RESULTS_RESPONSES_SUBROUTE,
+} from '~constants/routes'
+import { useDraggable } from '~hooks/useDraggable'
import { FormResultsNavbar } from './components/FormResultsNavbar'
-/**
- * Page for rendering subroutes via `Outlet` component for admin form result pages.
- */
export const FormResultsLayout = (): JSX.Element => {
+ const { ref, onMouseDown } = useDraggable()
+ const { formId } = useParams()
+ const navigate = useNavigate()
+ const { pathname } = useLocation()
+
+ if (!formId) throw new Error('No formId provided')
+
+ const checkTabActive = useCallback(
+ (to: string) => {
+ const match = pathname.match(ACTIVE_ADMINFORM_RESULTS_ROUTE_REGEX)
+ return (match?.[2] ?? '/') === `/${to}`
+ },
+ [pathname],
+ )
+
+ const tabConfig = [
+ { path: RESULTS_RESPONSES_SUBROUTE },
+ { path: RESULTS_FEEDBACK_SUBROUTE },
+ { path: RESULTS_CHARTS_SUBROUTE },
+ ]
+
+ const tabIndex = tabConfig.findIndex((tab) => checkTabActive(tab.path))
+
+ const handleTabChange = (index: number) => {
+ const subRoute = tabConfig[index].path
+ const path = subRoute
+ ? `${ADMINFORM_ROUTE}/${formId}/${ADMINFORM_RESULTS_SUBROUTE}/${subRoute}`
+ : `${ADMINFORM_ROUTE}/${formId}/${ADMINFORM_RESULTS_SUBROUTE}`
+ navigate(path)
+ }
+
return (
-
-
-
-
+
+ {' '}
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/frontend/src/features/admin-form/responses/IndividualResponsePage/IndividualResponsePage.tsx b/frontend/src/features/admin-form/responses/IndividualResponsePage/IndividualResponsePage.tsx
index 5623c79bb4..0cb7a49a1c 100644
--- a/frontend/src/features/admin-form/responses/IndividualResponsePage/IndividualResponsePage.tsx
+++ b/frontend/src/features/admin-form/responses/IndividualResponsePage/IndividualResponsePage.tsx
@@ -201,9 +201,13 @@ export const IndividualResponsePage = (): JSX.Element => {
const workflowNumTotalSteps = data?.mrf?.workflowNumTotalSteps
return (
-
+
+ {' '}
-
{
return (
-
-
-
-
-
+
+
+
)
}
diff --git a/frontend/src/features/admin-form/responses/ResponsesPage/common/EmptyResponses/EmptyResponses.tsx b/frontend/src/features/admin-form/responses/ResponsesPage/common/EmptyResponses/EmptyResponses.tsx
index b98368d860..042442cc0a 100644
--- a/frontend/src/features/admin-form/responses/ResponsesPage/common/EmptyResponses/EmptyResponses.tsx
+++ b/frontend/src/features/admin-form/responses/ResponsesPage/common/EmptyResponses/EmptyResponses.tsx
@@ -9,7 +9,14 @@ import { EmptyResponsesSvgr } from './EmptyResponsesSvgr'
export function EmptyResponses(): JSX.Element {
const { t } = useTranslation()
return (
-
+
{t('features.adminForm.responses.responsesPage.emptyResponses.title')}
diff --git a/frontend/src/features/admin-form/responses/ResponsesPage/common/ResponsesTabWrapper.tsx b/frontend/src/features/admin-form/responses/ResponsesPage/common/ResponsesTabWrapper.tsx
index fcaefe466b..e9f3faf96f 100644
--- a/frontend/src/features/admin-form/responses/ResponsesPage/common/ResponsesTabWrapper.tsx
+++ b/frontend/src/features/admin-form/responses/ResponsesPage/common/ResponsesTabWrapper.tsx
@@ -1,4 +1,4 @@
-import { Box, Container } from '@chakra-ui/react'
+import { Box } from '@chakra-ui/react'
export const ResponsesTabWrapper = ({
children,
@@ -6,18 +6,16 @@ export const ResponsesTabWrapper = ({
children: React.ReactNode
}): JSX.Element => {
return (
-
-
+
{children}
-
+
)
}
diff --git a/frontend/src/features/admin-form/responses/ResponsesPage/storage/StorageResponsesTab.tsx b/frontend/src/features/admin-form/responses/ResponsesPage/storage/StorageResponsesTab.tsx
index 1ca7102cff..c2680b292d 100644
--- a/frontend/src/features/admin-form/responses/ResponsesPage/storage/StorageResponsesTab.tsx
+++ b/frontend/src/features/admin-form/responses/ResponsesPage/storage/StorageResponsesTab.tsx
@@ -1,4 +1,5 @@
import { useTranslation } from 'react-i18next'
+import { Container, Flex } from '@chakra-ui/react'
import { FormActivationSvg } from '~features/admin-form/settings/components/FormActivationSvg'
@@ -19,14 +20,22 @@ export const StorageResponsesTab = (): JSX.Element => {
return secretKey ? (
) : (
- }
- ctaText={t(
- 'features.adminForm.responses.responsesPage.storage.storageResponsesTab.secretKeyVerification.ctaText',
- )}
- label={t(
- 'features.adminForm.responses.responsesPage.storage.storageResponsesTab.secretKeyVerification.label',
- )}
- />
+
+
+ }
+ ctaText={t(
+ 'features.adminForm.responses.responsesPage.storage.storageResponsesTab.secretKeyVerification.ctaText',
+ )}
+ label={t(
+ 'features.adminForm.responses.responsesPage.storage.storageResponsesTab.secretKeyVerification.label',
+ )}
+ />
+
+
)
}
diff --git a/frontend/src/features/admin-form/responses/ResponsesPage/storage/UnlockedResponses/DownloadButton.tsx b/frontend/src/features/admin-form/responses/ResponsesPage/storage/UnlockedResponses/DownloadButton.tsx
index fd8d66299e..9a576f6ba1 100644
--- a/frontend/src/features/admin-form/responses/ResponsesPage/storage/UnlockedResponses/DownloadButton.tsx
+++ b/frontend/src/features/admin-form/responses/ResponsesPage/storage/UnlockedResponses/DownloadButton.tsx
@@ -196,7 +196,7 @@ export const DownloadButton = (): JSX.Element => {
)}
-
+