diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx
index cb08bb400c8..4983b1771f7 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx
@@ -466,6 +466,10 @@ const DashboardDetails = ({
= ({
= ({
void;
+ entityFieldTasks?: EntityFieldThreads[];
+ onThreadLinkSelect?: (value: string, threadType?: ThreadType) => void;
followHandler?: () => void;
tagsHandler?: (selectedTags?: Array) => void;
versionHandler?: () => void;
@@ -88,8 +94,11 @@ const EntityPageInfo = ({
onThreadLinkSelect,
entityFqn,
entityType,
+ entityFieldTasks,
}: Props) => {
+ const history = useHistory();
const tagThread = entityFieldThreads?.[0];
+ const tagTask = entityFieldTasks?.[0];
const [isEditable, setIsEditable] = useState(false);
const [entityFollowers, setEntityFollowers] =
useState>(followersList);
@@ -101,6 +110,10 @@ const EntityPageInfo = ({
document.getElementById('version-and-follow-section')?.offsetWidth
);
+ const handleRequestTags = () => {
+ history.push(getRequestTagsPath(entityType as string, entityFqn as string));
+ };
+
const handleTagSelection = (selectedTags?: Array) => {
if (selectedTags) {
const prevTags =
@@ -269,35 +282,74 @@ const EntityPageInfo = ({
const getThreadElements = () => {
if (!isUndefined(entityFieldThreads)) {
- return !isUndefined(tagThread) ? (
- onThreadLinkSelect?.(tagThread.entityLink)}>
-
+
{tagThread.count}
-
+
) : (
-
onThreadLinkSelect?.(
getEntityFeedLink(entityType, entityFqn, 'tags')
)
}>
-
-
+
+
);
} else {
return null;
}
};
+ const getRequestTagsElements = useCallback(() => {
+ const hasTags = !isEmpty(tags);
+
+ return onThreadLinkSelect && !hasTags ? (
+
+ ) : null;
+ }, [tags]);
+
+ const getTaskElement = useCallback(() => {
+ return !isUndefined(tagTask) ? (
+
+ ) : null;
+ }, [tagTask]);
+
useEffect(() => {
setEntityFollowers(followersList);
}, [followersList]);
@@ -454,7 +506,7 @@ const EntityPageInfo = ({
position="bottom"
trigger="click">
{
// Fetch tags and terms only once
@@ -479,14 +531,9 @@ const EntityPageInfo = ({
}}>
{tags.length || tier ? (
) : (
@@ -501,7 +548,11 @@ const EntityPageInfo = ({
- {getThreadElements()}
+
+ {getRequestTagsElements()}
+ {getTaskElement()}
+ {getThreadElements()}
+
)}
diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts b/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts
index 3f029329883..39ea8f0eb0c 100644
--- a/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts
@@ -209,7 +209,9 @@ export const ROUTES = {
// Tasks Routes
REQUEST_DESCRIPTION: `/request-description/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
+ REQUEST_TAGS: `/request-tags/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
UPDATE_DESCRIPTION: `/update-description/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
+ UPDATE_TAGS: `/update-tags/${PLACEHOLDER_ROUTE_ENTITY_TYPE}/${PLACEHOLDER_ROUTE_ENTITY_FQN}`,
TASK_DETAIL: `/tasks/${PLACEHOLDER_TASK_ID}`,
ACTIVITY_PUSH_FEED: '/api/v1/push/feed',
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/RequestTagPage/RequestTagPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/RequestTagPage/RequestTagPage.tsx
new file mode 100644
index 00000000000..64a98beffe2
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/RequestTagPage/RequestTagPage.tsx
@@ -0,0 +1,282 @@
+/*
+ * Copyright 2021 Collate
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Button, Card, Input } from 'antd';
+import { AxiosError, AxiosResponse } from 'axios';
+import { capitalize, isNil } from 'lodash';
+import { observer } from 'mobx-react';
+import { EntityTags } from 'Models';
+import React, {
+ ChangeEvent,
+ useCallback,
+ useEffect,
+ useMemo,
+ useState,
+} from 'react';
+import { useHistory, useLocation, useParams } from 'react-router-dom';
+import AppState from '../../../AppState';
+import { postThread } from '../../../axiosAPIs/feedsAPI';
+import ProfilePicture from '../../../components/common/ProfilePicture/ProfilePicture';
+import TitleBreadcrumb from '../../../components/common/title-breadcrumb/title-breadcrumb.component';
+import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
+import { EntityField } from '../../../constants/feed.constants';
+import { EntityType } from '../../../enums/entity.enum';
+import {
+ CreateThread,
+ TaskType,
+} from '../../../generated/api/feed/createThread';
+import { ThreadType } from '../../../generated/entity/feed/thread';
+import { TagLabel } from '../../../generated/type/tagLabel';
+import { getEntityName } from '../../../utils/CommonUtils';
+import {
+ ENTITY_LINK_SEPARATOR,
+ getEntityFeedLink,
+} from '../../../utils/EntityUtils';
+import { getTagsWithoutTier, getTierTags } from '../../../utils/TableUtils';
+import {
+ fetchEntityDetail,
+ fetchOptions,
+ getBreadCrumbList,
+ getColumnObject,
+ getTaskDetailPath,
+} from '../../../utils/TasksUtils';
+import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils';
+import Assignees from '../shared/Assignees';
+import TagSuggestion from '../shared/TagSuggestion';
+import TaskPageLayout from '../shared/TaskPageLayout';
+import { cardStyles } from '../TaskPage.styles';
+import { EntityData, Option } from '../TasksPage.interface';
+
+const RequestTag = () => {
+ const location = useLocation();
+ const history = useHistory();
+
+ const { entityType, entityFQN } = useParams<{ [key: string]: string }>();
+ const queryParams = new URLSearchParams(location.search);
+
+ const field = queryParams.get('field');
+ const value = queryParams.get('value');
+
+ const [entityData, setEntityData] = useState({} as EntityData);
+ const [options, setOptions] = useState
-
-
+
@@ -651,7 +544,7 @@ const TaskDetailPage = () => {
)}
-
+
@@ -718,54 +611,24 @@ const TaskDetailPage = () => {
-
-
Description:
{' '}
- {!isEmpty(taskDetail) && (
-
- {isTaskClosed ? (
- getDiffView()
- ) : (
-
- {isRequestDescription && (
-
- {isTaskActionEdit && hasEditAccess() ? (
-
- ) : (
-
- {getCurrentDescription()}
-
- )}
-
- )}
-
- {isUpdateDescription && (
-
- {isTaskActionEdit && hasEditAccess() ? (
-
- ) : (
-
- {getCurrentDescription()}
-
- )}
-
- )}
-
- )}
-
- )}
-
+ {isTaskDescription && (
+
+ )}
+ {isTaskTags && (
+
+ )}
{hasEditAccess() && !isTaskClosed && (
{
)}
- {isTaskClosed && (
-
-
-
-
-
- {taskDetail?.task?.closedBy}
- {' '}
-
-
-
closed this task
-
- {toLower(
- getDayTimeByTimeStamp(
- taskDetail?.task?.closedAt as number
- )
- )}
-
-
- )}
+ {isTaskClosed && }
-
-
-
+
{
data-testid="task-right-sider"
width={600}>
-
+
{!isEmpty(taskFeedDetail) ? (
{
) : null}
-
+
{!isEmpty(taskFeedDetail) ? (
= ({ assignees, onSearch, onChange, options }) => {
return (