-
Notifications
You must be signed in to change notification settings - Fork 40
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
Improved: logic to show inventory computation of other shipment items in an order (#396) #397
Improved: logic to show inventory computation of other shipment items in an order (#396) #397
Conversation
src/views/OrderDetail.vue
Outdated
@@ -152,19 +152,27 @@ | |||
|
|||
<ion-item lines="none" v-for="item in shipGroup.items" :key="item"> | |||
<ion-thumbnail slot="start"> | |||
<ShopifyImg :src="getProduct(item.productId).mainImageUrl" size="small"/> | |||
<DxpShopifyImg :src="getProduct(item.productId).mainImageUrl" size="small"/> | |||
</ion-thumbnail> | |||
<ion-label> | |||
<p class="overline">{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}</p> | |||
{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : getProduct(item.productId).productName }} | |||
<p>{{ translate("Color:", { color: getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR') }) }}</p> |
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.
We should not display color and size, as we not displaying the same in product list item.
src/views/OrderDetail.vue
Outdated
<p class="overline">{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}</p> | ||
{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : getProduct(item.productId).productName }} |
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.
Use the same pattern as used in Product list item card
order.shipGroups?.find((shipGroup: any) => { | ||
if(shipGroup.shipGroupSeqId === payload.shipGroupSeqId){ | ||
shipGroup.items?.find((item: any) => { | ||
if(item.productId === payload.productId) item.isFetchingStock = !item.isFetchingStock |
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 adding this whole logic, we can simply update the item.isFetchingStock in the component method directly and then directly update the current order.
Related Issues
#396
Short Description and Why It's Useful
Displayed inventory computation for the items in other shipments of an order.
Screenshots of Visual Changes before/after (If There Are Any)
Contribution and Currently Important Rules Acceptance