Loading frontend/src/email/TeamEmails/EmailCard.tsx +42 −33 Original line number Diff line number Diff line Loading @@ -10,11 +10,15 @@ import { } from '@blueprintjs/core' import { Shield } from '@blueprintjs/icons' import { css, cx } from '@emotion/css' import { SetTimestampRead, useTypedMutation } from '@inject/graphql' import { LLMEnabledQuery, SetTimestampRead, useTypedMutation, useTypedQuery, } from '@inject/graphql' import { useTranslationFrontend } from '@inject/locale' import { breakWord, HelpIcon, LinkButton, notifyNoncommmit, Timestamp, Loading Loading @@ -89,6 +93,11 @@ export const EmailCard: FC<{ markDoneAvailable, }) => { const [, setTimestampRead] = useTypedMutation(SetTimestampRead) const [{ data: llmData, fetching: llmFetching }] = useTypedQuery({ query: LLMEnabledQuery, variables: { exerciseId }, pause: !assessmentProps, }) const { t } = useTranslationFrontend() const { toggleDone } = useToggleDone( email.__typename === 'IActionLogType' Loading Loading @@ -127,6 +136,9 @@ export const EmailCard: FC<{ ]) const definitionAddress = email.details.sender.definitionAddress const llmEnabled = llmData?.exerciseId.llm ?? false const showAssessment = !!assessmentProps && llmEnabled const showDivider = !assessmentProps || (!llmFetching && !llmEnabled) const MarkAsDoneAndNotify = () => { toggleDone() Loading Loading @@ -268,9 +280,12 @@ export const EmailCard: FC<{ /> ))} {assessmentProps && <Assessment {...assessmentProps} />} <Divider /> {showAssessment && assessmentProps && ( <Assessment {...assessmentProps} /> )} {markDoneAvailable && teamId && !email.done && ( <> {showDivider && <Divider />} <div className={buttonGroupRow}> <ButtonGroup> <Button icon='changes' onClick={MarkAsDoneAndNotify}> Loading @@ -284,13 +299,6 @@ export const EmailCard: FC<{ text: ( <span className={buttonTextWithHelp}> {t('overview.todoList.markAsDoneAndReturn')} <HelpIcon text={ <p> {t('overview.todoList.markAsDoneAndReturnHelp')} </p> } /> </span> ), minimal: true, Loading @@ -300,6 +308,7 @@ export const EmailCard: FC<{ )} </ButtonGroup> </div> </> )} </SectionCard> </Section> Loading locale/resources/cs/frontend.json +0 −1 Original line number Diff line number Diff line Loading @@ -519,7 +519,6 @@ "notDone": "Nedokončeno", "notFoundTitle": "Žádné injecty", "notFoundDescription": "Nebyly nalezeny žádné injecty, které by mohly být zobrazeny v téhle kategorii. Prosím počkejte na nové", "markAsDoneAndReturnHelp": "Označí email jako dokončený a vrátí vás zpět na přehled cvičení.", "notification": { "description": "Email byl označen jako dokončený", "undo": "Vrátit zpět" Loading locale/resources/en/frontend.json +0 −1 Original line number Diff line number Diff line Loading @@ -519,7 +519,6 @@ "notDone": "Not done", "notFoundTitle": "No inject items", "notFoundDescription": "There are no log items that can be shown in this category. Please await for new injects", "markAsDoneAndReturnHelp": "Marks the email as done and returns to the exercise overview.", "notification": { "description": "Email was marked as done", "undo": "Undo" Loading Loading
frontend/src/email/TeamEmails/EmailCard.tsx +42 −33 Original line number Diff line number Diff line Loading @@ -10,11 +10,15 @@ import { } from '@blueprintjs/core' import { Shield } from '@blueprintjs/icons' import { css, cx } from '@emotion/css' import { SetTimestampRead, useTypedMutation } from '@inject/graphql' import { LLMEnabledQuery, SetTimestampRead, useTypedMutation, useTypedQuery, } from '@inject/graphql' import { useTranslationFrontend } from '@inject/locale' import { breakWord, HelpIcon, LinkButton, notifyNoncommmit, Timestamp, Loading Loading @@ -89,6 +93,11 @@ export const EmailCard: FC<{ markDoneAvailable, }) => { const [, setTimestampRead] = useTypedMutation(SetTimestampRead) const [{ data: llmData, fetching: llmFetching }] = useTypedQuery({ query: LLMEnabledQuery, variables: { exerciseId }, pause: !assessmentProps, }) const { t } = useTranslationFrontend() const { toggleDone } = useToggleDone( email.__typename === 'IActionLogType' Loading Loading @@ -127,6 +136,9 @@ export const EmailCard: FC<{ ]) const definitionAddress = email.details.sender.definitionAddress const llmEnabled = llmData?.exerciseId.llm ?? false const showAssessment = !!assessmentProps && llmEnabled const showDivider = !assessmentProps || (!llmFetching && !llmEnabled) const MarkAsDoneAndNotify = () => { toggleDone() Loading Loading @@ -268,9 +280,12 @@ export const EmailCard: FC<{ /> ))} {assessmentProps && <Assessment {...assessmentProps} />} <Divider /> {showAssessment && assessmentProps && ( <Assessment {...assessmentProps} /> )} {markDoneAvailable && teamId && !email.done && ( <> {showDivider && <Divider />} <div className={buttonGroupRow}> <ButtonGroup> <Button icon='changes' onClick={MarkAsDoneAndNotify}> Loading @@ -284,13 +299,6 @@ export const EmailCard: FC<{ text: ( <span className={buttonTextWithHelp}> {t('overview.todoList.markAsDoneAndReturn')} <HelpIcon text={ <p> {t('overview.todoList.markAsDoneAndReturnHelp')} </p> } /> </span> ), minimal: true, Loading @@ -300,6 +308,7 @@ export const EmailCard: FC<{ )} </ButtonGroup> </div> </> )} </SectionCard> </Section> Loading
locale/resources/cs/frontend.json +0 −1 Original line number Diff line number Diff line Loading @@ -519,7 +519,6 @@ "notDone": "Nedokončeno", "notFoundTitle": "Žádné injecty", "notFoundDescription": "Nebyly nalezeny žádné injecty, které by mohly být zobrazeny v téhle kategorii. Prosím počkejte na nové", "markAsDoneAndReturnHelp": "Označí email jako dokončený a vrátí vás zpět na přehled cvičení.", "notification": { "description": "Email byl označen jako dokončený", "undo": "Vrátit zpět" Loading
locale/resources/en/frontend.json +0 −1 Original line number Diff line number Diff line Loading @@ -519,7 +519,6 @@ "notDone": "Not done", "notFoundTitle": "No inject items", "notFoundDescription": "There are no log items that can be shown in this category. Please await for new injects", "markAsDoneAndReturnHelp": "Marks the email as done and returns to the exercise overview.", "notification": { "description": "Email was marked as done", "undo": "Undo" Loading