Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/NIUANULP/nulp-elite-ui into…
Browse files Browse the repository at this point in the history
… webapp_changes
  • Loading branch information
sonaliTekdi committed Sep 23, 2024
2 parents 9be59a7 + bd1c79c commit 2377d14
Show file tree
Hide file tree
Showing 15 changed files with 210 additions and 56 deletions.
3 changes: 3 additions & 0 deletions packages/common-lib/src/components/SunbirdPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ const SunbirdPlayer = ({

React.useEffect(() => {
const fetchData = () => {
console.log("url-------------------",url)
if ([`/content-player`, `/quml`, `/pdf`, `/video`].includes(url)) {
window.addEventListener(
'message',
(event) => {
handleEvent(event)
console.log("event-------------------",event)

},
false
)
Expand Down
6 changes: 4 additions & 2 deletions packages/nulp_elite/public/locales/be/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,18 @@
"CONTENT_DERIVED_FROM": "এই বিষয়বস্তু থেকে সংগৃহীত",
"FILTERS":"ফিল্টার",
"EXPLORE_CONTENT":"কন্টেন্ট এক্সপ্লোর করুন",

"COURSE_SUCCESSFULLY_COMPLETED": "কোর্সটি সফলভাবে সম্পন্ন হয়েছে",

"ID":"আইডি",
"ORGANIZATION_NAME":"সংস্থার নাম",
"ROLE":"ভূমিকা",
"NO_CERTIFICATES_FOUND":"কোন শংসাপত্র পাওয়া যায়নি",
"NOT_ENROLL_MESSAGE":"আপনি কোনো কোর্সে নথিভুক্ত নন। এখনই নথিভুক্ত করুন!",
"FIRST_NAME":"প্রথম নাম",
"LAST_NAME":"শেষ নাম",
"CLOSED_POLLS":"বন্ধ পোল",

"NO_CHAT_REQUEST": "কোনো চ্যাট অনুরোধ নেই",
"PHONE":"ফোন",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"

}
2 changes: 1 addition & 1 deletion packages/nulp_elite/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@
"CONTENT_DERIVED_FROM": "This content is derived from",
"FILTERS":"Filters",
"EXPLORE_CONTENT":"Explore Content",
"COURSE_SUCCESSFULLY_COMPLETED": "Course completed Successfully",
"ID":"ID",
"ORGANIZATION_NAME":"Organization Name",
"ROLE":"Role",
"NO_CERTIFICATES_FOUND":"No certificates found",
"NOT_ENROLL_MESSAGE":"You are not enrolled in any course. Enroll now!",
"FIRST_NAME":"First Name",
"LAST_NAME":"Last Name",
"CLOSED_POLLS":"Closed Polls",
"NO_CHAT_REQUEST" : "No Chat Request",
"PHONE":"Phone",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
Expand Down
2 changes: 1 addition & 1 deletion packages/nulp_elite/public/locales/gg/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,14 @@
"CONTENT_DERIVED_FROM": "આ સામગ્રીમાંથી ઉત્પન્ન છે",
"FILTERS":"ફિલ્ટર્સ",
"EXPLORE_CONTENT":"સામગ્રીનું અન્વેષણ કરો",
"COURSE_SUCCESSFULLY_COMPLETED": "કોર્સ સફળતાપૂર્વક પૂર્ણ થયો",
"ID":"ID",
"ORGANIZATION_NAME":"સંસ્થાનું નામ",
"ROLE":"ભૂમિકા",
"NO_CERTIFICATES_FOUND":"કોઈ પ્રમાણપત્ર મળ્યા નથી",
"NOT_ENROLL_MESSAGE":"તમે કોઈપણ અભ્યાસક્રમમાં નોંધણી કરાવેલ નથી. હમણાં નોંધણી કરો!",
"FIRST_NAME":"પ્રથમ નામ",
"LAST_NAME":"છેલ્લું નામ",
"CLOSED_POLLS":"બંધ મતદાન",
"NO_CHAT_REQUEST": "કોઈ ચેટ વિનંતી નથી",
"PHONE":"ફોન",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
Expand Down
2 changes: 1 addition & 1 deletion packages/nulp_elite/public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,14 @@
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "एक माता-पिता/अभिभावक के रूप में मैं NULP उपयोग की शर्तों को समझता हूं और स्वीकार करता हूं और अपने बच्चे को दी गई जानकारी के साथ NULP पर पंजीकरण करने के लिए सहमत करता हूं।",
"FILTERS":"फिल्टर",
"EXPLORE_CONTENT":"सामग्री का अन्वेषण करें",
"COURSE_SUCCESSFULLY_COMPLETED": "कोर्स सफलतापूर्वक पूरा हुआ",
"ID":"पहचान",
"ORGANIZATION_NAME":"संगठन का नाम",
"ROLE":"भूमिका",
"NO_CERTIFICATES_FOUND":"कोई प्रमाणपत्र नहीं मिला",
"NOT_ENROLL_MESSAGE":"आप किसी भी पाठ्यक्रम में नामांकित नहीं हैं। अभी नामांकन करें!",
"FIRST_NAME":"प्रथम नाम",
"LAST_NAME":"अंतिम नाम",
"CLOSED_POLLS":"बंद मतदान",
"NO_CHAT_REQUEST": "कोई चैट अनुरोध नहीं",
"PHONE":"फोन",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
Expand Down
2 changes: 1 addition & 1 deletion packages/nulp_elite/public/locales/ma/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@
"CONTENT_DERIVED_FROM": "ही सामग्री यावरून घेतली आहे",
"FILTERS":"फिल्टर",
"EXPLORE_CONTENT":"सामग्री एक्सप्लोर करा",
"COURSE_SUCCESSFULLY_COMPLETED": "कोर्स यशस्वीरीत्या पूर्ण झाला",
"ID":"आयडी",
"ORGANIZATION_NAME":"संस्थेचे नाव",
"ROLE":"भूमिका",
"NO_CERTIFICATES_FOUND":"कोणतेही प्रमाणपत्र सापडले नाही",
"NOT_ENROLL_MESSAGE":"तुम्ही कोणत्याही कोर्समध्ये नावनोंदणी केलेले नाही. आता नावनोंदणी करा!",
"FIRST_NAME":"नाव",
"LAST_NAME":"आडनाव",
"CLOSED_POLLS":"बंद मतदान",
"NO_CHAT_REQUEST": "चॅट विनंती नाही",
"PHONE":"फोन",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
Expand Down
2 changes: 1 addition & 1 deletion packages/nulp_elite/public/locales/mal/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@
"CONTENT_DERIVED_FROM": "ഈ ഉള്ളടക്കം നിന്നു പ്രാപ്തമായതാണ്",
"FILTERS":"ഫിൽട്ടറുകൾ",
"EXPLORE_CONTENT":"ഉള്ളടക്കം പര്യവേക്ഷണം ചെയ്യുക",
"COURSE_SUCCESSFULLY_COMPLETED": "കോഴ്‌സ് വിജയകരമായി പൂർത്തിയാക്കി",
"ID":"ഐഡി",
"ORGANIZATION_NAME":"ഓർഗനൈസേഷൻ്റെ പേര്",
"ROLE":"റോൾ",
"NO_CERTIFICATES_FOUND":"സർട്ടിഫിക്കറ്റുകളൊന്നും കണ്ടെത്തിയില്ല",
"NOT_ENROLL_MESSAGE":"നിങ്ങൾ ഒരു കോഴ്സിലും എൻറോൾ ചെയ്തിട്ടില്ല. ഇപ്പോൾ എൻറോൾ ചെയ്യുക!",
"FIRST_NAME":"ആദ്യ പേര്",
"LAST_NAME":"അവസാന നാമം",
"CLOSED_POLLS":"അടച്ച വോട്ടെടുപ്പുകൾ",
"NO_CHAT_REQUEST": "ചാറ്റ് അഭ്യര്‍ത്ഥനയില്ല",
"PHONE":"ഫോൺ",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
Expand Down
2 changes: 1 addition & 1 deletion packages/nulp_elite/public/locales/ta/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@
"CONTENT_DERIVED_FROM": "இந்த உள்ளடக்கம் இதிலிருந்து பெறப்பட்டுள்ளது",
"FILTERS":"வடிப்பான்கள்",
"EXPLORE_CONTENT":"உள்ளடக்கத்தை ஆராயுங்கள்",
"COURSE_SUCCESSFULLY_COMPLETED": "பாடம் வெற்றிகரமாக முடிந்தது",
"ID":"ஐடி",
"ORGANIZATION_NAME":"நிறுவனத்தின் பெயர்",
"ROLE":"பாத்திரம்",
"NO_CERTIFICATES_FOUND":"சான்றிதழ்கள் எதுவும் கிடைக்கவில்லை",
"NOT_ENROLL_MESSAGE":"நீங்கள் எந்த படிப்பிலும் சேரவில்லை. இப்போதே பதிவு செய்யுங்கள்!",
"FIRST_NAME":"முதல் பெயர்",
"LAST_NAME":"கடைசி பெயர்",
"CLOSED_POLLS":"மூடப்பட்ட வாக்கெடுப்புகள்",
"NO_CHAT_REQUEST": "சாட் கோரிக்கை இல்லை",
"PHONE":"தொலைபேசி",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
Expand Down
2 changes: 1 addition & 1 deletion packages/nulp_elite/public/locales/te/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@
"CONTENT_DERIVED_FROM": "ఈ సాంఘికత నుండి పొందినది",
"FILTERS":"ఫిల్టర్లు",
"EXPLORE_CONTENT":"కంటెంట్‌ని అన్వేషించండి",
"COURSE_SUCCESSFULLY_COMPLETED": "కోర్సు విజయవంతంగా పూర్తయింది",
"ID":"ID",
"ORGANIZATION_NAME":"సంస్థ పేరు",
"ROLE":"పాత్ర",
"NO_CERTIFICATES_FOUND":"సర్టిఫికేట్‌లు ఏవీ కనుగొనబడలేదు",
"NOT_ENROLL_MESSAGE":"మీరు ఏ కోర్సులోనూ నమోదు చేసుకోలేదు. ఇప్పుడే నమోదు చేసుకోండి!",
"FIRST_NAME":"మొదటి పేరు",
"LAST_NAME":"చివరి పేరు",
"CLOSED_POLLS":"క్లోజ్డ్ పోల్స్",
"NO_CHAT_REQUEST": "చాట్ అభ్యర్థన లేదు",
"PHONE":"ఫోన్",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
Expand Down
5 changes: 3 additions & 2 deletions packages/nulp_elite/src/pages/SelectPreference.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ setSubCategories(data?.result?.framework?.categories[SubCategoryindex]?.terms);
</Select>
</FormControl>
</Box>
<FormControl fullWidth sx={{ marginBottom: 2 }}>
{/*Comment Topic from user Preferance popup because of costomer request */}
{/* <FormControl fullWidth sx={{ marginBottom: 2 }}>
<InputLabel id="topic-label" className="year-select">
{"Topic"}
</InputLabel>
Expand All @@ -480,7 +481,7 @@ setSubCategories(data?.result?.framework?.categories[SubCategoryindex]?.terms);
</MenuItem>
))}
</Select>
</FormControl>
</FormControl> */}
</DialogContent>
<DialogActions>
{isEmptyPreference && (
Expand Down
15 changes: 8 additions & 7 deletions packages/nulp_elite/src/pages/content/CategoryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ const CategoryPage = () => {
const handleDomainFilter = (query, domainName) => {
setSelectedDomain(query);
setDomainName(domainName);
fetchMoreItems(domainName);
// fetchMoreItems(domainName);
};

useEffect(() => {
if (selectedDomain) {
fetchMoreItems(selectedDomain);
}
}, [selectedDomain]);

fetchMoreItems();

}, [selectedDomain,domainName,clearDomains]);

useEffect(() => {
fetchMoreItems(selectedDomain);
}, [currentPage,clearDomains]);
}, [currentPage]);

const handleGoBack = () => {
navigate(-1); // Navigate back in history
Expand Down Expand Up @@ -223,8 +223,9 @@ const CategoryPage = () => {
};

const clearDomain = () => {
setDomainName(null)
setDomainName(null);
setClearDomain(null);
setSelectedDomain(null)
}

useEffect(() => {
Expand Down
6 changes: 4 additions & 2 deletions packages/nulp_elite/src/pages/content/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ const handleAssessmentData = async (data) => {
await updateContentState(2)
}
else if (data.eid === "START"){
await updateContentState(1)

await updateContentState(2)


}
};
Expand Down Expand Up @@ -238,7 +240,7 @@ const updateContentStateForAssessment = async () => {
};

if (!consumedContent.includes(contentId)) {
updateContentState(1);
updateContentState(2);
}
fetchData();
fetchUserData();
Expand Down
70 changes: 36 additions & 34 deletions packages/nulp_elite/src/pages/content/joinCourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,11 @@ const JoinCourse = () => {
batchId: batchDetails?.batchId,
},
});
setToasterMessage(t("COURSE_SUCCESSFULLY_COMPLETED"));
setTimeout(() => {
setToasterMessage("");
}, 2000);
setToasterOpen(true);
} catch (error) {
console.error("Error while fetching courses:", error);
}
Expand Down Expand Up @@ -637,40 +642,30 @@ const JoinCourse = () => {
</Box>
);
} else {
return (
return (
<>
<Box>
<Box style={{ display: "flex", justifyContent: "space-between" }}>
<Box >
<Button
onClick={() =>
handleGoBack()

}
className="custom-btn-primary mr-5"
>
{t("BACK")}
</Button></Box>
<Box><Button
onClick={() =>
handleLinkClick(
ContinueLearning ?? NotConsumedContent ?? childnode
)
}
className="custom-btn-primary mr-5"
>
{t("CONTINUE LEARNING")}
</Button>
{!isCompleted &&
<Button
onClick={handleLeaveCourseClick} // Open confirmation dialog
className="custom-btn-danger"
> {t("LEAVE_COURSE")}
</Button>
} </Box>

</Box>
<Button

disabled={ isCompleted}

onClick={() =>
handleLinkClick(
ContinueLearning ?? NotConsumedContent ?? childnode
)
}
className="custom-btn-primary mr-5"
>
{t("CONTINUE_LEARNNG")}
</Button>
{!isCompleted &&
<Button
onClick={handleLeaveCourseClick} // Open confirmation dialog
className="custom-btn-danger"
> {t("LEAVE_COURSE")}
</Button>
}

{showConfirmation && (
<Dialog open={showConfirmation} onClose={handleConfirmationClose}>
<DialogTitle>
Expand All @@ -695,11 +690,18 @@ const JoinCourse = () => {
>
{t("LEAVE_COURSE")}
</Button>

</DialogActions>
</Dialog>
)}
</Box>
{isCompleted &&
<Box>
{t("COURSE_SUCCESSFULLY_COMPLETED")}
</Box>
}

</>
);
}
} else {
Expand Down Expand Up @@ -1332,7 +1334,7 @@ const JoinCourse = () => {
fontSize: "16px",
}}
>
{t("CERT_NOT_ATTACHED")}:
{t("CERT_NOT_ATTACHED")}
</Typography>

</Box>
Expand Down Expand Up @@ -1852,7 +1854,7 @@ const JoinCourse = () => {
style={{
margin: "0 0 9px 0",
display: "block",
fontSize: "16px",
fontSize: "14px",
}}
>
{t("CERT_NOT_ATTACHED")}:
Expand Down
2 changes: 1 addition & 1 deletion packages/nulp_elite/src/pages/profile/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ const Profile = () => {
aria-label="lab API tabs example"
>
<Tab
label={t("CONTINUE LEARNING")}
label={t("CONTINUE_LEARNNG")}
className="tab-text profile-tab"
icon={<DomainVerificationOutlinedIcon />}
value="1"
Expand Down
Loading

0 comments on commit 2377d14

Please sign in to comment.