Skip to content

Commit

Permalink
option to show hide task handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-madlani committed Feb 27, 2025
1 parent 9680a4f commit d0e6f3e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ interface GenericEntity
interface CommonWidgetsProps {
widgetConfig: WidgetConfig;
entityType: EntityType;
showTaskHandler?: boolean;
}

export const CommonWidgets = ({
widgetConfig,
entityType,
showTaskHandler = true,
}: CommonWidgetsProps) => {
const { data, type, onUpdate, permissions } =
useGenericContext<GenericEntity>();
Expand Down Expand Up @@ -140,32 +142,38 @@ export const CommonWidgets = ({
const tagsWidget = useMemo(() => {
return (
<TagsContainerV2
showTaskHandler
displayType={DisplayType.READ_MORE}
entityFqn={fullyQualifiedName}
entityType={type}
permission={editTagsPermission}
selectedTags={tags}
showTaskHandler={showTaskHandler}
tagType={TagSource.Classification}
onSelectionChange={handleTagSelection}
/>
);
}, [editTagsPermission, tags, type, fullyQualifiedName]);
}, [editTagsPermission, tags, type, fullyQualifiedName, showTaskHandler]);

const glossaryWidget = useMemo(() => {
return (
<TagsContainerV2
showTaskHandler
displayType={DisplayType.READ_MORE}
entityFqn={fullyQualifiedName}
entityType={type}
permission={editGlossaryTermsPermission}
selectedTags={tags}
showTaskHandler={showTaskHandler}
tagType={TagSource.Glossary}
onSelectionChange={handleTagSelection}
/>
);
}, [editGlossaryTermsPermission, tags, type, fullyQualifiedName]);
}, [
editGlossaryTermsPermission,
tags,
type,
fullyQualifiedName,
showTaskHandler,
]);

const descriptionWidget = useMemo(() => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ export const getDomainWidgetsFromKey = (widgetConfig: WidgetConfig) => {
}

return (
<CommonWidgets entityType={EntityType.DOMAIN} widgetConfig={widgetConfig} />
<CommonWidgets
entityType={EntityType.DOMAIN}
showTaskHandler={false}
widgetConfig={widgetConfig}
/>
);
};

0 comments on commit d0e6f3e

Please sign in to comment.