Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions src/components/CallItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ export default class CallItem extends Component {
this.setState({
selected,
});
if (this.props.call.activityMatches.length > 0) {
if (
this.props.call.activityMatches.length > 0 &&
this.props.autoLog
) {
this.logCall({ redirect: false, selected });
}
}
Expand Down Expand Up @@ -215,13 +218,13 @@ export default class CallItem extends Component {
const {
call: {
direction,
telephonyStatus,
result,
startTime,
duration,
activityMatches,
// webphoneSession,
},
telephonyStatus,
result,
startTime,
duration,
activityMatches,
// webphoneSession,
},
currentLocale,
areaCode,
countryCode,
Expand Down Expand Up @@ -329,7 +332,7 @@ export default class CallItem extends Component {
countryCode={countryCode}
phoneNumber={phoneNumber}
currentLocale={currentLocale}
/>
/>
<div className={styles.details} >
{durationEl} | {dateEl}{statusEl}
</div>
Expand All @@ -342,8 +345,8 @@ export default class CallItem extends Component {
onClickToDial={onClickToDial && this.clickToDial}
onClickToSms={
showClickToSms ?
() => this.clickToSms({ countryCode, areaCode })
: undefined
() => this.clickToSms({ countryCode, areaCode })
: undefined
}
phoneNumber={phoneNumber}
disableLinks={disableLinks}
Expand Down Expand Up @@ -398,6 +401,7 @@ CallItem.propTypes = {
// webphoneHangup: PropTypes.func,
// webphoneResume: PropTypes.func,
enableContactFallback: PropTypes.bool,
autoLog: PropTypes.bool,
};

CallItem.defaultProps = {
Expand All @@ -417,4 +421,5 @@ CallItem.defaultProps = {
// webphoneHangup: () => null,
// webphoneResume: () => null,
enableContactFallback: undefined,
autoLog: false,
};
4 changes: 4 additions & 0 deletions src/components/CallList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function CallList({
webphoneHangup,
webphoneResume,
enableContactFallback,
autoLog,
}) {
if (calls && calls.length) {
return (
Expand Down Expand Up @@ -68,6 +69,7 @@ function CallList({
webphoneHangup={webphoneHangup}
webphoneResume={webphoneResume}
enableContactFallback={enableContactFallback}
autoLog={autoLog}
/>
))}
</div>
Expand Down Expand Up @@ -104,6 +106,7 @@ CallList.propTypes = {
webphoneHangup: PropTypes.func,
webphoneResume: PropTypes.func,
enableContactFallback: PropTypes.bool,
autoLog: PropTypes.bool,
};
CallList.defaultProps = {
className: null,
Expand All @@ -124,6 +127,7 @@ CallList.defaultProps = {
webphoneHangup: undefined,
webphoneResume: undefined,
enableContactFallback: undefined,
autoLog: false,
};

export default CallList;
4 changes: 4 additions & 0 deletions src/components/CallsPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default function CallsPanel({
webphoneHangup,
webphoneResume,
enableContactFallback,
autoLog,
}) {
const content = showSpinner ?
<SpinnerOverlay /> :
Expand Down Expand Up @@ -61,6 +62,7 @@ export default function CallsPanel({
webphoneHangup={webphoneHangup}
webphoneResume={webphoneResume}
enableContactFallback={enableContactFallback}
autoLog={autoLog}
/>
);
return (
Expand Down Expand Up @@ -100,6 +102,7 @@ CallsPanel.propTypes = {
webphoneHangup: PropTypes.func,
webphoneResume: PropTypes.func,
enableContactFallback: PropTypes.bool,
autoLog: PropTypes.bool,
};

CallsPanel.defaultProps = {
Expand All @@ -121,4 +124,5 @@ CallsPanel.defaultProps = {
webphoneHangup: undefined,
webphoneResume: undefined,
enableContactFallback: undefined,
autoLog: false,
};
1 change: 0 additions & 1 deletion src/components/MessageList/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { Component, PropTypes } from 'react';
import classnames from 'classnames';
import SearchInput from '../SearchInput';
import Panel from '../Panel';
import MessageItem from '../MessageItem';
import styles from './styles.scss';
import i18n from './i18n';
Expand Down
1 change: 1 addition & 0 deletions src/containers/CallHistoryPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function mapToProps(_, {
(!composeText || composeText.ready) &&
(!callLogger || callLogger.ready)
),
autoLog: callLogger.autoLog,
};
}
function mapToFunctions(_, {
Expand Down
1 change: 1 addition & 0 deletions src/containers/CallMonitorPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function mapToProps(_, {
(!rolesAndPermissions || rolesAndPermissions.ready) &&
(!composeText || composeText.ready)
),
autoLog: callLogger.autoLog,
};
}
function mapToFunctions(_, {
Expand Down