-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delivery type disable fix, product sku name change #939
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -667,6 +667,12 @@ const AddDeliveryRule = ({ targetedData, deliveryRules, setDeliveryRules, index, | |||||||||||||||
optionsKey="code" | ||||||||||||||||
onSelect={(value) => updateDeliveryType(value)} | ||||||||||||||||
t={t} | ||||||||||||||||
disabled={ | ||||||||||||||||
filteredDeliveryConfig?.deliveryConfig?.find((i, n) => n === targetedData?.deliveryIndex - 1)?.conditionConfig?.[delivery?.ruleKey - 1] | ||||||||||||||||
?.disableDeliveryType | ||||||||||||||||
? true | ||||||||||||||||
: false | ||||||||||||||||
} | ||||||||||||||||
Comment on lines
+670
to
+675
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The conditional disabling of UI components based on delivery configuration is implemented correctly. Consider simplifying the ternary operation for clarity. - disabled={
- filteredDeliveryConfig?.deliveryConfig?.find((i, n) => n === targetedData?.deliveryIndex - 1)?.conditionConfig?.[delivery?.ruleKey - 1]
- ?.disableDeliveryType
- ? true
- : false
- }
+ disabled={!!filteredDeliveryConfig?.deliveryConfig?.find((i, n) => n === targetedData?.deliveryIndex - 1)?.conditionConfig?.[delivery?.ruleKey - 1]?.disableDeliveryType} Committable suggestion
Suggested change
ToolsBiome
|
||||||||||||||||
/> | ||||||||||||||||
</LabelFieldPair> | ||||||||||||||||
)} | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated SKU generation logic enhances product identification by including both name and variant. Consider adding null checks for
target?.name
andtarget?.variant
to ensure robustness against potential undefined values.Committable suggestion