[CORL-924/CORL-923] show all comments or staff comments in slack (#2872)

* add allcomments option to slack config

* create separate class for hadnling slack event publishing

* add strings

Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
Co-authored-by: Kim Gardner <kgardnr@gmail.com>
This commit is contained in:
Tessa Thornton
2020-03-26 21:21:09 -04:00
committed by GitHub
co-authored by Wyatt Johnson Kim Gardner
parent 3cb5d0ff9f
commit 7fd524cd6a
8 changed files with 334 additions and 213 deletions
@@ -153,6 +153,42 @@ const SlackChannel: FunctionComponent<Props> = ({
</div>
<div className={styles.notificationToggles}>
<Field
name={`${channel}.triggers.allComments`}
type="checkbox"
parse={parseBool}
>
{({ input }) => (
<CheckBox
id={`configure-slack-channel-triggers-allComments-${input.name}`}
disabled={disabled || !channelEnabled}
className={styles.trigger}
{...input}
>
<Localized id="configure-slack-channel-triggers-allComments">
All Comments
</Localized>
</CheckBox>
)}
</Field>
<Field
name={`${channel}.triggers.staffComments`}
type="checkbox"
parse={parseBool}
>
{({ input }) => (
<CheckBox
id={`configure-slack-channel-triggers-staffComments-${input.name}`}
disabled={disabled || !channelEnabled}
className={styles.trigger}
{...input}
>
<Localized id="configure-slack-channel-triggers-staffComments">
Staff Comments
</Localized>
</CheckBox>
)}
</Field>
<Field
name={`${channel}.triggers.reportedComments`}
type="checkbox"
@@ -144,6 +144,8 @@ const enhanced = withFragmentContainer<Props>({
reportedComments
pendingComments
featuredComments
allComments
staffComments
}
}
}