Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK :#226030 Filled data at the time of regsiation such as Role, org… #609

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/be/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@
"LEARNING_REPORT":"লার্নিং রিপোর্ট",
"POPULAR_COURSES" : "জনপ্রিয় কোর্স",
"RECENTLY_ADDED":"সম্প্রতি যোগ করা হয়েছে",
"This content is derived from": "এই বিষয়বস্তু থেকে সংগৃহীত",
"LICENSE TERMS": "লাইসেন্সের শর্তাবলী",
"PUBLISHED ON NULP BY": "NULP দ্বারা প্রকাশিত"
"CONTENT_DERIVED_FROM": "এই বিষয়বস্তু থেকে সংগৃহীত",
"PUBLISHED_ON_NULP_BY": "NULP দ্বারা প্রকাশিত"
}
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@
"LEARNING_REPORT":"Learning Report",
"POPULAR_COURSES" : "Popular Courses",
"RECENTLY_ADDED":"Recently Added",
"This content is derived from": "This content is derived from",
"LICENSE TERMS": "LICENSE TERMS",
"PUBLISHED ON NULP BY": "PUBLISHED ON NULP BY"
"CONTENT_DERIVED_FROM": "This content is derived from",
"PUBLISHED_ON_NULP_BY": "PUBLISHED ON NULP BY"
}
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/gg/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@
"LEARNING_REPORT":"લર્નિંગ રિપોર્ટ",
"POPULAR_COURSES" : "લોકપ્રિય અભ્યાસક્રમો",
"RECENTLY_ADDED":"તાજેતરમાં ઉમેરાયેલ",
"This content is derived from": "આ સામગ્રીમાંથી ઉત્પન્ન છે",
"LICENSE TERMS": "લાઇસન્સની શરતો",
"PUBLISHED ON NULP BY": "NULP દ્વારા પ્રકાશિત"
"CONTENT_DERIVED_FROM": "આ સામગ્રીમાંથી ઉત્પન્ન છે",
"PUBLISHED_ON_NULP_BY": "NULP દ્વારા પ્રકાશિત"

}
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@
"LEARNING_REPORT":"सीखने की रिपोर्ट",
"POPULAR_COURSES" : "लोकप्रिय पाठ्यक्रम",
"RECENTLY_ADDED":"हाल ही में जोड़ा",
"This content is derived from": "यह सामग्री से व्युत्पन्न है",
"LICENSE TERMS": "लाइसेंस की शर्तें",
"PUBLISHED ON NULP BY": "एनयूपीएलपी द्वारा प्रकाशित"
"CONTENT_DERIVED_FROM": "यह सामग्री से व्युत्पन्न है",
"PUBLISHED_ON_NULP_BY": "एनयूपीएलपी द्वारा प्रकाशित"
}
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/ma/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@
"LEARNING_REPORT":"शिकण्याचा अहवाल",
"POPULAR_COURSES" : "लोकप्रिय अभ्यासक्रम",
"RECENTLY_ADDED":"अलीकडे जोडले",
"This content is derived from": "ही सामग्री यावरून घेतली आहे",
"LICENSE TERMS": "परवाना अटी",
"PUBLISHED ON NULP BY": "एनयूपीएलपीद्वारे प्रकाशित"
"CONTENT_DERIVED_FROM": "ही सामग्री यावरून घेतली आहे",
"PUBLISHED_ON_NULP_BY": "एनयूपीएलपीद्वारे प्रकाशित"

}
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/mal/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@
"LEARNING_REPORT":"പഠന റിപ്പോർട്ട്",
"POPULAR_COURSES" : "ജനപ്രിയ കോഴ്സുകൾ",
"RECENTLY_ADDED":"അടുത്തിടെ ചേർത്തത് ",
"This content is derived from": "ഈ ഉള്ളടക്കം നിന്നു പ്രാപ്തമായതാണ്",
"LICENSE TERMS": "ലൈസൻസ് നിബന്ധനകൾ",
"PUBLISHED ON NULP BY": "NULP വഴി പ്രസിദ്ധീകരിച്ചത്"
"CONTENT_DERIVED_FROM": "ഈ ഉള്ളടക്കം നിന്നു പ്രാപ്തമായതാണ്",
"PUBLISHED_ON_NULP_BY": "NULP വഴി പ്രസിദ്ധീകരിച്ചത്"
}
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/ta/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@
"LEARNING_REPORT":"கற்றல் அறிக்கை",
"POPULAR_COURSES" : " జనాదరణ పొందిన కోర్సులు",
"RECENTLY_ADDED":"ఇటీవల జోడించబడింది",
"This content is derived from": "இந்த உள்ளடக்கம் இதிலிருந்து பெறப்பட்டுள்ளது",
"LICENSE TERMS": "உரிமம் நிபந்தனைகள்",
"PUBLISHED ON NULP BY": "NULP மூலம் வெளியிடப்பட்டது"
"CONTENT_DERIVED_FROM": "இந்த உள்ளடக்கம் இதிலிருந்து பெறப்பட்டுள்ளது",
"PUBLISHED_ON_NULP_BY": "NULP மூலம் வெளியிடப்பட்டது"
}
5 changes: 2 additions & 3 deletions packages/nulp_elite/public/locales/te/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@
"LEARNING_REPORT":"లెర్నింగ్ రిపోర్ట్",
"POPULAR_COURSES" : "జనాదరణ పొందిన కోర్సులు",
"RECENTLY_ADDED":"ఇటీవల జోడించబడింది",
"This content is derived from": "ఈ సాంఘికత నుండి పొందినది",
"LICENSE TERMS": "లైసెన్స్ నిబంధనలు",
"PUBLISHED ON NULP BY": "NULP ద్వారా ప్రచురించబడింది"
"CONTENT_DERIVED_FROM": "ఈ సాంఘికత నుండి పొందినది",
"PUBLISHED_ON_NULP_BY": "NULP ద్వారా ప్రచురించబడింది"
}
6 changes: 3 additions & 3 deletions packages/nulp_elite/src/pages/content/joinCourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1450,17 +1450,17 @@ className="xs-hide accordionBoxShadow"
}
{userData?.result?.content?.originData && (
<>
<h5>{t("This content is derived from")}</h5>
<h5>{t("CONTENT_DERIVED_FROM")}</h5>
<p style={{ color: "#4d4d4d", fontSize: "13px", fontWeight: "bold" }}>
{t("CONTENT")}
</p>
{userData?.result?.content?.originData?.name}
<p style={{ color: "#4d4d4d", fontSize: "13px", fontWeight: "bold" }}>
{t("LICENSE TERMS")}
{t("LICENSE_TERMS")}
</p>
{userData?.result?.content?.originData?.license}
<p style={{ color: "#4d4d4d", fontSize: "13px", fontWeight: "bold" }}>
{t("PUBLISHED ON NULP BY")}
{t("PUBLISHED_ON_NULP_BY")}
</p>
{userData?.result?.content?.originData?.organisation[0]}
</>
Expand Down
105 changes: 51 additions & 54 deletions packages/nulp_elite/src/pages/profile/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,13 @@ const Profile = () => {
const updateUserInfoInCustomDB = async () => {
const requestBody = {
designation:
editedUserInfo.designation === "Other"
editedUserInfo.designation === "Others"
? editedUserInfo.otherDesignation
: editedUserInfo.designation,
bio: editedUserInfo.bio,
created_by: _userId,
user_type:
editedUserInfo.userType === "Other"
editedUserInfo.userType === "Others"
? editedUserInfo.otherUserType
: editedUserInfo.userType,
organisation: editedUserInfo.organisation,
Expand Down Expand Up @@ -1032,21 +1032,18 @@ const Profile = () => {
</Box>

<Box py={1}>
<FormControl
fullWidth
style={{ marginTop: "10px" }}
>
<InputLabel
id="designation-label"
className="year-select"
>
{" "}
{t("DESIGNATION")}{" "}
<FormControl fullWidth style={{ marginTop: "10px" }}>
<InputLabel id="designation-label" className="year-select">
{t("DESIGNATION")}
</InputLabel>
<Select
labelId="designation-label"
id="designation"
value={editedUserInfo.designation}
value={
designationsList.includes(editedUserInfo.designation)
? editedUserInfo.designation
: "Others"
}
onChange={(e) =>
setEditedUserInfo({
...editedUserInfo,
Expand All @@ -1059,23 +1056,26 @@ const Profile = () => {
{desig}
</MenuItem>
))}
<MenuItem value="Others">{t("Others")}</MenuItem>
</Select>
</FormControl>
</Box>
{editedUserInfo.designation === "Others" && (

{!designationsList.includes(editedUserInfo.designation) && (
<Box py={1}>
<CssTextField
id="otherDesignation"
name="otherDesignation"
label={
<span>
{t("OTHER_DESIGNATION")}{" "}
<span className="required">*</span>
{t("OTHER_DESIGNATION")} <span className="required">*</span>
</span>
}
}
variant="outlined"
size="small"
value={editedUserInfo.otherDesignation}
value={
editedUserInfo.otherDesignation || editedUserInfo.designation
}
onChange={(e) =>
setEditedUserInfo({
...editedUserInfo,
Expand All @@ -1086,58 +1086,55 @@ const Profile = () => {
</Box>
)}
<Box py={1}>
<FormControl
fullWidth
style={{ marginTop: "10px" }}
>
<InputLabel
id="designation-label"
className="year-select"
>
{" "}
{t("userType")}{" "}
<FormControl fullWidth style={{ marginTop: "10px" }}>
<InputLabel id="designation-label" className="year-select">
{t("userType")}
</InputLabel>
<Select
labelId="designation-label"
id="designation"
value={editedUserInfo.userType}
value={
userTypesList.includes(editedUserInfo.userType)
? editedUserInfo.userType
: "Others"
}
onChange={(e) =>
setEditedUserInfo({
...editedUserInfo,
userType: e.target.value,
})
}
>
{userTypesList.map((desig, index) => (
<MenuItem key={index} value={desig}>
{desig}
{userTypesList.map((userType, index) => (
<MenuItem key={index} value={userType}>
{userType}
</MenuItem>
))}
<MenuItem value="Others">{t("Others")}</MenuItem>
</Select>
</FormControl>
</Box>
{editedUserInfo.userType === "Others" && (
<Box py={1}>
<CssTextField
id="otherDesignation"
name="otherDesignation"
label={
<span>
{t("UserType")}{" "}
<span className="required">*</span>
</span>
}
variant="outlined"
size="small"
value={editedUserInfo.otherUserType}
onChange={(e) =>
setEditedUserInfo({
...editedUserInfo,
otherUserType: e.target.value,
})
}
/>
</Box>
{!userTypesList.includes(editedUserInfo.userType) && (
<Box py={1}>
<CssTextField
id="otherUserType"
name="otherUserType"
label={
<span>
{t("UserType")} <span className="required">*</span>
</span>
}
variant="outlined"
size="small"
value={editedUserInfo.otherUserType || editedUserInfo.userType}
onChange={(e) =>
setEditedUserInfo({
...editedUserInfo,
otherUserType: e.target.value,
})
}
/>
</Box>
)}
<Box py={2}>
<TextField
Expand Down
Loading