Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/issue 1509 #1534

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading