Skip to content

Commit 04d3ec6

Browse files
committed
improvement: add link to update skills when they do not match a task
1 parent d5cf9b9 commit 04d3ec6

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/pages/TranslationDetails/TaskStatusDetails/byStatus/Created/CreatedForOther.jsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import React from 'react';
2+
import styled from 'styled-components';
3+
import { Link } from 'react-router-dom';
24
import { Tooltip } from 'antd';
35
import Spacer from '~/shared/Spacer';
46
import { useShallowEqualSelector } from '~/adapters/react-redux';
7+
import * as r from '~/app/routes';
58
import { selectAllSkills } from '~/features/translator/translatorSlice';
69
import ContentBlocker from '~/shared/ContentBlocker';
10+
import Button from '~/shared/Button';
711
import TaskStatusDetailsLayout from '../../components/TaskStatusDetailsLayout';
812
import ContextAwareTaskInteractionButton from '../../components/ContextAwareTaskInteractionButton';
913
import TaskDeadline from '../../components/TaskDeadline';
@@ -50,7 +54,21 @@ export default function CreatedForOther() {
5054
};
5155

5256
return (
53-
<Tooltip title={!hasSkill ? "You don't have the required skills for this task" : ''}>
57+
<Tooltip
58+
title={
59+
!hasSkill ? (
60+
<>
61+
You don&rsquo;t have the required skills for this task.{' '}
62+
<Link to={r.TRANSLATOR_SETTINGS} component={StyledTooltipButtonLink} variant="link">
63+
Update your skills
64+
</Link>
65+
.
66+
</>
67+
) : (
68+
''
69+
)
70+
}
71+
>
5472
<div>
5573
<ContentBlocker blocked={!hasSkill} contentBlur={0}>
5674
<TaskStatusDetailsLayout {...props} />
@@ -65,3 +83,7 @@ const minimumLevelByQuality = {
6583
standard: 'C1',
6684
professional: 'C2',
6785
};
86+
87+
const StyledTooltipButtonLink = styled(Button)`
88+
color: ${p => p.theme.color.text.inverted};
89+
`;

0 commit comments

Comments
 (0)