Commit 953c8d57 authored by Patrik Kotucek's avatar Patrik Kotucek
Browse files

feat: add tooltip to AI assesment pin

parent d5ede11d
Loading
Loading
Loading
Loading
+39 −15
Original line number Diff line number Diff line
import { Button, Classes, Section, SectionCard } from '@blueprintjs/core'
import {
  Button,
  Classes,
  Section,
  SectionCard,
  Tooltip,
} from '@blueprintjs/core'
import { css, cx } from '@emotion/css'
import { useTranslationFrontend } from '@inject/locale'
import { formattedText } from '@inject/shared'
@@ -54,20 +60,38 @@ export const AssessmentResult: FC<AssessmentResultProps> = ({
        title={t('assessment.resultTitle')}
        compact
        rightElement={
          pinned ? (
            <Button
              minimal
            icon={pinned ? 'cross' : 'pin'}
              icon='cross'
              onClick={() => {
                window.dispatchEvent(
                  new CustomEvent(PIN_ASSESSMENT_EVENT_TYPE, {
                    detail: {
                    assessment: pinned ? '' : assessment,
                      assessment: '',
                    } as PinAssessmentEventPayload,
                  })
                )
                onPin?.()
              }}
            />
          ) : (
            <Tooltip content={t('assessment.assessmentPinTooltip')}>
              <Button
                icon='pin'
                onClick={() => {
                  window.dispatchEvent(
                    new CustomEvent(PIN_ASSESSMENT_EVENT_TYPE, {
                      detail: {
                        assessment,
                      } as PinAssessmentEventPayload,
                    })
                  )
                  onPin?.()
                }}
              />
            </Tooltip>
          )
        }
        className={cx(
          css`
+2 −1
Original line number Diff line number Diff line
@@ -1029,6 +1029,7 @@
    "personaSubtitle": "Definuje roli a chování AI během posouzení",
    "assessmentTitle": "Rubrika posouzení",
    "assessmentSubtitle": "Definuje kritéria a standardy pro hodnocení e-mailu",
    "resultTitle": "Výsledek posouzení AI"
    "resultTitle": "Výsledek posouzení AI",
    "assessmentPinTooltip": "Tím se v aplikaci připne hodnocení AI."
  }
}
+2 −1
Original line number Diff line number Diff line
@@ -1029,6 +1029,7 @@
    "personaSubtitle": "Defines the role and behavior of the AI during the assessment",
    "assessmentTitle": "Assessment Rubric",
    "assessmentSubtitle": "Defines the criteria and standards for evaluating the email",
    "resultTitle": "AI Assessment Result"
    "resultTitle": "AI Assessment Result",
    "assessmentPinTooltip": "This will pin the AI assesment in the application"
  }
}