mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-27 02:36:06 +08:00
96ead235ff
Summary: associating salesforce contacts and leads with Nylas contacts adding fetcher form salesforce shows conencted leads and contacts auto associates acount fixing salesforce forms Salesforce composers are styled fix opportunity association with account on object creation fix specs Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://review.inboxapp.com/D1507
48 lines
1.3 KiB
CoffeeScript
48 lines
1.3 KiB
CoffeeScript
_ = require 'underscore-plus'
|
|
React = require "react"
|
|
FullContactStore = require "./fullcontact-store"
|
|
|
|
{InjectedComponentSet} = require 'ui-components'
|
|
|
|
SidebarFullContactDetails = require "./sidebar-fullcontact-details"
|
|
|
|
class SidebarFullContact extends React.Component
|
|
@displayName: "SidebarFullContact"
|
|
@containerStyles:
|
|
order: 1
|
|
maxWidth: 300
|
|
minWidth: 200
|
|
flexShrink: 0
|
|
|
|
constructor: (@props) ->
|
|
@state = @_getStateFromStores()
|
|
|
|
componentDidMount: =>
|
|
@unsubscribe = FullContactStore.listen @_onChange
|
|
|
|
componentWillUnmount: =>
|
|
@unsubscribe()
|
|
|
|
render: =>
|
|
<div className="full-contact-sidebar">
|
|
<SidebarFullContactDetails contact={@state.focusedContact ? {}}
|
|
fullContact={@_fullContact()}/>
|
|
<InjectedComponentSet matching={role: "sidebar:focusedContactInfo"}
|
|
exposedProps={focusedContact: @state.focusedContact}/>
|
|
</div>
|
|
|
|
_fullContact: =>
|
|
if @state.focusedContact?.thirdPartyData
|
|
return @state.focusedContact?.thirdPartyData["FullContact"] ? {}
|
|
else
|
|
return {}
|
|
|
|
_onChange: =>
|
|
@setState(@_getStateFromStores())
|
|
|
|
_getStateFromStores: =>
|
|
focusedContact: FullContactStore.focusedContact()
|
|
|
|
|
|
module.exports = SidebarFullContact
|