@@ -74,8 +90,8 @@ const FAQPage = () => {
} // Apply active class
style={{ cursor: "pointer" }}
>
- {category.name}
-
+ {t(category.name.toUpperCase())}
+
))}
diff --git a/packages/nulp_elite/src/pages/SelectPreference.js b/packages/nulp_elite/src/pages/SelectPreference.js
index b3af0edb..90cf1b2a 100644
--- a/packages/nulp_elite/src/pages/SelectPreference.js
+++ b/packages/nulp_elite/src/pages/SelectPreference.js
@@ -49,7 +49,7 @@ const SelectPreference = ({ isOpen, onClose }) => {
const [frameworks, setFrameworks] = useState([]);
const [defaultFramework, setDefaultFramework] = useState("");
const [custodianOrgId, setCustodianOrgId] = useState("");
- const [isEmptyPreference, setIsEmptyPreference] = useState(false);
+ const [isEmptyPreference, setIsEmptyPreference] = useState(true);
const [domain, setDomain] = useState();
const [subDomain, setSubDomain] = useState();
const [language, setLanguage] = useState();
@@ -222,11 +222,8 @@ const SelectPreference = ({ isOpen, onClose }) => {
}
const responseData = await response.json();
- if (responseData?.result?.response.framework?.id[0] === "nulp") {
- setframworkname(true);
- }
- if (_.isEmpty(responseData?.result?.response.framework)) {
- setIsEmptyPreference(true);
+ if (Object.entries(responseData?.result?.response.framework).length === 0) {
+ setIsEmptyPreference(false);
} else {
setSelectedCategory(
responseData?.result?.response?.framework?.board[0]
@@ -249,6 +246,11 @@ const SelectPreference = ({ isOpen, onClose }) => {
responseData?.result?.response?.framework?.gradeLevel
);
}
+
+ if (responseData?.result?.response.framework?.id[0] === "nulp") {
+ setframworkname(true);
+ }
+
} catch (error) {
console.error("Error fetching data:", error);
showErrorMessage("Failed to fetch data. Please try again.");
@@ -442,7 +444,7 @@ const SelectPreference = ({ isOpen, onClose }) => {
- {!isEmptyPreference && (
+ {isEmptyPreference && (
diff --git a/packages/nulp_elite/src/pages/content/AllContent.js b/packages/nulp_elite/src/pages/content/AllContent.js
index c5ab004d..e4215a9a 100644
--- a/packages/nulp_elite/src/pages/content/AllContent.js
+++ b/packages/nulp_elite/src/pages/content/AllContent.js
@@ -126,7 +126,7 @@ const AllContent = () => {
let data = JSON.stringify({
request: {
filters: {
- se_boards: [domainName],
+ board: [domainName],
primaryCategory: [
"Collection",
"Resource",
diff --git a/packages/nulp_elite/src/pages/content/Player.js b/packages/nulp_elite/src/pages/content/Player.js
index 408fc8af..0439167c 100644
--- a/packages/nulp_elite/src/pages/content/Player.js
+++ b/packages/nulp_elite/src/pages/content/Player.js
@@ -165,7 +165,7 @@ const Player = () => {
-
+
{lesson && (
{
{lesson?.name}
-
+
{/* Placeholder for future features */}
{lesson && (
-
+
{
{lesson.board}
)}
- {lesson.se_boards &&
+ {!lesson.board &&
+ lesson.se_boards &&
lesson.se_boards.map((item, index) => (
))}
- {lesson.se_gradeLevels &&
+ {!lesson.gradeLevel &&
+ lesson.se_gradeLevels &&
lesson.se_gradeLevels.map((item, index) => (
diff --git a/packages/nulp_elite/src/pages/content/joinCourse.js b/packages/nulp_elite/src/pages/content/joinCourse.js
index 5d778ee6..487d415e 100644
--- a/packages/nulp_elite/src/pages/content/joinCourse.js
+++ b/packages/nulp_elite/src/pages/content/joinCourse.js
@@ -130,6 +130,11 @@ const JoinCourse = () => {
}, 2000);
setToasterOpen(true);
};
+
+ const showOpenContenErrorMessage = (msg) => {
+ setToasterMessage(msg);
+ setToasterOpen(true);
+ };
useEffect(() => {
const handleResize = () => setIsMobile(window.innerWidth <= 767);
window.addEventListener("resize", handleResize);
@@ -496,7 +501,9 @@ const JoinCourse = () => {
});
};
- const handleLinkClick = (id) => {
+
+ const handleLinkClick = (id) => {
+ if (isEnroll) {
navigate(`${routeConfig.ROUTES.PLAYER_PAGE.PLAYER}?${id}`, {
state: {
coursename: userData?.result?.content?.name,
@@ -506,7 +513,11 @@ const JoinCourse = () => {
consumedcontents: ConsumedContents,
},
});
- };
+ } else {
+ showErrorMessage("You must join the course to get complete access to content.");
+ }
+};
+
const handleSnackbarClose = (event, reason) => {
if (reason === "clickaway") {
@@ -982,7 +993,7 @@ const JoinCourse = () => {
@@ -1078,7 +1089,7 @@ const JoinCourse = () => {
courseData?.result?.content?.se_boards ||
courseData?.result?.content?.gradeLevel ||
courseData?.result?.content?.se_gradeLevels) && (
-
+
{
const [endDateFilter, setEndDateFilter] = useState(dayjs());
const handleDomainChange = (event) => {
- setSelectedDomain(event.target.value);
+ const selectedBoard = event.target.value;
+ setSelectedDomain(selectedBoard);
+ const selectedIndex = domainList.findIndex(
+ (category) => category.name === selectedBoard
+ );
+ if (selectedIndex !== -1) {
+
+ setSubCategory(domainList[selectedIndex]?.associations || []);
+ } else {
+ setSubCategory([]);
+ }
+
+ setSelectedSubDomain([]);
};
const [selectedUser, setSelectedUser] = useState("");
const handleUserChange = (event) => {
@@ -383,9 +395,9 @@ const Dashboard = () => {
const domainList =
responseData?.result?.framework?.categories[3].terms;
setDomainList(domainList || []);
- setSubCategory(
- responseData?.result?.framework?.categories[1]?.terms || []
- );
+ // setSubCategory(
+ // responseData?.result?.framework?.categories[1]?.terms || []
+ // );
}
} else {
throw new Error(t("FAILED_TO_FETCH_DATA"));
@@ -494,7 +506,12 @@ const Dashboard = () => {
const handleVisibilityFilterChange = (event) => {
setVisibilityFilter(event.target.value);
};
- const eventNames = topEvent?.map((event) => event.event_name);
+// const eventNames = topEvent?.map((event) => event.event_name);
+const eventNames = topEvent?.map((event) => {
+ return event?.event_name?.length > 10
+ ? event?.event_name.substring(0, 10) + "..."
+ : event?.event_name;
+});
const eventTopUser = topEvent?.map((event) => parseInt(event.user_count));
const listOfDesignation = topDesignation?.map(
@@ -602,6 +619,8 @@ const Dashboard = () => {
{eventNames && eventTopUser && (
<>
+ Events
+
{
barSize={2}
/>
No. of Participants
- Events
>
)}
@@ -654,7 +672,7 @@ const Dashboard = () => {
{listOfDesignation && countOfTopDesignationUser && (
<>
- {" "}
+ Designation{" "}
{
xAxis={[{ scaleType: "point", data: listOfDesignation }]}
/>
Participants
- Designation
>
)}
diff --git a/packages/nulp_elite/src/pages/events/eventDetails.js b/packages/nulp_elite/src/pages/events/eventDetails.js
index 59e45b53..b6e5e73a 100644
--- a/packages/nulp_elite/src/pages/events/eventDetails.js
+++ b/packages/nulp_elite/src/pages/events/eventDetails.js
@@ -25,6 +25,15 @@ import Modal from "@mui/material/Modal";
import axios from "axios";
import Alert from "@mui/material/Alert";
import TextField from "@mui/material/TextField";
+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";
+import CloseIcon from "@mui/icons-material/Close";
+import PlayCircleIcon from "@mui/icons-material/PlayCircle";
+
import {
FormControl,
InputLabel,
@@ -36,7 +45,7 @@ import {
const consenttext = require("../../configs/consent.json");
const urlConfig = require("../../configs/urlConfig.json");
const designations = require("../../configs/designations.json");
-const recording = require("../../assets/eventRecording.json");
+// const recording = require("../../assets/eventRecording.json");
import {
FacebookShareButton,
@@ -95,7 +104,14 @@ const EventDetails = () => {
const [error, setError] = useState(null);
const [designationsList, setDesignationsList] = useState([]);
const [isChecked, setIsChecked] = useState(false);
-
+ const [open, setOpen] = React.useState(false);
+ const [recording, setRecording] = useState();
+ const handleClickOpen = () => {
+ setOpen(true);
+ };
+ const handleClose = () => {
+ setOpen(false);
+ };
const handleCheckboxChange = (event) => {
setIsChecked(event.target.checked);
};
@@ -163,6 +179,15 @@ const EventDetails = () => {
}
};
+ const BootstrapDialog = styled(Dialog)(({ theme }) => ({
+ "& .MuiDialogContent-root": {
+ padding: theme.spacing(2),
+ },
+ "& .MuiDialogActions-root": {
+ padding: theme.spacing(1),
+ },
+ }));
+
useEffect(() => {
fetchUserData();
const fetchData = async () => {
@@ -627,6 +652,7 @@ const EventDetails = () => {
const url = "/custom_event/fetch_recordings?event_id=" + eventId;
const response = await axios.get(url);
console.log("---------------Recording Link", response.data);
+ setRecording(response.data);
console.log("Recording Hardcoded Data", recording);
} catch (error) {
console.error("Error fetching recording:", error);
@@ -744,8 +770,8 @@ const EventDetails = () => {
{creatorInfo.firstName
? creatorInfo.firstName
: "" + " " + creatorInfo.lastName
- ? creatorInfo.lastName
- : ""}
+ ? creatorInfo.lastName
+ : ""}
@@ -753,27 +779,24 @@ const EventDetails = () => {
-
+
{formatDate(detailData.startDate)}
-
{formatTimeToIST(detailData.startTime)}
To
- {/*
+
{formatDate(detailData.endDate)}
- */}
+
-
{formatTimeToIST(detailData.endTime)}
-
{eventVisibility &&
canEnroll &&
!isEnrolled &&
@@ -875,6 +898,17 @@ const EventDetails = () => {
{formatDate(detailData.registrationStartDate)}
)}
+ {/*
+ {
+ detailData.recording == undefined &&
+
+ Recording will be available soon
+
+ }
+ */}
{regEnd && isRecorded && (
{
}}
startIcon={}
disabled={true}
+ onClick={handleClickOpen}
>
{t("VIEW_WEBINAR_RECORDING")}
{
- // detailData.recording == undefined &&
+ detailData.recording == undefined &&
{
)} */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
National Urban Learning Platform{" "}
@@ -939,8 +995,8 @@ const EventDetails = () => {
{creatorInfo.firstName
? creatorInfo.firstName
: "" + " " + creatorInfo.lastName
- ? creatorInfo.lastName
- : ""}
+ ? creatorInfo.lastName
+ : ""}
@@ -959,10 +1015,10 @@ const EventDetails = () => {
To
- {/*
+
{formatDate(detailData.endDate)}
- */}
+
@@ -995,7 +1051,7 @@ const EventDetails = () => {
marginTop: "10px",
}}
onClick={handleOpenConsentModal}
- // onClick={handleOpenConsentModal}
+ // onClick={handleOpenConsentModal}
>
{t("REGISTER_WEBINAR")}
@@ -1082,11 +1138,12 @@ const EventDetails = () => {
}}
disabled={true}
startIcon={}
+ onClick={handleClickOpen}
>
{t("VIEW_WEBINAR_RECORDING")}
{
- // detailData.recording == undefined &&
+ detailData.recording == undefined &&
{
)}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
{/* {
+
+
+ Recording List
+
+ theme.palette.grey[500],
+ }}
+ >
+
+
+
+ {recording?.result?.map((item, index) => (
+
+
+ Recording {index + 1}
+
+
+
+ ))}
+
+ {/*
+
+ */}
+
+
);
diff --git a/packages/nulp_elite/src/pages/events/eventList.js b/packages/nulp_elite/src/pages/events/eventList.js
index b3ae509d..c71836ba 100644
--- a/packages/nulp_elite/src/pages/events/eventList.js
+++ b/packages/nulp_elite/src/pages/events/eventList.js
@@ -121,10 +121,12 @@ const EventList = (props) => {
searchQuery,
domainName,
domain,
+ currentPage,
+ subDomainFilter
]);
- useEffect(() => {
- fetchAllData();
- }, [currentPage]);
+ // useEffect(() => {
+ // fetchAllData();
+ // }, [currentPage]);
const handleChangeTab = (event, newValue) => {
setValueTab(newValue);
@@ -143,7 +145,7 @@ const EventList = (props) => {
setSubDomainFilter(selectedFilters.subDomainFilter);
setSearchQuery(selectedFilters.eventSearch);
- fetchAllData();
+ // fetchAllData();
};
const handleDomainFilter = (query, domainName) => {
setDomain(query);
@@ -151,7 +153,7 @@ const EventList = (props) => {
setCurrentPage(1);
// setData({});
setDomainName(domainName);
- fetchAllData();
+ // fetchAllData();
};
const [value, setValue] = React.useState("1");
let startDate = [];
@@ -165,60 +167,13 @@ const EventList = (props) => {
const fetchAllData = async () => {
console.log("searchQuery", searchQuery);
- let filters = {};
- if (searchQuery && domainfilter && subDomainFilter) {
- filters = {
- objectType: ["Event"],
- // query: searchQuery ? searchQuery : "",
- board: domainfilter.se_board || [domainName],
- gradeLevel: subDomainFilter,
- startDate: startDate,
- };
- } else if (searchQuery && domainfilter) {
- filters = {
- objectType: ["Event"],
- // query: searchQuery ? searchQuery : "",
- board: domainfilter.se_board || [domainName],
- startDate: startDate,
- };
- } else if (searchQuery && subDomainFilter) {
- filters = {
- objectType: ["Event"],
- // query: searchQuery ? searchQuery : "",
- gradeLevel: subDomainFilter,
- startDate: startDate,
- };
- } else if (domainfilter && subDomainFilter) {
- filters = {
- objectType: ["Event"],
- board: domainfilter.se_board || [domainName],
- gradeLevel: subDomainFilter,
- startDate: startDate || {},
- };
- } else if (domainfilter) {
- filters = {
- objectType: ["Event"],
- board: domainfilter.se_board || [domainName],
- startDate: startDate || {},
- };
- } else if (subDomainFilter) {
- filters = {
- objectType: ["Event"],
- gradeLevel: subDomainFilter,
- startDate: startDate || {},
- };
- } else if (searchQuery) {
- filters = {
- objectType: ["Event"],
- // query: searchQuery ? searchQuery : "",
- startDate: startDate || {},
- };
- } else {
- filters = {
- objectType: ["Event"],
- startDate: startDate || {},
- };
- }
+ let filters = {
+ objectType: ["Event"],
+ ...((domainfilter?.se_board != null || domainName !=null) && { board: domainfilter?.se_board || [domainName] }),
+ ...(subDomainFilter && { gradeLevel: subDomainFilter }),
+ ...(startDate && { startDate: startDate })
+};
+
setError(null);
let data = JSON.stringify({
diff --git a/packages/nulp_elite/src/pages/profile/Profile.js b/packages/nulp_elite/src/pages/profile/Profile.js
index 2fe6761f..e12a8b6e 100644
--- a/packages/nulp_elite/src/pages/profile/Profile.js
+++ b/packages/nulp_elite/src/pages/profile/Profile.js
@@ -109,9 +109,9 @@ const Profile = () => {
bio: "",
designation: "",
otherDesignation: "",
- userType: '',
- otherUserType: '',
- organisation:""
+ userType: "",
+ otherUserType: "",
+ organisation: "",
});
const [originalUserInfo, setOriginalUserInfo] = useState({});
const [isFormDirty, setIsFormDirty] = useState(false);
@@ -128,8 +128,15 @@ const Profile = () => {
const [showCertificate, setShowCertificate] = useState(false);
const [isButtonDisabled, setIsButtonDisabled] = useState(false);
const [orgId, setOrgId] = useState();
- const userTypesList = ["State Governments / Parastatal Bodies", "Urban Local Bodies / Special Purpose Vehicles", "Academia and Research Organisations", "Multilateral / Bilateral Agencies", "Industries","Any Other Government Entities","Others"];
-
+ const userTypesList = [
+ "State Governments / Parastatal Bodies",
+ "Urban Local Bodies / Special Purpose Vehicles",
+ "Academia and Research Organisations",
+ "Multilateral / Bilateral Agencies",
+ "Industries",
+ "Any Other Government Entities",
+ "Others",
+ ];
// for bar charts
const defaultCertData = {
@@ -285,9 +292,9 @@ const Profile = () => {
bio: userInfo[0]?.bio,
designation: userInfo[0]?.designation,
otherDesignation: "",
- userType:userInfo[0]?.user_type,
- otherUserType:"",
- organisation:userInfo[0]?.organisation
+ userType: userInfo[0]?.user_type,
+ otherUserType: "",
+ organisation: userInfo[0]?.organisation,
});
setOriginalUserInfo({
firstName: userData?.result?.response.firstName,
@@ -295,10 +302,9 @@ const Profile = () => {
bio: userInfo[0]?.bio,
designation: userInfo[0]?.designation,
otherDesignation: "",
- userType:userInfo[0]?.user_type,
- otherUserType:"",
- organisation:userInfo[0]?.organisation
-
+ userType: userInfo[0]?.user_type,
+ otherUserType: "",
+ organisation: userInfo[0]?.organisation,
});
}
setDomain(userData?.result?.response.framework.board);
@@ -462,10 +468,11 @@ const Profile = () => {
: editedUserInfo.designation,
bio: editedUserInfo.bio,
created_by: _userId,
- user_type:editedUserInfo.userType === "Other"
+ user_type:
+ editedUserInfo.userType === "Other"
? editedUserInfo.otherUserType
- : editedUserInfo.userType,
- organisation:editedUserInfo.organisation
+ : editedUserInfo.userType,
+ organisation: editedUserInfo.organisation,
};
try {
const url = `${urlConfig.URLS.POFILE_PAGE.USER_UPDATE}?user_id=${_userId}`;
@@ -807,7 +814,7 @@ const Profile = () => {