diff --git a/src/components/events/partials/ModalTabsAndPages/DetailsTobiraTab.tsx b/src/components/events/partials/ModalTabsAndPages/DetailsTobiraTab.tsx index cabd57e33e..7230b75a1e 100644 --- a/src/components/events/partials/ModalTabsAndPages/DetailsTobiraTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/DetailsTobiraTab.tsx @@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next"; import Notifications from "../../../shared/Notifications"; import { useAppDispatch, useAppSelector } from "../../../../store"; import { getSeriesDetailsTobiraData, getSeriesDetailsTobiraDataError, getTobiraTabHierarchy } from "../../../../selectors/seriesDetailsSelectors"; -import { addNotification, removeNotificationWizardForm } from "../../../../slices/notificationSlice"; +import { addNotification } from "../../../../slices/notificationSlice"; import { NOTIFICATION_CONTEXT } from "../../../../configs/modalConfig"; import { getEventDetailsTobiraData, getEventDetailsTobiraDataError } from "../../../../selectors/eventDetailsSelectors"; import { Formik } from "formik"; @@ -112,7 +112,7 @@ const DetailsTobiraTab: React.FC = ({ kind, id }) => { />} {tabHierarchy === "main" &&
{/* Notifications */} - + {!error && <>
diff --git a/src/components/events/partials/ModalTabsAndPages/NewTobiraPage.tsx b/src/components/events/partials/ModalTabsAndPages/NewTobiraPage.tsx index 54093d9d57..9921b9a7a5 100644 --- a/src/components/events/partials/ModalTabsAndPages/NewTobiraPage.tsx +++ b/src/components/events/partials/ModalTabsAndPages/NewTobiraPage.tsx @@ -7,7 +7,7 @@ import { OurNotification, addNotification, removeNotificationByKey, removeNotifi import { useAppDispatch, useAppSelector } from "../../../../store"; import { TobiraPage, fetchSeriesDetailsTobiraNew, setErrorTobiraPage, setTobiraPage } from "../../../../slices/seriesSlice"; import { getSeriesTobiraPage, getSeriesTobiraPageError } from "../../../../selectors/seriesSeletctor"; -import { NOTIFICATION_CONTEXT } from "../../../../configs/modalConfig"; +import { NOTIFICATION_CONTEXT_TOBIRA } from "../../../../configs/modalConfig"; import { SaveEditFooter } from "../../../shared/SaveEditFooter"; import { Tooltip } from "../../../shared/Tooltip"; @@ -71,7 +71,7 @@ const NewTobiraPage = ({ let valid = true; - valid = valid && check('info', 'TOBIRA_OVERRIDE_NAME', NOTIFICATION_CONTEXT, () => { + valid = valid && check('info', 'TOBIRA_OVERRIDE_NAME', NOTIFICATION_CONTEXT_TOBIRA, () => { return !!formik.values.selectedPage && !!formik.values.selectedPage.title; }); @@ -87,9 +87,9 @@ const NewTobiraPage = ({ } const newPage = currentPage.children[currentPage.children.length - 1]; - valid = valid && check('warning', 'TOBIRA_NO_PATH_SEGMENT', NOTIFICATION_CONTEXT, () => !newPage.segment); + valid = valid && check('warning', 'TOBIRA_NO_PATH_SEGMENT', NOTIFICATION_CONTEXT_TOBIRA, () => !newPage.segment); - valid = valid && check('warning', 'TOBIRA_PATH_SEGMENT_INVALID', NOTIFICATION_CONTEXT, () => ( + valid = valid && check('warning', 'TOBIRA_PATH_SEGMENT_INVALID', NOTIFICATION_CONTEXT_TOBIRA, () => ( newPage.segment.length <= 1 || [ // eslint-disable-next-line no-control-regex /[\u0000-\u001F\u007F-\u009F]/u, @@ -99,7 +99,7 @@ const NewTobiraPage = ({ ].some(regex => regex.test(newPage.segment)) )); - valid = valid && check('warning', 'TOBIRA_PATH_SEGMENT_UNIQUE', NOTIFICATION_CONTEXT, () => ( + valid = valid && check('warning', 'TOBIRA_PATH_SEGMENT_UNIQUE', NOTIFICATION_CONTEXT_TOBIRA, () => ( currentPage.children.some(child => child !== newPage && child.segment === newPage.segment) )); @@ -211,7 +211,7 @@ const NewTobiraPage = ({
{/* Notifications */} - + {!editMode &&

{t("EVENTS.SERIES.NEW.TOBIRA.DESCRIPTION")}

} {!error && <>
@@ -271,8 +271,8 @@ const NewTobiraPage = ({ {!!page.new ? setPage(key, e, "title")} + value={page.title ?? ""} + onChange={e => setPage(key, e, "title")} /> :