diff --git a/client/src/components/Profile/LegacyScreeningFeedback.tsx b/client/src/components/Profile/LegacyScreeningFeedback.tsx new file mode 100644 index 0000000000..e9ddcc9414 --- /dev/null +++ b/client/src/components/Profile/LegacyScreeningFeedback.tsx @@ -0,0 +1,82 @@ +import * as React from 'react'; +import { Tag, Typography, Table } from 'antd'; +import { Rating } from 'components/Rating'; +import { LegacyFeedback } from 'common/models/profile'; +import { ENGLISH_LEVELS } from 'data/english'; +import { CODING_LEVELS, SKILLS_LEVELS } from 'data/interviews/technical-screening'; + +const { Text } = Typography; + +enum SKILL_NAME { + htmlCss = 'HTML/CSS', + dataStructures = 'Data structures', + common = 'Common of CS / Programming', +} + +/** + * this feedback template will live here until we will migrate all feedbacks to new template + */ +export function LegacyScreeningFeedback({ feedback }: { feedback: LegacyFeedback }) { + const { comment, skills, programmingTask, english } = feedback; + + const skillSet = [ + ...(Object.keys(skills) as any[]).map((key: keyof typeof skills) => ({ + rating: skills[key], + name: SKILL_NAME[key], + key, + isNotCodeWritingLevel: true, + })), + { + rating: programmingTask.codeWritingLevel, + name: 'Code writing level', + key: 'codeWritingLevel', + isNotCodeWritingLevel: false, + }, + ]; + const englishLevel = typeof english === 'number' ? ENGLISH_LEVELS[english] : english; + + return ( + <> + {comment && ( +
+
+ Programming task(s):
+ Has the student solved the task(s)?{' '}
+ {programmingTask.resolved === 1 ? (
+
Comments about coding level: {programmingTask.comment}
+Estimated English level: {englishLevel?.toString().toUpperCase()}
+