Skip to content

Commit 9d945ef

Browse files
Merge pull request #1052 from topcoder-platform/PM-590-fixes
PM-589 Improve skills UI
2 parents d9d34af + a34c0bd commit 9d945ef

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx

+23-9
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,29 @@ const tableColumns: TableColumn<CopilotOpportunity>[] = [
4242
isSortable: false,
4343
label: 'Skills Required',
4444
propertyName: 'skills',
45-
renderer: (copilotOpportunity: CopilotOpportunity) => (
46-
<div className={styles.skillsContainer}>
47-
{copilotOpportunity.skills.map((skill: any) => (
48-
<div key={skill.id} className={styles.skillPill}>
49-
{skill.name}
50-
</div>
51-
))}
52-
</div>
53-
),
45+
renderer: (copilotOpportunity: CopilotOpportunity) => {
46+
const visibleSkills = copilotOpportunity.skills.slice(0, 3)
47+
const remainingSkills = copilotOpportunity.skills.slice(3)
48+
return (
49+
<div className={styles.skillsContainer}>
50+
{visibleSkills.map((skill: { id: string | number; name: string }) => (
51+
<div key={skill.id} className={styles.skillPill}>
52+
{skill.name}
53+
</div>
54+
))}
55+
{remainingSkills.length > 0 && (
56+
<div
57+
className={styles.skillPill}
58+
title={remainingSkills.map(skill => skill.name)
59+
.join(', ')}
60+
>
61+
+
62+
{remainingSkills.length}
63+
</div>
64+
)}
65+
</div>
66+
)
67+
},
5468
type: 'element',
5569
},
5670
{

src/apps/copilots/src/pages/copilot-opportunity-list/styles.module.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
}
99

1010
.skillPill {
11-
background-color: #aaaaaa;
11+
background-color: #d6d6d6;
1212
color: #333;
1313
padding: 4px 8px;
1414
border-radius: 10px;
1515
white-space: break-spaces;
16-
font-size: 14px;
16+
font-size: 11px;
1717
}
1818

1919
.status {

0 commit comments

Comments
 (0)