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

Merging main into prod main #502

Merged
merged 62 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
8fb813b
ui
Ekta29yadav Aug 9, 2024
988f0ff
Merge branch 'main' of github.com:NIUANULP/nulp-elite-ui into ui
Ekta29yadav Aug 9, 2024
cbdb766
Merge branch 'main' of github.com:NIUANULP/nulp-elite-ui into ui
Ekta29yadav Aug 9, 2024
e53d42f
ui
Ekta29yadav Aug 9, 2024
fec2937
ui
Ekta29yadav Aug 9, 2024
e249fa1
Merge branch 'main' of github.com:NIUANULP/nulp-elite-ui into ui
Ekta29yadav Aug 9, 2024
0974e8b
TASK : #0000Course Unit Content Type Visible in Recently Added Contents
mahajanmahesh935 Aug 12, 2024
d601a8a
ui
Ekta29yadav Aug 12, 2024
b4bd263
ui
Ekta29yadav Aug 12, 2024
889a5fa
Merge pull request #468 from Ekta29yadav/ui
paritshivani Aug 12, 2024
4223cca
Task #0000:Added chatbot and player URL
Aug 12, 2024
b03cb4c
Merge pull request #483 from ManojNathIC/polls
ManojNathIC Aug 12, 2024
99f2f04
TASK :#0000 Resolved search subdomain not working on drawer filter
mahajanmahesh935 Aug 12, 2024
bc8c119
Merge branch 'main' of https://github.com/NIUANULP/nulp-elite-ui into…
mahajanmahesh935 Aug 12, 2024
4fe744a
Merge pull request #478 from mahajanmahesh935/newbugs
paritshivani Aug 12, 2024
155ffe9
Bug #224621
sonaliTekdi Aug 12, 2024
9c86b6a
resolved code conflicts
sonaliTekdi Aug 12, 2024
6dbbd83
TASK : #0000 Fetch Recording link from API
mahajanmahesh935 Aug 12, 2024
c35eb2f
Merge branch 'main' of https://github.com/NIUANULP/nulp-elite-ui into…
mahajanmahesh935 Aug 12, 2024
b2c8400
Merge pull request #485 from sonaliTekdi/UI_changes
paritshivani Aug 12, 2024
503603d
Task : #0000 Show subdomains as per Selected domain on event dashboar…
mahajanmahesh935 Aug 12, 2024
62028d9
Task
sonaliTekdi Aug 12, 2024
12b66fd
TASK : #0000 Restrict user to access unenrolled course contents
mahajanmahesh935 Aug 13, 2024
304c88e
Merge pull request #486 from mahajanmahesh935/newbugs
ManojNathIC Aug 13, 2024
c0e60d5
Merge pull request #487 from sonaliTekdi/UI_changes
ManojNathIC Aug 13, 2024
4f47833
Merge pull request #488 from mahajanmahesh935/main
ManojNathIC Aug 13, 2024
82f06f3
ui
Ekta29yadav Aug 13, 2024
150708a
ui
Ekta29yadav Aug 13, 2024
9ef13b3
Merge pull request #489 from Ekta29yadav/ui
paritshivani Aug 13, 2024
ab8246c
create poll UI issues
sonaliTekdi Aug 13, 2024
5f681fe
TASK :#0000 Filters not working properly on contentList page
mahajanmahesh935 Aug 14, 2024
bf8dc0a
Merge pull request #490 from sonaliTekdi/UI_changes
ManojNathIC Aug 14, 2024
8bf4a96
Merge pull request #491 from mahajanmahesh935/main
ManojNathIC Aug 14, 2024
f536c19
ui
Ekta29yadav Aug 14, 2024
d9605b9
Merge branch 'main' of github.com:NIUANULP/nulp-elite-ui into ui
Ekta29yadav Aug 14, 2024
6c0cf85
ui
Ekta29yadav Aug 14, 2024
32826a2
Merge pull request #492 from Ekta29yadav/ui
paritshivani Aug 14, 2024
79170df
select user dropdown with seacrh is not working in create poll form
sonaliTekdi Aug 14, 2024
af6d5e7
resolved conflicts
sonaliTekdi Aug 14, 2024
d266eb6
TASK : #0000 don't show cancel button on preferance popup
mahajanmahesh935 Aug 14, 2024
152d784
Merge pull request #493 from sonaliTekdi/UI_changes
ManojNathIC Aug 14, 2024
c08d28c
Merge pull request #494 from mahajanmahesh935/main
ManojNathIC Aug 14, 2024
4fda05c
ui
Ekta29yadav Aug 16, 2024
af9438b
TASK #0000 show error message every time when user click on content i…
mahajanmahesh935 Aug 16, 2024
118933f
Bug #225050 - FAQ language selection Not Reflecting for other than en…
sonaliTekdi Aug 16, 2024
9e28cc3
Merge pull request #497 from sonaliTekdi/UI_changes
ManojNathIC Aug 16, 2024
f87ab75
Merge branch 'main' into main
mahajanmahesh935 Aug 16, 2024
54231d8
TASK : #0000 Changed se_boards to board on content search API filter …
mahajanmahesh935 Aug 16, 2024
08d5054
Merge branch 'main' of github.com:mahajanmahesh935/nulp-elite-ui into…
mahajanmahesh935 Aug 16, 2024
82b7c69
Merge pull request #496 from mahajanmahesh935/main
paritshivani Aug 16, 2024
e4d18a6
Merge pull request #495 from Ekta29yadav/ui
ManojNathIC Aug 16, 2024
5737404
events details page changes
sonaliTekdi Aug 16, 2024
28727db
Merge pull request #498 from sonaliTekdi/UI_changes
paritshivani Aug 16, 2024
5096715
Task #0000:Only print 10 char for event name in event reports
Aug 16, 2024
c7d618b
Merge branch 'main' of https://github.com/NIUANULP/nulp-elite-ui into…
Aug 16, 2024
82de785
Merge pull request #499 from ManojNathIC/polls
ManojNathIC Aug 16, 2024
939997e
TASK : #0000 Use board filter only if board is not null
mahajanmahesh935 Aug 19, 2024
5726615
TASK : #0000 Filter chnages on eventLis and Allcontent page
mahajanmahesh935 Aug 19, 2024
e66bb4a
Merge pull request #500 from mahajanmahesh935/main
paritshivani Aug 19, 2024
457eae9
Task #0000: isMobile undefined issue fixed
Aug 19, 2024
4fb8d8f
Merge branch 'main' of https://github.com/NIUANULP/nulp-elite-ui into…
Aug 19, 2024
c328d6b
Merge pull request #501 from ManojNathIC/polls
ManojNathIC Aug 19, 2024
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
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/be/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,6 @@
"CONNECTION_REQUEST": "সংযোগ অনুরোধ",
"BLOCKED_USERS": "ব্লক করা ব্যবহারকারীরা",
"What do you want to learn today? ": "আজ আপনি কী শিখতে চান?",
"REGISTRATION_FORM": "ইভেন্টের জন্য নিবন্ধন করুন"
"REGISTRATION_FORM": "ইভেন্টের জন্য নিবন্ধন করুন",
"COURSE & CERTIFICATES":"কোর্স এবং সার্টিফিকেট"
}
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,5 +281,6 @@
"SHARE_RESULTS": "Share Results",
"UPDATE_VOTE": "Update Vote",
"What do you want to learn today? ": "What do you want to learn today? ",
"REGISTRATION_FORM": "Register For Event"
"REGISTRATION_FORM": "Register For Event",
"COURSE & CERTIFICATES":"Course & Certificates"
}
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/gg/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,6 @@
"CONNECTION_REQUEST": "કનેક્શન વિનંતીઓ",
"BLOCKED_USERS": "અબ્લોક કરેલા યૂઝર્સ",
"What do you want to learn today? ": "આજે તમે શું શીખવા માંગો છો?",
"REGISTRATION_FORM": "ઇવેન્ટ માટે નોંધણી કરો"
"REGISTRATION_FORM": "ઇવેન્ટ માટે નોંધણી કરો",
"COURSE & CERTIFICATES": "અભ્યાસક્રમ અને પ્રમાણપત્રો"
}
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,6 @@
"CONNECTION_REQUEST": "कनेक्शन अनुरोध",
"BLOCKED_USERS": "ब्लॉक किए गए उपयोगकर्ता",
"What do you want to learn today? ": "आज आप क्या सीखना चाहते हैं?",
"REGISTRATION_FORM": "इवेंट के लिए पंजीकरण करें"
"REGISTRATION_FORM": "इवेंट के लिए पंजीकरण करें",
"COURSE & CERTIFICATES": "पाठ्यक्रम एवं प्रमाणपत्र"
}
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/ma/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,6 @@
"CONNECTION_REQUEST": "कनेक्शन विनंत्या",
"BLOCKED_USERS": "ब्लॉक वापरकर्ते",
"What do you want to learn today? ": "आज तुम्हाला काय शिकायचे आहे?",
"REGISTRATION_FORM": "इव्हेंटसाठी नोंदणी करा"
"REGISTRATION_FORM": "इव्हेंटसाठी नोंदणी करा",
"COURSE & CERTIFICATES": "अभ्यासक्रम आणि प्रमाणपत्रे"
}
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/mal/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,6 @@
"CONNECTION_REQUEST": "കണക്ഷൻ അഭ്യർത്ഥനകൾ",
"BLOCKED_USERS": "അടച്ച ഉപയോക്താക്കൾ",
"What do you want to learn today? ": "ഇന്ന് നിങ്ങൾ എന്താണ് പഠിക്കാൻ ആഗ്രഹിക്കുന്നത്?",
"REGISTRATION_FORM": "ഇവെന്റിനായി രജിസ്റ്റർ ചെയ്യുക"
"REGISTRATION_FORM": "ഇവെന്റിനായി രജിസ്റ്റർ ചെയ്യുക",
"COURSE & CERTIFICATES": "കോഴ്സും സർട്ടിഫിക്കറ്റുകളും"
}
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/ta/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,6 @@
"CONNECTION_REQUEST": "இணைப்பு கோரிக்கைகள்",
"BLOCKED_USERS": "தடுக்கும் பயனர்கள்",
"What do you want to learn today? ": "இன்று நீங்கள் என்ன கற்க விரும்புகிறீர்கள்?",
"REGISTRATION_FORM": "நிகழ்வுக்கு பதிவு செய்யுங்கள்"
"REGISTRATION_FORM": "நிகழ்வுக்கு பதிவு செய்யுங்கள்",
"COURSE & CERTIFICATES": "பாடநெறி & சான்றிதழ்கள்"
}
3 changes: 2 additions & 1 deletion packages/nulp_elite/public/locales/te/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,6 @@
"DASHBOARD": "డాష్‌బోర్డ్",
"EVENTS_DASHBOARD": "ఈవెంట్స్ డాష్‌బోర్డ్",
"TOTAl_EVENTS": "మొత్తం ఈవెంట్స్",
"EVENTS_THIS_MONTH": "ఈ నెలలో ఈవెంట్స్"
"EVENTS_THIS_MONTH": "ఈ నెలలో ఈవెంట్స్",
"COURSE & CERTIFICATES": "కోర్సు & సర్టిఫికెట్లు"
}
54 changes: 26 additions & 28 deletions packages/nulp_elite/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ import votingDashboard from "pages/voting/votingDashboard";
import pollsDetails from "pages/voting/pollsDetails";
const urlConfig = require("./configs/urlConfig.json");
const routeConfig = require("./configs/routeConfig.json");
import PopupForm from "pages/profileData"
import axios from 'axios';
import PopupForm from "pages/profileData";
import axios from "axios";

function App() {
// const [t] = useTranslation();
Expand All @@ -66,7 +66,7 @@ function App() {
const [checkPref, setCheckPref] = React.useState(true);
const _userId = util.userId();
const [orgId, setOrgId] = useState();
const[userData,setUserData]=React.useState(false)
const [userData, setUserData] = React.useState(false);

const routes = [
{
Expand Down Expand Up @@ -241,27 +241,25 @@ function App() {
console.error("Error fetching user data:", error);
}
};
const UserData=async()=>{
const url = `${urlConfig.URLS.POFILE_PAGE.USER_READ}`
const requestBody={
user_ids:[_userId]
}
const response=await axios.post(url,requestBody);
const Data=response.data;
console.log("Data of user----------- ",Data);
if(
Array.isArray(Data?.result) && Data.result.length === 0 ||
(Array.isArray(Data?.result) && Data.result.length > 0 &&
(
Data.result[0]?.designation === null ||
const UserData = async () => {
const url = `${urlConfig.URLS.POFILE_PAGE.USER_READ}`;
const requestBody = {
user_ids: [_userId],
};
const response = await axios.post(url, requestBody);
const Data = response.data;
console.log("Data of user----------- ", Data);
if (
(Array.isArray(Data?.result) && Data.result.length === 0) ||
(Array.isArray(Data?.result) &&
Data.result.length > 0 &&
(Data.result[0]?.designation === null ||
Data.result[0]?.user_type === null ||
Data.result[0]?.organisation === null
)
)
){
setUserData(true)
}
}
Data.result[0]?.organisation === null))
) {
setUserData(true);
}
};
const fetchData = async () => {
try {
const url = `${urlConfig.URLS.LEARNER_PREFIX}${urlConfig.URLS.USER.GET_PROFILE}${_userId}`;
Expand Down Expand Up @@ -318,12 +316,12 @@ if(
onClose={() => setCheckPref(true)}
/>
)}
{userData && (<PopupForm
open={userData}
handleClose={()=> setUserData(false)}
></PopupForm>
{userData && (
<PopupForm
open={userData}
handleClose={() => setUserData(false)}
></PopupForm>
)}


<Router>
<Routes>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 35 additions & 33 deletions packages/nulp_elite/src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Divider } from "native-base";
import RandomImage from "../assets/cardRandomImgs.json";
import { useTranslation } from "react-i18next";
const processString = (str) => {
return str.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
return str?.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
};
export default function BoxCard({ items, index, onClick, continueLearning }) {
const [imgUrl, setImgUrl] = useState();
Expand Down Expand Up @@ -91,7 +91,7 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
color="#5B5B5B"
style={{
fontSize: "11px",
padding: "10px 0",
padding: "10px 0 0 0",
textAlign: "left",
}}
>
Expand All @@ -109,7 +109,11 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
<Typography
variant="body2"
color="#5B5B5B"
style={{ fontSize: "11px", padding: "10px 0", textAlign: "left" }}
style={{
fontSize: "11px",
padding: "10px 0 0 0",
textAlign: "left",
}}
>
<Box>
{t("ENROLLED_ON")} :{" "}
Expand All @@ -122,14 +126,12 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
<Box className="my-10 pl-20">
<Typography
style={{
marginTop: "10px",
color: (() => {
if (items.status === 2) return "#065872";
else if (items.batch.status === 2) return "#FF0000";
else if (items.batch.status === 1) return "#579b00";
})(),
fontSize: "12px",
padding: "10px 0",
textAlign: "left",
fontWeight: "500",
}}
Expand Down Expand Up @@ -210,34 +212,34 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
items?.se_gradeLevels) && (
<>
<Box className="textLeft mb-15 d-flex">
{(items?.board || items?.se_boards) && (
<Tooltip
title={
Array.isArray(items?.board) && items.board.length === 1
? items.board.join(", ")
: Array.isArray(items?.se_boards) &&
items.se_boards.length > 1
? items.se_boards.join(", ")
: items?.se_boards?.[0] || ""
}
placement="top"
className="labelOne cardLabelEllips"
>
<Button>
{Array.isArray(items?.board) && items.board.length === 1
? items.board[0]
: Array.isArray(items?.board) && items.board.length > 1
? `${items.board[0]} + ${items.board.length - 1}`
: Array.isArray(items?.se_boards) &&
items.se_boards.length === 1
? items.se_boards[0]
: Array.isArray(items?.se_boards) &&
items.se_boards.length > 1
? `${items.se_boards[0]} + ${items.se_boards.length - 1}`
: ""}
</Button>
</Tooltip>
)}
{items?.board ? (
<Tooltip
title={items.board}
placement="top"
className="labelOne cardLabelEllips"
>
<Button>
{items.board}
</Button>
</Tooltip>
) : (
<Tooltip
title={
Array.isArray(items?.se_boards) && items.se_boards.length > 0
? items.se_boards.join(", ")
: ""
}
placement="top"
className="labelOne cardLabelEllips"
>
<Button>
{Array.isArray(items?.se_boards) && items.se_boards.length > 0
? `${items.se_boards[0]}${items.se_boards.length > 1 ? ` + ${items.se_boards.length - 1}` : ''}`
: ""
}
</Button>
</Tooltip>
)}
{(items.gradeLevel || items.se_gradeLevels) && (
<Tooltip
title={
Expand Down
93 changes: 43 additions & 50 deletions packages/nulp_elite/src/components/FeedbackPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,22 @@ import * as util from "../../src/services/utilService";
import axios from "axios";
const urlConfig = require("../configs/urlConfig.json");



const FeedbackPopup = ({ open, onClose,contentId }) => {
const FeedbackPopup = ({ open, onClose, contentId }) => {
const [rating, setRating] = useState(0);
const [feedback, setFeedback] = useState("");
const [additionalFeedback, setAdditionalFeedback] = useState("");
const [showTextBox, setShowTextBox] = useState(false);
const [checkboxes, setCheckboxes] = useState({});
const _userId = util.userId();

const _userId = util.userId();

const BootstrapDialog = styled(Dialog)(({ theme }) => ({
"& .MuiDialogContent-root": {
padding: theme.spacing(2),
},
"& .MuiDialogActions-root": {
padding: theme.spacing(1),
},
}));
// 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 @@ -91,44 +88,42 @@ const FeedbackPopup = ({ open, onClose,contentId }) => {
setAdditionalFeedback(event.target.value);
};

const handleSubmit = async () => {
try {
let selectedCheckboxes = [];
const handleSubmit = async () => {
try {
let selectedCheckboxes = [];

Object.keys(checkboxes).forEach((key) => {
if (checkboxes[key] && checkboxLabels[key] !== 'Other') {
selectedCheckboxes.push(checkboxLabels[key]);
}
});
Object.keys(checkboxes).forEach((key) => {
if (checkboxes[key] && checkboxLabels[key] !== "Other") {
selectedCheckboxes.push(checkboxLabels[key]);
}
});

const url = `${urlConfig.URLS.FEEDBACK.CREATE}`;
const request = {
content_id: contentId,
user_id: _userId,
rating: rating,
default_feedback: selectedCheckboxes,
other_feedback: additionalFeedback,
};
const url = `${urlConfig.URLS.FEEDBACK.CREATE}`;
const request = {
content_id: contentId,
user_id: _userId,
rating: rating,
default_feedback: selectedCheckboxes,
other_feedback: additionalFeedback,
};

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 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);


const handleClose = () => {
setOpen(false);
onClose();
} catch (error) {
console.error("Error submitting feedback:", error);
}
};

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

const renderCheckboxes = () => {
if (rating >= 5) {
return (
Expand Down Expand Up @@ -293,13 +288,11 @@ const FeedbackPopup = ({ open, onClose,contentId }) => {
};

return (
<BootstrapDialog open={open} onClose={onClose} className="feedback-popup">
<DialogTitle sx={{ m: 0, p: 2 }} id="customized-dialog-title">
Feedback
</DialogTitle>
<Dialog open={open} onClose={onClose} className="feedback-popup">
<DialogTitle sx={{ m: 0, p: 2 }}>Feedback</DialogTitle>
<IconButton
aria-label="close"
onClick={onClose}
aria-label="close"
sx={{
position: "absolute",
right: 8,
Expand Down Expand Up @@ -340,7 +333,7 @@ const FeedbackPopup = ({ open, onClose,contentId }) => {
Submit
</Button>
</DialogActions>
</BootstrapDialog>
</Dialog>

// <Dialog open={open} onClose={onClose}>
// <DialogTitle>Feedback</DialogTitle>
Expand Down
Loading
Loading