Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:erxes/erxes into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Wlkr123 committed Mar 29, 2023
2 parents c35ef97 + 0f96bcf commit f4cce7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CustomerDetails extends React.Component<Props> {
<MailForm
fromEmail={customer.primaryEmail}
refetchQueries={['activityLogsCustomer']}
source={isEnabled('imap') ? 'inbox' : undefined}
closeModal={props.closeModal}
/>
</MailBox>
Expand Down Expand Up @@ -121,7 +122,7 @@ class CustomerDetails extends React.Component<Props> {
contentType="contacts:customer"
extraTabs={[
{ name: 'inbox:conversation', label: 'Conversation' },
{ name: 'email', label: 'Email' },
{ name: 'imap:email', label: 'Email' },
{ name: 'cards:task', label: 'Task' },
// { name: 'sms', label: 'SMS' },
{ name: 'engages:campaign', label: 'Campaign' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Alert, __, confirm } from '@erxes/ui/src/utils';
import { Box, MailBox, States } from '../../styles';
import { Box, States } from '../../styles';

import { Actions } from '@erxes/ui/src/styles/main';
import Button from '@erxes/ui/src/components/Button';
Expand All @@ -13,7 +13,6 @@ import DropdownToggle from '@erxes/ui/src/components/DropdownToggle';
import { ICompany } from '@erxes/ui-contacts/src/companies/types';
import { ICustomer } from '../../types';
import Icon from '@erxes/ui/src/components/Icon';
import MailForm from '@erxes/ui-inbox/src/settings/integrations/containers/mail/MailForm';
import ModalTrigger from '@erxes/ui/src/components/ModalTrigger';
import React from 'react';
import SmsForm from '@erxes/ui-inbox/src/settings/integrations/containers/telnyx/SmsForm';
Expand Down Expand Up @@ -42,44 +41,10 @@ class ActionSection extends React.Component<Props, { customerState: string }> {
const { coc, cocType } = this.props;
const { primaryPhone, primaryEmail } = coc;

const content = props => (
<MailBox>
<MailForm
fromEmail={primaryEmail}
customerId={cocType === 'customer' ? coc._id : undefined}
refetchQueries={
cocType === 'customer'
? ['activityLogsCustomer']
: ['activityLogsCompany']
}
closeModal={props.closeModal}
/>
</MailBox>
);

const smsForm = props => <SmsForm {...props} primaryPhone={primaryPhone} />;

return (
<>
<ModalTrigger
dialogClassName="middle"
title="Email"
trigger={
<Button
disabled={primaryEmail ? false : true}
size="small"
btnStyle={primaryEmail ? 'primary' : 'simple'}
>
<Tip text="Send e-mail" placement="top-end">
<Icon icon="envelope" />
</Tip>
</Button>
}
size="lg"
content={content}
paddingContent="less-padding"
enforceFocus={false}
/>
<ModalTrigger
dialogClassName="middle"
title={`Send SMS to (${primaryPhone})`}
Expand Down

0 comments on commit f4cce7f

Please sign in to comment.