Skip to content

Commit

Permalink
feat: fixed the place not added to event form
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekPAnil committed Aug 4, 2023
1 parent c904dc4 commit 8a5a77c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/List/SelectionItem/SelectionItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function SelectionItem(props) {
<Col>
<div className="selection-item-sub-content">
<address>
{postalAddress?.streetAddress && (
{(postalAddress?.streetAddress?.en || postalAddress?.streetAddress?.fr) && (
<span>
{contentLanguageBilingual({
en: postalAddress?.streetAddress?.en,
Expand All @@ -80,7 +80,7 @@ function SelectionItem(props) {
,&nbsp;
</span>
)}
<br />
{(postalAddress?.streetAddress?.en || postalAddress?.streetAddress?.fr) && <br />}
{postalAddress?.addressLocality && (
<span>
{contentLanguageBilingual({
Expand Down
2 changes: 2 additions & 0 deletions src/components/Modal/QuickCreatePlace/QuickCreatePlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function QuickCreatePlace(props) {
setKeyword,
interfaceLanguage,
setLocationPlace,
eventForm,
} = props;
const [form] = Form.useForm();
const { t } = useTranslation();
Expand Down Expand Up @@ -107,6 +108,7 @@ function QuickCreatePlace(props) {
.unwrap()
.then((response) => {
setLocationPlace(placesOptions([response], user, calendarContentLanguage)[0]);
eventForm.setFieldValue('locationPlace', id);
})
.catch((error) => console.log(error));
};
Expand Down
1 change: 1 addition & 0 deletions src/pages/Dashboard/AddEvent/AddEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,7 @@ function AddEvent() {
interfaceLanguage={user?.interfaceLanguage?.toLowerCase()}
calendarContentLanguage={calendarContentLanguage}
setLocationPlace={setLocationPlace}
eventForm={form}
/>
</Form.Item>
<Form.Item
Expand Down

0 comments on commit 8a5a77c

Please sign in to comment.