Skip to content

Commit

Permalink
Merge pull request #672 from paritshivani/main
Browse files Browse the repository at this point in the history
prod deployment - Oct 4
  • Loading branch information
paritshivani authored Oct 4, 2024
2 parents 5d4134f + cdffdab commit 9648104
Show file tree
Hide file tree
Showing 24 changed files with 1,997 additions and 1,233 deletions.
8 changes: 6 additions & 2 deletions packages/nulp_elite/public/locales/be/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@

"SELECT_CATEGORY_FIRST":"প্রথমে একটি বিভাগ নির্বাচন করুন",
"SELECT_PREF":"পছন্দ নির্বাচন করুন",
"CHANGE_PREF_OLD_USER":"আমরা কাঠামোতে কিছু পরিবর্তন করেছি অনুগ্রহ করে আপনার পছন্দ নির্বাচন করুন"
"CHANGE_PREF_OLD_USER":"আমরা কাঠামোতে কিছু পরিবর্তন করেছি অনুগ্রহ করে আপনার পছন্দ নির্বাচন করুন",
"COURSE & CERTIFICATES": "কোর্স এবং সার্টিফিকেট",
"ALL_PLAYER": "সমস্ত খেলোয়াড়",
"LICENSEDETAILS": "লাইসেন্সের বিবরণ",
Expand Down Expand Up @@ -321,5 +321,9 @@

"NO_CHAT_REQUEST": "কোনো চ্যাট অনুরোধ নেই",
"PHONE":"ফোন",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"LERN_title":"Learnathon 2.0",
"LERN_MESSAGE":"Learnathon 2.0 20/09/2024 থেকে 20/10/2024 পর্যন্ত শুরু হয়েছে। আপনি এখন আপনার জমাগুলি তৈরি এবং ভাগ করতে পারেন!",
"CREATE_CONTENT":"সামগ্রী তৈরি করুন",
"REQUEST_TO_CREATE":"তৈরি করার অনুরোধ"
}
44 changes: 25 additions & 19 deletions packages/nulp_elite/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,26 +295,32 @@
"VIEW_STATUS": "View Status",
"SEARCH_FOR_POLL": "Search for a Poll",
"NO_POLL_AVAILABLE_NOW": " It looks like there are no polls at the moment.",
"ADMIN":"Admin",
"LEARNING_REPORT":"Learning Report",
"POPULAR_COURSES" : "Popular Courses",
"RECENTLY_ADDED":"Recently Added",
"THIS_CONTENT_IS_DERIVED_FROM":"This content is derived from",
"PUBLISHED_ON_NULP_BY":"PUBLISHED ON NULP BY",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "I am 18+ years old and understand and accept the NULP Terms of Use",
"ADMIN": "Admin",
"LEARNING_REPORT": "Learning Report",
"POPULAR_COURSES": "Popular Courses",
"RECENTLY_ADDED": "Recently Added",
"THIS_CONTENT_IS_DERIVED_FROM": "This content is derived from",
"PUBLISHED_ON_NULP_BY": "PUBLISHED ON NULP BY",
"ACCEPT_THE_NULP_TERMS_OF_USE": "I am 18+ years old and understand and accept the NULP Terms of Use",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "As a parent/guardian I understand & accept the NULP Terms of Use agree my child to register on NULP with the given information.",
"CONTENT_DERIVED_FROM": "This content is derived from",
"FILTERS":"Filters",
"EXPLORE_CONTENT":"Explore Content",
"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",
"NO_CHAT_REQUEST" : "No Chat Request",
"PHONE":"Phone",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"

"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",
"NO_CHAT_REQUEST": "No Chat Request",
"PHONE": "Phone",
"PHONE_NUMBER": "(+91 11) 24617517, 24617543, 24617595",
"SESSION_TIMEOUT_MESSAGE": "Failed to fetch data.please try again.",
"LERN_title": "Learnathon 2.0",
"LERN_MESSAGE": "Learnathon 2.0 has started from 20/09/2024 to 20/10/2024. You can now create and share your submissions!",
"CREATE_CONTENT": "Create Content",
"REQUEST_TO_CREATE": "Request to Create"
}
6 changes: 5 additions & 1 deletion packages/nulp_elite/public/locales/gg/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,5 +324,9 @@
"LAST_NAME":"છેલ્લું નામ",
"NO_CHAT_REQUEST": "કોઈ ચેટ વિનંતી નથી",
"PHONE":"ફોન",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"LERN_title":"લર્નથોન 2.0",
"LERN_MESSAGE":"લર્નથોન 2.0 20/09/2024 થી 20/10/2024 સુધી શરૂ થઈ છે. તમે હવે તમારા સબમિશન બનાવી અને શેર કરી શકો છો!",
"CREATE_CONTENT":"સામગ્રી બનાવો",
"REQUEST_TO_CREATE":"બનાવવાની વિનંતી"
}
6 changes: 5 additions & 1 deletion packages/nulp_elite/public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,5 +315,9 @@
"LAST_NAME":"अंतिम नाम",
"NO_CHAT_REQUEST": "कोई चैट अनुरोध नहीं",
"PHONE":"फोन",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"LERN_title":"लर्नथॉन 2.0",
"LERN_MESSAGE":"लर्नथॉन 2.0 20/09/2024 से 20/10/2024 तक शुरू हो चुका है। अब आप अपने सबमिशन बना और साझा कर सकते हैं!",
"CREATE_CONTENT":"सामग्री बनाएँ",
"REQUEST_TO_CREATE":"बनाने का अनुरोध"
}
6 changes: 5 additions & 1 deletion packages/nulp_elite/public/locales/ma/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@
"LAST_NAME":"आडनाव",
"NO_CHAT_REQUEST": "चॅट विनंती नाही",
"PHONE":"फोन",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"LERN_title":"लर्नथॉन 2.0",
"LERN_MESSAGE":"लर्नथॉन 2.0 20/09/2024 ते 20/10/2024 पर्यंत सुरू झाली आहे. तुम्ही आता तुमचे सबमिशन तयार आणि शेअर करू शकता!",
"CREATE_CONTENT":"सामग्री तयार करा",
"REQUEST_TO_CREATE":"तयार करण्याची विनंती"
}

6 changes: 5 additions & 1 deletion packages/nulp_elite/public/locales/mal/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,5 +316,9 @@
"LAST_NAME":"അവസാന നാമം",
"NO_CHAT_REQUEST": "ചാറ്റ് അഭ്യര്‍ത്ഥനയില്ല",
"PHONE":"ഫോൺ",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"LERN_title":"ലേണത്തോൺ 2.0",
"LERN_MESSAGE":"ലേണത്തോൺ 2.0 20/09/2024 മുതൽ 20/10/2024 വരെ ആരംഭിച്ചു. നിങ്ങൾക്ക് ഇപ്പോൾ നിങ്ങളുടെ സമർപ്പിക്കലുകൾ സൃഷ്ടിക്കാനും പങ്കിടാനും കഴിയും!",
"CREATE_CONTENT":"ഉള്ളടക്കം സൃഷ്ടിക്കുക",
"REQUEST_TO_CREATE":"സൃഷ്ടിക്കാനുള്ള അഭ്യർത്ഥന"
}
6 changes: 5 additions & 1 deletion packages/nulp_elite/public/locales/ta/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,5 +341,9 @@
"LAST_NAME":"கடைசி பெயர்",
"NO_CHAT_REQUEST": "சாட் கோரிக்கை இல்லை",
"PHONE":"தொலைபேசி",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595"
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"LERN_title":"கற்றல் 2.0",
"LERN_MESSAGE":"கற்றல் 2.0 20/09/2024 முதல் 20/10/2024 வரை தொடங்கியது. நீங்கள் இப்போது உங்கள் சமர்ப்பிப்புகளை உருவாக்கி பகிரலாம்!",
"CREATE_CONTENT":"உள்ளடக்கத்தை உருவாக்கவும்",
"REQUEST_TO_CREATE":"உருவாக்க கோரிக்கை"
}
6 changes: 5 additions & 1 deletion packages/nulp_elite/public/locales/te/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,9 @@
"NO_CHAT_REQUEST": "చాట్ అభ్యర్థన లేదు",
"PHONE":"ఫోన్",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"WHAT_DO_YOU_WANT_TO_LEARN_TODAY":"ఈరోజు మీరు ఏమి నేర్చుకోవాలనుకుంటున్నారు"
"WHAT_DO_YOU_WANT_TO_LEARN_TODAY":"ఈరోజు మీరు ఏమి నేర్చుకోవాలనుకుంటున్నారు",
"LERN_title":"లెర్నాథాన్ 2.0",
"LERN_MESSAGE":"లెర్నాథాన్ 2.0 20/09/2024 నుండి 20/10/2024 వరకు ప్రారంభమైంది. మీరు ఇప్పుడు మీ సమర్పణలను సృష్టించవచ్చు మరియు భాగస్వామ్యం చేయవచ్చు!",
"CREATE_CONTENT":"కంటెంట్‌ని సృష్టించండి",
"REQUEST_TO_CREATE":"సృష్టించడానికి అభ్యర్థన"
}
19 changes: 12 additions & 7 deletions packages/nulp_elite/src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React, { useEffect, useState } from "react";
import "./App.css";
import "./styles/style.css";
import {
NativeBaseProvider,
} from "native-base";
import { NativeBaseProvider } from "native-base";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import { initializeI18n } from "@shiksha/common-lib";
import * as util from "services/utilService";
Expand Down Expand Up @@ -36,11 +34,13 @@ import createForm from "pages/voting/createForm";
import VotingDetails from "pages/voting/votingDetails";
import votingDashboard from "pages/voting/votingDashboard";
import pollsDetails from "pages/voting/pollsDetails";
import LernCreatorForm from "pages/learnathon/lernCreatorForm";
const urlConfig = require("./configs/urlConfig.json");
const routeConfig = require("./configs/routeConfig.json");
import PopupForm from "pages/profileData";
import axios from "axios";
import ReactGA from 'react-ga4';
import ReactGA from "react-ga4";
import LernModal from "components/learnathon/LernModal";

function App() {
// const [t] = useTranslation();
Expand All @@ -53,8 +53,7 @@ function App() {
const _userId = util.userId();
const [orgId, setOrgId] = useState();
const [userData, setUserData] = React.useState(false);
ReactGA.initialize('G-QH3SHT9MTG');

ReactGA.initialize("G-QH3SHT9MTG");

const routes = [
{
Expand Down Expand Up @@ -213,6 +212,11 @@ function App() {
path: routeConfig.ROUTES.POLL.POLLS_VIEW_ALL,
component: pollsDetails,
},
{
moduleName: "nulp_elite",
path: routeConfig.ROUTES.LEARNATHON.CREATELEARNCONTENT,
component: LernCreatorForm,
},
];
createForm;
initializeI18n(
Expand Down Expand Up @@ -286,7 +290,7 @@ function App() {
console.error("Error fetching user data:", error);
}
};
console.log("Prod here")
console.log("dev here");
fetchData();
UserData();
}, []);
Expand Down Expand Up @@ -322,6 +326,7 @@ console.log("Prod here")
))}
</Routes>
</Router>
<LernModal />
</React.Suspense>
{/* </ChakraProvider> */}
{/* </ChakraProvider> */}
Expand Down
126 changes: 103 additions & 23 deletions packages/nulp_elite/src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
const { t } = useTranslation();

useEffect(() => {
console.log("items-------", items);
if (items.se_gradeLevels) {
setSubdomain(processString(items.se_gradeLevels[0]));
} else if (items.gradeLevel) {
Expand Down Expand Up @@ -196,29 +197,108 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
{items.name}
</Typography>
)}
{items.organisation && items.organisation.length > 0 && (
<Tooltip
title={
items.organisation.length > 1
? items.organisation.join(', ')
: items.organisation[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{ fontSize: "11px", padding: "10px 0", textAlign: "left" }}
>
<Box className="cardLabelEllips">
{items.organisation.length === 1
? items.organisation[0]
: `${items.organisation[0]} + ${items.organisation.length - 1}`}
</Box>
</Typography>
</Tooltip>
)}
<Box
style={{
alignItems: "center",
justifyContent: "space-between",
display: "flex",
}}
>
<Box>
{" "}
{items.organisation && items.organisation.length > 0 && (
<Tooltip
title={
items.organisation.length > 1
? items.organisation.join(", ")
: items.organisation[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{
fontSize: "11px",
padding: "10px 0",
textAlign: "left",
}}
>
<Box className="cardLabelEllips">
{items.organisation.length === 1
? items.organisation[0]
: `${items.organisation[0]} + ${
items.organisation.length - 1
}`}
</Box>
</Typography>
</Tooltip>
)}
</Box>
<Box>
{items?.medium ||
(items?.se_mediums && (
<>
{items?.medium && items.medium.length > 0 ? (
<Tooltip
title={
items.medium.length > 1
? items.medium.join(", ")
: items.medium[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{
fontSize: "11px",
padding: "10px 0",
textAlign: "right",
}}
>
<Box className="cardLabelEllips">
{items.medium.length === 1
? items.medium[0]
: `${items.medium[0]} + ${items.medium.length - 1}`}
</Box>
</Typography>
</Tooltip>
) : (
<Tooltip
title={
items.se_mediums.length > 1
? items.se_mediums.join(", ")
: items.se_mediums[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{
fontSize: "11px",
padding: "10px 0",
textAlign: "right",
}}
>
<Box className="cardLabelEllips">
{items.se_mediums.length === 1
? items.se_mediums[0]
: `${items.se_mediums[0]} + ${
items.se_mediums.length - 1
}`}
</Box>
</Typography>
</Tooltip>
)}
</>
))}
</Box>
</Box>
</CardContent>
{(items?.board ||
items?.gradeLevel ||
Expand Down
12 changes: 8 additions & 4 deletions packages/nulp_elite/src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ function Header({ globalSearchQuery }) {
boxShadow: searchQuery ? '0 2px 4px rgba(0, 0, 0, 0.2)' : 'none',
color: searchQuery ? '#fff' : "#000"
};

const handleLogout =() => {
sessionStorage.setItem('isModalShown', 'false');
}
return (
<>
<Box
Expand Down Expand Up @@ -612,8 +614,10 @@ function Header({ globalSearchQuery }) {

</MenuItem>
</Link>
<Link href="/logoff" underline="none" textAlign="center">
<Link href="/logoff" underline="none" textAlign="center"
onClick={handleLogout}>
<MenuItem>


{t("LOGOUT")}

Expand Down Expand Up @@ -672,7 +676,7 @@ function Header({ globalSearchQuery }) {

</MenuItem>
</Link>
<Link href="/logoff" textAlign="center" underline="none">
<Link href="/logoff" textAlign="center" underline="none" onClick={handleLogout}>
<MenuItem>

<LogoutOutlinedIcon
Expand Down Expand Up @@ -971,7 +975,7 @@ function Header({ globalSearchQuery }) {
{t("HELP")}
</MenuItem>
</Link>
<Link href="/logoff" underline="none" textAlign="center">
<Link href="/logoff" underline="none" textAlign="center" onClick={handleLogout}>
<MenuItem>
{t("LOGOUT")}
</MenuItem>
Expand Down
Loading

0 comments on commit 9648104

Please sign in to comment.