message channel change 2 (#15269)

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
neo773
2025-10-24 20:09:22 +05:30
committed by GitHub
parent a937090b5f
commit e37b8b61ba
13 changed files with 309 additions and 50 deletions
@@ -21,6 +21,9 @@ export const isMatchingSelectFilter = ({
case selectFilter.eq !== undefined: {
return value === selectFilter.eq;
}
case selectFilter.neq !== undefined: {
return value !== selectFilter.neq;
}
default: {
throw new Error(
`Unexpected value for select filter : ${JSON.stringify(selectFilter)}`,
@@ -101,16 +101,33 @@ export const SettingsAccountsMessageChannelDetails = ({
return (
<StyledDetailsContainer>
{isFolderControlEnabled && messageChannel.messageFolders && (
<Section>
<H2Title
title={t`Import`}
description={t`Emails from the blocklist will be ignored. Manage blocklist on the “Accounts” setting page.`}
/>
<SettingsAccountsMessageFolderCard
onChange={handleMessageFolderImportPolicyChange}
value={messageChannel.messageFolderImportPolicy}
/>
</Section>
<>
<Section>
<H2Title
title={t`Import`}
description={t`Emails from the blocklist will be ignored. Manage blocklist on the “Accounts” setting page.`}
/>
<SettingsAccountsMessageFolderCard
onChange={handleMessageFolderImportPolicyChange}
value={messageChannel.messageFolderImportPolicy}
/>
</Section>
<Section>
<Card rounded>
<SettingsOptionCardContentToggle
Icon={IconUsers}
title={t`Exclude group emails`}
description={t`Don't sync emails from team@ support@ noreply@...`}
checked={messageChannel.excludeGroupEmails}
onChange={() =>
handleIsGroupEmailExcludedToggle(
!messageChannel.excludeGroupEmails,
)
}
/>
</Card>
</Section>
</>
)}
<Section>
<H2Title
@@ -137,8 +154,7 @@ export const SettingsAccountsMessageChannelDetails = ({
<SettingsOptionCardContentToggle
Icon={IconBriefcase}
title={t`Exclude non-professional emails`}
description={t`Dont create contacts from/to Gmail, Outlook emails`}
divider
description={t`Don't create contacts from/to Gmail, Outlook emails`}
checked={messageChannel.excludeNonProfessionalEmails}
onChange={() => {
handleIsNonProfessionalEmailExcludedToggle(
@@ -146,17 +162,6 @@ export const SettingsAccountsMessageChannelDetails = ({
);
}}
/>
<SettingsOptionCardContentToggle
Icon={IconUsers}
title={t`Exclude group emails`}
description={t`Dont sync emails from team@ support@ noreply@...`}
checked={messageChannel.excludeGroupEmails}
onChange={() =>
handleIsGroupEmailExcludedToggle(
!messageChannel.excludeGroupEmails,
)
}
/>
</Card>
</Section>
</StyledDetailsContainer>