Skip to content

Commit e599078

Browse files
committed
ContactInfo now pulls street address from salesforcecontacts instead of volgistics
1 parent 7a501aa commit e599078

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/client/src/pages/DataView360/components/ContactInfo.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,19 @@ const StyledContact = withStyles((theme)=>({
1616

1717
class ContactInfo extends Component {
1818
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+
}
2132
const phoneStr = participant.mobile;
2233
let phone = _.isEmpty(phoneStr) ? '-' : phoneStr.split(" ").join("");
2334
return (<Container className={styles.contact_info}>

0 commit comments

Comments
 (0)