Skip to content

Commit

Permalink
fix: added image to main part of read only
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekPAnil committed Jan 13, 2025
1 parent 27e4063 commit 7a60651
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
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 7a60651

Please sign in to comment.