-
Notifications
You must be signed in to change notification settings - Fork 59
Fixed: logic for fetching orders when showShippingOrders is enabled #780
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
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -253,7 +253,7 @@ export const useOrderStore = defineStore('order', { | |||||
| pageIndex: params.viewIndex | ||||||
| } as any; | ||||||
|
|
||||||
| if (useProductStore().isProductStoreSettingEnabled('SHOW_SHIPPING_ORDERS')) { | ||||||
| if (useProductStore().isProductStoreSettingEnabled('showShippingOrders')) { | ||||||
| queryParams = { | ||||||
| shipmentMethodTypeId: 'STOREPICKUP', | ||||||
| shipmentMethodTypeId_op: 'equals', | ||||||
|
|
@@ -499,7 +499,7 @@ export const useOrderStore = defineStore('order', { | |||||
| pageIndex: params.viewIndex || 0 | ||||||
| } as any | ||||||
|
|
||||||
| if (!useProductStore().isProductStoreSettingEnabled('SHOW_SHIPPING_ORDERS')) { | ||||||
| if (!useProductStore().isProductStoreSettingEnabled('showShippingOrders')) { | ||||||
|
Contributor
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. Instead of querying the setting with a hardcoded string key, you can use the existing
Suggested change
|
||||||
| queryParams.shipmentMethodTypeIds = 'STOREPICKUP' | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -576,7 +576,7 @@ export const useOrderStore = defineStore('order', { | |||||
| pageIndex: params.viewIndex || 0 | ||||||
| } as any | ||||||
|
|
||||||
| if (!useProductStore().isProductStoreSettingEnabled('SHOW_SHIPPING_ORDERS')) { | ||||||
| if (!useProductStore().isProductStoreSettingEnabled('showShippingOrders')) { | ||||||
|
Contributor
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. Instead of querying the setting with a hardcoded string key, you can use the existing
Suggested change
|
||||||
| queryParams.shipmentMethodTypeIds = 'STOREPICKUP' | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
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.
Instead of querying the setting with a hardcoded string key, you can use the existing
isShowShippingOrdersEnabledgetter defined in theproductStore. This improves type safety and maintainability.