Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ function getEntityIcon(entity: CombinedEntity) {
case 'item': {
const blockName =
entity.data.type === 'document'
? fileTypeToBlockName(entity.data.fileType, true)
? entity.data.subType === 'task'
? 'task'
: fileTypeToBlockName(entity.data.fileType, true)
: entity.data.type === 'chat'
? 'chat'
: entity.data.type === 'project'
Expand Down Expand Up @@ -210,6 +212,12 @@ export function PropertyEntitySelector(props: EntityInputProps) {
return [];
}

if (specificEntityType === 'TASK') {
return history()
.filter((item) => item.type === 'document' && item.subType === 'task')
.map(entityMapper('item'));
}

const itemTypes: EntityType[] = ['DOCUMENT', 'PROJECT', 'CHAT'];
if (itemTypes.includes(specificEntityType)) {
return history()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import FolderIcon from '@icon/regular/folder.svg';
import HashIcon from '@icon/regular/hash.svg';
import LinkIcon from '@icon/regular/link.svg';
import ListBulletIcon from '@icon/regular/list-bullets.svg';
import TaskIcon from '@icon/regular/list-checks.svg';
import PencilIcon from '@icon/regular/pencil.svg';
import SimpleTagIcon from '@icon/regular/tag-simple.svg';
import UserCircleIcon from '@icon/regular/user-circle.svg';
Expand Down Expand Up @@ -44,6 +45,8 @@ export const PropertyDataTypeIcon: Component<PropertyDataTypeIconProps> = (
return <CompanyIcon class={iconClasses} />;
case 'THREAD':
return <ThreadIcon class={iconClasses} />;
case 'TASK':
return <TaskIcon class={iconClasses} />;
default:
return <SimpleTagIcon class={iconClasses} />;
}
Expand Down
1 change: 1 addition & 0 deletions js/app/packages/core/component/Properties/utils/display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const getPropertyDataTypeDropdownOptions = () => [
{ value: 'entity:CHANNEL' as const, label: 'Channel' },
{ 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:THREAD' as const, label: 'Thread' },
{ value: 'entity' as const, label: 'Any Entity' },
Expand Down