Commit b7fdf769 authored by janithgamage1.ed's avatar janithgamage1.ed

fix: update

Desc : update project
parent e82bca29
...@@ -5,7 +5,7 @@ export const curriculums: curriculumType[] = [ ...@@ -5,7 +5,7 @@ export const curriculums: curriculumType[] = [
"curriculumCode": "01", "curriculumCode": "01",
"curriculumLevel": 1, "curriculumLevel": 1,
"curriculumDescription": "This curriculum teaches basic sign language skills to help beginners communicate effectively using sign language.", "curriculumDescription": "This curriculum teaches basic sign language skills to help beginners communicate effectively using sign language.",
"curriculumTitle": "Learn Basic Sign Language Skills", "curriculumTitle": "Basic Sign Language Skills",
"curriculumImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc", "curriculumImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc",
"_id": "1", "_id": "1",
"status": 1, "status": 1,
...@@ -197,7 +197,7 @@ export const curriculums: curriculumType[] = [ ...@@ -197,7 +197,7 @@ export const curriculums: curriculumType[] = [
{ {
"curriculumCode": "02", "curriculumCode": "02",
"curriculumLevel": 2, "curriculumLevel": 2,
"curriculumTitle": "Learn Intermediate Sign Language Skills", "curriculumTitle": "Intermediate Sign Language Skills",
"curriculumDescription": "This curriculum focuses on building intermediate sign language skills, allowing learners to engage in more complex conversations and interactions using sign language.", "curriculumDescription": "This curriculum focuses on building intermediate sign language skills, allowing learners to engage in more complex conversations and interactions using sign language.",
"curriculumImage": "https://drive.google.com/uc?export=view&id=1b5C6VNO55k3Wj6DJ-vJiUFFEuQnXs5Jo", "curriculumImage": "https://drive.google.com/uc?export=view&id=1b5C6VNO55k3Wj6DJ-vJiUFFEuQnXs5Jo",
"tutorials": [], "tutorials": [],
...@@ -210,7 +210,7 @@ export const curriculums: curriculumType[] = [ ...@@ -210,7 +210,7 @@ export const curriculums: curriculumType[] = [
{ {
"curriculumCode": "03", "curriculumCode": "03",
"curriculumLevel": 3, "curriculumLevel": 3,
"curriculumTitle": "Learn Advance Sign Language Skills", "curriculumTitle": "Advance Sign Language Skills",
"curriculumDescription": "This curriculum is designed for those who already have a solid foundation in sign language. It covers advanced topics, nuances, and cultural aspects of sign language communication.", "curriculumDescription": "This curriculum is designed for those who already have a solid foundation in sign language. It covers advanced topics, nuances, and cultural aspects of sign language communication.",
"curriculumImage": "https://drive.google.com/uc?export=view&id=1k-CtiCkM3efhmTBet-JZt2izxVrAdBL3", "curriculumImage": "https://drive.google.com/uc?export=view&id=1k-CtiCkM3efhmTBet-JZt2izxVrAdBL3",
"tutorials": [], "tutorials": [],
......
...@@ -7,7 +7,7 @@ export const userProgress: userProgressType = { ...@@ -7,7 +7,7 @@ export const userProgress: userProgressType = {
{ {
"curriculumCode": "01", "curriculumCode": "01",
"curriculumLevel": 1, "curriculumLevel": 1,
"curriculumTitle": "Learn Basic Sign Language Skills", "curriculumTitle": "Basic Sign Language Skills",
"curriculumDescription": "This curriculum teaches basic sign language skills to help beginners communicate effectively using sign language.", "curriculumDescription": "This curriculum teaches basic sign language skills to help beginners communicate effectively using sign language.",
"curriculumImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc", "curriculumImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc",
"curriculumMark": 100, "curriculumMark": 100,
......
...@@ -70,9 +70,9 @@ const TutorialSection = ({ tutorial }: { tutorial: tutorialTypeUserProgress }) = ...@@ -70,9 +70,9 @@ const TutorialSection = ({ tutorial }: { tutorial: tutorialTypeUserProgress }) =
variant="outlined" variant="outlined"
endIcon={<PlaySquareOutlined />} endIcon={<PlaySquareOutlined />}
sx={{ my: 2 }} sx={{ my: 2 }}
onClick={() => { navigation(`/learning-management/curriculums-subscribed`) }} onClick={() => { navigation(`/learning-management/curriculums-subscribed-tutorial`) }}
> >
Start Start Tutorial
</Button> </Button>
</AnimateButton> </AnimateButton>
</Box> </Box>
......
import { useState } from 'react'; import { useState } from 'react';
import { useNavigate } from 'react-router';
// material-ui // material-ui
import { import {
...@@ -25,6 +26,8 @@ import CurriculumPreview from './CurriculumPreview'; ...@@ -25,6 +26,8 @@ import CurriculumPreview from './CurriculumPreview';
// ==============================|| CURRICULUM - CARD ||============================== // // ==============================|| CURRICULUM - CARD ||============================== //
const CurriculumCard = ({ curriculum }: { curriculum: curriculumType }) => { const CurriculumCard = ({ curriculum }: { curriculum: curriculumType }) => {
const navigate = useNavigate()
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const handleClickOpen = () => { const handleClickOpen = () => {
...@@ -35,6 +38,9 @@ const CurriculumCard = ({ curriculum }: { curriculum: curriculumType }) => { ...@@ -35,6 +38,9 @@ const CurriculumCard = ({ curriculum }: { curriculum: curriculumType }) => {
setOpen(false); setOpen(false);
}; };
const [desc, setDesc] = useState(curriculum.curriculumDescription?.slice(0, 100))
const [readMore, setReadMore] = useState(false)
return ( return (
<> <>
<Animation <Animation
...@@ -51,41 +57,54 @@ const CurriculumCard = ({ curriculum }: { curriculum: curriculumType }) => { ...@@ -51,41 +57,54 @@ const CurriculumCard = ({ curriculum }: { curriculum: curriculumType }) => {
</Typography> </Typography>
</Grid> </Grid>
<Grid item xs={12}> <Grid item xs={12}>
<Typography variant="body1" color="secondary"> <Typography variant="body1" color="secondary" sx={{ textAlign: "justify" }}>
{curriculum.curriculumDescription} {desc}
<span style={{ fontWeight: "bold", cursor: "pointer" }}
onClick={() => {
if (!readMore) {
setDesc(curriculum.curriculumDescription)
setReadMore(true)
} else {
setDesc(curriculum.curriculumDescription?.slice(0, 100))
setReadMore(false)
}
}} color="secondary">
{readMore ? "Show Less" : "...Read More"}
</span>
</Typography> </Typography>
</Grid> </Grid>
<Grid md={3}> <Grid item xs={6}>
<Box sx={{ display: 'inline-block' }}> <Box sx={{ display: 'inline-block' }}>
<AnimateButton> <AnimateButton>
<Button <Button
fullWidth
variant="outlined" variant="outlined"
endIcon={<PlusOutlined />} endIcon={<PlusOutlined />}
sx={{ my: 2 }} sx={{ my: 2, width: "100%" }}
// onClick={handleClickOpen} onClick={() => { navigate(`/learning-management/curriculums-subscribed`) }}
color='success' color='success'
> >
Follow Follow Curriculum
</Button> </Button>
</AnimateButton> </AnimateButton>
</Box> </Box>
</Grid> </Grid>
<Grid md={3}> <Grid item xs={6}>
<Box sx={{ display: 'inline-block' }}> <Box sx={{ display: 'inline-block' }}>
<AnimateButton> <AnimateButton>
<Button <Button
fullWidth
variant="outlined" variant="outlined"
endIcon={<SendOutlined />} endIcon={<SendOutlined />}
sx={{ my: 2 }} sx={{ my: 2, width: "100%" }}
onClick={handleClickOpen} onClick={handleClickOpen}
> >
Preview Preview Curriculum
</Button> </Button>
</AnimateButton> </AnimateButton>
</Box> </Box>
</Grid> </Grid>
<Grid md={6} /> <Grid item xs={12} sx={{ '& img': { marginBottom: '-3.75px', width: '100%', height: '456px', objectFit: 'cover' } }}>
<Grid item xs={12} sx={{ '& img': { mb: -3.75, width: `calc( 100% + 24px)` } }}>
<img src={curriculum.curriculumImage} alt="feature" /> <img src={curriculum.curriculumImage} alt="feature" />
</Grid> </Grid>
</Grid> </Grid>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment