Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
feat: add 'customer_status' rule
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed Jun 10, 2024
1 parent 4f3c1f1 commit 0e3091e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/app/src/data/ruleBuilder/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,30 @@ export const ruleBuilderConfig: RuleBuilderConfig = {
return true
}
},
customer_status: {
resource: 'custom_promotion_rules',
rel: null,
label: 'Customer status',
operators: [matchers.in, matchers.not_in],
Component: () => (
<HookedInputSelect
name='value'
placeholder='Select...'
initialValues={[
{ label: 'Prospect', value: 'prospect' },
{
label: 'Acquired',
value: 'acquired'
},
{ label: 'Repeat', value: 'repeat' }
]}
isMulti
/>
),
isAvailable() {
return true
}
},
customer_tags_id: {
resource: 'custom_promotion_rules',
rel: 'tags',
Expand Down Expand Up @@ -181,6 +205,7 @@ export type RuleBuilderConfig = Record<
| 'currency_code'
| 'total_amount_cents'
| 'line_items_sku_tags_id'
| 'customer_status'
| 'customer_tags_id'
| 'customer_email'
| 'order_tags_id'
Expand Down

0 comments on commit 0e3091e

Please sign in to comment.