Skip to content

Commit

Permalink
Merge pull request #389 from Aar-if/seventy
Browse files Browse the repository at this point in the history
  Issue #0000 feat: Course planner bug fixes
  • Loading branch information
itsvick authored Dec 3, 2024
2 parents 6c0cb3e + 6662a78 commit d8f7ccb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
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
26 changes: 19 additions & 7 deletions src/pages/subjectDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ const SubjectDetails = () => {

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,7 +704,14 @@ const SubjectDetails = () => {

return (
<Box>
<Box sx={{ display: "flex", flexDirection: "row", marginTop: "20px" }}>
<Box
sx={{
display: "flex",
flexDirection: "row",
marginTop: "20px",
marginLeft: "20px",
}}
>
<Box>
<Select
value={selectedmedium || ""}
Expand Down Expand Up @@ -822,7 +829,7 @@ const SubjectDetails = () => {
sx={{
display: "flex",
alignItems: "center",

marginLeft: "10px",
marginTop: "16px",
marginBottom: "16px",
}}
Expand All @@ -838,14 +845,20 @@ const SubjectDetails = () => {
</Box>
<Divider />

<Box sx={{ marginTop: "16px" }}>
<Box
sx={{
marginLeft: "20px",
marginTop: "16px",
display: "grid",
gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
gap: "16px", // Space between cards
}}
>
{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)",
Expand All @@ -856,7 +869,6 @@ const SubjectDetails = () => {
backgroundColor: "#EAF2FF",
transform: "scale(1.02)",
},
marginTop: "12px",
}}
onClick={() => handleCardClick(subj)}
>
Expand Down

0 comments on commit d8f7ccb

Please sign in to comment.