File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
src/client/src/pages/DataView360/components Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,19 @@ const StyledContact = withStyles((theme)=>({
16
16
17
17
class ContactInfo extends Component {
18
18
render ( ) {
19
- const participantArray = _ . get ( this . props , "participant" )
20
- const participant = participantArray [ 0 ]
19
+ // TODO: move to the backend
20
+ let participantArray = _ . get ( this . props , "participant" ) ;
21
+ let participant = { } ;
22
+ if ( participantArray . length === 1 ) {
23
+ participant = participantArray [ 0 ] ;
24
+ } else {
25
+ participantArray = _ . filter ( participantArray , function ( p ) {
26
+ if ( p [ "source_type" ] === "salesforcecontacts" ) {
27
+ return p ;
28
+ }
29
+ } ) ;
30
+ participant = participantArray [ 0 ] ;
31
+ }
21
32
const phoneStr = participant . mobile ;
22
33
let phone = _ . isEmpty ( phoneStr ) ? '-' : phoneStr . split ( " " ) . join ( "" ) ;
23
34
return ( < Container className = { styles . contact_info } >
You can’t perform that action at this time.
0 commit comments