Enable records layouts for all records except workflows (#15378)
https://github.com/user-attachments/assets/3cb30486-3409-459e-9d60-7f6f31ebe00c
This commit is contained in:
committed by
GitHub
parent
d66d972d01
commit
24349cb729
+5
-13
@@ -18,23 +18,15 @@ export const PageLayoutDispatcher = ({
|
||||
FeatureFlagKey.IS_RECORD_PAGE_LAYOUT_ENABLED,
|
||||
);
|
||||
|
||||
const isStandardObjectWithDefaultLayout =
|
||||
const isStandardObjectUnsupportingRecordPageLayouts =
|
||||
targetRecordIdentifier.targetObjectNameSingular ===
|
||||
CoreObjectNameSingular.Company ||
|
||||
CoreObjectNameSingular.Workflow ||
|
||||
targetRecordIdentifier.targetObjectNameSingular ===
|
||||
CoreObjectNameSingular.Person ||
|
||||
CoreObjectNameSingular.WorkflowRun ||
|
||||
targetRecordIdentifier.targetObjectNameSingular ===
|
||||
CoreObjectNameSingular.Opportunity ||
|
||||
targetRecordIdentifier.targetObjectNameSingular ===
|
||||
CoreObjectNameSingular.Note ||
|
||||
targetRecordIdentifier.targetObjectNameSingular ===
|
||||
CoreObjectNameSingular.Task;
|
||||
CoreObjectNameSingular.WorkflowVersion;
|
||||
|
||||
if (
|
||||
targetRecordIdentifier.targetObjectNameSingular ===
|
||||
CoreObjectNameSingular.Dashboard ||
|
||||
(isRecordPageEnabled && isStandardObjectWithDefaultLayout)
|
||||
) {
|
||||
if (isRecordPageEnabled && !isStandardObjectUnsupportingRecordPageLayouts) {
|
||||
return (
|
||||
<PageLayoutRecordPageRenderer
|
||||
targetRecordIdentifier={targetRecordIdentifier}
|
||||
|
||||
@@ -173,69 +173,5 @@ export const DEFAULT_RECORD_PAGE_LAYOUT: PageLayout = {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
__typename: 'PageLayoutTab',
|
||||
id: 'default-tab-emails',
|
||||
title: 'Emails',
|
||||
position: 600,
|
||||
layoutMode: 'vertical-list',
|
||||
pageLayoutId: DEFAULT_RECORD_PAGE_LAYOUT_ID,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
deletedAt: null,
|
||||
widgets: [
|
||||
{
|
||||
__typename: 'PageLayoutWidget',
|
||||
id: 'default-widget-emails',
|
||||
pageLayoutTabId: 'default-tab-emails',
|
||||
title: 'Emails',
|
||||
type: WidgetType.EMAILS,
|
||||
objectMetadataId: null,
|
||||
gridPosition: {
|
||||
__typename: 'GridPosition',
|
||||
row: 0,
|
||||
column: 0,
|
||||
rowSpan: 6,
|
||||
columnSpan: 12,
|
||||
},
|
||||
configuration: null,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
deletedAt: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
__typename: 'PageLayoutTab',
|
||||
id: 'default-tab-calendar',
|
||||
title: 'Calendar',
|
||||
position: 700,
|
||||
layoutMode: 'vertical-list',
|
||||
pageLayoutId: DEFAULT_RECORD_PAGE_LAYOUT_ID,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
deletedAt: null,
|
||||
widgets: [
|
||||
{
|
||||
__typename: 'PageLayoutWidget',
|
||||
id: 'default-widget-calendar',
|
||||
pageLayoutTabId: 'default-tab-calendar',
|
||||
title: 'Calendar',
|
||||
type: WidgetType.CALENDAR,
|
||||
objectMetadataId: null,
|
||||
gridPosition: {
|
||||
__typename: 'GridPosition',
|
||||
row: 0,
|
||||
column: 0,
|
||||
rowSpan: 6,
|
||||
columnSpan: 12,
|
||||
},
|
||||
configuration: null,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
deletedAt: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user