Skip to content

Commit

Permalink
Merge pull request #792 from culturecreates/hotfix/issue-791
Browse files Browse the repository at this point in the history
fix: added label tree dynamic  fields
  • Loading branch information
sahalali authored Nov 17, 2023
2 parents 682166a + 0c738e9 commit b5526ed
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
18 changes: 17 additions & 1 deletion src/components/TreeSelectOption/treeSelectOption.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,23 @@ export const treeDynamicTaxonomyOptions = (concepts, user, calendarContentLangua
}),
value: concept?.id,
...(concept?.children && {
children: handleMultilevelTreeSelect(concept?.children, user),
children: handleMultilevelTreeSelect(
concept?.children,
user,
calendarContentLanguage,
contentLanguageBilingual({
en: concept?.name?.en,
fr: concept?.name?.fr,
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
}),
),
}),
label: contentLanguageBilingual({
en: concept?.name?.en,
fr: concept?.name?.fr,
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
}),
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ function OrganizationsReadOnly() {
const navigate = useNavigate();
const [currentCalendarData] = useOutletContext();

const { currentData: allTaxonomyData, isLoading: taxonomyLoading } = useGetAllTaxonomyQuery({
calendarId,
search: '',
taxonomyClass: taxonomyClass.ORGANIZATION,
includeConcepts: true,
});

const {
data: organizationData,
isLoading: organizationLoading,
Expand All @@ -43,12 +50,6 @@ function OrganizationsReadOnly() {
{ id: organizationId, calendarId, sessionId: timestampRef },
{ skip: organizationId ? false : true },
);
const { currentData: allTaxonomyData, isLoading: taxonomyLoading } = useGetAllTaxonomyQuery({
calendarId,
search: '',
taxonomyClass: taxonomyClass.ORGANIZATION,
includeConcepts: true,
});

const [getPlace] = useLazyGetPlaceQuery();
const [getAllTaxonomy] = useLazyGetAllTaxonomyQuery();
Expand Down

0 comments on commit b5526ed

Please sign in to comment.