From fa107ff809f190839161271b2745a333923cb2e0 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:02:32 +0100 Subject: [PATCH] 3208: Added colibo feed type --- .../feed-sources/feed-source-form.jsx | 61 +++++++--- .../feed-sources/feed-source-manager.jsx | 33 ++++-- .../templates/colibo-feed-type.jsx | 107 ++++++++++++++++++ src/components/slide/content/content-form.jsx | 2 +- .../slide/content/feed-selector.jsx | 3 +- src/translations/da/common.json | 18 ++- 6 files changed, 196 insertions(+), 28 deletions(-) create mode 100644 src/components/feed-sources/templates/colibo-feed-type.jsx diff --git a/src/components/feed-sources/feed-source-form.jsx b/src/components/feed-sources/feed-source-form.jsx index 2cce65ae..10414974 100644 --- a/src/components/feed-sources/feed-source-form.jsx +++ b/src/components/feed-sources/feed-source-form.jsx @@ -1,5 +1,5 @@ import { React } from "react"; -import { Button } from "react-bootstrap"; +import { Alert, Button } from "react-bootstrap"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import PropTypes from "prop-types"; @@ -13,6 +13,7 @@ import FormInput from "../util/forms/form-input"; import CalendarApiFeedType from "./templates/calendar-api-feed-type"; import NotifiedFeedType from "./templates/notified-feed-type"; import EventDatabaseApiFeedType from "./templates/event-database-feed-type"; +import ColiboFeedType from "./templates/colibo-feed-type.jsx"; /** * The feed-source form component. @@ -47,6 +48,10 @@ function FeedSourceForm({ const { t } = useTranslation("common", { keyPrefix: "feed-source-form" }); const navigate = useNavigate(); + const typeInOptions = + !feedSource?.feedType || + feedSourceTypeOptions.find((el) => el.value === feedSource.feedType); + return ( <>