fix(dashboard): promotions disable conditions (#8104)
This commit is contained in:
1 parent
f6e86f1b99
commit
82b620c488
3 files changed
+12
-2
No files matched your search
@@ -78,7 +78,9 @@ export const useVariantPriceGridColumns = ({
|
|||||||
return (
|
return (
|
||||||
<ReadonlyCell>
|
<ReadonlyCell>
|
||||||
<div className="flex h-full w-full items-center gap-x-2 overflow-hidden">
|
<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>
|
</div>
|
||||||
</ReadonlyCell>
|
</ReadonlyCell>
|
||||||
)
|
)
|
||||||
|
|||||||
+4
@@ -84,6 +84,7 @@ export const RuleValueFormField = ({
|
|||||||
className="bg-ui-bg-base"
|
className="bg-ui-bg-base"
|
||||||
ref={valuesRef}
|
ref={valuesRef}
|
||||||
min={1}
|
min={1}
|
||||||
|
disabled={!fieldRule.attribute}
|
||||||
/>
|
/>
|
||||||
</Form.Control>
|
</Form.Control>
|
||||||
<Form.ErrorMessage />
|
<Form.ErrorMessage />
|
||||||
@@ -97,6 +98,7 @@ export const RuleValueFormField = ({
|
|||||||
{...field}
|
{...field}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
className="bg-ui-bg-base"
|
className="bg-ui-bg-base"
|
||||||
|
disabled={!fieldRule.attribute}
|
||||||
/>
|
/>
|
||||||
</Form.Control>
|
</Form.Control>
|
||||||
<Form.ErrorMessage />
|
<Form.ErrorMessage />
|
||||||
@@ -112,6 +114,7 @@ export const RuleValueFormField = ({
|
|||||||
Array.isArray(field.value) ? field.value[0] : field.value
|
Array.isArray(field.value) ? field.value[0] : field.value
|
||||||
}
|
}
|
||||||
onValueChange={onChange}
|
onValueChange={onChange}
|
||||||
|
disabled={!fieldRule.attribute}
|
||||||
>
|
>
|
||||||
<Select.Trigger ref={ref} className="bg-ui-bg-base">
|
<Select.Trigger ref={ref} className="bg-ui-bg-base">
|
||||||
<Select.Value placeholder="Select Value" />
|
<Select.Value placeholder="Select Value" />
|
||||||
@@ -144,6 +147,7 @@ export const RuleValueFormField = ({
|
|||||||
options={options}
|
options={options}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
className="bg-ui-bg-base"
|
className="bg-ui-bg-base"
|
||||||
|
disabled={!fieldRule.attribute}
|
||||||
/>
|
/>
|
||||||
</Form.Control>
|
</Form.Control>
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -213,7 +213,11 @@ export const RulesFormField = ({
|
|||||||
return (
|
return (
|
||||||
<Form.Item className="basis-1/2">
|
<Form.Item className="basis-1/2">
|
||||||
<Form.Control>
|
<Form.Control>
|
||||||
<Select {...field} onValueChange={onChange}>
|
<Select
|
||||||
|
{...field}
|
||||||
|
disabled={!fieldRule.attribute}
|
||||||
|
onValueChange={onChange}
|
||||||
|
>
|
||||||
<Select.Trigger
|
<Select.Trigger
|
||||||
ref={operatorRef}
|
ref={operatorRef}
|
||||||
className="bg-ui-bg-base"
|
className="bg-ui-bg-base"
|
||||||
|
|||||||
Reference in new issue
Block a user