Skip to content

Commit

Permalink
fix(Component): Add missing additional roles for component detail
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangnt2 committed Sep 28, 2023
1 parent d0a60d4 commit b92cb79
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,27 @@ const SummaryRole = ({ component }: { component: Component }) => {
</tr>
<tr>
<td>{t('Additional Roles')}:</td>
<td></td>
<td>
{component.roles &&
Object.keys(component.roles).map((key) => (
<li key={key}>
<span className='mapDisplayChildItemLeft' style={{ fontWeight: 'bold' }}>
{key}:{' '}
</span>
<span className='mapDisplayChildItemRight'>
{component.roles[key]
.map(
(email: string): React.ReactNode => (
<a key={email} href={`mailto:${email}`}>
{email}
</a>
)
)
.reduce((prev, curr): React.ReactNode[] => [prev, ', ', curr])}
</span>
</li>
))}
</td>
</tr>
</tbody>
</table>
Expand Down
1 change: 1 addition & 0 deletions src/object-types/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default interface Component {
blog?: string
modifiedOn?: string
modifiedBy?: string
roles?: { [k: string]: Array<string> }
setBusinessUnit?: boolean
setVisbility?: boolean
_links?: {
Expand Down

0 comments on commit b92cb79

Please sign in to comment.