11import { TFunction } from 'react-i18next' ;
2- import { theme } from 'src/app/theme' ;
2+ import { SM } from '@appquality/unguess-design-system' ;
3+ import { theme as globalTheme } from 'src/app/theme' ;
34import { Pill } from 'src/common/components/pills/Pill' ;
45import { SeverityPill } from 'src/common/components/pills/SeverityPill' ;
56import { Pipe } from 'src/common/components/Pipe' ;
67import { getSelectedBugId } from 'src/features/bugsPage/bugsPageSlice' ;
7- import { TableBugType } from '../../types ' ;
8+ import styled from 'styled-components ' ;
89import { BugTitle } from '../components/BugTitle' ;
10+ import { TableBugType } from '../../types' ;
11+ import { ReactComponent as FatherIcon } from '../assets/father-icon.svg' ;
12+
13+ const DuplicateContainer = styled ( ( props ) => < SM isBold { ...props } /> ) `
14+ display: flex;
15+ align-items: center;
16+ justify-content: center;
17+ gap: ${ ( { theme } ) => theme . space . xxs } ;
18+ line-height: ${ ( { theme } ) => theme . lineHeights . md } ;
19+ ` ;
920
1021export const mapBugsToTableData = ( bugs : TableBugType [ ] , t : TFunction ) => {
1122 const currentBugId = getSelectedBugId ( ) ;
@@ -15,8 +26,17 @@ export const mapBugsToTableData = (bugs: TableBugType[], t: TFunction) => {
1526 return {
1627 key : bug . id . toString ( ) ,
1728 id : bug . id . toString ( ) ,
29+ siblings :
30+ bug . siblings > 0 ? (
31+ < DuplicateContainer >
32+ { ! bug . duplicated_of_id ? (
33+ < FatherIcon style = { { color : globalTheme . palette . grey [ 500 ] } } />
34+ ) : null }
35+ +{ bug . siblings }
36+ </ DuplicateContainer >
37+ ) : null ,
1838 bugId : (
19- < span style = { { color : theme . palette . grey [ 700 ] } } >
39+ < span style = { { color : globalTheme . palette . grey [ 700 ] } } >
2040 { bug . id . toString ( ) }
2141 </ span >
2242 ) ,
@@ -37,7 +57,10 @@ export const mapBugsToTableData = (bugs: TableBugType[], t: TFunction) => {
3757 { bug . type . name && (
3858 < >
3959 < Pipe size = "small" />
40- < Pill isBold = { isPillBold } style = { { marginLeft : theme . space . xs } } >
60+ < Pill
61+ isBold = { isPillBold }
62+ style = { { marginLeft : globalTheme . space . xs } }
63+ >
4164 { bug . type . name }
4265 </ Pill >
4366 </ >
@@ -48,7 +71,7 @@ export const mapBugsToTableData = (bugs: TableBugType[], t: TFunction) => {
4871 < Pill
4972 isBold
5073 backgroundColor = "transparent"
51- color = { theme . palette . blue [ 600 ] }
74+ color = { globalTheme . palette . blue [ 600 ] }
5275 >
5376 { t ( '__PAGE_BUGS_UNREAD_PILL' , 'Unread' ) }
5477 </ Pill >
@@ -60,7 +83,9 @@ export const mapBugsToTableData = (bugs: TableBugType[], t: TFunction) => {
6083 created : bug . created ,
6184 updated : bug . updated ,
6285 borderColor :
63- theme . colors . bySeverity [ bug . severity . name . toLowerCase ( ) as Severities ] ,
86+ globalTheme . colors . bySeverity [
87+ bug . severity . name . toLowerCase ( ) as Severities
88+ ] ,
6489 } ;
6590 } ) ;
6691} ;
0 commit comments