Skip to content

Commit

Permalink
Merge pull request #455 from culturecreates/feature/issue-328
Browse files Browse the repository at this point in the history
feat: added support logo and image for orgs and people
  • Loading branch information
AbhishekPAnil authored Jul 27, 2023
2 parents f4d276f + f965c3b commit 48a033d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function QuickCreateOrganization(props) {
id: response?.id,
name: response?.name,
type: entitiesClass.organization,
logo: response?.logo,
},
];
createdOrganizer = treeEntitiesOption(createdOrganizer, user, calendarContentLanguage);
Expand Down
10 changes: 7 additions & 3 deletions src/components/TreeSelectOption/treeSelectOption.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ export const treeEntitiesOption = (data, user, calendarContentLanguage) => {
itemWidth="100%"
icon={
entity?.type?.toUpperCase() == taxonomyClass.ORGANIZATION ? (
entity?.icon ? (
<img src={entity?.icon} />
entity?.logo?.thumbnail?.uri ? (
<img src={entity?.logo?.thumbnail?.uri} />
) : (
<Icon component={Organizations} style={{ color: '#607EFC' }} />
)
) : (
entity?.type?.toUpperCase() == taxonomyClass.PERSON &&
(entity?.icon ? <img src={entity?.icon} /> : <UserOutlined style={{ color: '#607EFC' }} />)
(entity?.image?.thumbnail?.uri ? (
<img src={entity?.image?.thumbnail?.uri} />
) : (
<UserOutlined style={{ color: '#607EFC' }} />
))
)
}
name={
Expand Down
9 changes: 6 additions & 3 deletions src/pages/Dashboard/AddEvent/AddEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,8 @@ function AddEvent() {
id: organizer?.entityId,
name: organizer?.entity?.name,
type: organizer?.type,
icon: organizer?.entity?.logo?.thumbnail?.uri,
logo: organizer?.entity?.logo,
image: organizer?.entity?.image,
};
});
setSelectedOrganizers(treeEntitiesOption(initialOrganizers, user, calendarContentLanguage));
Expand All @@ -884,7 +885,8 @@ function AddEvent() {
id: performer?.entityId,
name: performer?.entity?.name,
type: performer?.type,
icon: performer?.entity?.logo?.thumbnail?.uri,
logo: performer?.entity?.logo,
image: performer?.entity?.image,
};
});
setSelectedPerformers(treeEntitiesOption(initialPerformers, user, calendarContentLanguage));
Expand All @@ -897,7 +899,8 @@ function AddEvent() {
id: supporter?.entityId,
name: supporter?.entity?.name,
type: supporter?.type,
icon: supporter?.entity?.logo?.thumbnail?.uri,
logo: supporter?.entity?.logo,
image: supporter?.entity?.image,
};
});
setSelectedSupporters(treeEntitiesOption(initialSupporters, user, calendarContentLanguage));
Expand Down

0 comments on commit 48a033d

Please sign in to comment.