Skip to content

Commit

Permalink
Implemented: do not dispatch stock/addProducts action while dispatchi…
Browse files Browse the repository at this point in the history
…ng getRejHistory action (#283)
  • Loading branch information
sanskar345 committed Oct 11, 2023
1 parent 2d32058 commit 2f7a6cb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/ProductListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ion-label>
<!-- Only show stock if its not a ship to store order -->
<div v-if="!isShipToStoreOrder">
<ion-note v-if="getProductStock(item.productId).quantityOnHandTotal >= 0 " :color="updateColor(getProductStock(item.productId))">
<ion-note v-if="getProductStock(item.productId).quantityOnHandTotal >= 0 " :color="updateColor(getProductStock(item.productId).quantityOnHandTotal)">
{{ getProductStock(item.productId).quantityOnHandTotal }} {{ $t('pieces in stock') }}
</ion-note>
<ion-spinner v-else-if="isFetchingStock" color="medium" name="crescent" />
Expand All @@ -26,14 +26,15 @@

<script lang="ts">
import { defineComponent } from "vue";
import { IonIcon, IonItem, IonLabel, IonNote, IonSpinner, IonThumbnail } from "@ionic/vue";
import { IonButton, IonIcon, IonItem, IonLabel, IonNote, IonSpinner, IonThumbnail } from "@ionic/vue";
import { mapGetters, useStore } from 'vuex';
import { ShopifyImg } from '@hotwax/dxp-components'
import { cubeOutline } from 'ionicons/icons'
export default defineComponent({
name: "ProductListItem",
components: {
IonButton,
IonIcon,
IonItem,
IonLabel,
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"pending approval": "pending approval",
"Picked by": "Picked by { pickers }",
"Pick up location": "Pick up location",
"pieces in stock": "pieces in stock",
"Product details": "Product details",
"Product not found": "Product not found",
"Products not found": "Products not found",
Expand Down
1 change: 1 addition & 0 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"pending approval": "pendiente de aprobación",
"Picked by": "Picked by { pickers }",
"Pick up location": "Ubicación de recogida",
"pieces in stock": "pieces in stock",
"Product details": "Detalles del producto",
"Product not found": "Producto no encontrado",
"Products not found": "Productos no encontrados",
Expand Down
1 change: 1 addition & 0 deletions src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"pending approval": "承認待ち",
"Picked by": "Picked by { pickers }",
"Pick up location": "受取場所",
"pieces in stock": "pieces in stock",
"Product details": "商品詳細",
"Product not found": "商品が見つかりません",
"Products not found": "商品が見つかりません",
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/order/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,6 @@ const actions: ActionTree<OrderState , RootState> ={

// Get products that exist in order item rejection history
await this.dispatch('product/fetchProducts', { productIds })
await this.dispatch('stock/addProducts', { productIds })
} else {
throw resp.data
}
Expand Down
2 changes: 2 additions & 0 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ import {
IonIcon,
IonItem,
IonLabel,
IonList,
IonPage,
IonSelect,
IonSelectOption,
Expand Down Expand Up @@ -290,6 +291,7 @@ export default defineComponent({
IonIcon,
IonItem,
IonLabel,
IonList,
IonPage,
IonSelect,
IonSelectOption,
Expand Down

0 comments on commit 2f7a6cb

Please sign in to comment.