diff --git a/src/components/SearchBox.tsx b/src/components/SearchBox.tsx index cae7407..a0aff77 100644 --- a/src/components/SearchBox.tsx +++ b/src/components/SearchBox.tsx @@ -101,6 +101,7 @@ const SearchBox: React.FC = ({ e.preventDefault()} sx={{ display: "flex", alignItems: "center", diff --git a/src/pages/workspace/content/allContents/index.tsx b/src/pages/workspace/content/allContents/index.tsx index 1b07039..0cc111c 100644 --- a/src/pages/workspace/content/allContents/index.tsx +++ b/src/pages/workspace/content/allContents/index.tsx @@ -102,7 +102,7 @@ const AllContentsPage = () => { ]; const query = debouncedSearchTerm || ""; const primaryCategory = filter.length ? filter : []; - const order = sortBy === "Modified On" ? "desc" : "asc"; + const order = sortBy === "Created On" ? "asc" : "desc"; const sort_by = { lastUpdatedOn: order, }; @@ -159,8 +159,13 @@ const AllContentsPage = () => { - - All My Contents + + + All My Contents + {/* Here you see all your content. */} @@ -197,7 +202,10 @@ const AllContentsPage = () => { sx={{ cursor: "pointer" }} > {content?.appIcon ? ( - + ) : ( )} diff --git a/src/pages/workspace/content/draft/index.tsx b/src/pages/workspace/content/draft/index.tsx index 561a1a6..03bce13 100644 --- a/src/pages/workspace/content/draft/index.tsx +++ b/src/pages/workspace/content/draft/index.tsx @@ -90,7 +90,7 @@ const DraftPage = () => { const query = debouncedSearchTerm || ""; const offset = page * LIMIT; const primaryCategory = filter.length ? filter : []; - const order = sortBy === "Modified On" ? "desc" : "asc"; + const order = sortBy === "Created On" ? "asc" : "desc"; const sort_by = { lastUpdatedOn: order }; const response = await getContent( ["Draft", "FlagDraft"], @@ -118,8 +118,13 @@ const DraftPage = () => { - - Drafts + + + Drafts + {/* Create, organize, and manage all types of content in one place. @@ -160,7 +165,7 @@ const DraftPage = () => { openEditor(content)}> {content.name} { const query = debouncedSearchTerm || ""; const offset = page * LIMIT; const primaryCategory = filter.length ? filter : []; - const order = sortBy === "Modified On" ? "desc" : "asc"; + const order = sortBy === "Created On" ? "asc" : "desc"; const sort_by = { lastUpdatedOn: order }; const response = await getContent( ["Live"], @@ -119,7 +119,12 @@ const PublishPage = () => { - Published + + Published + {/* Here you see all your published content. */} @@ -158,7 +163,7 @@ const PublishPage = () => { openEditor(content)}> {content.name} { const query = debouncedSearchTerm || ""; const offset = page * LIMIT; const primaryCategory = filter.length ? filter : []; - const order = sortBy === "Modified On" ? "desc" : "asc"; + const order = sortBy === "Created On" ? "asc" : "desc"; const sort_by = { lastUpdatedOn: order }; const response = await getContent( ["Review", "FlagReview"], @@ -101,7 +101,10 @@ const SubmittedForReviewPage = () => { content?.mimeType && MIME_TYPE.GENERIC_MIME_TYPE.includes(content?.mimeType) ) { - router.push({ pathname: `/workspace/content/review`, query: { identifier, mode } }); + router.push({ + pathname: `/workspace/content/review`, + query: { identifier, mode }, + }); } else if ( content?.mimeType && MIME_TYPE.COLLECTION_MIME_TYPE.includes(content?.mimeType) @@ -114,9 +117,13 @@ const SubmittedForReviewPage = () => { - - - Submitted For Review + + + Submitted For Review + {/* Here you can see all your content submitted for review. @@ -157,7 +164,7 @@ const SubmittedForReviewPage = () => { openEditor(content)}> {content?.name}", userId); @@ -54,9 +54,9 @@ const getReqBodyWithStatus = ( sort_by: any ) => { if (typeof window !== "undefined" && typeof localStorage !== "undefined") { - var PrimaryCategory = JSON.parse( - localStorage.getItem("PrimaryCategory") as string - ); + var PrimaryCategory = + JSON.parse(localStorage.getItem("PrimaryCategory") as string) || + PrimaryCategoryValue; } primaryCategory = primaryCategory.length === 0 ? PrimaryCategory : primaryCategory; diff --git a/src/utils/app.constant.ts b/src/utils/app.constant.ts index 04971a7..1452f57 100644 --- a/src/utils/app.constant.ts +++ b/src/utils/app.constant.ts @@ -12,3 +12,14 @@ export const SortOptions = ["Modified On", "Created On"]; export const LIMIT = 6; export const ChannelID = "test-k12-channel"; + +export const PrimaryCategoryValue = [ + "Course", + "Course Assessment", + "eTextbook", + "Explanation Content", + "Learning Resource", + "Practice Question Set", + "Teacher Resource", + "Exam Question", +];