diff --git a/packages/datatrak-web/src/api/mutations/useLogout.ts b/packages/datatrak-web/src/api/mutations/useLogout.ts index 1b7d2cd93c..988145bff1 100644 --- a/packages/datatrak-web/src/api/mutations/useLogout.ts +++ b/packages/datatrak-web/src/api/mutations/useLogout.ts @@ -11,8 +11,8 @@ export const useLogout = () => { const queryClient = useQueryClient(); return useMutation('logout', () => post('logout'), { - onSuccess: () => { - queryClient.invalidateQueries(); + onSuccess: async () => { + await queryClient.resetQueries(); removeTaskFilterSetting('all_assignees_tasks'); removeTaskFilterSetting('show_completed_tasks'); removeTaskFilterSetting('show_cancelled_tasks'); diff --git a/packages/datatrak-web/src/components/Tile.tsx b/packages/datatrak-web/src/components/Tile.tsx index 0ad8bce8c7..92170d8f1b 100644 --- a/packages/datatrak-web/src/components/Tile.tsx +++ b/packages/datatrak-web/src/components/Tile.tsx @@ -30,6 +30,7 @@ const ButtonWrapper = styled(Wrapper).attrs({ flex-direction: row; position: relative; justify-content: flex-start; + align-items: flex-start; svg { margin-right: 0.4rem; diff --git a/packages/datatrak-web/src/features/SurveyResponseModal.tsx b/packages/datatrak-web/src/features/SurveyResponseModal.tsx index 49f4d82d01..34af86bdf6 100644 --- a/packages/datatrak-web/src/features/SurveyResponseModal.tsx +++ b/packages/datatrak-web/src/features/SurveyResponseModal.tsx @@ -123,7 +123,12 @@ export const SurveyResponseModal = () => { const surveyResponseId = urlSearchParams.get('responseId'); - const { data: surveyResponse, isLoading, error, isFetched } = useSurveyResponse(surveyResponseId); + const { + data: surveyResponse, + isLoading, + error, + isFetched, + } = useSurveyResponse(surveyResponseId, { meta: { applyCustomErrorHandling: true } }); const isLoadingSurveyResponse = isLoading || !isFetched; diff --git a/packages/datatrak-web/src/features/Tasks/TaskDetails/TaskDetails.tsx b/packages/datatrak-web/src/features/Tasks/TaskDetails/TaskDetails.tsx index 9875b89647..11a16bba74 100644 --- a/packages/datatrak-web/src/features/Tasks/TaskDetails/TaskDetails.tsx +++ b/packages/datatrak-web/src/features/Tasks/TaskDetails/TaskDetails.tsx @@ -12,7 +12,7 @@ import { LoadingContainer } from '@tupaia/ui-components'; import { useEditTask, useSurveyResponse } from '../../../api'; import { displayDate } from '../../../utils'; import { Button as BaseButton, SurveyTickIcon, Tile } from '../../../components'; -import { SingleTaskResponse } from '../../../types'; +import { SingleTaskResponse } from '../../../types'; import { RepeatScheduleInput } from '../RepeatScheduleInput'; import { DueDatePicker } from '../DueDatePicker'; import { AssigneeInput } from '../AssigneeInput'; @@ -114,7 +114,9 @@ const SectionHeading = styled(Typography).attrs({ `; const InitialRequest = ({ initialRequestId }) => { - const { data: surveyResponse, isLoading } = useSurveyResponse(initialRequestId); + const { data: surveyResponse, isLoading } = useSurveyResponse(initialRequestId, { + meta: { applyCustomErrorHandling: true }, + }); if (isLoading || !surveyResponse) { return null; } diff --git a/packages/datatrak-web/src/features/Tasks/TaskTile.tsx b/packages/datatrak-web/src/features/Tasks/TaskTile.tsx index 3c91307ed9..9fac9ed87a 100644 --- a/packages/datatrak-web/src/features/Tasks/TaskTile.tsx +++ b/packages/datatrak-web/src/features/Tasks/TaskTile.tsx @@ -62,6 +62,7 @@ const TileContent = styled.div` align-items: center; > span { + text-wrap: nowrap; margin-inline-end: 0.6rem; } `;