Skip to content
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

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

amansinghbais
Copy link
Contributor

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)

Screenshot from 2024-06-17 12-05-56

Contribution and Currently Important Rules Acceptance

@@ -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>
Copy link
Contributor

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.

Comment on lines 158 to 159
<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 }}
Copy link
Contributor

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
Copy link
Contributor

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.

@ravilodhi ravilodhi merged commit 63a6f76 into hotwax:main Jun 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants