diff --git a/next.config.mjs b/next.config.mjs index 196635c..0b1b14f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -47,15 +47,15 @@ const nextConfig = { return [ { source: "/action/asset/v1/upload/:identifier*", // Match asset upload routes - destination: '/api/fileUpload' // Forward asset uploads to fileUpload proxy + destination: "/api/fileUpload", // Forward asset uploads to fileUpload proxy }, { source: "/action/content/v3/upload/url/:identifier*", // Match content upload with 'url' in the path destination: `${process.env.WORKSPACE_BASE_URL}/api/proxy?path=/action/content/v3/upload/url/:identifier*`, // Forward to proxy route with path as query param }, { - source: '/action/content/v3/upload/:identifier*', // Match content upload routes - destination: '/api/fileUpload', // Forward asset uploads to fileUpload proxy + source: "/action/content/v3/upload/:identifier*", // Match content upload routes + destination: "/api/fileUpload", // Forward asset uploads to fileUpload proxy }, { source: "/action/asset/:path*", // Match other /action/asset routes @@ -74,7 +74,7 @@ const nextConfig = { destination: `${process.env.WORKSPACE_BASE_URL}/api/proxy?path=/api/:path*`, // Forward them to proxy.js }, { - source: '/assets/public/:path*', // Match any URL starting with /assets/public/ + source: "/assets/public/:path*", // Match any URL starting with /assets/public/ destination: `${process.env.WORKSPACE_BASE_URL}/assets/public/:path*`, // Forward to workspace proxy }, { diff --git a/src/data/cardData.js b/src/data/cardData.js index 02fd17b..34fb163 100644 --- a/src/data/cardData.js +++ b/src/data/cardData.js @@ -1,18 +1,12 @@ let state; -if (typeof window !== 'undefined') { - state = 'Maharashtra' +if (typeof window !== "undefined") { + state = localStorage.getItem("stateName"); } const cardData = [ { id: "1", state: state, - boardsUploaded: 0, - totalBoards: 1, - details: - "Maharashtra is a state in the southeastern coastal region of India.", - boards: ["Maharashtra Board"], - subjects: ["English"], }, ]; diff --git a/src/pages/collection.tsx b/src/pages/collection.tsx new file mode 100644 index 0000000..460499e --- /dev/null +++ b/src/pages/collection.tsx @@ -0,0 +1,21 @@ +import React, { useEffect, useState } from "react"; +import dynamic from "next/dynamic"; +import { serverSideTranslations } from "next-i18next/serverSideTranslations"; + +// @ts-ignore +const CollectionEditor = dynamic(() => import("editor/Collection"), { ssr: false }); + +const Collection = () => { + return ; +}; + +export default Collection; + +export async function getStaticProps({ locale }: any) { + return { + props: { + noLayout: true, + ...(await serverSideTranslations(locale, ["common"])), + }, + }; +} diff --git a/src/pages/course-planner/index.tsx b/src/pages/course-planner/index.tsx index 7602a9e..497bd4b 100644 --- a/src/pages/course-planner/index.tsx +++ b/src/pages/course-planner/index.tsx @@ -7,6 +7,7 @@ import { useMediaQuery, useTheme, Grid, + Divider, } from "@mui/material"; import FolderOutlinedIcon from "@mui/icons-material/FolderOutlined"; import InsertLinkOutlinedIcon from "@mui/icons-material/InsertLinkOutlined"; @@ -21,7 +22,7 @@ import Loader from "@/components/Loader"; import { getChannelDetails } from "@/services/coursePlanner"; import { getOptionsByCategory } from "@/utils/Helper"; import coursePlannerStore from "@/store/coursePlannerStore"; -import taxonomyStore from "@/store/tanonomyStore" +import taxonomyStore from "@/store/tanonomyStore"; const Foundation = () => { const router = useRouter(); @@ -158,19 +159,15 @@ const Foundation = () => { ) : ( - {/* {t("MASTER.STATE")} - {t("COURSE_PLANNER.ACTIVITY")} - {t("COURSE_PLANNER.COPY_LINK")} - */} - + + + {!selectedCardId ? ( cardData?.map((card: any) => ( @@ -227,8 +224,7 @@ const Foundation = () => { handleCopyLink(card.state); }} sx={{ minWidth: "auto", padding: 0 }} - > - + > diff --git a/src/pages/stateDetails.tsx b/src/pages/stateDetails.tsx index f42beda..c440e8b 100644 --- a/src/pages/stateDetails.tsx +++ b/src/pages/stateDetails.tsx @@ -8,6 +8,7 @@ import { useTheme, useMediaQuery, Grid, + Divider, } from "@mui/material"; import FolderOutlinedIcon from "@mui/icons-material/FolderOutlined"; import InsertLinkOutlinedIcon from "@mui/icons-material/InsertLinkOutlined"; @@ -49,7 +50,7 @@ const StateDetails = () => { const channel = store?.boards; setBoards(channel); - localStorage.removeItem("overallCommonSubjects") + localStorage.removeItem("overallCommonSubjects"); setLoading(false); }, 1000); }; @@ -107,16 +108,26 @@ const StateDetails = () => { return ( - - + - {tStore.state} - - + + {card.state} + + State + + + + + + + Boards : + {boards.map((board: any, index: number) => ( { {board?.name} - - + > diff --git a/src/pages/subjectDetails.tsx b/src/pages/subjectDetails.tsx index abd73e7..234ca35 100644 --- a/src/pages/subjectDetails.tsx +++ b/src/pages/subjectDetails.tsx @@ -9,6 +9,8 @@ import { IconButton, MenuItem, Select, + Divider, + Tooltip, } from "@mui/material"; import FolderOutlinedIcon from "@mui/icons-material/FolderOutlined"; import InsertLinkOutlinedIcon from "@mui/icons-material/InsertLinkOutlined"; @@ -81,8 +83,8 @@ const SubjectDetails = () => { const setTaxonomySubject = taxonomyStore((state) => state.setTaxonomySubject); useEffect(() => { - const subjects = localStorage.getItem('overallCommonSubjects'); - + const subjects = localStorage.getItem("overallCommonSubjects"); + if (subjects) { try { const parsedData = JSON.parse(subjects); @@ -95,8 +97,6 @@ const SubjectDetails = () => { setSubject([]); } }, []); - - useEffect(() => { const fetchFrameworkDetails = async () => { @@ -172,7 +172,7 @@ const SubjectDetails = () => { const handleCopyLink = (subject: any) => {}; const handleCardClick = (subject: any) => { - setTaxonomySubject(subject?.name) + setTaxonomySubject(subject?.name); router.push(`/importCsv?subject=${encodeURIComponent(subject?.name)}`); setTaxanomySubject(subject?.name); @@ -188,7 +188,10 @@ const SubjectDetails = () => { if (medium) { const getGrades = getOptionsByCategory(store?.framedata, "gradeLevel"); - const mediumAssociations = getAssociationsByCodeNew(mediumOptions, medium); + const mediumAssociations = getAssociationsByCodeNew( + mediumOptions, + medium + ); setMediumAssociations(mediumAssociations); console.log(getGrades); @@ -359,9 +362,12 @@ const SubjectDetails = () => { ]; const overallCommonSubjects = findOverallCommonSubjects(arrays); - + setSubject(overallCommonSubjects); - localStorage.setItem("overallCommonSubjects", JSON.stringify(overallCommonSubjects)) + localStorage.setItem( + "overallCommonSubjects", + JSON.stringify(overallCommonSubjects) + ); } }; @@ -421,7 +427,7 @@ const SubjectDetails = () => { }} > - Select Grade + Select Grade {grade.map((item: any) => ( @@ -467,7 +473,7 @@ const SubjectDetails = () => { sx={{ display: "flex", alignItems: "center", - gap: "16px", + marginTop: "16px", marginBottom: "16px", }} @@ -476,12 +482,15 @@ const SubjectDetails = () => { {boardName} - + + Board + + {subject && subject.length > 1 ? ( - subject.map((subj: any, index: any) => ( + subject.map((subj: any, index: number) => ( { gridTemplateColumns: "1fr 2fr 1fr", padding: "14px", cursor: "pointer", - border: "1px solid #0000001A", - boxShadow: "none", - transition: "background-color 0.3s", + border: "1px solid rgba(0, 0, 0, 0.1)", + boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.05)", + borderRadius: "8px", + transition: "all 0.3s ease", "&:hover": { backgroundColor: "#EAF2FF", + transform: "scale(1.02)", }, - marginTop: "8px", + marginTop: "12px", }} onClick={() => handleCardClick(subj)} > + {/* Left Section: Folder Icon and Subject Name */} - - {subj?.name} - - - - - {/* {subj.uploaded} / {subj.total} {"topics uploaded"} */} + + + {subj?.name || "Untitled Subject"} - - - )) ) : ( - - Select Medium, Grade and Type + + Select Medium, Grade, and Type )}