Loading frontend/src/actionlog/InjectMessage/index.tsx +3 −8 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import { useTypedQuery } from '@inject/graphql/graphql' import { WriteReadReceipt } from '@inject/graphql/mutations.client' import { GetSingleActionLog } from '@inject/graphql/queries' import { useClient } from '@inject/graphql/urql/client' import isOverlay from '@inject/graphql/utils/isOverlay' import Message from '@inject/shared/components/Message' import HeaderItem from '@inject/shared/components/Message/HeaderItem' import Timestamp from '@inject/shared/components/StyledTag/Timestamp' Loading Loading @@ -72,12 +73,6 @@ const InjectMessage: FC<InjectMessageProps> = ({ } }, [actionLogSimple.id, client, initialReadReceipt]) const showOverlay = useMemo( // eslint-disable-next-line @typescript-eslint/no-explicit-any () => inInstructor && actionLog && !!(actionLog.details as any)?.overlay, [actionLog, inInstructor] ) const titleProps: EntityTitleProps = useMemo( () => ({ icon: 'applications', Loading @@ -94,8 +89,8 @@ const InjectMessage: FC<InjectMessageProps> = ({ return ( <Message fill={fill} titleProps={showOverlay ? titleProps : undefined} warning={showOverlay} titleProps={isOverlay(actionLog) ? titleProps : undefined} warning={isOverlay(actionLog)} header={ <> <HeaderItem> Loading frontend/src/analyst/ActionLog/index.tsx +3 −3 Original line number Diff line number Diff line Loading @@ -61,12 +61,12 @@ const getContent = (actionLog: ActionLogFragment) => { case 'TeamQuestionnaireStateType': return actionLog.details.questionnaire.title case 'EmailType': { const senderId = actionLog.details.sender.id const senderAddress = actionLog.details.sender.address const recipients = actionLog.details.thread.participants .filter(participant => participant.id !== senderId) .filter(participant => participant.address !== senderAddress) .map(participant => participant.address) .join(', ') return `${actionLog.details.sender.address} → ${recipients}: ${textFromRenderedContent(actionLog.details.content.rendered)}` return `${senderAddress} → ${recipients}: ${textFromRenderedContent(actionLog.details.content.rendered)}` } default: throw new Error(`unknown actionLog type`) Loading graphql/fragments.ts +6 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,12 @@ export const ActionLogLookup = graphql( } ... on TeamQuestionnaireStateType { id questionnaire { id overlay { id } } } } } Loading graphql/graphql-cache.d.ts +42 −38 File changed.Preview size limit exceeded, changes collapsed. Show changes graphql/utils/Subscriptions/trainee.ts +2 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ import { import { teamAction } from '../../subscriptions' import { useClient } from '../../urql/client' import type { ActionLogPayload } from '../../urql/events' import isOverlay from '../isOverlay' import useExerciseLoopStatusSubscription from '../useExerciseLoopStatusSubscription' import { isInCurrentContext, useGenericActionLogEvent } from './utils' Loading Loading @@ -64,8 +65,7 @@ const useActionLogSubscriptionTrainee = ({ if ( !actionLog.readReceipt && !isInCurrentContext(actionLog) && // eslint-disable-next-line @typescript-eslint/no-explicit-any !(actionLog.details as any)?.overlay && !isOverlay(actionLog) && !( actionLog.details.__typename === 'EmailType' && actionLog.details.readReceipt Loading Loading
frontend/src/actionlog/InjectMessage/index.tsx +3 −8 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import { useTypedQuery } from '@inject/graphql/graphql' import { WriteReadReceipt } from '@inject/graphql/mutations.client' import { GetSingleActionLog } from '@inject/graphql/queries' import { useClient } from '@inject/graphql/urql/client' import isOverlay from '@inject/graphql/utils/isOverlay' import Message from '@inject/shared/components/Message' import HeaderItem from '@inject/shared/components/Message/HeaderItem' import Timestamp from '@inject/shared/components/StyledTag/Timestamp' Loading Loading @@ -72,12 +73,6 @@ const InjectMessage: FC<InjectMessageProps> = ({ } }, [actionLogSimple.id, client, initialReadReceipt]) const showOverlay = useMemo( // eslint-disable-next-line @typescript-eslint/no-explicit-any () => inInstructor && actionLog && !!(actionLog.details as any)?.overlay, [actionLog, inInstructor] ) const titleProps: EntityTitleProps = useMemo( () => ({ icon: 'applications', Loading @@ -94,8 +89,8 @@ const InjectMessage: FC<InjectMessageProps> = ({ return ( <Message fill={fill} titleProps={showOverlay ? titleProps : undefined} warning={showOverlay} titleProps={isOverlay(actionLog) ? titleProps : undefined} warning={isOverlay(actionLog)} header={ <> <HeaderItem> Loading
frontend/src/analyst/ActionLog/index.tsx +3 −3 Original line number Diff line number Diff line Loading @@ -61,12 +61,12 @@ const getContent = (actionLog: ActionLogFragment) => { case 'TeamQuestionnaireStateType': return actionLog.details.questionnaire.title case 'EmailType': { const senderId = actionLog.details.sender.id const senderAddress = actionLog.details.sender.address const recipients = actionLog.details.thread.participants .filter(participant => participant.id !== senderId) .filter(participant => participant.address !== senderAddress) .map(participant => participant.address) .join(', ') return `${actionLog.details.sender.address} → ${recipients}: ${textFromRenderedContent(actionLog.details.content.rendered)}` return `${senderAddress} → ${recipients}: ${textFromRenderedContent(actionLog.details.content.rendered)}` } default: throw new Error(`unknown actionLog type`) Loading
graphql/fragments.ts +6 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,12 @@ export const ActionLogLookup = graphql( } ... on TeamQuestionnaireStateType { id questionnaire { id overlay { id } } } } } Loading
graphql/graphql-cache.d.ts +42 −38 File changed.Preview size limit exceeded, changes collapsed. Show changes
graphql/utils/Subscriptions/trainee.ts +2 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ import { import { teamAction } from '../../subscriptions' import { useClient } from '../../urql/client' import type { ActionLogPayload } from '../../urql/events' import isOverlay from '../isOverlay' import useExerciseLoopStatusSubscription from '../useExerciseLoopStatusSubscription' import { isInCurrentContext, useGenericActionLogEvent } from './utils' Loading Loading @@ -64,8 +65,7 @@ const useActionLogSubscriptionTrainee = ({ if ( !actionLog.readReceipt && !isInCurrentContext(actionLog) && // eslint-disable-next-line @typescript-eslint/no-explicit-any !(actionLog.details as any)?.overlay && !isOverlay(actionLog) && !( actionLog.details.__typename === 'EmailType' && actionLog.details.readReceipt Loading