Skip to content

Commit

Permalink
Merge branch 'release-1.0.0' of github.com:tekdi/shiksha-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvick committed Dec 3, 2024
2 parents 803e134 + 0c6b14c commit 4dcccb7
Show file tree
Hide file tree
Showing 6 changed files with 663 additions and 516 deletions.
5 changes: 1 addition & 4 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
{
"label": "मराठी",
"code": "mr"
},
{
"label": "ଓଡ଼ିଆ",
"code": "or"
}

],
"QUESTIONSET_MIME_TYPE": "application/vnd.sunbird.questionset",
"INTERACTIVE_MIME_TYPE": ["application/vnd.ekstep.h5p-archive", "application/vnd.ekstep.html-archive"]
Expand Down
480 changes: 278 additions & 202 deletions public/locales/hi/common.json

Large diffs are not rendered by default.

472 changes: 268 additions & 204 deletions public/locales/mr/common.json

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions src/pages/course-planner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ const Foundation = () => {
{loading ? (
<Loader showBackdrop={true} loadingText={t("COMMON.LOADING")} />
) : (
<Box sx={{ pl: "20px", mt: 5 }}>
<Box sx={{ mb: 2 }}>
<Box sx={{ pl: "20px", ml: 2 }}>
<Box sx={{ m: 2 }}>
<Typography>{t("MASTER.STATE")}</Typography>
</Box>
<Divider />
Expand Down Expand Up @@ -268,10 +268,15 @@ const Foundation = () => {
>
<Box
sx={{
cursor: "pointer",
border: "1px solid #D0C5B4",
borderRadius: "8px",
padding: "10px",
display: "flex",
alignItems: "center",
gap: "16px",
}}
onClick={() => handleCardClick(stateName)}
>
<FolderOutlinedIcon />
<Typography>{store?.matchingstate?.name}</Typography>
Expand All @@ -282,7 +287,6 @@ const Foundation = () => {
e.stopPropagation();
handleCopyLink(store?.matchingstate?.name);
}}
sx={{ minWidth: "auto", padding: 0 }}
>
{/* Add any icon or text for the copy link button */}
</Button>
Expand All @@ -291,7 +295,6 @@ const Foundation = () => {
</Grid>
)}
</Grid>

</Box>
)}
</>
Expand Down
82 changes: 42 additions & 40 deletions src/pages/stateDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,53 +80,55 @@ const StateDetails = () => {
</Typography>
</Box>
<Divider />
<Grid container spacing={2} sx={{ marginTop: "16px", ml: 2 }}>
<Box sx={{mx:'16px'}}>
<Box
sx={{ display: "flex", alignItems: "center", gap: 2, mb: 2, mt: 2 }}
sx={{ display: "flex", alignItems: "center", gap: 2, mt: 2, }}
>
<Typography variant="h2">Boards:</Typography>
</Box>
{boards.map((board: any, index: number) => (
<Grid item xs={12} md={4} key={index}>
<Box
sx={{
alignItems: "center",
cursor: "pointer",
border: "1px solid #0000001A",
boxShadow: "none",
transition: "background-color 0.3s",
"&:hover": {
backgroundColor: "#EAF2FF",
},
<Grid container spacing={2} sx={{ overflow: "hidden", maxWidth: "100%" }}>
{boards.map((board: any, index: number) => (
<Grid item xs={12} sm={6} md={4} lg={3} key={index}>
<Box
sx={{
alignItems: "center",
cursor: "pointer",
border: "1px solid #0000001A",
boxShadow: "none",
transition: "background-color 0.3s",
"&:hover": {
backgroundColor: "#EAF2FF",
},

marginTop: "8px",
padding: "16px",
display: "flex",
justifyContent: "space-between",
}}
onClick={() => {
handleBoardClick(board.code, board.name);
console.log(board);
}}
>
<Box>
<Box
sx={{
display: "flex",
alignItems: "center",
gap: "8px",
}}
>
<FolderOutlinedIcon />
<Typography variant="h6" sx={{ fontSize: "16px" }}>
{board.name}
</Typography>
marginTop: "8px",
padding: "16px",
display: "flex",
justifyContent: "space-between",
}}
onClick={() => {
handleBoardClick(board.code, board.name);
console.log(board);
}}
>
<Box>
<Box
sx={{
display: "flex",
alignItems: "center",
gap: "8px",
}}
>
<FolderOutlinedIcon />
<Typography variant="h6" sx={{ fontSize: "16px" }}>
{board.name}
</Typography>
</Box>
</Box>
</Box>
</Box>
</Grid>
))}
</Grid>
</Grid>
))}
</Grid>
</Box>
</Box>
);
};
Expand Down
129 changes: 67 additions & 62 deletions src/pages/subjectDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,9 @@ const SubjectDetails = () => {
router.back();
};

const handleCopyLink = (subject: any) => {};
const handleCopyLink = (subject: any) => { };

const handleCardClick = (subject: any) => {
const handleCardClick = (subject: string) => {
setTaxonomySubject(subject);
router.push(`/importCsv?subject=${encodeURIComponent(subject)}`);

Expand Down Expand Up @@ -704,8 +704,8 @@ const SubjectDetails = () => {

return (
<Box>
<Box sx={{ display: "flex", flexDirection: "row", marginTop: "20px" }}>
<Box>
<Grid container spacing={2} sx={{ marginTop: "20px" }}>
<Grid item xs={12} sm={12} md={4} lg={6} xl={3}>
<Select
value={selectedmedium || ""}
onChange={handleMediumChange}
Expand All @@ -723,7 +723,7 @@ const SubjectDetails = () => {
borderRadius: "8px",
marginRight: "16px",
height: 40,
width: "170px",
width: "100%",
}}
>
<MenuItem value="">
Expand All @@ -735,8 +735,8 @@ const SubjectDetails = () => {
</MenuItem>
))}
</Select>
</Box>
<Box>
</Grid>
<Grid item xs={12} sm={12} md={4} lg={6} xl={3}>
<Select
value={selectedgrade || ""}
onChange={handleGradeChange}
Expand All @@ -754,7 +754,7 @@ const SubjectDetails = () => {
borderRadius: "8px",
marginRight: "16px",
height: 40,
width: "170px",
width: "100%",
}}
>
<MenuItem value="">
Expand All @@ -766,9 +766,9 @@ const SubjectDetails = () => {
</MenuItem>
))}
</Select>
</Box>
</Grid>

<Box>
<Grid item xs={12} sm={12} md={4} lg={6} xl={4}>
<Select
value={selectedtype || ""}
onChange={handleTypeChange}
Expand All @@ -785,7 +785,7 @@ const SubjectDetails = () => {
border: "1px solid #3C3C3C",
borderRadius: "8px",
height: 40,
width: "170px",
width: "100%",
}}
>
<MenuItem value="">
Expand All @@ -797,32 +797,31 @@ const SubjectDetails = () => {
</MenuItem>
))}
</Select>
</Box>
<Box>
</Grid>
<Grid item xs={12} sm={12} md={4} lg={6} xl={2}>
<Button
onClick={handleReset}
sx={{
height: 40,
width: "80px",
backgroundColor: "#4D4639",
color: "#FFFFFF",
borderRadius: "8px",
marginLeft: "16px",
"&:hover": {
backgroundColor: "black",
},
width: "100%",
}}
>
Reset
</Button>
</Box>
</Box>
</Grid>
</Grid>

<Box
sx={{
display: "flex",
alignItems: "center",

marginLeft: "10px",
marginTop: "16px",
marginBottom: "16px",
}}
Expand All @@ -836,51 +835,57 @@ const SubjectDetails = () => {
<Divider />

<Box sx={{ marginTop: "16px" }}>
{subject && subject.length > 1 ? (
subject?.map((subj: string, index: number) => (
<MuiCard
key={index}
sx={{
display: "grid",
gridTemplateColumns: "1fr 2fr 1fr",
padding: "14px",
cursor: "pointer",
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: "12px",
}}
onClick={() => handleCardClick(subj)}
<Grid container spacing={2}>


{subject && subject.length > 1 ? (
subject?.map((subj: string, index: number) => (
<Grid item xs={12} sm={6} md={4} lg={3} key={index}>
<MuiCard
key={index}
sx={{

padding: "14px",
cursor: "pointer",
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: "12px",
}}
onClick={() => handleCardClick(subj)}
>
{/* Left Section: Folder Icon and Subject Name */}
<Box
sx={{
display: "flex",
alignItems: "center",
gap: "10px",
}}
>
<FolderOutlinedIcon sx={{ color: "#3C3C3C" }} />
<Typography variant="h6" noWrap>
{subj || "Untitled Subject"}
</Typography>
</Box>
</MuiCard>
</Grid>

))
) : (
<Typography
variant="h4"
align="center"
sx={{ marginTop: "24px", color: "#6B7280" }}
>
{/* Left Section: Folder Icon and Subject Name */}
<Box
sx={{
display: "flex",
alignItems: "center",
gap: "10px",
}}
>
<FolderOutlinedIcon sx={{ color: "#3C3C3C" }} />
<Typography variant="h6" noWrap>
{subj || "Untitled Subject"}
</Typography>
</Box>
</MuiCard>
))
) : (
<Typography
variant="h4"
align="center"
sx={{ marginTop: "24px", color: "#6B7280" }}
>
Select Medium, Grade, and Type
</Typography>
)}
Select Medium, Grade, and Type
</Typography>
)}
</Grid>
</Box>
</Box>
);
Expand Down

0 comments on commit 4dcccb7

Please sign in to comment.