Skip to content

Commit

Permalink
feat: added occupation taxonomy to read only page for person
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekPAnil committed Aug 4, 2023
1 parent 8a5a77c commit 8c67640
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/Modal/QuickCreatePlace/quickCreatePlace.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@
font-size: 16px;
color: #646d7b;
}

.quick-create-place-modal-wrapper .ant-dropdown-menu-item-selected {
color: #0f0e98;
background-color: #eff2ff;
}
33 changes: 32 additions & 1 deletion src/pages/Dashboard/PersonReadOnly/PersonReadOnly.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { useSelector } from 'react-redux';
import { getUserDetails } from '../../../redux/reducer/userSlice';
import { taxonomyClass } from '../../../constants/taxonomyClass';
import { useGetAllTaxonomyQuery } from '../../../services/taxonomy';
import { treeDynamicTaxonomyOptions } from '../../../components/TreeSelectOption/treeSelectOption.settings';
import {
treeDynamicTaxonomyOptions,
treeTaxonomyOptions,
} from '../../../components/TreeSelectOption/treeSelectOption.settings';
import Tags from '../../../components/Tags/Common/Tags';
import TreeSelectOption from '../../../components/TreeSelectOption/TreeSelectOption';
import FeatureFlag from '../../../layout/FeatureFlag/FeatureFlag';
Expand All @@ -20,6 +23,7 @@ import { useGetPersonQuery } from '../../../services/people';
import ArtsDataInfo from '../../../components/ArtsDataInfo/ArtsDataInfo';
import { artsDataLinkChecker } from '../../../utils/artsDataLinkChecker';
import Breadcrumbs from '../../../components/Breadcrumbs/Breadcrumbs';
import { taxonomyDetails } from '../../../utils/taxonomyDetails';

function PersonReadOnly() {
const { t } = useTranslation();
Expand Down Expand Up @@ -140,6 +144,33 @@ function PersonReadOnly() {
)}
</Col>
)}
{personData?.occupation.length > 0 && (
<div>
<p className="read-only-event-content-sub-title-primary">
{taxonomyDetails(allTaxonomyData?.data, user, 'Occupation', 'name', false)}
</p>
<TreeSelectOption
style={{ marginBottom: '1rem' }}
bordered={false}
open={false}
disabled
treeData={treeTaxonomyOptions(
allTaxonomyData,
user,
'Occupation',
false,
calendarContentLanguage,
)}
defaultValue={personData?.occupation?.map((type) => {
return type?.entityId;
})}
tagRender={(props) => {
const { label } = props;
return <Tags>{label}</Tags>;
}}
/>
</div>
)}
{personData?.dynamicFields?.length > 0 && (
<Col span={24}>
{allTaxonomyData?.data?.map((taxonomy, index) => {
Expand Down

0 comments on commit 8c67640

Please sign in to comment.