Feat/email composer improvements (#23188)
- Move composer to dedicated page - Add test email option - Auto saved as draft can be revisited from `objects/messageCampaigns` later - Campaign stats component https://github.com/user-attachments/assets/9e523116-e79b-496d-9c9d-3887e0c9213f <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/23188?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
+174
@@ -0,0 +1,174 @@
|
||||
import { type QueryRunner } from 'typeorm';
|
||||
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
import { MessageSuppressionReason } from 'src/engine/core-modules/emailing-domain/types/message-suppression-reason.type';
|
||||
import { MessageSuppressionSource } from 'src/engine/core-modules/emailing-domain/types/message-suppression-source.type';
|
||||
import {
|
||||
getSeededUnsubscribeTopicIds,
|
||||
type SeededUnsubscribeTopicName,
|
||||
} from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-unsubscribe-topics.util';
|
||||
|
||||
const tableName = 'messageSuppression';
|
||||
|
||||
type MessageSuppressionSeed = {
|
||||
emailAddress: string;
|
||||
reason: MessageSuppressionReason;
|
||||
source: MessageSuppressionSource;
|
||||
providerEventId: string | null;
|
||||
topicSeedName: SeededUnsubscribeTopicName | null;
|
||||
};
|
||||
|
||||
// Addresses are taken from the seeded people so the unsubscribers list lines up
|
||||
// with records that exist in the workspace.
|
||||
const MESSAGE_SUPPRESSION_SEEDS: MessageSuppressionSeed[] = [
|
||||
{
|
||||
emailAddress: 'mark.young@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'gabriel.robinson@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'kimberly.gordon@example.com',
|
||||
reason: MessageSuppressionReason.BOUNCE,
|
||||
source: MessageSuppressionSource.WEBHOOK,
|
||||
providerEventId: 'seed-bounce-event-1',
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'cindy.baker@example.com',
|
||||
reason: MessageSuppressionReason.BOUNCE,
|
||||
source: MessageSuppressionSource.WEBHOOK,
|
||||
providerEventId: 'seed-bounce-event-2',
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'anthony.may@example.com',
|
||||
reason: MessageSuppressionReason.COMPLAINT,
|
||||
source: MessageSuppressionSource.WEBHOOK,
|
||||
providerEventId: 'seed-complaint-event-1',
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'vicki.meyer@example.com',
|
||||
reason: MessageSuppressionReason.COMPLAINT,
|
||||
source: MessageSuppressionSource.WEBHOOK,
|
||||
providerEventId: 'seed-complaint-event-2',
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'billy.mckinney@example.com',
|
||||
reason: MessageSuppressionReason.BOUNCE,
|
||||
source: MessageSuppressionSource.WEBHOOK,
|
||||
providerEventId: 'seed-bounce-event-3',
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'andrew.king@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: null,
|
||||
},
|
||||
{
|
||||
emailAddress: 'todd.jones@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: 'unsubscribe-topic-product-updates',
|
||||
},
|
||||
{
|
||||
emailAddress: 'gregory.perez@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: 'unsubscribe-topic-product-updates',
|
||||
},
|
||||
{
|
||||
emailAddress: 'vanessa.farmer@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: 'unsubscribe-topic-newsletter',
|
||||
},
|
||||
{
|
||||
emailAddress: 'elizabeth.chung@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: 'unsubscribe-topic-newsletter',
|
||||
},
|
||||
{
|
||||
emailAddress: 'melissa.huerta@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: 'unsubscribe-topic-events',
|
||||
},
|
||||
{
|
||||
emailAddress: 'debbie.johnson@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: 'unsubscribe-topic-events',
|
||||
},
|
||||
// Also globally suppressed above, to cover an address that opted out of a
|
||||
// single topic before unsubscribing from everything.
|
||||
{
|
||||
emailAddress: 'mark.young@example.com',
|
||||
reason: MessageSuppressionReason.UNSUBSCRIBE,
|
||||
source: MessageSuppressionSource.SYSTEM,
|
||||
providerEventId: null,
|
||||
topicSeedName: 'unsubscribe-topic-newsletter',
|
||||
},
|
||||
];
|
||||
|
||||
type SeedMessageSuppressionsArgs = {
|
||||
queryRunner: QueryRunner;
|
||||
schemaName: string;
|
||||
workspaceId: string;
|
||||
};
|
||||
|
||||
export const seedMessageSuppressions = async ({
|
||||
queryRunner,
|
||||
schemaName,
|
||||
workspaceId,
|
||||
}: SeedMessageSuppressionsArgs) => {
|
||||
const topicIds = getSeededUnsubscribeTopicIds(workspaceId);
|
||||
|
||||
await queryRunner.manager
|
||||
.createQueryBuilder()
|
||||
.insert()
|
||||
.into(`${schemaName}.${tableName}`, [
|
||||
'workspaceId',
|
||||
'emailAddress',
|
||||
'reason',
|
||||
'source',
|
||||
'providerEventId',
|
||||
'unsubscribeTopicId',
|
||||
])
|
||||
.orIgnore()
|
||||
.values(
|
||||
MESSAGE_SUPPRESSION_SEEDS.map(
|
||||
({ emailAddress, reason, source, providerEventId, topicSeedName }) => ({
|
||||
workspaceId,
|
||||
emailAddress,
|
||||
reason,
|
||||
source,
|
||||
providerEventId,
|
||||
unsubscribeTopicId: isDefined(topicSeedName)
|
||||
? topicIds[topicSeedName]
|
||||
: null,
|
||||
}),
|
||||
),
|
||||
)
|
||||
.execute();
|
||||
};
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
import { type QueryRunner } from 'typeorm';
|
||||
|
||||
import { UnsubscribeTopicVisibility } from 'src/engine/core-modules/emailing-domain/types/unsubscribe-topic-visibility.type';
|
||||
import { generateSeedId } from 'src/engine/workspace-manager/dev-seeder/core/utils/generate-seed-id.util';
|
||||
|
||||
const tableName = 'unsubscribeTopic';
|
||||
|
||||
const UNSUBSCRIBE_TOPIC_SEEDS = [
|
||||
{
|
||||
seedName: 'unsubscribe-topic-product-updates',
|
||||
name: 'Product updates',
|
||||
description: 'New features, improvements and release notes',
|
||||
visibility: UnsubscribeTopicVisibility.PUBLIC,
|
||||
},
|
||||
{
|
||||
seedName: 'unsubscribe-topic-newsletter',
|
||||
name: 'Monthly newsletter',
|
||||
description: 'A monthly digest of company news',
|
||||
visibility: UnsubscribeTopicVisibility.PUBLIC,
|
||||
},
|
||||
{
|
||||
seedName: 'unsubscribe-topic-events',
|
||||
name: 'Events and webinars',
|
||||
description: 'Invitations to live events and webinars',
|
||||
visibility: UnsubscribeTopicVisibility.PUBLIC,
|
||||
},
|
||||
] as const;
|
||||
|
||||
export type SeededUnsubscribeTopicName =
|
||||
(typeof UNSUBSCRIBE_TOPIC_SEEDS)[number]['seedName'];
|
||||
|
||||
export const getSeededUnsubscribeTopicIds = (
|
||||
workspaceId: string,
|
||||
): Record<SeededUnsubscribeTopicName, string> =>
|
||||
Object.fromEntries(
|
||||
UNSUBSCRIBE_TOPIC_SEEDS.map(({ seedName }) => [
|
||||
seedName,
|
||||
generateSeedId(workspaceId, seedName),
|
||||
]),
|
||||
) as Record<SeededUnsubscribeTopicName, string>;
|
||||
|
||||
type SeedUnsubscribeTopicsArgs = {
|
||||
queryRunner: QueryRunner;
|
||||
schemaName: string;
|
||||
workspaceId: string;
|
||||
};
|
||||
|
||||
export const seedUnsubscribeTopics = async ({
|
||||
queryRunner,
|
||||
schemaName,
|
||||
workspaceId,
|
||||
}: SeedUnsubscribeTopicsArgs) => {
|
||||
const topicIds = getSeededUnsubscribeTopicIds(workspaceId);
|
||||
|
||||
await queryRunner.manager
|
||||
.createQueryBuilder()
|
||||
.insert()
|
||||
.into(`${schemaName}.${tableName}`, [
|
||||
'id',
|
||||
'workspaceId',
|
||||
'name',
|
||||
'description',
|
||||
'visibility',
|
||||
])
|
||||
.orIgnore()
|
||||
.values(
|
||||
UNSUBSCRIBE_TOPIC_SEEDS.map(
|
||||
({ seedName, name, description, visibility }) => ({
|
||||
id: topicIds[seedName],
|
||||
workspaceId,
|
||||
name,
|
||||
description,
|
||||
visibility,
|
||||
}),
|
||||
),
|
||||
)
|
||||
.execute();
|
||||
};
|
||||
+4
@@ -30,10 +30,12 @@ import { seedAgents } from 'src/engine/workspace-manager/dev-seeder/core/utils/s
|
||||
import { seedApiKeys } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-api-keys.util';
|
||||
import { seedEmailingDomains } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-emailing-domains.util';
|
||||
import { seedFeatureFlags } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util';
|
||||
import { seedMessageSuppressions } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-message-suppressions.util';
|
||||
import { seedMetadataEntities } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-metadata-entities.util';
|
||||
import { seedPageLayouts } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-page-layouts.util';
|
||||
import { seedServerId } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-server-id.util';
|
||||
import { seedTwoFactorAuthenticationMethods } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-two-factor-authentication-methods.util';
|
||||
import { seedUnsubscribeTopics } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-unsubscribe-topics.util';
|
||||
import { seedUserWorkspaces } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-user-workspaces.util';
|
||||
import { seedUsers } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-users.util';
|
||||
import { createWorkspace } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-workspace.util';
|
||||
@@ -262,6 +264,8 @@ export class DevSeederService {
|
||||
) {
|
||||
await seedEmailingDomains({ queryRunner, schemaName, workspaceId });
|
||||
}
|
||||
await seedUnsubscribeTopics({ queryRunner, schemaName, workspaceId });
|
||||
await seedMessageSuppressions({ queryRunner, schemaName, workspaceId });
|
||||
await seedFeatureFlags({ queryRunner, schemaName, workspaceId });
|
||||
|
||||
if (seedBilling) {
|
||||
|
||||
+4
-1
@@ -18,7 +18,10 @@ export const SEARCH_FIELDS_BY_STANDARD_OBJECT_NAME = {
|
||||
],
|
||||
dashboard: [{ name: 'title', type: FieldMetadataType.TEXT }],
|
||||
message: [{ name: 'subject', type: FieldMetadataType.TEXT }],
|
||||
messageCampaign: [{ name: 'subject', type: FieldMetadataType.TEXT }],
|
||||
messageCampaign: [
|
||||
{ name: 'name', type: FieldMetadataType.TEXT },
|
||||
{ name: 'subject', type: FieldMetadataType.TEXT },
|
||||
],
|
||||
messageChannelMessageAssociation: [
|
||||
{ name: 'messageExternalId', type: FieldMetadataType.TEXT },
|
||||
],
|
||||
|
||||
+39
-7
@@ -13,7 +13,7 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
shortLabel: null,
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "RECORD_PAGE" and not isInSidePanel',
|
||||
'pageType == "RECORD_PAGE" and not isInSidePanel and objectMetadataItem.nameSingular != "messageCampaign"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.NAVIGATE_TO_NEXT_RECORD,
|
||||
@@ -29,7 +29,7 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
shortLabel: null,
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "RECORD_PAGE" and not isInSidePanel',
|
||||
'pageType == "RECORD_PAGE" and not isInSidePanel and objectMetadataItem.nameSingular != "messageCampaign"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.NAVIGATE_TO_PREVIOUS_RECORD,
|
||||
@@ -104,7 +104,7 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
shortLabel: null,
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression:
|
||||
'arrayLength(favoriteRecordIds) < numberOfSelectedRecords and noneDefined(selectedRecords, "deletedAt") and not hasAnySoftDeleteFilterOnView',
|
||||
'arrayLength(favoriteRecordIds) < numberOfSelectedRecords and noneDefined(selectedRecords, "deletedAt") and not hasAnySoftDeleteFilterOnView and objectMetadataItem.nameSingular != "messageCampaign"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.ADD_TO_FAVORITES,
|
||||
@@ -119,7 +119,7 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
shortLabel: null,
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression:
|
||||
'arrayLength(favoriteRecordIds) == numberOfSelectedRecords and noneDefined(selectedRecords, "deletedAt") and not hasAnySoftDeleteFilterOnView',
|
||||
'arrayLength(favoriteRecordIds) == numberOfSelectedRecords and noneDefined(selectedRecords, "deletedAt") and not hasAnySoftDeleteFilterOnView and objectMetadataItem.nameSingular != "messageCampaign"',
|
||||
availabilityObjectMetadataUniversalIdentifier: null,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.REMOVE_FROM_FAVORITES,
|
||||
@@ -725,11 +725,11 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
},
|
||||
composeCampaignPinned: {
|
||||
universalIdentifier: '7ad6f0c7-ac02-4062-b5cf-1f36e1664bc8',
|
||||
label: 'Compose Campaign',
|
||||
icon: 'IconSend',
|
||||
label: 'Create new Campaign',
|
||||
icon: 'IconPlus',
|
||||
isPinned: true,
|
||||
position: 67,
|
||||
shortLabel: 'Campaign',
|
||||
shortLabel: 'New Campaign',
|
||||
availabilityType: CommandMenuItemAvailabilityType.GLOBAL_OBJECT_CONTEXT,
|
||||
conditionalAvailabilityExpression:
|
||||
'pageType == "INDEX_PAGE" and featureFlags.IS_EMAIL_GROUP_ENABLED',
|
||||
@@ -739,6 +739,38 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
|
||||
engineComponentKey: EngineComponentKey.COMPOSE_CAMPAIGN,
|
||||
hotKeys: null,
|
||||
},
|
||||
sendMessageCampaign: {
|
||||
universalIdentifier: 'b08f4ccd-070b-460f-a4b6-6d0c14f1c44d',
|
||||
label: 'Send Campaign',
|
||||
icon: 'IconSend',
|
||||
isPinned: true,
|
||||
position: 68,
|
||||
shortLabel: 'Send',
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression:
|
||||
'numberOfSelectedRecords >= 1 and everyEquals(selectedRecords, "status", "DRAFT") and noneDefined(selectedRecords, "deletedAt")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.universalIdentifier,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEND_MESSAGE_CAMPAIGN,
|
||||
hotKeys: null,
|
||||
},
|
||||
sendMessageCampaignTest: {
|
||||
universalIdentifier: 'a6e6fd08-2c75-4d43-8795-1baafbac165e',
|
||||
label: 'Send Test Email',
|
||||
icon: 'IconMail',
|
||||
isPinned: true,
|
||||
position: 69,
|
||||
shortLabel: 'Test',
|
||||
availabilityType: CommandMenuItemAvailabilityType.RECORD_SELECTION,
|
||||
conditionalAvailabilityExpression:
|
||||
'numberOfSelectedRecords >= 1 and everyEquals(selectedRecords, "status", "DRAFT") and noneDefined(selectedRecords, "deletedAt")',
|
||||
availabilityObjectMetadataUniversalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.universalIdentifier,
|
||||
frontComponentUniversalIdentifier: null,
|
||||
engineComponentKey: EngineComponentKey.SEND_MESSAGE_CAMPAIGN_TEST,
|
||||
hotKeys: null,
|
||||
},
|
||||
goToSettings: {
|
||||
universalIdentifier: 'ef9aba44-0068-453e-930a-f8c182af18ee',
|
||||
label: 'Go to Settings',
|
||||
|
||||
+9
@@ -45,6 +45,14 @@ export const STANDARD_NAVIGATION_MENU_ITEMS = {
|
||||
STANDARD_OBJECTS.dashboard.views.allDashboards.universalIdentifier,
|
||||
position: 5,
|
||||
},
|
||||
allMessageCampaigns: {
|
||||
universalIdentifier: '20202020-b00b-4b0b-8b0b-c0aba11c000b',
|
||||
type: NavigationMenuItemType.OBJECT,
|
||||
viewUniversalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.views.allMessageCampaigns
|
||||
.universalIdentifier,
|
||||
position: 7,
|
||||
},
|
||||
workflowsFolder: {
|
||||
universalIdentifier: '20202020-b007-4b07-8b07-c0aba11c0007',
|
||||
type: NavigationMenuItemType.FOLDER,
|
||||
@@ -88,6 +96,7 @@ export const STANDARD_NAVIGATION_MENU_ITEM_DEFAULT_COLORS: Partial<
|
||||
allNotes: 'turquoise',
|
||||
allOpportunities: 'red',
|
||||
workflowsFolder: 'orange',
|
||||
allMessageCampaigns: 'gray',
|
||||
allDashboards: 'gray',
|
||||
workflowsFolderAllWorkflows: 'gray',
|
||||
workflowsFolderAllWorkflowRuns: 'gray',
|
||||
|
||||
+18
@@ -145,6 +145,12 @@ export const TAB_PROPS = {
|
||||
icon: 'IconSettings',
|
||||
layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,
|
||||
},
|
||||
composer: {
|
||||
title: 'Email',
|
||||
position: 15,
|
||||
icon: 'IconMail',
|
||||
layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,
|
||||
},
|
||||
flowSecondary: {
|
||||
title: 'Flow',
|
||||
position: 20,
|
||||
@@ -214,6 +220,18 @@ export const WIDGET_PROPS = {
|
||||
gridPosition: GRID_POSITIONS.FULL_WIDTH,
|
||||
position: VERTICAL_LIST_LAYOUT_POSITIONS.FIRST,
|
||||
},
|
||||
messageCampaign: {
|
||||
title: 'Email',
|
||||
type: WidgetType.MESSAGE_CAMPAIGN_BODY,
|
||||
gridPosition: GRID_POSITIONS.RICH_TEXT,
|
||||
position: VERTICAL_LIST_LAYOUT_POSITIONS.FIRST,
|
||||
},
|
||||
messageCampaignDetails: {
|
||||
title: 'Details',
|
||||
type: WidgetType.MESSAGE_CAMPAIGN_DETAILS,
|
||||
gridPosition: GRID_POSITIONS.FULL_WIDTH,
|
||||
position: VERTICAL_LIST_LAYOUT_POSITIONS.FIRST,
|
||||
},
|
||||
workflowVersion: {
|
||||
title: 'Flow',
|
||||
type: WidgetType.WORKFLOW_VERSION,
|
||||
|
||||
+1224
-1189
File diff suppressed because it is too large
Load Diff
+123
-115
@@ -183,18 +183,26 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
|
||||
"messageCampaignRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000055",
|
||||
"tabs": {
|
||||
"composer": {
|
||||
"id": "00000000-0000-0000-0000-000000000061",
|
||||
"widgets": {
|
||||
"messageCampaign": {
|
||||
"id": "00000000-0000-0000-0000-000000000062",
|
||||
},
|
||||
},
|
||||
},
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000056",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"details": {
|
||||
"id": "00000000-0000-0000-0000-000000000057",
|
||||
},
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000060",
|
||||
},
|
||||
"list": {
|
||||
"id": "00000000-0000-0000-0000-000000000058",
|
||||
},
|
||||
"messages": {
|
||||
"id": "00000000-0000-0000-0000-000000000060",
|
||||
},
|
||||
"recipients": {
|
||||
"id": "00000000-0000-0000-0000-000000000059",
|
||||
},
|
||||
@@ -203,92 +211,92 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
|
||||
},
|
||||
},
|
||||
"messageChannelMessageAssociationMessageFolderRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000066",
|
||||
"id": "00000000-0000-0000-0000-000000000068",
|
||||
"tabs": {
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000067",
|
||||
"id": "00000000-0000-0000-0000-000000000069",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000068",
|
||||
"id": "00000000-0000-0000-0000-000000000070",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000069",
|
||||
"id": "00000000-0000-0000-0000-000000000071",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000070",
|
||||
"id": "00000000-0000-0000-0000-000000000072",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"messageChannelMessageAssociationRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000061",
|
||||
"id": "00000000-0000-0000-0000-000000000063",
|
||||
"tabs": {
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000062",
|
||||
"id": "00000000-0000-0000-0000-000000000064",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000063",
|
||||
"id": "00000000-0000-0000-0000-000000000065",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000064",
|
||||
"id": "00000000-0000-0000-0000-000000000066",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000065",
|
||||
"id": "00000000-0000-0000-0000-000000000067",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"messageListRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000076",
|
||||
"id": "00000000-0000-0000-0000-000000000078",
|
||||
"tabs": {
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000077",
|
||||
"id": "00000000-0000-0000-0000-000000000079",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000078",
|
||||
"id": "00000000-0000-0000-0000-000000000080",
|
||||
},
|
||||
"members": {
|
||||
"id": "00000000-0000-0000-0000-000000000079",
|
||||
"id": "00000000-0000-0000-0000-000000000081",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"messageParticipantRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000071",
|
||||
"id": "00000000-0000-0000-0000-000000000073",
|
||||
"tabs": {
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000072",
|
||||
"id": "00000000-0000-0000-0000-000000000074",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000073",
|
||||
"id": "00000000-0000-0000-0000-000000000075",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000074",
|
||||
"id": "00000000-0000-0000-0000-000000000076",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000075",
|
||||
"id": "00000000-0000-0000-0000-000000000077",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"messageThreadRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000080",
|
||||
"id": "00000000-0000-0000-0000-000000000082",
|
||||
"tabs": {
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000081",
|
||||
"id": "00000000-0000-0000-0000-000000000083",
|
||||
"widgets": {
|
||||
"emailThread": {
|
||||
"id": "00000000-0000-0000-0000-000000000082",
|
||||
"id": "00000000-0000-0000-0000-000000000084",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -329,302 +337,302 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
|
||||
},
|
||||
},
|
||||
"noteRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000083",
|
||||
"id": "00000000-0000-0000-0000-000000000085",
|
||||
"tabs": {
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000091",
|
||||
"id": "00000000-0000-0000-0000-000000000093",
|
||||
"widgets": {
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000092",
|
||||
"id": "00000000-0000-0000-0000-000000000094",
|
||||
},
|
||||
},
|
||||
},
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000084",
|
||||
"id": "00000000-0000-0000-0000-000000000086",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000085",
|
||||
"id": "00000000-0000-0000-0000-000000000087",
|
||||
},
|
||||
"noteRichText": {
|
||||
"id": "00000000-0000-0000-0000-000000000086",
|
||||
},
|
||||
},
|
||||
},
|
||||
"note": {
|
||||
"id": "00000000-0000-0000-0000-000000000087",
|
||||
"widgets": {
|
||||
"noteRichText": {
|
||||
"id": "00000000-0000-0000-0000-000000000088",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"note": {
|
||||
"id": "00000000-0000-0000-0000-000000000089",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"noteRichText": {
|
||||
"id": "00000000-0000-0000-0000-000000000090",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000091",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000092",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"opportunityRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000093",
|
||||
"id": "00000000-0000-0000-0000-000000000095",
|
||||
"tabs": {
|
||||
"calendar": {
|
||||
"id": "00000000-0000-0000-0000-000000000109",
|
||||
"id": "00000000-0000-0000-0000-000000000111",
|
||||
"widgets": {
|
||||
"calendar": {
|
||||
"id": "00000000-0000-0000-0000-000000000110",
|
||||
"id": "00000000-0000-0000-0000-000000000112",
|
||||
},
|
||||
},
|
||||
},
|
||||
"emails": {
|
||||
"id": "00000000-0000-0000-0000-000000000107",
|
||||
"id": "00000000-0000-0000-0000-000000000109",
|
||||
"widgets": {
|
||||
"emails": {
|
||||
"id": "00000000-0000-0000-0000-000000000108",
|
||||
"id": "00000000-0000-0000-0000-000000000110",
|
||||
},
|
||||
},
|
||||
},
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000105",
|
||||
"id": "00000000-0000-0000-0000-000000000107",
|
||||
"widgets": {
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000106",
|
||||
"id": "00000000-0000-0000-0000-000000000108",
|
||||
},
|
||||
},
|
||||
},
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000094",
|
||||
"id": "00000000-0000-0000-0000-000000000096",
|
||||
"widgets": {
|
||||
"company": {
|
||||
"id": "00000000-0000-0000-0000-000000000097",
|
||||
"id": "00000000-0000-0000-0000-000000000099",
|
||||
},
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000095",
|
||||
"id": "00000000-0000-0000-0000-000000000097",
|
||||
},
|
||||
"owner": {
|
||||
"id": "00000000-0000-0000-0000-000000000098",
|
||||
"id": "00000000-0000-0000-0000-000000000100",
|
||||
},
|
||||
"pointOfContact": {
|
||||
"id": "00000000-0000-0000-0000-000000000096",
|
||||
"id": "00000000-0000-0000-0000-000000000098",
|
||||
},
|
||||
},
|
||||
},
|
||||
"notes": {
|
||||
"id": "00000000-0000-0000-0000-000000000103",
|
||||
"id": "00000000-0000-0000-0000-000000000105",
|
||||
"widgets": {
|
||||
"notes": {
|
||||
"id": "00000000-0000-0000-0000-000000000104",
|
||||
"id": "00000000-0000-0000-0000-000000000106",
|
||||
},
|
||||
},
|
||||
},
|
||||
"tasks": {
|
||||
"id": "00000000-0000-0000-0000-000000000101",
|
||||
"id": "00000000-0000-0000-0000-000000000103",
|
||||
"widgets": {
|
||||
"tasks": {
|
||||
"id": "00000000-0000-0000-0000-000000000102",
|
||||
"id": "00000000-0000-0000-0000-000000000104",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000099",
|
||||
"id": "00000000-0000-0000-0000-000000000101",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000100",
|
||||
"id": "00000000-0000-0000-0000-000000000102",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"personRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000111",
|
||||
"id": "00000000-0000-0000-0000-000000000113",
|
||||
"tabs": {
|
||||
"calendar": {
|
||||
"id": "00000000-0000-0000-0000-000000000127",
|
||||
"id": "00000000-0000-0000-0000-000000000129",
|
||||
"widgets": {
|
||||
"calendar": {
|
||||
"id": "00000000-0000-0000-0000-000000000128",
|
||||
"id": "00000000-0000-0000-0000-000000000130",
|
||||
},
|
||||
},
|
||||
},
|
||||
"emails": {
|
||||
"id": "00000000-0000-0000-0000-000000000125",
|
||||
"id": "00000000-0000-0000-0000-000000000127",
|
||||
"widgets": {
|
||||
"emails": {
|
||||
"id": "00000000-0000-0000-0000-000000000126",
|
||||
"id": "00000000-0000-0000-0000-000000000128",
|
||||
},
|
||||
},
|
||||
},
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000123",
|
||||
"id": "00000000-0000-0000-0000-000000000125",
|
||||
"widgets": {
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000124",
|
||||
"id": "00000000-0000-0000-0000-000000000126",
|
||||
},
|
||||
},
|
||||
},
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000112",
|
||||
"id": "00000000-0000-0000-0000-000000000114",
|
||||
"widgets": {
|
||||
"company": {
|
||||
"id": "00000000-0000-0000-0000-000000000114",
|
||||
},
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000113",
|
||||
},
|
||||
"listMemberships": {
|
||||
"id": "00000000-0000-0000-0000-000000000116",
|
||||
},
|
||||
"pointOfContactForOpportunities": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000115",
|
||||
},
|
||||
"listMemberships": {
|
||||
"id": "00000000-0000-0000-0000-000000000118",
|
||||
},
|
||||
"pointOfContactForOpportunities": {
|
||||
"id": "00000000-0000-0000-0000-000000000117",
|
||||
},
|
||||
},
|
||||
},
|
||||
"notes": {
|
||||
"id": "00000000-0000-0000-0000-000000000121",
|
||||
"id": "00000000-0000-0000-0000-000000000123",
|
||||
"widgets": {
|
||||
"notes": {
|
||||
"id": "00000000-0000-0000-0000-000000000122",
|
||||
"id": "00000000-0000-0000-0000-000000000124",
|
||||
},
|
||||
},
|
||||
},
|
||||
"tasks": {
|
||||
"id": "00000000-0000-0000-0000-000000000119",
|
||||
"id": "00000000-0000-0000-0000-000000000121",
|
||||
"widgets": {
|
||||
"tasks": {
|
||||
"id": "00000000-0000-0000-0000-000000000120",
|
||||
"id": "00000000-0000-0000-0000-000000000122",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000117",
|
||||
"id": "00000000-0000-0000-0000-000000000119",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000118",
|
||||
"id": "00000000-0000-0000-0000-000000000120",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"taskRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000129",
|
||||
"id": "00000000-0000-0000-0000-000000000131",
|
||||
"tabs": {
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000137",
|
||||
"id": "00000000-0000-0000-0000-000000000139",
|
||||
"widgets": {
|
||||
"files": {
|
||||
"id": "00000000-0000-0000-0000-000000000138",
|
||||
"id": "00000000-0000-0000-0000-000000000140",
|
||||
},
|
||||
},
|
||||
},
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000130",
|
||||
"id": "00000000-0000-0000-0000-000000000132",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000131",
|
||||
"id": "00000000-0000-0000-0000-000000000133",
|
||||
},
|
||||
"taskRichText": {
|
||||
"id": "00000000-0000-0000-0000-000000000132",
|
||||
},
|
||||
},
|
||||
},
|
||||
"note": {
|
||||
"id": "00000000-0000-0000-0000-000000000133",
|
||||
"widgets": {
|
||||
"taskRichText": {
|
||||
"id": "00000000-0000-0000-0000-000000000134",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"note": {
|
||||
"id": "00000000-0000-0000-0000-000000000135",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"taskRichText": {
|
||||
"id": "00000000-0000-0000-0000-000000000136",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000137",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000138",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"workflowAutomatedTriggerRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000142",
|
||||
"id": "00000000-0000-0000-0000-000000000144",
|
||||
"tabs": {
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000143",
|
||||
"id": "00000000-0000-0000-0000-000000000145",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000144",
|
||||
"id": "00000000-0000-0000-0000-000000000146",
|
||||
},
|
||||
},
|
||||
},
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000145",
|
||||
"id": "00000000-0000-0000-0000-000000000147",
|
||||
"widgets": {
|
||||
"timeline": {
|
||||
"id": "00000000-0000-0000-0000-000000000146",
|
||||
"id": "00000000-0000-0000-0000-000000000148",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"workflowRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000139",
|
||||
"id": "00000000-0000-0000-0000-000000000141",
|
||||
"tabs": {
|
||||
"flow": {
|
||||
"id": "00000000-0000-0000-0000-000000000140",
|
||||
"id": "00000000-0000-0000-0000-000000000142",
|
||||
"widgets": {
|
||||
"workflow": {
|
||||
"id": "00000000-0000-0000-0000-000000000141",
|
||||
"id": "00000000-0000-0000-0000-000000000143",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"workflowRunRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000153",
|
||||
"id": "00000000-0000-0000-0000-000000000155",
|
||||
"tabs": {
|
||||
"flow": {
|
||||
"id": "00000000-0000-0000-0000-000000000157",
|
||||
"id": "00000000-0000-0000-0000-000000000159",
|
||||
"widgets": {
|
||||
"workflowRun": {
|
||||
"id": "00000000-0000-0000-0000-000000000158",
|
||||
"id": "00000000-0000-0000-0000-000000000160",
|
||||
},
|
||||
},
|
||||
},
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000154",
|
||||
"id": "00000000-0000-0000-0000-000000000156",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000155",
|
||||
"id": "00000000-0000-0000-0000-000000000157",
|
||||
},
|
||||
"workflow": {
|
||||
"id": "00000000-0000-0000-0000-000000000156",
|
||||
"id": "00000000-0000-0000-0000-000000000158",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"workflowVersionRecordPage": {
|
||||
"id": "00000000-0000-0000-0000-000000000147",
|
||||
"id": "00000000-0000-0000-0000-000000000149",
|
||||
"tabs": {
|
||||
"flow": {
|
||||
"id": "00000000-0000-0000-0000-000000000151",
|
||||
"id": "00000000-0000-0000-0000-000000000153",
|
||||
"widgets": {
|
||||
"workflowVersion": {
|
||||
"id": "00000000-0000-0000-0000-000000000152",
|
||||
"id": "00000000-0000-0000-0000-000000000154",
|
||||
},
|
||||
},
|
||||
},
|
||||
"home": {
|
||||
"id": "00000000-0000-0000-0000-000000000148",
|
||||
"id": "00000000-0000-0000-0000-000000000150",
|
||||
"widgets": {
|
||||
"fields": {
|
||||
"id": "00000000-0000-0000-0000-000000000149",
|
||||
"id": "00000000-0000-0000-0000-000000000151",
|
||||
},
|
||||
"workflow": {
|
||||
"id": "00000000-0000-0000-0000-000000000150",
|
||||
"id": "00000000-0000-0000-0000-000000000152",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+12
@@ -159,6 +159,18 @@ export const buildMessageCampaignStandardFlatFieldMetadatas = ({
|
||||
isNullable: true,
|
||||
},
|
||||
}),
|
||||
name: createStandardFieldFlatMetadata({
|
||||
...base,
|
||||
context: {
|
||||
fieldName: 'name',
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: i18nLabel(msg`Name`),
|
||||
description: i18nLabel(msg`Internal name of the campaign`),
|
||||
icon: 'IconAbc',
|
||||
isNullable: false,
|
||||
defaultValue: "''",
|
||||
},
|
||||
}),
|
||||
subject: createStandardFieldFlatMetadata({
|
||||
...base,
|
||||
context: {
|
||||
|
||||
+1
@@ -15,6 +15,7 @@ import {
|
||||
const FLAT_NAVIGATION_MENU_ITEM_NAMES = [
|
||||
'allCompanies',
|
||||
'allDashboards',
|
||||
'allMessageCampaigns',
|
||||
'allNotes',
|
||||
'allOpportunities',
|
||||
'allPeople',
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ export const STANDARD_FLAT_OBJECT_METADATA_BUILDERS_BY_OBJECT_NAME = {
|
||||
icon: 'IconSend',
|
||||
isSystem: true,
|
||||
isUICreatable: false,
|
||||
labelIdentifierFieldMetadataName: 'subject',
|
||||
labelIdentifierFieldMetadataName: 'name',
|
||||
},
|
||||
workspaceId,
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+29
-11
@@ -23,11 +23,13 @@ const MESSAGE_CAMPAIGN_PAGE_TABS = {
|
||||
.home.universalIdentifier,
|
||||
...TAB_PROPS.home,
|
||||
widgets: {
|
||||
fields: {
|
||||
details: {
|
||||
universalIdentifier:
|
||||
STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS.messageCampaignRecordPage
|
||||
.tabs.home.widgets.fields.universalIdentifier,
|
||||
...WIDGET_PROPS.fields,
|
||||
.tabs.home.widgets.details.universalIdentifier,
|
||||
...WIDGET_PROPS.messageCampaignDetails,
|
||||
conditionalAvailabilityExpression:
|
||||
'everyEquals(selectedRecords, "status", "DRAFT")',
|
||||
},
|
||||
list: {
|
||||
universalIdentifier:
|
||||
@@ -39,6 +41,8 @@ const MESSAGE_CAMPAIGN_PAGE_TABS = {
|
||||
position: VERTICAL_LIST_LAYOUT_POSITIONS.THIRD,
|
||||
fieldUniversalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.fields.list.universalIdentifier,
|
||||
conditionalAvailabilityExpression:
|
||||
'not everyEquals(selectedRecords, "status", "DRAFT")',
|
||||
},
|
||||
recipients: {
|
||||
universalIdentifier:
|
||||
@@ -51,17 +55,31 @@ const MESSAGE_CAMPAIGN_PAGE_TABS = {
|
||||
fieldUniversalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.fields.recipients
|
||||
.universalIdentifier,
|
||||
conditionalAvailabilityExpression:
|
||||
'not everyEquals(selectedRecords, "status", "DRAFT")',
|
||||
},
|
||||
messages: {
|
||||
fields: {
|
||||
universalIdentifier:
|
||||
STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS.messageCampaignRecordPage
|
||||
.tabs.home.widgets.messages.universalIdentifier,
|
||||
title: 'Sent Messages',
|
||||
type: WidgetType.FIELD,
|
||||
gridPosition: GRID_POSITIONS.FULL_WIDTH,
|
||||
position: VERTICAL_LIST_LAYOUT_POSITIONS.FIFTH,
|
||||
fieldUniversalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.fields.messages.universalIdentifier,
|
||||
.tabs.home.widgets.fields.universalIdentifier,
|
||||
...WIDGET_PROPS.fields,
|
||||
position: VERTICAL_LIST_LAYOUT_POSITIONS.SECOND,
|
||||
conditionalAvailabilityExpression:
|
||||
'not everyEquals(selectedRecords, "status", "DRAFT")',
|
||||
},
|
||||
},
|
||||
},
|
||||
composer: {
|
||||
universalIdentifier:
|
||||
STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS.messageCampaignRecordPage.tabs
|
||||
.composer.universalIdentifier,
|
||||
...TAB_PROPS.composer,
|
||||
widgets: {
|
||||
messageCampaign: {
|
||||
universalIdentifier:
|
||||
STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS.messageCampaignRecordPage
|
||||
.tabs.composer.widgets.messageCampaign.universalIdentifier,
|
||||
...WIDGET_PROPS.messageCampaign,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+7
@@ -39,6 +39,8 @@ const RECORD_PAGE_LAYOUT_WIDGET_TYPES = [
|
||||
WidgetType.WORKFLOW,
|
||||
WidgetType.WORKFLOW_VERSION,
|
||||
WidgetType.WORKFLOW_RUN,
|
||||
WidgetType.MESSAGE_CAMPAIGN_BODY,
|
||||
WidgetType.MESSAGE_CAMPAIGN_DETAILS,
|
||||
];
|
||||
|
||||
const WIDGET_TYPE_TO_CONFIGURATION_TYPE: Partial<
|
||||
@@ -60,6 +62,10 @@ const WIDGET_TYPE_TO_CONFIGURATION_TYPE: Partial<
|
||||
[WidgetType.WORKFLOW_RUN]: WidgetConfigurationType.WORKFLOW_RUN,
|
||||
[WidgetType.RECORD_TABLE]: WidgetConfigurationType.RECORD_TABLE,
|
||||
[WidgetType.EMAIL_THREAD]: WidgetConfigurationType.EMAIL_THREAD,
|
||||
[WidgetType.MESSAGE_CAMPAIGN_BODY]:
|
||||
WidgetConfigurationType.MESSAGE_CAMPAIGN_BODY,
|
||||
[WidgetType.MESSAGE_CAMPAIGN_DETAILS]:
|
||||
WidgetConfigurationType.MESSAGE_CAMPAIGN_DETAILS,
|
||||
};
|
||||
|
||||
const RECORD_PAGE_FIELDS_VIEW_NAME_BY_OBJECT: Partial<
|
||||
@@ -72,6 +78,7 @@ const RECORD_PAGE_FIELDS_VIEW_NAME_BY_OBJECT: Partial<
|
||||
calendarEventParticipant: 'calendarEventParticipantRecordPageFields',
|
||||
callRecording: 'callRecordingRecordPageFields',
|
||||
company: 'companyRecordPageFields',
|
||||
messageCampaign: 'messageCampaignRecordPageFields',
|
||||
messageChannelMessageAssociation:
|
||||
'messageChannelMessageAssociationRecordPageFields',
|
||||
messageChannelMessageAssociationMessageFolder:
|
||||
|
||||
+2
@@ -9,6 +9,7 @@ import { computeStandardCalendarEventViewFieldGroups } from 'src/engine/workspac
|
||||
import { computeStandardCalendarEventParticipantViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-calendar-event-participant-view-field-groups.util';
|
||||
import { computeStandardCallRecordingViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-call-recording-view-field-groups.util';
|
||||
import { computeStandardCompanyViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-company-view-field-groups.util';
|
||||
import { computeStandardMessageCampaignViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-campaign-view-field-groups.util';
|
||||
import { computeStandardMessageChannelMessageAssociationViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-channel-message-association-view-field-groups.util';
|
||||
import { computeStandardMessageChannelMessageAssociationMessageFolderViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-channel-message-association-message-folder-view-field-groups.util';
|
||||
import { computeStandardMessageParticipantViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-participant-view-field-groups.util';
|
||||
@@ -34,6 +35,7 @@ const STANDARD_FLAT_VIEW_FIELD_GROUP_METADATA_BUILDERS_BY_OBJECT_NAME = {
|
||||
computeStandardCalendarEventParticipantViewFieldGroups,
|
||||
callRecording: computeStandardCallRecordingViewFieldGroups,
|
||||
company: computeStandardCompanyViewFieldGroups,
|
||||
messageCampaign: computeStandardMessageCampaignViewFieldGroups,
|
||||
messageChannelMessageAssociation:
|
||||
computeStandardMessageChannelMessageAssociationViewFieldGroups,
|
||||
messageChannelMessageAssociationMessageFolder:
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
|
||||
import {
|
||||
createStandardViewFieldGroupFlatMetadata,
|
||||
type CreateStandardViewFieldGroupArgs,
|
||||
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/create-standard-view-field-group-flat-metadata.util';
|
||||
|
||||
export const computeStandardMessageCampaignViewFieldGroups = (
|
||||
args: Omit<CreateStandardViewFieldGroupArgs<'messageCampaign'>, 'context'>,
|
||||
): Record<string, FlatViewFieldGroup> => {
|
||||
return {
|
||||
messageCampaignRecordPageFieldsStats:
|
||||
createStandardViewFieldGroupFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
viewFieldGroupName: 'stats',
|
||||
name: 'Stats',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
+107
-11
@@ -8,6 +8,18 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
args: Omit<CreateStandardViewFieldArgs<'messageCampaign'>, 'context'>,
|
||||
): Record<string, FlatViewField> => {
|
||||
return {
|
||||
allMessageCampaignsName: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'name',
|
||||
fieldName: 'name',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 250,
|
||||
},
|
||||
}),
|
||||
allMessageCampaignsSubject: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
@@ -15,7 +27,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'subject',
|
||||
fieldName: 'subject',
|
||||
position: 0,
|
||||
position: 1,
|
||||
isVisible: true,
|
||||
size: 300,
|
||||
},
|
||||
@@ -27,7 +39,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'status',
|
||||
fieldName: 'status',
|
||||
position: 1,
|
||||
position: 2,
|
||||
isVisible: true,
|
||||
size: 120,
|
||||
},
|
||||
@@ -39,7 +51,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'list',
|
||||
fieldName: 'list',
|
||||
position: 2,
|
||||
position: 3,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
@@ -51,7 +63,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'fromAddress',
|
||||
fieldName: 'fromAddress',
|
||||
position: 3,
|
||||
position: 4,
|
||||
isVisible: true,
|
||||
size: 200,
|
||||
},
|
||||
@@ -63,7 +75,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'sentAt',
|
||||
fieldName: 'sentAt',
|
||||
position: 4,
|
||||
position: 5,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
@@ -75,7 +87,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'sentCount',
|
||||
fieldName: 'sentCount',
|
||||
position: 5,
|
||||
position: 6,
|
||||
isVisible: true,
|
||||
size: 100,
|
||||
},
|
||||
@@ -87,7 +99,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'failedCount',
|
||||
fieldName: 'failedCount',
|
||||
position: 6,
|
||||
position: 7,
|
||||
isVisible: true,
|
||||
size: 100,
|
||||
},
|
||||
@@ -99,7 +111,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'bouncedCount',
|
||||
fieldName: 'bouncedCount',
|
||||
position: 7,
|
||||
position: 8,
|
||||
isVisible: true,
|
||||
size: 100,
|
||||
},
|
||||
@@ -111,7 +123,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'complainedCount',
|
||||
fieldName: 'complainedCount',
|
||||
position: 8,
|
||||
position: 9,
|
||||
isVisible: true,
|
||||
size: 120,
|
||||
},
|
||||
@@ -123,7 +135,7 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'recipients',
|
||||
fieldName: 'recipients',
|
||||
position: 9,
|
||||
position: 10,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
@@ -135,10 +147,94 @@ export const computeStandardMessageCampaignViewFields = (
|
||||
viewName: 'allMessageCampaigns',
|
||||
viewFieldName: 'createdAt',
|
||||
fieldName: 'createdAt',
|
||||
position: 10,
|
||||
position: 11,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
}),
|
||||
|
||||
// messageCampaignRecordPageFields view fields
|
||||
messageCampaignRecordPageFieldsStatus: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
viewFieldName: 'status',
|
||||
fieldName: 'status',
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 120,
|
||||
viewFieldGroupName: 'stats',
|
||||
},
|
||||
}),
|
||||
messageCampaignRecordPageFieldsSentAt: createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
viewFieldName: 'sentAt',
|
||||
fieldName: 'sentAt',
|
||||
position: 1,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
viewFieldGroupName: 'stats',
|
||||
},
|
||||
}),
|
||||
messageCampaignRecordPageFieldsSentCount:
|
||||
createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
viewFieldName: 'sentCount',
|
||||
fieldName: 'sentCount',
|
||||
position: 2,
|
||||
isVisible: true,
|
||||
size: 100,
|
||||
viewFieldGroupName: 'stats',
|
||||
},
|
||||
}),
|
||||
messageCampaignRecordPageFieldsFailedCount:
|
||||
createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
viewFieldName: 'failedCount',
|
||||
fieldName: 'failedCount',
|
||||
position: 3,
|
||||
isVisible: true,
|
||||
size: 100,
|
||||
viewFieldGroupName: 'stats',
|
||||
},
|
||||
}),
|
||||
messageCampaignRecordPageFieldsBouncedCount:
|
||||
createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
viewFieldName: 'bouncedCount',
|
||||
fieldName: 'bouncedCount',
|
||||
position: 4,
|
||||
isVisible: true,
|
||||
size: 100,
|
||||
viewFieldGroupName: 'stats',
|
||||
},
|
||||
}),
|
||||
messageCampaignRecordPageFieldsComplainedCount:
|
||||
createStandardViewFieldFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
viewFieldName: 'complainedCount',
|
||||
fieldName: 'complainedCount',
|
||||
position: 5,
|
||||
isVisible: true,
|
||||
size: 120,
|
||||
viewFieldGroupName: 'stats',
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
+12
@@ -22,5 +22,17 @@ export const computeStandardMessageCampaignViews = (
|
||||
icon: 'IconSend',
|
||||
},
|
||||
}),
|
||||
messageCampaignRecordPageFields: createStandardViewFlatMetadata({
|
||||
...args,
|
||||
objectName: 'messageCampaign',
|
||||
context: {
|
||||
viewName: 'messageCampaignRecordPageFields',
|
||||
name: 'Message Campaign Record Page Fields',
|
||||
type: ViewType.FIELDS_WIDGET,
|
||||
key: null,
|
||||
position: 0,
|
||||
icon: 'IconList',
|
||||
},
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
+2
@@ -360,6 +360,8 @@ export const fromUniversalConfigurationToFlatPageLayoutWidgetConfiguration = ({
|
||||
case WidgetConfigurationType.IFRAME:
|
||||
case WidgetConfigurationType.STANDALONE_RICH_TEXT:
|
||||
case WidgetConfigurationType.EMAIL_THREAD:
|
||||
case WidgetConfigurationType.MESSAGE_CAMPAIGN_BODY:
|
||||
case WidgetConfigurationType.MESSAGE_CAMPAIGN_DETAILS:
|
||||
return universalConfiguration;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user