From d5c105e07be6bb68099b87d2cb4f5f5540409a39 Mon Sep 17 00:00:00 2001 From: Akshata Katwal Date: Fri, 22 Nov 2024 12:17:08 +0530 Subject: [PATCH] Issue feat:CCTA cant only see up for review and restrict publish and reject option for STA --- src/components/KaTableComponent.tsx | 6 +++--- src/components/SideBar.tsx | 5 ++++- src/pages/workspace/content/review/index.tsx | 7 ++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/KaTableComponent.tsx b/src/components/KaTableComponent.tsx index c864324..a5f413e 100644 --- a/src/components/KaTableComponent.tsx +++ b/src/components/KaTableComponent.tsx @@ -76,9 +76,9 @@ const KaTableComponent: React.FC = ({ data, columns, tableTitl if (content?.mimeType === MIME_TYPE.QUESTIONSET_MIME_TYPE ) { router.push({ pathname: `/editor`, query: { identifier, mode } }); } - // else if (content?.mimeType === MIME_TYPE.COURSE_MIME_TYPE && tableTitle==='submitted') { - // router.push({ pathname: `/editor`, query: { identifier, mode } }); - // } + else if ( tableTitle==='submitted') { + router.push({ pathname: `/workspace/content/review`, query: { identifier, mode } }); + } else if (content?.mimeType && MIME_TYPE.GENERIC_MIME_TYPE.includes(content?.mimeType)) { const pathname = tableTitle === 'upForReview' ? `/workspace/content/review` : `/upload-editor`; router.push({ pathname, query: { identifier, mode } }); diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index 32f24bd..6470697 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -31,7 +31,10 @@ const userRole = getLocalStoredUserRole(); const menuItems = [ { text: "Create", key: "create", icon: }, { text: "Draft", key: "draft", icon: }, - { text: "Submitted for Review", key: "submitted", icon: }, + ...(userRole !== Role.CCTA + ? [ { text: "Submitted for Review", key: "submitted", icon: }, + ] + : []), ...(userRole === Role.CCTA ? [{ text: "Up for Review", key: "up-review", icon: }] : []), diff --git a/src/pages/workspace/content/review/index.tsx b/src/pages/workspace/content/review/index.tsx index d886b69..136b4d4 100644 --- a/src/pages/workspace/content/review/index.tsx +++ b/src/pages/workspace/content/review/index.tsx @@ -30,7 +30,8 @@ import { } from "../../../../components/players/playerMetadata"; import $ from "jquery"; import { MIME_TYPE, CHANNEL_ID } from "@/utils/app.config"; -import { getLocalStoredUserName } from "@/services/LocalStorageService"; +import { getLocalStoredUserName , getLocalStoredUserRole} from "@/services/LocalStorageService"; +import { Role } from "@/utils/app.constant"; const userFullName = getLocalStoredUserName() || "Anonymous User"; const [firstName, lastName] = userFullName.split(" "); @@ -388,7 +389,7 @@ const ReviewContentSubmissions = () => { - { > Request Changes - + )} ) : ( No content details available