Skip to content

Commit

Permalink
wip: add strategy all
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiusj committed Nov 17, 2023
1 parent dc80b05 commit 830dcfb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,10 @@
"maximum": {
"label": "Maximum",
"helpText": "Only apply the discount that offers the maximum reduction."
},
"all": {
"label": "All",
"helpText": "Apply all discounts with conditions that are satisfied."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export function DiscountApplicationStrategyCard({
label: i18n.translate('maximum.label', I18N_SCOPE),
helpText: i18n.translate('maximum.helpText', I18N_SCOPE),
},
{
value: DiscountApplicationStrategy.All,
label: i18n.translate('all.label', I18N_SCOPE),
helpText: i18n.translate('all.helpText', I18N_SCOPE),
},
]}
selected={[strategy.value]}
onChange={handleChange}
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export type CountryCode = SupportedCountryCode | typeof REST_OF_WORLD;
export enum DiscountApplicationStrategy {
First = 'FIRST',
Maximum = 'MAXIMUM',
All = 'ALL',
}
export interface ProductOrCollectionResource extends Resource {
title: string;
Expand Down

0 comments on commit 830dcfb

Please sign in to comment.