Skip to content

Commit

Permalink
3208: Removed refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj committed Dec 20, 2024
1 parent 5059062 commit 9d2c36b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
12 changes: 4 additions & 8 deletions src/components/feed-sources/feed-source-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,30 @@ function FeedSourceForm({
</>
)}

{feedSource?.feedType ===
"App\\Feed\\SourceType\\Calendar\\CalendarApiFeedType" && (
{feedSource?.feedType === "App\\Feed\\CalendarApiFeedType" && (
<CalendarApiFeedType
handleInput={handleSecretInput}
formStateObject={feedSource.secrets}
mode={mode}
feedSourceId={feedSource["@id"]}
/>
)}
{feedSource?.feedType ===
"App\\Feed\\SourceType\\Colibo\\ColiboFeedType" && (
{feedSource?.feedType === "App\\Feed\\ColiboFeedType" && (
<ColiboFeedType
handleInput={handleSecretInput}
formStateObject={feedSource.secrets}
mode={mode}
feedSourceId={feedSource["@id"]}
/>
)}
{feedSource?.feedType ===
"App\\Feed\\SourceType\\EventDatabase\\EventDatabaseApiFeedType" && (
{feedSource?.feedType === "App\\Feed\\EventDatabaseApiFeedType" && (
<EventDatabaseApiFeedType
handleInput={handleSecretInput}
formStateObject={feedSource.secrets}
mode={mode}
/>
)}
{feedSource?.feedType ===
"App\\Feed\\SourceType\\Notified\\NotifiedFeedType" && (
{feedSource?.feedType === "App\\Feed\\NotifiedFeedType" && (
<NotifiedFeedType
handleInput={handleSecretInput}
formStateObject={feedSource.secrets}
Expand Down
16 changes: 8 additions & 8 deletions src/components/feed-sources/feed-source-manager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ function FeedSourceManager({

const feedSourceTypeOptions = [
{
value: "App\\Feed\\SourceType\\Calendar\\CalendarApiFeedType",
value: "App\\Feed\\CalendarApiFeedType",
title: t("dynamic-fields.calendar-api-feed-type.title"),
key: "0",
secretsDefault: {
locations: [],
},
},
{
value: "App\\Feed\\SourceType\\Colibo\\ColiboFeedType",
value: "App\\Feed\\ColiboFeedType",
title: t("colibo-feed-type.title"),
key: "5",
key: "1",
secretsDefault: {
api_base_uri: "",
client_id: "",
Expand All @@ -79,23 +79,23 @@ function FeedSourceManager({
},
},
{
value: "App\\Feed\\SourceType\\EventDatabase\\EventDatabaseApiFeedType",
value: "App\\Feed\\EventDatabaseApiFeedType",
title: t("dynamic-fields.event-database-api-feed-type.title"),
key: "1",
key: "2",
secretsDefault: {
host: "",
},
},
{
value: "App\\Feed\\SourceType\\Notified\\NotifiedFeedType",
value: "App\\Feed\\NotifiedFeedType",
title: t("dynamic-fields.notified-feed-type.title"),
key: "2",
key: "3",
secretsDefault: {
token: "",
},
},
{
value: "App\\Feed\\SourceType\\Rss\\RssFeedType",
value: "App\\Feed\\RssFeedType",
title: t("dynamic-fields.rss-feed-type.title"),
key: "4",
secretsDefault: {},
Expand Down
1 change: 1 addition & 0 deletions src/components/feed-sources/templates/colibo-feed-type.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const ColiboFeedType = ({
label={t("allowed-recipients")}
value={formStateObject.allowed_recipients ?? []}
optionsEndpoint={optionsEndpoint}
helpText={t("allowed-recipients-help")}
/>
)}
</>
Expand Down
3 changes: 2 additions & 1 deletion src/translations/da/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,7 @@
"values-info": "Værdierne Client ID og Client Secret findes ved at oprette en API klient i \"Systemadministration\" -> \"API adgangshåndtering\" i Colibo intranet.",
"allowed-recipients": "Tilladte modtagergrupper",
"redacted-value-input-placeholder": "Skjult værdi",
"save-before-recipients-can-be-set": "Bemærk! Datakilden skal gemmes før der kan tilkobles tilladte modtagergrupper. Gem og åbn datakilden igen."
"save-before-recipients-can-be-set": "Bemærk! Datakilden skal gemmes før der kan tilkobles tilladte modtagergrupper. Gem og åbn datakilden igen.",
"allowed-recipients-help": "Det er kun disse modtagergrupper, der vil være tilgængelige, når man opretter et slide, der bruger datakilden."
}
}

0 comments on commit 9d2c36b

Please sign in to comment.