Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-90820 || Incorrect description for Slack rules #3824

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export const Notifications = () => {
</Layout>
{allNotificationPlugins.map((item) => (
<RuleGroup
ruleDescription={item.details.ruleDescription}
ruleFields={item.details.ruleFields}
key={`rule-section-${item.name}`}
pluginName={item.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const RuleItemDisabledTooltip = withTooltip({
},
})(({ children }) => children);

export const RuleGroup = ({ pluginName, rules, isPluginEnabled, ruleFields }) => {
export const RuleGroup = ({ pluginName, ruleDescription, rules, isPluginEnabled, ruleFields }) => {
const { trackEvent } = useTracking();
const { formatMessage } = useIntl();

Expand Down Expand Up @@ -201,6 +201,7 @@ export const RuleGroup = ({ pluginName, rules, isPluginEnabled, ruleFields }) =>
showModalAction({
id: 'addEditNotificationModal',
data: {
type: pluginName,
actionType: MODAL_ACTION_TYPE_COPY,
ruleFields,
onSave: (withoutAttributes) => confirmAdd(withoutAttributes),
Expand Down Expand Up @@ -239,7 +240,11 @@ export const RuleGroup = ({ pluginName, rules, isPluginEnabled, ruleFields }) =>
<FieldElement
className={cx('fieldElement')}
withoutProvider
description={formatMessage(messages.typeDescription, { type: pluginName })}
description={
pluginName === EMAIL
? formatMessage(messages.typeDescription, { type: EMAIL })
: ruleDescription
}
>
<div className={cx('toggle')}>
<Toggle
Expand Down Expand Up @@ -343,6 +348,7 @@ const ruleShape = PropTypes.shape({
});

RuleGroup.propTypes = {
ruleDescription: PropTypes.string,
pluginName: PropTypes.string.isRequired,
rules: PropTypes.arrayOf(ruleShape),
ruleFields: PropTypes.arrayOf(ruleField),
Expand Down
Loading