Skip to content

Commit 29c8869

Browse files
committed
3208: Adjusted to allowed recipients
1 parent fa107ff commit 29c8869

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

src/components/feed-sources/templates/colibo-feed-type.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const ColiboFeedType = ({
2424
let endpoint = config.api;
2525
endpoint = endpoint.replace(/\/$/, "");
2626
endpoint += feedSourceId;
27-
endpoint += "/config/FeedEntryRecipients";
27+
endpoint += "/config/recipients";
2828

2929
setOptionsEndpoint(endpoint);
3030
});
@@ -81,10 +81,10 @@ const ColiboFeedType = ({
8181
{optionsEndpoint && (
8282
<MultiselectFromEndpoint
8383
onChange={handleInput}
84-
name="recipients"
84+
name="allowed_recipients"
8585
disableSearch={false}
86-
label={t("recipients")}
87-
value={formStateObject.recipients ?? []}
86+
label={t("allowed-recipients")}
87+
value={formStateObject.allowed_recipients ?? []}
8888
optionsEndpoint={optionsEndpoint}
8989
/>
9090
)}
@@ -98,7 +98,7 @@ ColiboFeedType.propTypes = {
9898
api_base_uri: PropTypes.string,
9999
client_id: PropTypes.string,
100100
client_secret: PropTypes.string,
101-
recipients: PropTypes.arrayOf(PropTypes.string),
101+
allowed_recipients: PropTypes.arrayOf(PropTypes.string),
102102
}),
103103
feedSourceId: PropTypes.string,
104104
mode: PropTypes.string,

src/components/slide/content/content-form.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function ContentForm({
123123
errors={formData.required ? errors : null}
124124
label={formData.label}
125125
helpText={formData.helpText}
126-
value={formStateObject[formData.name]}
126+
value={formStateObject[formData.name] ?? formData?.defaultValue}
127127
onChange={onChange}
128128
formGroupClasses={formData.formGroupClasses}
129129
/>

src/components/slide/content/feed-selector.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ function FeedSelector({
125125
optionsEndpoint={element.endpoint}
126126
disableSearch={element.disableSearch ?? false}
127127
singleSelect={element.singleSelect ?? false}
128+
helpText={element.helpText ?? null}
128129
/>
129130
);
130131
}

src/components/slide/content/multiselect-from-endpoint.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function MultiselectFromEndpoint({
2626
value = [],
2727
disableSearch = true,
2828
singleSelect = false,
29+
helpText = null,
2930
}) {
3031
const { t } = useTranslation("common");
3132
const [options, setOptions] = useState(null);
@@ -98,6 +99,7 @@ function MultiselectFromEndpoint({
9899
}}
99100
filterCallback={() => {}}
100101
label={label ?? t("multiselect.select")}
102+
helpText={helpText}
101103
/>
102104
)}
103105
</>
@@ -112,6 +114,7 @@ MultiselectFromEndpoint.propTypes = {
112114
optionsEndpoint: PropTypes.string.isRequired,
113115
singleSelect: PropTypes.bool,
114116
disableSearch: PropTypes.bool,
117+
helpText: PropTypes.string,
115118
};
116119

117120
export default MultiselectFromEndpoint;

src/translations/da/common.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,8 +1086,8 @@
10861086
"client-id": "Client ID",
10871087
"client-secret": "Client Secret",
10881088
"values-info": "Værdierne Client ID og Client Secret findes ved at oprette en API klient i \"Systemadministration\" -> \"API adgangshåndtering\" i Colibo intranet.",
1089-
"recipients": "Modtagergrupper",
1089+
"allowed-recipients": "Tilladte modtagergrupper",
10901090
"redacted-value-input-placeholder": "Skjult værdi",
1091-
"save-before-recipients-can-be-set": "Bemærk! Datakilden skal gemmes før der kan tilkobles modtagergrupper. Gem og åbn datakilden igen."
1091+
"save-before-recipients-can-be-set": "Bemærk! Datakilden skal gemmes før der kan tilkobles tilladte modtagergrupper. Gem og åbn datakilden igen."
10921092
}
10931093
}

0 commit comments

Comments
 (0)