Skip to content

Commit

Permalink
Merge pull request #486 from mahajanmahesh935/newbugs
Browse files Browse the repository at this point in the history
TASK : #0000Recording popup -Adding API connection to UI
  • Loading branch information
ManojNathIC authored Aug 13, 2024
2 parents b2c8400 + 503603d commit 304c88e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
20 changes: 16 additions & 4 deletions packages/nulp_elite/src/pages/events/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,19 @@ const Dashboard = () => {
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) => {
Expand Down Expand Up @@ -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"));
Expand Down
7 changes: 4 additions & 3 deletions packages/nulp_elite/src/pages/events/eventDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,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,
Expand Down Expand Up @@ -105,7 +105,7 @@ const EventDetails = () => {
const [designationsList, setDesignationsList] = useState([]);
const [isChecked, setIsChecked] = useState(false);
const [open, setOpen] = React.useState(false);

const [recording , setRecording] = useState();
const handleClickOpen = () => {
setOpen(true);
};
Expand Down Expand Up @@ -652,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);
Expand Down Expand Up @@ -1367,7 +1368,7 @@ const EventDetails = () => {
<CloseIcon />
</IconButton>
<DialogContent dividers>
{recording.result.map((item, index) => (
{recording?.result?.map((item, index) => (
<Box key={item.id} className="my-20">
<Link
href={item.recording_url}
Expand Down

0 comments on commit 304c88e

Please sign in to comment.