diff --git a/mfes/workspace/src/components/ActionIcon.tsx b/mfes/workspace/src/components/ActionIcon.tsx index 65d41353d..9f9604eb0 100644 --- a/mfes/workspace/src/components/ActionIcon.tsx +++ b/mfes/workspace/src/components/ActionIcon.tsx @@ -3,8 +3,10 @@ import { Box, Typography, Tooltip, useTheme } from "@mui/material"; import DeleteConfirmation from "./DeleteConfirmation"; import UnpublishedIcon from '@mui/icons-material/Unpublished'; import PublishIcon from '@mui/icons-material/Publish'; +import ReplayIcon from '@mui/icons-material/Replay'; import { Role } from "@workspace/utils/app.constant"; import { getLocalStoredUserRole } from "@workspace/services/LocalStorageService"; +import router from 'next/router'; interface ActionCellProps { rowData?: any; @@ -14,6 +16,7 @@ const ActionIcon: React.FC = ({ rowData, // onEdit, }) => { + console.log("rowData in ActionIcon====>", rowData); const theme = useTheme(); const [open, setOpen] = useState(false); const [actionType, setActionType] = useState('delete'); @@ -104,6 +107,28 @@ const ActionIcon: React.FC = ({ )} */} + {rowData?.status === 'Processing' && ( + + { + const identifier = rowData?.identifier; + const pathname = `/workspace/content/review`; + router.push({ pathname, query: { identifier } }); + }} + sx={{ + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + cursor: 'pointer', + backgroundColor: '#F8EFE7', + p: '10px', + }} + > + + + + )} + = ({ break; case 'all-content': - mode = - content?.status === 'Draft' || content?.status === 'Live' - ? 'edit' - : getLocalStoredUserRole() === Role.SCTA ? 'read' : 'review'; + if (content?.status === 'Draft' || content?.status === 'Live') { + mode = 'edit'; + } else if (content?.status === 'Processing') { + mode = 'review'; + } else { + mode = getLocalStoredUserRole() === Role.SCTA ? 'read' : 'review'; + } break; default: @@ -152,16 +155,23 @@ const KaTableComponent: React.FC = ({ query: { identifier }, }); } else if (tableTitle === 'all-content' && mode === 'review') { - content.contentType === 'Course' - ? router.push({ - pathname: `/course-hierarchy/${identifier}`, - query: { - identifier, - isReadOnly: true, - previousPage: 'allContents', - }, - }) - : router.push({ + console.log('Opening all-content review for identifier:', identifier); + if (content?.status === 'Processing') { + const pathname = + + `/workspace/content/review` + router.push({ pathname, query: { identifier } }); + } + content.contentType === 'Course' + ? router.push({ + pathname: `/course-hierarchy/${identifier}`, + query: { + identifier, + isReadOnly: true, + previousPage: 'allContents', + }, + }) + : router.push({ pathname: `/workspace/content/review`, query: { identifier, isReadOnly: true, isAllContents: true }, }); diff --git a/mfes/workspace/src/pages/workspace/content/up-review/index.tsx b/mfes/workspace/src/pages/workspace/content/up-review/index.tsx index 7700e8930..ea3459294 100644 --- a/mfes/workspace/src/pages/workspace/content/up-review/index.tsx +++ b/mfes/workspace/src/pages/workspace/content/up-review/index.tsx @@ -186,7 +186,7 @@ const UpForReviewPage = () => { const sort_by = { lastUpdatedOn: order }; const contentType = 'upReview'; const response = await getContent( - ['Review', 'FlagReview'], + ['Review', 'FlagReview' , 'Processing'], query, LIMIT, offset,