Skip to content

Commit

Permalink
fix(dashboard): promotions disable conditions (#8104)
Browse files Browse the repository at this point in the history
  • Loading branch information
fPolic authored Jul 12, 2024
1 parent f6e86f1 commit 82b620c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export const useVariantPriceGridColumns = ({
return (
<ReadonlyCell>
<div className="flex h-full w-full items-center gap-x-2 overflow-hidden">
<span className="truncate">{entity.title}</span>
<span title={entity.title} className="truncate">
{entity.title}
</span>
</div>
</ReadonlyCell>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const RuleValueFormField = ({
className="bg-ui-bg-base"
ref={valuesRef}
min={1}
disabled={!fieldRule.attribute}
/>
</Form.Control>
<Form.ErrorMessage />
Expand All @@ -97,6 +98,7 @@ export const RuleValueFormField = ({
{...field}
onChange={onChange}
className="bg-ui-bg-base"
disabled={!fieldRule.attribute}
/>
</Form.Control>
<Form.ErrorMessage />
Expand All @@ -112,6 +114,7 @@ export const RuleValueFormField = ({
Array.isArray(field.value) ? field.value[0] : field.value
}
onValueChange={onChange}
disabled={!fieldRule.attribute}
>
<Select.Trigger ref={ref} className="bg-ui-bg-base">
<Select.Value placeholder="Select Value" />
Expand Down Expand Up @@ -144,6 +147,7 @@ export const RuleValueFormField = ({
options={options}
onChange={onChange}
className="bg-ui-bg-base"
disabled={!fieldRule.attribute}
/>
</Form.Control>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@ export const RulesFormField = ({
return (
<Form.Item className="basis-1/2">
<Form.Control>
<Select {...field} onValueChange={onChange}>
<Select
{...field}
disabled={!fieldRule.attribute}
onValueChange={onChange}
>
<Select.Trigger
ref={operatorRef}
className="bg-ui-bg-base"
Expand Down

0 comments on commit 82b620c

Please sign in to comment.