Skip to content

Commit

Permalink
Merge pull request #1258 from culturecreates/bugfix/issue-tech-suppor…
Browse files Browse the repository at this point in the history
…t-17

fix: corrected search person query from organization to person
  • Loading branch information
AbhishekPAnil authored Aug 2, 2024
2 parents 60ec40b + 076e862 commit 74f6b69
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/components/Accordion/CalendarAccordion/CalendarAccordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { entitiesClass } from '../../../constants/entitiesClass';
import { useOutletContext, useParams } from 'react-router-dom';
import LoadingIndicator from '../../LoadingIndicator';
import { treeEntitiesOption } from '../../TreeSelectOption/treeSelectOption.settings';
import { externalSourceOptions, sourceOptions } from '../../../constants/sourceOptions';
import { sourceOptions } from '../../../constants/sourceOptions';
import { getUserDetails } from '../../../redux/reducer/userSlice';
import { useSelector } from 'react-redux';
import { useDebounce } from '../../../hooks/debounce';
Expand Down Expand Up @@ -84,10 +84,14 @@ function CalendarAccordion(props) {
const calendarContentLanguage = currentCalendarData?.contentLanguage;

const organizationPersonSearch = (value, type) => {
let sourceQuery = new URLSearchParams();
sourceQuery.append('sources', externalSourceOptions.ARTSDATA);
sourceQuery.append('sources', externalSourceOptions.FOOTLIGHT);
getEntities({ searchKey: value, classes: decodeURIComponent(query.toString()), calendarId })
const queryMap = {
organizers: query,
people: queryPerson,
};

const currentQuery = queryMap[type];

getEntities({ searchKey: value, classes: decodeURIComponent(currentQuery.toString()), calendarId })
.unwrap()
.then((response) => {
if (type == 'organizers') {
Expand Down

0 comments on commit 74f6b69

Please sign in to comment.