Skip to content

Commit

Permalink
fix(dop): issue detail complexity add icon (#2270)
Browse files Browse the repository at this point in the history
  • Loading branch information
hujiahao-hjh authored Dec 13, 2021
1 parent 1c59a1c commit b7b61c3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ const priorityOptions = map(ISSUE_PRIORITY_LIST, ({ iconLabel, value }) => (
{iconLabel}
</Option>
));
const complexityOptions = map(ISSUE_COMPLEXITY_MAP, ({ label, value }) => (
const complexityOptions = map(ISSUE_COMPLEXITY_MAP, ({ iconLabel, value }) => (
<Option key={value} value={value}>
{label}
{iconLabel}
</Option>
));
const severityOptions = map(BUG_SEVERITY_MAP, ({ iconLabel, value }) => (
Expand Down
39 changes: 36 additions & 3 deletions shell/app/modules/project/common/components/issue/issue-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,45 @@ export const ISSUE_ICON = {
DUP: <CustomIcon type="zs" className="issue-icon state zs" />,
CLOSED: <CustomIcon type="tg" className="issue-icon state tg" />,
},
complexity: {
// 复杂度
EASY: <ErdaIcon type="rongyi" size="20px" className="mr-1" />,
NORMAL: <ErdaIcon type="zhongdengnandu" size="20px" className="mr-1" />,
HARD: <ErdaIcon type="nan" size="20px" className="mr-1" />,
},
};

export const ISSUE_COMPLEXITY_MAP = {
HARD: { value: 'HARD', label: i18n.t('dop:complex') },
NORMAL: { value: 'NORMAL', label: i18n.t('medium') },
EASY: { value: 'EASY', label: i18n.t('dop:easy') },
HARD: {
value: 'HARD',
label: i18n.t('dop:complex'),
iconLabel: (
<div className="flex items-center">
{ISSUE_ICON.complexity.HARD}
{i18n.t('dop:complex')}
</div>
),
},
NORMAL: {
value: 'NORMAL',
label: i18n.t('medium'),
iconLabel: (
<div className="flex items-center">
{ISSUE_ICON.complexity.NORMAL}
{i18n.t('medium')}
</div>
),
},
EASY: {
value: 'EASY',
label: i18n.t('dop:easy'),
iconLabel: (
<div className="flex items-center">
{ISSUE_ICON.complexity.EASY}
{i18n.t('dop:easy')}
</div>
),
},
};

export const BUG_SEVERITY_MAP = {
Expand Down

0 comments on commit b7b61c3

Please sign in to comment.