From 317c51a5f4bbdf2535205bc98c6b08cf79314d7f Mon Sep 17 00:00:00 2001 From: Mahesh Mahajan Date: Fri, 13 Sep 2024 10:54:57 +0530 Subject: [PATCH 1/2] TASK :#226030 Filled data at the time of regsiation such as Role, org name and profile is unable to save while udpating the profile --- .../nulp_elite/src/pages/profile/Profile.js | 105 +++++++++--------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/packages/nulp_elite/src/pages/profile/Profile.js b/packages/nulp_elite/src/pages/profile/Profile.js index 9179e1a1..132e6217 100644 --- a/packages/nulp_elite/src/pages/profile/Profile.js +++ b/packages/nulp_elite/src/pages/profile/Profile.js @@ -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, @@ -1032,21 +1032,18 @@ const Profile = () => { - - - {" "} - {t("DESIGNATION")}{" "} + + + {t("DESIGNATION")} - {editedUserInfo.designation === "Others" && ( + + {!designationsList.includes(editedUserInfo.designation) && ( - {t("OTHER_DESIGNATION")}{" "} - * + {t("OTHER_DESIGNATION")} * - } + } variant="outlined" size="small" - value={editedUserInfo.otherDesignation} + value={ + editedUserInfo.otherDesignation || editedUserInfo.designation + } onChange={(e) => setEditedUserInfo({ ...editedUserInfo, @@ -1086,21 +1086,18 @@ const Profile = () => { )} - - - {" "} - {t("userType")}{" "} + + + {t("userType")} - {editedUserInfo.userType === "Others" && ( - - - {t("UserType")}{" "} - * - - } - variant="outlined" - size="small" - value={editedUserInfo.otherUserType} - onChange={(e) => - setEditedUserInfo({ - ...editedUserInfo, - otherUserType: e.target.value, - }) - } - /> - + {!userTypesList.includes(editedUserInfo.userType) && ( + + + {t("UserType")} * + + } + variant="outlined" + size="small" + value={editedUserInfo.otherUserType || editedUserInfo.userType} + onChange={(e) => + setEditedUserInfo({ + ...editedUserInfo, + otherUserType: e.target.value, + }) + } + /> + )} Date: Fri, 13 Sep 2024 13:42:08 +0530 Subject: [PATCH 2/2] TASK : #0000 Chnaged Language constants --- packages/nulp_elite/public/locales/be/translation.json | 5 ++--- packages/nulp_elite/public/locales/en/translation.json | 5 ++--- packages/nulp_elite/public/locales/gg/translation.json | 5 ++--- packages/nulp_elite/public/locales/hi/translation.json | 5 ++--- packages/nulp_elite/public/locales/ma/translation.json | 5 ++--- packages/nulp_elite/public/locales/mal/translation.json | 5 ++--- packages/nulp_elite/public/locales/ta/translation.json | 5 ++--- packages/nulp_elite/public/locales/te/translation.json | 5 ++--- packages/nulp_elite/src/pages/content/joinCourse.js | 6 +++--- 9 files changed, 19 insertions(+), 27 deletions(-) diff --git a/packages/nulp_elite/public/locales/be/translation.json b/packages/nulp_elite/public/locales/be/translation.json index 46c52785..bdf9cd4f 100644 --- a/packages/nulp_elite/public/locales/be/translation.json +++ b/packages/nulp_elite/public/locales/be/translation.json @@ -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 দ্বারা প্রকাশিত" } diff --git a/packages/nulp_elite/public/locales/en/translation.json b/packages/nulp_elite/public/locales/en/translation.json index c5b17a8d..5e88b564 100644 --- a/packages/nulp_elite/public/locales/en/translation.json +++ b/packages/nulp_elite/public/locales/en/translation.json @@ -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" } diff --git a/packages/nulp_elite/public/locales/gg/translation.json b/packages/nulp_elite/public/locales/gg/translation.json index 036675cb..7e0785db 100644 --- a/packages/nulp_elite/public/locales/gg/translation.json +++ b/packages/nulp_elite/public/locales/gg/translation.json @@ -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 દ્વારા પ્રકાશિત" } diff --git a/packages/nulp_elite/public/locales/hi/translation.json b/packages/nulp_elite/public/locales/hi/translation.json index 94344929..78861c9f 100644 --- a/packages/nulp_elite/public/locales/hi/translation.json +++ b/packages/nulp_elite/public/locales/hi/translation.json @@ -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": "एनयूपीएलपी द्वारा प्रकाशित" } diff --git a/packages/nulp_elite/public/locales/ma/translation.json b/packages/nulp_elite/public/locales/ma/translation.json index b72be166..7376e7fa 100644 --- a/packages/nulp_elite/public/locales/ma/translation.json +++ b/packages/nulp_elite/public/locales/ma/translation.json @@ -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": "एनयूपीएलपीद्वारे प्रकाशित" } diff --git a/packages/nulp_elite/public/locales/mal/translation.json b/packages/nulp_elite/public/locales/mal/translation.json index 696e1de2..229c6003 100644 --- a/packages/nulp_elite/public/locales/mal/translation.json +++ b/packages/nulp_elite/public/locales/mal/translation.json @@ -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 വഴി പ്രസിദ്ധീകരിച്ചത്" } diff --git a/packages/nulp_elite/public/locales/ta/translation.json b/packages/nulp_elite/public/locales/ta/translation.json index 3ddf0025..47d16fe7 100644 --- a/packages/nulp_elite/public/locales/ta/translation.json +++ b/packages/nulp_elite/public/locales/ta/translation.json @@ -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 மூலம் வெளியிடப்பட்டது" } diff --git a/packages/nulp_elite/public/locales/te/translation.json b/packages/nulp_elite/public/locales/te/translation.json index 6576e93a..ca64406a 100644 --- a/packages/nulp_elite/public/locales/te/translation.json +++ b/packages/nulp_elite/public/locales/te/translation.json @@ -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 ద్వారా ప్రచురించబడింది" } diff --git a/packages/nulp_elite/src/pages/content/joinCourse.js b/packages/nulp_elite/src/pages/content/joinCourse.js index 9aadc7c6..122e3cb8 100644 --- a/packages/nulp_elite/src/pages/content/joinCourse.js +++ b/packages/nulp_elite/src/pages/content/joinCourse.js @@ -1450,17 +1450,17 @@ className="xs-hide accordionBoxShadow" } {userData?.result?.content?.originData && ( <> -
{t("This content is derived from")}
+
{t("CONTENT_DERIVED_FROM")}

{t("CONTENT")}

{userData?.result?.content?.originData?.name}

- {t("LICENSE TERMS")} + {t("LICENSE_TERMS")}

{userData?.result?.content?.originData?.license}

- {t("PUBLISHED ON NULP BY")} + {t("PUBLISHED_ON_NULP_BY")}

{userData?.result?.content?.originData?.organisation[0]}