diff --git a/src/components/KaTableComponent.tsx b/src/components/KaTableComponent.tsx index 4bcacd9..4b9db53 100644 --- a/src/components/KaTableComponent.tsx +++ b/src/components/KaTableComponent.tsx @@ -86,7 +86,7 @@ const KaTableComponent: React.FC = ({ data, columns, handleDel {props.rowData.image ? ( Image = ({ data, columns, handleDel }} /> ) : props.column.key === 'name' ? ( - + Image ) : ( = ({ data, columns, handleDel )}
- {props.rowData.name} + {props.rowData.name}
- + {props.column.key === 'name' ? props.rowData.primaryCategory : props.rowData.description}
@@ -127,21 +138,21 @@ const KaTableComponent: React.FC = ({ data, columns, handleDel else if (props.column.key === "status") { if (props.rowData.status === "Draft") { return ( - + {props.rowData.status} ) } if (props.rowData.status === "Review") { return ( - + {props.rowData.status} ) } if (props.rowData.status === "Live") { return ( - + {props.rowData.status} ) @@ -167,7 +178,7 @@ const KaTableComponent: React.FC = ({ data, columns, handleDel {/* */} Image @@ -197,7 +208,7 @@ const KaTableComponent: React.FC = ({ data, columns, handleDel Image diff --git a/src/components/Loader.tsx b/src/components/Loader.tsx index f000169..82af67a 100644 --- a/src/components/Loader.tsx +++ b/src/components/Loader.tsx @@ -8,7 +8,7 @@ const Loader: React.FC<{ showBackdrop: boolean; loadingText: string }> = ({ const Spinner = () => { return ( <> - +
{loadingText}... diff --git a/src/pages/workspace/content/allContents/index.tsx b/src/pages/workspace/content/allContents/index.tsx index 11e87a2..83bf6b2 100644 --- a/src/pages/workspace/content/allContents/index.tsx +++ b/src/pages/workspace/content/allContents/index.tsx @@ -28,11 +28,20 @@ import { Table as KaTable } from 'ka-table'; import { DataType } from 'ka-table/enums'; import "ka-table/style.css"; import KaTableComponent from "@/components/KaTableComponent"; +// const columns = [ +// { key: 'name', title: 'Content', dataType: DataType.String, width: "450px" }, +// { key: 'lastUpdatedOn', title: 'Last Updated', dataType: DataType.String, width: "300px" }, +// { key: 'status', title: 'Status', dataType: DataType.String, width: "300px" }, +// { key: 'contentAction', title: 'Action', dataType: DataType.String, width: "200px" }, + +// ] const columns = [ - { key: 'name', title: 'Content', dataType: DataType.String, width: "450px" }, - { key: 'lastUpdatedOn', title: 'Last Updated', dataType: DataType.String, width: "300px" }, - { key: 'status', title: 'Status', dataType: DataType.String, width: "300px" }, - { key: 'contentAction', title: 'Action', dataType: DataType.String, width: "200px" }, + { key: 'name', title: 'TITLE & DESCRIPTION', dataType: DataType.String, width: "450px" }, + { key: 'contentType', title: 'CONTENT TYPE', dataType: DataType.String, width: "250px" }, + { key: 'status', title: 'STATUS', dataType: DataType.String, width: "100px" }, + { key: 'lastUpdatedOn', title: 'LAST MODIFIED', dataType: DataType.String, width: "180px" }, + { key: 'contentAction', title: 'ACTION', dataType: DataType.String, width: "100px" }, + ] const AllContentsPage = () => { @@ -143,7 +152,7 @@ const AllContentsPage = () => { useEffect(() => { const filteredArray = contentList.map(item => ({ image: item?.appIcon, - + contentType: item.primaryCategory, name: item.name, primaryCategory: item.primaryCategory, lastUpdatedOn: timeAgo(item.lastUpdatedOn), @@ -188,35 +197,37 @@ const AllContentsPage = () => { - - All My Contents + + + All My Contents + + {/* Here you see all your content. */} + + + + + + + {loading ? ( + + ) : contentList && contentList.length > 0 ? ( + contentList && + contentList.length > 0 && ( + <> + + + + + ) + ) : ( + + )} - {/* Here you see all your content. */} - - - - - - - {loading ? ( - - ) : contentList && contentList.length > 0 ? ( - contentList && - contentList.length > 0 && ( - <> - - - - - ) - ) : ( - - )} diff --git a/src/pages/workspace/content/create/index.tsx b/src/pages/workspace/content/create/index.tsx index 8cefb64..a620a12 100644 --- a/src/pages/workspace/content/create/index.tsx +++ b/src/pages/workspace/content/create/index.tsx @@ -127,38 +127,39 @@ const CreatePage = () => { flexWrap="wrap" > - {cardData.map((card, index) => ( - - - {card?.icon} - - {card?.title} - - - {card?.description} - - - - ))} + {cardData.map((card, index) => ( + + + {card?.icon} + + {card?.title} + + + {card?.description} + + + + ))} - + diff --git a/src/pages/workspace/content/draft/index.tsx b/src/pages/workspace/content/draft/index.tsx index 33de991..e9b58eb 100644 --- a/src/pages/workspace/content/draft/index.tsx +++ b/src/pages/workspace/content/draft/index.tsx @@ -27,11 +27,11 @@ import Paper from '@mui/material/Paper'; import { timeAgo } from "@/utils/Helper"; const columns = [ - { key: 'title_and_description', title: 'Title & Description', dataType: DataType.String, width: "450px" }, - { key: 'contentType', title: 'Content Type', dataType: DataType.String, width: "300px" }, - { key: 'status', title: 'Status', dataType: DataType.String, width: "300px" }, - { key: 'lastUpdatedOn', title: 'Last Modified', dataType: DataType.String, width: "300px" }, - { key: 'action', title: 'Action', dataType: DataType.String, width: "200px" }, + { key: 'title_and_description', title: 'TITLE & DESCRIPTION', dataType: DataType.String, width: "450px" }, + { key: 'contentType', title: 'CONTENT TYPE', dataType: DataType.String, width: "250px" }, + { key: 'status', title: 'STATUS', dataType: DataType.String, width: "100px" }, + { key: 'lastUpdatedOn', title: 'LAST MODIFIED', dataType: DataType.String, width: "180px" }, + { key: 'action', title: 'ACTION', dataType: DataType.String, width: "100px" }, ] diff --git a/src/pages/workspace/content/publish/index.tsx b/src/pages/workspace/content/publish/index.tsx index 8b7149c..8cdda76 100644 --- a/src/pages/workspace/content/publish/index.tsx +++ b/src/pages/workspace/content/publish/index.tsx @@ -26,11 +26,11 @@ import KaTableComponent from "@/components/KaTableComponent"; import { timeAgo } from "@/utils/Helper"; const columns = [ - { key: 'title_and_description', title: 'Title & Description', dataType: DataType.String, width: "450px" }, - { key: 'contentType', title: 'Content Type', dataType: DataType.String, width: "300px" }, - { key: 'status', title: 'Status', dataType: DataType.String, width: "300px" }, - { key: 'lastUpdatedOn', title: 'Last Modified', dataType: DataType.String, width: "300px" }, - { key: 'action', title: 'Action', dataType: DataType.String, width: "200px" }, + { key: 'title_and_description', title: 'TITLE & DESCRIPTION', dataType: DataType.String, width: "450px" }, + { key: 'contentType', title: 'CONTENT TYPE', dataType: DataType.String, width: "250px" }, + { key: 'status', title: 'STATUS', dataType: DataType.String, width: "100px" }, + { key: 'lastUpdatedOn', title: 'LAST MODIFIED', dataType: DataType.String, width: "180px" }, + { key: 'action', title: 'ACTION', dataType: DataType.String, width: "100px" }, ] diff --git a/src/pages/workspace/content/submitted/index.tsx b/src/pages/workspace/content/submitted/index.tsx index d615e48..4ac5fe7 100644 --- a/src/pages/workspace/content/submitted/index.tsx +++ b/src/pages/workspace/content/submitted/index.tsx @@ -25,11 +25,11 @@ import { DataType } from 'ka-table/enums'; import KaTableComponent from "@/components/KaTableComponent"; import { timeAgo } from "@/utils/Helper"; const columns = [ - { key: 'title_and_description', title: 'Title & Description', dataType: DataType.String, width: "450px" }, - { key: 'contentType', title: 'Content Type', dataType: DataType.String, width: "300px" }, - { key: 'status', title: 'Status', dataType: DataType.String, width: "300px" }, - { key: 'lastUpdatedOn', title: 'Last Modified', dataType: DataType.String, width: "300px" }, - { key: 'action', title: 'Action', dataType: DataType.String, width: "200px" }, + { key: 'title_and_description', title: 'TITLE & DESCRIPTION', dataType: DataType.String, width: "450px" }, + { key: 'contentType', title: 'CONTENT TYPE', dataType: DataType.String, width: "250px" }, + { key: 'status', title: 'STATUS', dataType: DataType.String, width: "100px" }, + { key: 'lastUpdatedOn', title: 'LAST MODIFIED', dataType: DataType.String, width: "180px" }, + { key: 'action', title: 'ACTION', dataType: DataType.String, width: "100px" }, ] diff --git a/src/styles/global.css b/src/styles/global.css index cf13d2d..1f66d5a 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -75,4 +75,20 @@ h6, span, p .css-1ydl6z0-MuiTypography-root { font-family: Poppins, sans-serif !important; +} + +.two-line-text { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; +} + +.one-line-text { + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } \ No newline at end of file diff --git a/src/utils/app.constant.ts b/src/utils/app.constant.ts index 1452f57..986a027 100644 --- a/src/utils/app.constant.ts +++ b/src/utils/app.constant.ts @@ -10,7 +10,7 @@ export enum ContentType { export const SortOptions = ["Modified On", "Created On"]; -export const LIMIT = 6; +export const LIMIT = 10; export const ChannelID = "test-k12-channel"; export const PrimaryCategoryValue = [