Skip to content

Commit

Permalink
Merge pull request #1534 from culturecreates/bugfix/issue-1509
Browse files Browse the repository at this point in the history
Bugfix/issue 1509
  • Loading branch information
AbhishekPAnil authored Jan 20, 2025
2 parents 9ab9deb + 7a60651 commit 3287fc7
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/locales/en/translationEn.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,13 @@
"location": "Location",
"edit": "Edit",
"Edit": "Edit",
"socialMediaLinks": "Social media links"
"socialMediaLinks": "Social media links",
"image": {
"image": "Image",
"mainImage": "Main image",
"additionalImages": "Additional images"
},
"logo": "Logo"
},
"createNew": {
"search": {
Expand Down
8 changes: 7 additions & 1 deletion src/locales/fr/transalationFr.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,13 @@
"memberOf": "Membre de",
"location": "Endroit",
"edit": "Éditer",
"socialMediaLinks": "Liens vers les réseaux sociaux"
"socialMediaLinks": "Liens vers les réseaux sociaux",
"image": {
"image": "Image",
"mainImage": "Image principale",
"additionalImages": "Images supplémentaires"
},
"logo": "Logo"
},
"createNew": {
"search": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,36 @@ function OrganizationsReadOnly() {
))}
</Col>
)}
{checkIfFieldIsToBeDisplayed(organizationFormFieldNames.LOGO, organizationData?.logo) &&
organizationData?.logo?.large?.uri && (
<div>
<p className="read-only-event-content-sub-title-primary">
{t('dashboard.organization.readOnly.logo')}
</p>
<ImageUpload
imageUrl={organizationData?.logo?.large?.uri}
imageReadOnly={true}
preview={true}
eventImageData={organizationData?.logo?.large}
/>
</div>
)}
{checkIfFieldIsToBeDisplayed(
organizationFormFieldNames.IMAGE,
organizationData?.image?.find((image) => image?.isMain),
) &&
organizationData?.image?.find((image) => image?.isMain)?.large?.uri && (
<ImageUpload
imageUrl={organizationData?.image?.find((image) => image?.isMain)?.large?.uri}
imageReadOnly={true}
preview={true}
eventImageData={organizationData?.image?.find((image) => image?.isMain)?.large}
/>
<div>
<p className="read-only-event-content-sub-title-primary">
{t('dashboard.organization.readOnly.image.mainImage')}
</p>
<ImageUpload
imageUrl={organizationData?.image?.find((image) => image?.isMain)?.large?.uri}
imageReadOnly={true}
preview={true}
eventImageData={organizationData?.image?.find((image) => image?.isMain)?.large}
/>
</div>
)}
{checkIfFieldIsToBeDisplayed(
organizationFormFieldNames.IMAGE,
Expand Down
15 changes: 15 additions & 0 deletions src/pages/Dashboard/PersonReadOnly/PersonReadOnly.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { isDataValid } from '../../../utils/MultiLingualFormItemSupportFunctions
import { personFormFieldNames } from '../../../constants/personAndOrganizationFormFieldNames';
import { adminCheckHandler } from '../../../utils/adminCheckHandler';
import { getCurrentCalendarDetailsFromUserDetails } from '../../../utils/getCurrentCalendarDetailsFromUserDetails';
import ImageUpload from '../../../components/ImageUpload';

function PersonReadOnly() {
const { t } = useTranslation();
Expand Down Expand Up @@ -469,6 +470,20 @@ function PersonReadOnly() {
))}
</Col>
)}
{checkIfFieldIsToBeDisplayed(personFormFieldNames.IMAGE, mainImageData) &&
mainImageData?.large?.uri && (
<div>
<p className="read-only-event-content-sub-title-primary">
{t('dashboard.organization.readOnly.image.mainImage')}
</p>
<ImageUpload
imageUrl={mainImageData?.large?.uri}
imageReadOnly={true}
preview={true}
eventImageData={mainImageData?.large}
/>
</div>
)}
{imageConfig.enableGallery && imageGalleryData?.length > 0 && (
<Col span={24}>
<p className="read-only-event-content-sub-title-primary">
Expand Down
15 changes: 15 additions & 0 deletions src/pages/Dashboard/PlaceReadOnly/PlaceReadOnly.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { isDataValid } from '../../../utils/MultiLingualFormItemSupportFunctions
import { placeFormRequiredFieldNames } from '../../../constants/placeFormRequiredFieldNames';
import { adminCheckHandler } from '../../../utils/adminCheckHandler';
import { getCurrentCalendarDetailsFromUserDetails } from '../../../utils/getCurrentCalendarDetailsFromUserDetails';
import ImageUpload from '../../../components/ImageUpload';

function PlaceReadOnly() {
const { t } = useTranslation();
Expand Down Expand Up @@ -482,6 +483,20 @@ function PlaceReadOnly() {
)}
</Col>
)}
{checkIfFieldIsToBeDisplayed(placeFormRequiredFieldNames.IMAGE, mainImageData) &&
mainImageData?.large?.uri && (
<div>
<p className="read-only-event-content-sub-title-primary">
{t('dashboard.organization.readOnly.image.mainImage')}
</p>
<ImageUpload
imageUrl={mainImageData?.large?.uri}
imageReadOnly={true}
preview={true}
eventImageData={mainImageData?.large}
/>
</div>
)}
{imageGalleryData?.length > 0 && imageConfig.enableGallery && (
<Col span={24}>
<div>
Expand Down

0 comments on commit 3287fc7

Please sign in to comment.