mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
show label_attached instead of label_created in rules
This commit is contained in:
parent
25fb9fd698
commit
207241934d
2 changed files with 11 additions and 2 deletions
|
|
@ -148,6 +148,7 @@ export const saveLabelsInLibraryItem = async (
|
|||
{
|
||||
id: libraryItemId,
|
||||
labels: labels.map((l) => deepDelete(l, columnsToDelete)),
|
||||
labelNames: labels.map((l) => l.name),
|
||||
},
|
||||
userId
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,14 @@ type CreateRuleModalProps = {
|
|||
revalidate: () => void
|
||||
}
|
||||
|
||||
const eventTypeObj = {
|
||||
PAGE_CREATED: 'PAGE_CREATED',
|
||||
PAGE_UPDATED: 'PAGE_UPDATED',
|
||||
HIGHLIGHT_CREATED: 'HIGHLIGHT_CREATED',
|
||||
HIGHLIGHT_UPDATED: 'HIGHLIGHT_UPDATED',
|
||||
LABEL_CREATED: 'LABEL_ATTACHED',
|
||||
}
|
||||
|
||||
const CreateRuleModal = (props: CreateRuleModalProps): JSX.Element => {
|
||||
const [form] = Form.useForm()
|
||||
|
||||
|
|
@ -104,7 +112,7 @@ const CreateRuleModal = (props: CreateRuleModalProps): JSX.Element => {
|
|||
const value = Object.values(RuleEventType)[index]
|
||||
return (
|
||||
<Select.Option key={key} value={value}>
|
||||
{key === 'LABEL_CREATED' ? 'LABEL_ATTACHED' : key}
|
||||
{eventTypeObj[value]}
|
||||
</Select.Option>
|
||||
)
|
||||
})}
|
||||
|
|
@ -363,7 +371,7 @@ export default function Rules(): JSX.Element {
|
|||
{row.eventTypes.map((eventType: RuleEventType, index: number) => {
|
||||
return (
|
||||
<Tag color={'geekblue'} key={index}>
|
||||
{eventType}
|
||||
{eventTypeObj[eventType]}
|
||||
</Tag>
|
||||
)
|
||||
})}
|
||||
|
|
|
|||
Loading…
Reference in a new issue