diff --git a/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts b/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts index dd1a3f65a..7455de848 100644 --- a/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts +++ b/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts @@ -4,7 +4,7 @@ import {getPlanningProfileFields} from '../profile-fields'; import {IFieldDefinition} from '../field-definitions/interfaces'; export const getCustomVocabularyFields = () => { - const customVocabularyIds = getPlanningProfileFields() + const customVocabularyIds = getPlanningProfileFields({embeddedOnly: true}) .filter((x) => x.type === 'custom_vocabulary') .map(({vocabularyId}) => vocabularyId); const result: Array = []; diff --git a/client/components/planning-editor-standalone/profile-fields.ts b/client/components/planning-editor-standalone/profile-fields.ts index 0cd44be1a..9fb4c2b66 100644 --- a/client/components/planning-editor-standalone/profile-fields.ts +++ b/client/components/planning-editor-standalone/profile-fields.ts @@ -23,8 +23,9 @@ const unimplementedFields = new Set([ /** * A function that handles planning profile field types so they can be used in authoring react. + * @embeddedOnly defaults to false */ -export const getPlanningProfileFields = (): Array => { +export const getPlanningProfileFields = (options: {embeddedOnly?: boolean}): Array => { const planningProfile = planningApi.contentProfiles.get('planning'); const planningGroups = getEditorFormGroupsFromProfile(planningProfile); const planningFieldIds = Object.values(planningGroups) @@ -39,7 +40,7 @@ export const getPlanningProfileFields = (): Array => { * If a field does not have show_in_embedded_editor or required toggled on * we must not show it in the embedded editor */ - if (!(fieldSchema.show_in_embedded_editor || fieldSchema.required)) { + if (options.embeddedOnly && !(fieldSchema.show_in_embedded_editor || fieldSchema.required)) { continue; } diff --git a/client/components/planning-editor-standalone/profile.ts b/client/components/planning-editor-standalone/profile.ts index c73e127c3..e15429ef5 100644 --- a/client/components/planning-editor-standalone/profile.ts +++ b/client/components/planning-editor-standalone/profile.ts @@ -5,7 +5,7 @@ import {getPlanningProfileFields} from './profile-fields'; import {getFieldDefinitions} from './field-definitions/index'; export function getProfile() { - const planningFieldIds = getPlanningProfileFields(); + const planningFieldIds = getPlanningProfileFields({embeddedOnly: true}); const skipped = new Set(); const fieldDefinitions = getFieldDefinitions(); const profileV2: IContentProfileV2 = {