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

prod deployment - 17th September #617

Merged
merged 11 commits into from
Sep 17, 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
7 changes: 5 additions & 2 deletions packages/nulp_elite/public/locales/be/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@
"LEARNING_REPORT":"লার্নিং রিপোর্ট",
"POPULAR_COURSES" : "জনপ্রিয় কোর্স",
"RECENTLY_ADDED":"সম্প্রতি যোগ করা হয়েছে",
"CONTENT_DERIVED_FROM": "এই বিষয়বস্তু থেকে সংগৃহীত",
"PUBLISHED_ON_NULP_BY": "NULP দ্বারা প্রকাশিত"
"THIS_CONTENT_IS_DERIVED_FROM":"এই বিষয়বস্তুটি এখান থেকে নেওয়া হয়েছে",
"PUBLISHED_ON_NULP_BY":"NULP-এ প্রকাশিত",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "আমার বয়স 18+ বছর এবং আমি NULP ব্যবহারের শর্তাবলী বুঝি এবং স্বীকার করি",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "একজন পিতা-মাতা/অভিভাবক হিসাবে আমি NULP ব্যবহারের শর্তাবলী বুঝি এবং স্বীকার করি যে আমার সন্তান প্রদত্ত তথ্যের সাথে NULP-এ নিবন্ধন করতে সম্মত।",
"CONTENT_DERIVED_FROM": "এই বিষয়বস্তু থেকে সংগৃহীত"
}
9 changes: 6 additions & 3 deletions packages/nulp_elite/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
"OK": "Ok",
"BLOCK_USER_LIST": "Block user list",
"ARE_YOU_SURE_YOU_WANT_TO_REJECT_THIS_REQUEST": " Are you sure you want to reject this request?",
"ARE_YOU_SURE_YOU_WANT_TO_BLOCK_THIS_USER": " Are you sure you want to block this user?",
"ARE_YOU_SURE_YOU_WANT_TO_BLOCK_THIS_USER": "Are you sure you want to block this user?",
"CONNECT_WITH_THEM_TO_GET_INSIGHTS": "Connect with them to get insights on what they do or simply answers to your question!",
"NO_RESULT_FOUND": "No result Found",
"WEBINAR": "Events",
Expand Down Expand Up @@ -317,6 +317,9 @@
"LEARNING_REPORT":"Learning Report",
"POPULAR_COURSES" : "Popular Courses",
"RECENTLY_ADDED":"Recently Added",
"CONTENT_DERIVED_FROM": "This content is derived from",
"PUBLISHED_ON_NULP_BY": "PUBLISHED ON NULP BY"
"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"
}
7 changes: 5 additions & 2 deletions packages/nulp_elite/public/locales/gg/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@
"LEARNING_REPORT":"લર્નિંગ રિપોર્ટ",
"POPULAR_COURSES" : "લોકપ્રિય અભ્યાસક્રમો",
"RECENTLY_ADDED":"તાજેતરમાં ઉમેરાયેલ",
"CONTENT_DERIVED_FROM": "આ સામગ્રીમાંથી ઉત્પન્ન છે",
"PUBLISHED_ON_NULP_BY": "NULP દ્વારા પ્રકાશિત"
"THIS_CONTENT_IS_DERIVED_FROM":"આ સામગ્રી આમાંથી લેવામાં આવી છે",
"PUBLISHED_ON_NULP_BY":"NULP દ્વારા પ્રકાશિત",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "હું 18+ વર્ષનો છું અને NULP ઉપયોગની શરતો સમજું છું અને સ્વીકારું છું",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "માતાપિતા/વાલી તરીકે હું NULP ઉપયોગની શરતોને સમજું છું અને સ્વીકારું છું અને સ્વીકારું છું કે મારા બાળકને આપેલ માહિતી સાથે NULP પર નોંધણી કરાવવા માટે સંમત થાઓ.",
"CONTENT_DERIVED_FROM": "આ સામગ્રીમાંથી ઉત્પન્ન છે"

}
6 changes: 4 additions & 2 deletions packages/nulp_elite/public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@
"LEARNING_REPORT":"सीखने की रिपोर्ट",
"POPULAR_COURSES" : "लोकप्रिय पाठ्यक्रम",
"RECENTLY_ADDED":"हाल ही में जोड़ा",
"CONTENT_DERIVED_FROM": "यह सामग्री से व्युत्पन्न है",
"PUBLISHED_ON_NULP_BY": "एनयूपीएलपी द्वारा प्रकाशित"
"THIS_CONTENT_IS_DERIVED_FROM":"यह सामग्री इससे ली गई है",
"PUBLISHED_ON_NULP_BY":"NULP BY पर प्रकाशित",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "मैं 18+ वर्ष का हूं और NULP उपयोग की शर्तों को समझता हूं और स्वीकार करता हूं",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "एक माता-पिता/अभिभावक के रूप में मैं NULP उपयोग की शर्तों को समझता हूं और स्वीकार करता हूं और अपने बच्चे को दी गई जानकारी के साथ NULP पर पंजीकरण करने के लिए सहमत करता हूं।"
}
9 changes: 6 additions & 3 deletions packages/nulp_elite/public/locales/ma/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@
"LEARNING_REPORT":"शिकण्याचा अहवाल",
"POPULAR_COURSES" : "लोकप्रिय अभ्यासक्रम",
"RECENTLY_ADDED":"अलीकडे जोडले",
"CONTENT_DERIVED_FROM": "ही सामग्री यावरून घेतली आहे",
"PUBLISHED_ON_NULP_BY": "एनयूपीएलपीद्वारे प्रकाशित"

"THIS_CONTENT_IS_DERIVED_FROM":"ही सामग्री येथून घेतली आहे",
"PUBLISHED_ON_NULP_BY":"NULP द्वारे प्रकाशित",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "मी 18+ वर्षांचा आहे आणि NULP वापरण्याच्या अटी समजतो आणि स्वीकारतो",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "पालक/पालक म्हणून मी NULP वापराच्या अटी समजतो आणि स्वीकारतो आणि माझ्या मुलाने दिलेल्या माहितीसह NULP वर नोंदणी करण्यास सहमती देतो.",
"CONTENT_DERIVED_FROM": "ही सामग्री यावरून घेतली आहे"
}

7 changes: 5 additions & 2 deletions packages/nulp_elite/public/locales/mal/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@
"LEARNING_REPORT":"പഠന റിപ്പോർട്ട്",
"POPULAR_COURSES" : "ജനപ്രിയ കോഴ്സുകൾ",
"RECENTLY_ADDED":"അടുത്തിടെ ചേർത്തത് ",
"CONTENT_DERIVED_FROM": "ഈ ഉള്ളടക്കം നിന്നു പ്രാപ്തമായതാണ്",
"PUBLISHED_ON_NULP_BY": "NULP വഴി പ്രസിദ്ധീകരിച്ചത്"
"THIS_CONTENT_IS_DERIVED_FROM":"ഈ ഉള്ളടക്കം ഉരുത്തിരിഞ്ഞത്",
"PUBLISHED_ON_NULP_BY":"NULP-ൽ പ്രസിദ്ധീകരിച്ചത്",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "എനിക്ക് 18+ വയസ്സുണ്ട്, NULP ഉപയോഗ നിബന്ധനകൾ മനസ്സിലാക്കുകയും അംഗീകരിക്കുകയും ചെയ്യുന്നു",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "ഒരു രക്ഷിതാവ്/രക്ഷകൻ എന്ന നിലയിൽ, NULP ഉപയോഗ നിബന്ധനകൾ ഞാൻ മനസ്സിലാക്കുകയും അംഗീകരിക്കുകയും ചെയ്യുന്നു, തന്നിരിക്കുന്ന വിവരങ്ങൾക്കൊപ്പം NULP-ൽ രജിസ്റ്റർ ചെയ്യാൻ എൻ്റെ കുട്ടി സമ്മതിക്കുന്നു.",
"CONTENT_DERIVED_FROM": "ഈ ഉള്ളടക്കം നിന്നു പ്രാപ്തമായതാണ്"
}
7 changes: 5 additions & 2 deletions packages/nulp_elite/public/locales/ta/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@
"LEARNING_REPORT":"கற்றல் அறிக்கை",
"POPULAR_COURSES" : " జనాదరణ పొందిన కోర్సులు",
"RECENTLY_ADDED":"ఇటీవల జోడించబడింది",
"CONTENT_DERIVED_FROM": "இந்த உள்ளடக்கம் இதிலிருந்து பெறப்பட்டுள்ளது",
"PUBLISHED_ON_NULP_BY": "NULP மூலம் வெளியிடப்பட்டது"
"THIS_CONTENT_IS_DERIVED_FROM":"இந்த உள்ளடக்கம் இதிலிருந்து பெறப்பட்டது",
"PUBLISHED_ON_NULP_BY":"NULP ஆல் வெளியிடப்பட்டது",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "எனக்கு 18+ வயது மற்றும் NULP பயன்பாட்டு விதிமுறைகளைப் புரிந்து ஏற்றுக்கொள்கிறேன்",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "ஒரு பெற்றோர்/பாதுகாவலராக நான் NULP பயன்பாட்டு விதிமுறைகளைப் புரிந்துகொண்டு ஏற்றுக்கொள்கிறேன், கொடுக்கப்பட்ட தகவலுடன் NULP இல் பதிவுசெய்ய என் குழந்தை ஒப்புக்கொள்கிறேன்.",
"CONTENT_DERIVED_FROM": "இந்த உள்ளடக்கம் இதிலிருந்து பெறப்பட்டுள்ளது"
}
7 changes: 5 additions & 2 deletions packages/nulp_elite/public/locales/te/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@
"LEARNING_REPORT":"లెర్నింగ్ రిపోర్ట్",
"POPULAR_COURSES" : "జనాదరణ పొందిన కోర్సులు",
"RECENTLY_ADDED":"ఇటీవల జోడించబడింది",
"CONTENT_DERIVED_FROM": "ఈ సాంఘికత నుండి పొందినది",
"PUBLISHED_ON_NULP_BY": "NULP ద్వారా ప్రచురించబడింది"
"THIS_CONTENT_IS_DERIVED_FROM":"ఈ కంటెంట్ దీని నుండి తీసుకోబడింది",
"PUBLISHED_ON_NULP_BY":"NULP ద్వారా ప్రచురించబడింది",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "నాకు 18+ సంవత్సరాలు మరియు NULP ఉపయోగ నిబంధనలను అర్థం చేసుకుని, అంగీకరిస్తున్నాను",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "తల్లిదండ్రులుగా/సంరక్షకుడిగా నేను NULP ఉపయోగ నిబంధనలను అర్థం చేసుకున్నాను & అంగీకరిస్తున్నాను, అందించిన సమాచారంతో NULPలో నమోదు చేసుకోవడానికి నా బిడ్డ అంగీకరిస్తున్నాను.",
"CONTENT_DERIVED_FROM": "ఈ సాంఘికత నుండి పొందినది"
}
16 changes: 1 addition & 15 deletions packages/nulp_elite/src/App.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
import React, { useEffect, useState } from "react";

import "./App.css";
import "./styles/style.css";
import {
NativeBaseProvider,
Box,
Stack,
VStack,
Text,
HStack,
Button,
extendTheme,
Actionsheet,
ScrollView,
} from "native-base";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import { DEFAULT_THEME, H2, initializeI18n } from "@shiksha/common-lib";
import { useTranslation, initReactI18next } from "react-i18next";
import i18n from "i18next";
import { initializeI18n } from "@shiksha/common-lib";

import * as util from "services/utilService";
// import { ChakraProvider } from "@chakra-ui/react";
import Profile from "pages/profile/Profile";
import Certificate from "pages/profile/certificate";
import FAQPage from "pages/FAQPage";
Expand Down Expand Up @@ -48,7 +35,6 @@ import Dashboard from "pages/events/dashboard";
import VotingList from "pages/voting/votingList";
import createForm from "pages/voting/createForm";
import VotingDetails from "pages/voting/votingDetails";
import { truncate } from "lodash";
import votingDashboard from "pages/voting/votingDashboard";
import pollsDetails from "pages/voting/pollsDetails";
const urlConfig = require("./configs/urlConfig.json");
Expand Down
10 changes: 10 additions & 0 deletions packages/nulp_elite/src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
</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"
Expand All @@ -208,6 +217,7 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
: `${items.organisation[0]} + ${items.organisation.length - 1}`}
</Box>
</Typography>
</Tooltip>
)}
</CardContent>
{(items?.board ||
Expand Down
53 changes: 0 additions & 53 deletions packages/nulp_elite/src/components/FeedbackPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
TextField,
} from "@mui/material";
import StarIcon from "@mui/icons-material/Star";
import { styled } from "@mui/material/styles";
import IconButton from "@mui/material/IconButton";
import CloseIcon from "@mui/icons-material/Close";
import * as util from "../../src/services/utilService";
Expand All @@ -28,14 +27,6 @@ const FeedbackPopup = ({ open, onClose, contentId }) => {
const [checkboxes, setCheckboxes] = useState({});
const _userId = util.userId();

// const BootstrapDialog = styled(Dialog)(({ theme }) => ({
// "& .MuiDialogContent-root": {
// padding: theme.spacing(2),
// },
// "& .MuiDialogActions-root": {
// padding: theme.spacing(1),
// },
// }));
// Mapping of checkbox names to labels
const checkboxLabels = {
conceptWell: "Understood the concept well",
Expand Down Expand Up @@ -112,21 +103,12 @@ const FeedbackPopup = ({ open, onClose, contentId }) => {
};

const response = await axios.post(url, request);
console.log("response.data", response.data);

console.log("Rating:", rating);
console.log("Selected Checkboxes:", selectedCheckboxes);
console.log("Additional Feedback:", additionalFeedback);

onClose();
} catch (error) {
console.error("Error submitting feedback:", error);
}
};

// const handleClose = () => {
// setOpen(false);
// };

const renderCheckboxes = () => {
if (rating >= 5) {
Expand Down Expand Up @@ -338,41 +320,6 @@ const FeedbackPopup = ({ open, onClose, contentId }) => {
</Button>
</DialogActions>
</Dialog>

// <Dialog open={open} onClose={onClose}>
// <DialogTitle>Feedback</DialogTitle>
// <DialogContent>
// <Typography variant="h6">Rate Us</Typography>
// <Box>
// <Rating
// name="feedback-rating"
// value={rating}
// onChange={handleRatingChange}
// icon={<StarIcon style={{ color: "gold" }} />}
// emptyIcon={<StarIcon style={{ color: "grey" }} />}
// precision={1}
// />
// <Typography variant="body1" style={{ marginLeft: "10px" }}>
// {rating} {rating === 1 ? "star" : "stars"}
// </Typography>
// </Box>
// <Typography
// variant="body2"
// style={{ marginTop: "10px", fontStyle: "italic" }}
// >
// {ratingMessages[rating]}
// </Typography>
// {renderCheckboxes()}
// </DialogContent>
// <DialogActions>
// <Button onClick={onClose} color="primary">
// Cancel
// </Button>
// <Button onClick={handleSubmit} color="primary">
// Submit
// </Button>
// </DialogActions>
// </Dialog>
);
};

Expand Down
26 changes: 0 additions & 26 deletions packages/nulp_elite/src/components/VotingCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import CardContent from "@mui/material/CardContent";
import Button from "@mui/material/Button";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import Modal from "@mui/material/Modal";
import { useTranslation } from "react-i18next";
import TodayOutlinedIcon from "@mui/icons-material/TodayOutlined";
import ArrowForwardIosOutlinedIcon from "@mui/icons-material/ArrowForwardIosOutlined";
Expand All @@ -20,7 +19,6 @@ import {
} from "react-share";
import { styled } from "@mui/material/styles";
import Dialog from "@mui/material/Dialog";
import DialogTitle from "@mui/material/DialogTitle";
import DialogContent from "@mui/material/DialogContent";
import DialogActions from "@mui/material/DialogActions";
import IconButton from "@mui/material/IconButton";
Expand Down Expand Up @@ -96,16 +94,6 @@ export default function VotingCard({ items, index, onClick }) {
};

const isVotingEnded = new Date(items.end_date) < new Date();

const formatDate = (dateString) => {
const date = new Date(dateString);
return date.toLocaleDateString("en-GB", {
day: "2-digit",
month: "long",
year: "numeric",
});
};

const fetchPoll = async (pollId) => {
try {
const response = await axios.get(
Expand Down Expand Up @@ -250,13 +238,6 @@ export default function VotingCard({ items, index, onClick }) {
)}
</Box>
</Box>
{/* <Box className="card-img-container" style={{ position: "inherit" }}>
<img
src={items.image ? items.image : require("assets/default.png")}
className="event-card-img"
alt="App Icon"
/>
</Box> */}
</CardContent>
<Box className="voting-text lg-mt-20">
<Box>
Expand Down Expand Up @@ -368,13 +349,6 @@ export default function VotingCard({ items, index, onClick }) {
</span>
</Box>
</Grid>
{/* <Grid item xs={3} md={6} lg={3}>
<img
src={require("assets/default.png")}
className="appicon"
alt="App Icon"
/>
</Grid> */}
<Box style={{ paddingLeft: "18px", width: "100%" }}>
<Box sx={{ width: "100%" }}>
{pollResult?.map((option, index) => (
Expand Down
1 change: 1 addition & 0 deletions packages/nulp_elite/src/configs/urlConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"framework": "board,gradeLevel,medium,class,subject"
},
"URLS": {
"CUSTOM_EVENT_FETCH_RECORDINGS":"/custom_event/fetch_recordings?event_id=",
"LEARNER_PREFIX": "/learner/",
"DISCUSSIONS_FORUM_PREFIX": "/discussion/",
"DEVICE_PREFIX": "/device/",
Expand Down
Loading
Loading