Skip to content

Commit

Permalink
Issue feat: fix sidebar select option issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshataKatwal16 committed Nov 21, 2024
1 parent ac4bc75 commit b0cbe8d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/components/KaTableComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ const KaTableComponent: React.FC<CustomTableProps> = ({ data, columns, tableTitl
mode = "read";
break;
case 'submitted':
mode = "review";
case 'upForReview':
mode = "read";
break;
case 'upForReview':
mode = "review";
break;
case 'all-content':
mode=content?.status==="Draft"|| content?.status==="Live" ?"edit":"review"
break;
Expand All @@ -72,9 +73,13 @@ const KaTableComponent: React.FC<CustomTableProps> = ({ data, columns, tableTitl
}

// Generic routing for cases other than 'draft'
if (content?.mimeType === MIME_TYPE.QUESTIONSET_MIME_TYPE) {
if (content?.mimeType === MIME_TYPE.QUESTIONSET_MIME_TYPE ) {
router.push({ pathname: `/editor`, query: { identifier, mode } });
} else if (content?.mimeType && MIME_TYPE.GENERIC_MIME_TYPE.includes(content?.mimeType)) {
}
// else if (content?.mimeType === MIME_TYPE.COURSE_MIME_TYPE && tableTitle==='submitted') {
// router.push({ pathname: `/editor`, 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 } });
} else if (content?.mimeType && MIME_TYPE.COLLECTION_MIME_TYPE.includes(content?.mimeType)) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/content/up-review/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const columns = [

]
const UpForReviewPage = () => {
const [selectedKey, setSelectedKey] = useState("submitted");
const [selectedKey, setSelectedKey] = useState("up-review");
const [filter, setFilter] = useState<string[]>([]);
const [sortBy, setSortBy] = useState("Modified On");
const [searchTerm, setSearchTerm] = useState("");
Expand Down

0 comments on commit b0cbe8d

Please sign in to comment.