Skip to content

Commit

Permalink
Merge pull request #106 from AkshataKatwal16/page-issue
Browse files Browse the repository at this point in the history
Issue feat:CCTA cant only see up for review and restrict publish and  reject option for STA
  • Loading branch information
itsvick authored Nov 22, 2024
2 parents 3a50a6b + d5c105e commit 2b66bf4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/components/KaTableComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ const KaTableComponent: React.FC<CustomTableProps> = ({ 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 } });
Expand Down
5 changes: 4 additions & 1 deletion src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const userRole = getLocalStoredUserRole();
const menuItems = [
{ text: "Create", key: "create", icon: <AddOutlinedIcon /> },
{ text: "Draft", key: "draft", icon: <CreateOutlinedIcon /> },
{ text: "Submitted for Review", key: "submitted", icon: <PreviewOutlinedIcon /> },
...(userRole !== Role.CCTA
? [ { text: "Submitted for Review", key: "submitted", icon: <PreviewOutlinedIcon /> },
]
: []),
...(userRole === Role.CCTA
? [{ text: "Up for Review", key: "up-review", icon: <PreviewOutlinedIcon /> }]
: []),
Expand Down
7 changes: 4 additions & 3 deletions src/pages/workspace/content/review/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ");
Expand Down Expand Up @@ -388,7 +389,7 @@ const ReviewContentSubmissions = () => {
</Grid>
</Grid>

<Box
{getLocalStoredUserRole() === Role.CCTA&&(<Box
sx={{
display: "flex",
justifyContent: "flex-end",
Expand Down Expand Up @@ -416,7 +417,7 @@ const ReviewContentSubmissions = () => {
>
Request Changes
</Button>
</Box>
</Box>)}
</>
) : (
<Typography>No content details available</Typography>
Expand Down

0 comments on commit 2b66bf4

Please sign in to comment.