diff --git a/src/i18n/de.json b/src/i18n/de.json index 7bec03deb..6d4b58a19 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -1418,6 +1418,10 @@ }, "online_label": "Online", "main_image": "Hauptbild", + "publication_alert": "Ihre Änderungen wurden gespeichert und sind innerhalb von {{timeFrame}} auf {{siteName}} sichtbar.", + "publication_alert_cultuurkuur_timeframe": "1 Tag", + "publication_alert_uitagendas_timeframe": "1 Stunde", + "uit_agendas": "der UiTagendas", "labels": { "title": "Titel", "type": "Typ", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 9f09f310b..f474e2390 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -1417,6 +1417,10 @@ }, "online_label": "En ligne", "main_image": "Image principale", + "publication_alert": "Vos modifications ont été enregistrées et seront visibles sur {{siteName}} dans un délai de {{timeFrame}}.", + "publication_alert_cultuurkuur_timeframe": "un jour", + "publication_alert_uitagendas_timeframe": "1 heure", + "uit_agendas": "les UiTagendas", "labels": { "title": "Titre", "type": "Type", diff --git a/src/i18n/nl.json b/src/i18n/nl.json index b9bbac6dd..f4bd8835d 100644 --- a/src/i18n/nl.json +++ b/src/i18n/nl.json @@ -1474,6 +1474,10 @@ }, "online_label": "Online", "main_image": "Hoofdafbeelding", + "publication_alert": "Je aanpassingen zijn opgeslagen en zijn binnen {{timeFrame}} zichtbaar op {{siteName}}.", + "publication_alert_cultuurkuur_timeframe": "een dag", + "publication_alert_uitagendas_timeframe": "1 uur", + "uit_agendas": "de UiTagenda's", "labels": { "title": "Titel", "type": "Type", diff --git a/src/pages/events/[eventId]/preview/Preview.tsx b/src/pages/events/[eventId]/preview/Preview.tsx index d7bd5d4b4..4c74cdb2e 100644 --- a/src/pages/events/[eventId]/preview/Preview.tsx +++ b/src/pages/events/[eventId]/preview/Preview.tsx @@ -1,6 +1,6 @@ import { useRouter } from 'next/router'; import { useState } from 'react'; -import { useTranslation } from 'react-i18next'; +import { Trans, useTranslation } from 'react-i18next'; import { AgeRanges } from '@/constants/AgeRange'; import { OfferTypes, ScopeTypes } from '@/constants/OfferType'; @@ -11,6 +11,7 @@ import { LabelsForm } from '@/pages/LabelsForm'; import { BookingAvailability, isCultuurkuur, isEvent } from '@/types/Event'; import { hasOnlineLocation } from '@/types/Offer'; import { isPlace } from '@/types/Place'; +import { Alert } from '@/ui/Alert'; import { Image } from '@/ui/Image'; import { Inline } from '@/ui/Inline'; import { Link } from '@/ui/Link'; @@ -57,6 +58,8 @@ const Preview = () => { }); const offer = getOfferByIdQuery.data; + const isEdited = router.query.edited === 'true'; + const isCultuurkuurEvent = isEvent(offer) && isCultuurkuur(offer); const calendarSummary = getCalendarSummaryQuery.data; @@ -115,7 +118,6 @@ const Preview = () => { if (!offer.priceInfo || offer.priceInfo.length === 0) { return {t('preview.empty_value.price')}; } - const isCultuurkuurEvent = isEvent(offer) && isCultuurkuur(offer); return ( { + {isEdited && ( + + + }} + /> + + + )} onTabChange(key as string)} diff --git a/src/pages/steps/StepsForm.tsx b/src/pages/steps/StepsForm.tsx index 4e870f246..3154ec7c7 100644 --- a/src/pages/steps/StepsForm.tsx +++ b/src/pages/steps/StepsForm.tsx @@ -15,6 +15,7 @@ import { OfferType, OfferTypes } from '@/constants/OfferType'; import { useGetEventByIdQuery } from '@/hooks/api/events'; import { useGetPlaceByIdQuery } from '@/hooks/api/places'; import { useGetTypesByScopeQuery } from '@/hooks/api/types'; +import { FeatureFlags, useFeatureFlag } from '@/hooks/useFeatureFlag'; import { locationStepConfiguration, useEditLocation, @@ -186,6 +187,13 @@ const StepsForm = ({ await editLocation(data); reload(); }; + const [isReactEventPreviewFeatureFlagEnabled] = useFeatureFlag( + FeatureFlags.REACT_EVENT_PREVIEW, + ); + + const doneEditingLink = isReactEventPreviewFeatureFlagEnabled + ? `/events/${offerId}?edited=true` + : `/event/${offerId}/preview?edited=true`; const footerStatus = useFooterStatus({ offer, form }); @@ -455,7 +463,7 @@ const StepsForm = ({ {footerStatus === FooterStatus.AUTO_SAVE && ( {t('create.footer.done_editing')}