Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix [properties-fe] - hide company entity type from property creation and selection (#582)

Daniel Kweon315706fe8cad
diff --git a/js/app/packages/core/component/Properties/hooks/usePropertySelection.ts b/js/app/packages/core/component/Properties/hooks/usePropertySelection.ts
index f653e148d3..1bdf8533ef 100644
--- a/js/app/packages/core/component/Properties/hooks/usePropertySelection.ts
+++ b/js/app/packages/core/component/Properties/hooks/usePropertySelection.ts
@@ -37,9 +37,14 @@ export function usePropertySelection(
const query = searchQuery ? searchQuery().toLowerCase().trim() : '';
const existingIds = existingPropertyIdsSet();
- // First filter out existing properties (reactive to existingPropertyIds changes)
+ // First filter out existing properties and hidden entity types
const availableProperties = currentState.availableProperties.filter(
- (property) => property && property.id && !existingIds.has(property.id)
+ (property) =>
+ property &&
+ property.id &&
+ !existingIds.has(property.id) &&
+ // Hide COMPANY entity properties (not yet implemented)
+ property.specific_entity_type !== 'COMPANY'
);
// Then apply search filter
diff --git a/js/app/packages/core/component/Properties/utils/display.ts b/js/app/packages/core/component/Properties/utils/display.ts
index e6dd2d1407..9c76bea8de 100644
--- a/js/app/packages/core/component/Properties/utils/display.ts
+++ b/js/app/packages/core/component/Properties/utils/display.ts
@@ -18,7 +18,7 @@ export const getPropertyDataTypeDropdownOptions = () => [
{ value: 'entity:PROJECT' as const, label: 'Project' },
{ value: 'entity:CHAT' as const, label: 'Chat' },
{ value: 'entity:TASK' as const, label: 'Task' },
- // { value: 'entity:COMPANY' as const, label: 'Company' },
+ // { value: 'entity:COMPANY' as const, label: 'Company' }, NOT YET IMPLEMENTED
{ value: 'entity:THREAD' as const, label: 'Email' },
{ value: 'entity' as const, label: 'Any Entity' },
];