Skip to content

Commit

Permalink
Merge branch 'main' into #298
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Mar 14, 2024
2 parents e92f305 + 70885d4 commit 9d97a89
Show file tree
Hide file tree
Showing 30 changed files with 402 additions and 312 deletions.
117 changes: 30 additions & 87 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "receiving",
"version": "2.22.0",
"version": "2.24.0",
"private": true,
"description": "HotWax Commerce Receiving App",
"scripts": {
Expand All @@ -16,7 +16,7 @@
"@casl/ability": "^6.0.0",
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.2.6",
"@hotwax/dxp-components": "^1.11.0",
"@hotwax/dxp-components": "^1.12.1",
"@hotwax/oms-api": "^1.10.0",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
Expand Down
10 changes: 10 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ export default defineComponent({
if (this.loader) {
this.loader.dismiss();
this.loader = null as any;
} else {
// Added this else case as there are some scenarios in which the loader is not created and before that the dismissLoader gets called, resulting in the loader not getting dismissed
// So checking that when the loader is not found then try dismissing the loader again after 3 secs.
// The above case appears when directly hitting the shipment detail page and then the receive shipment api throws error
// TODO: need to find a more better approach to dismiss the loader in such case
setTimeout(() => {
if (this.loader) {
this.dismissLoader();
}
}, 3000)
}
},
async unauthorized() {
Expand Down
3 changes: 2 additions & 1 deletion src/adapter/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { api, client, getConfig, getUserFacilities, initialise, logout, resetConfig, updateInstanceUrl, updateToken } from '@hotwax/oms-api'
import { api, client, getConfig, getUserFacilities, hasError, initialise, logout, resetConfig, updateInstanceUrl, updateToken } from '@hotwax/oms-api'

export {
api,
client,
getConfig,
getUserFacilities,
hasError,
initialise,
logout,
resetConfig,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/components/ClosePurchaseOrderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<ion-list>
<ion-item :button="isPOItemStatusPending(item)" v-for="(item, index) in getPOItems()" :key="index" @click="item.isChecked = !item.isChecked">
<ion-thumbnail slot="start">
<ShopifyImg size="small" :src="getProduct(item.productId).mainImageUrl" />
<DxpShopifyImg size="small" :src="getProduct(item.productId).mainImageUrl" />
</ion-thumbnail>
<ion-label>
<h2>{{ productHelpers.getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) }}</h2>
Expand Down Expand Up @@ -66,7 +66,7 @@ import { defineComponent } from 'vue';
import { mapGetters, useStore } from 'vuex'
import { OrderService } from "@/services/OrderService";
import { productHelpers } from '@/utils';
import { ShopifyImg, translate } from '@hotwax/dxp-components';
import { DxpShopifyImg, translate } from '@hotwax/dxp-components';
import { useRouter } from 'vue-router';
export default defineComponent({
Expand All @@ -87,7 +87,7 @@ export default defineComponent({
IonTitle,
IonThumbnail,
IonToolbar,
ShopifyImg
DxpShopifyImg
},
computed: {
...mapGetters({
Expand Down
6 changes: 3 additions & 3 deletions src/components/ImageModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ion-header>

<ion-content class="ion-text-center">
<ShopifyImg :src="imageUrl" />
<DxpShopifyImg :src="imageUrl" />

</ion-content>
</template>
Expand All @@ -29,7 +29,7 @@ import {
} from '@ionic/vue';
import { defineComponent } from 'vue';
import { closeOutline } from 'ionicons/icons';
import { ShopifyImg } from '@hotwax/dxp-components';
import { DxpShopifyImg } from '@hotwax/dxp-components';
export default defineComponent({
name: 'ImageModal',
Expand All @@ -41,7 +41,7 @@ export default defineComponent({
IonIcon,
IonTitle,
IonToolbar,
ShopifyImg
DxpShopifyImg
},
props: ["imageUrl", "productName"],
methods: {
Expand Down
12 changes: 7 additions & 5 deletions src/components/ShipmentListItem.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<template>
<ion-item button @click="viewShipment()">
<ion-label>
<p class="overline" v-show="shipment.externalOrderId">{{ shipment.externalOrderId }}</p>
<p class="overline" v-show="shipment.externalOrderId || shipment.externalOrderName">{{ shipment.externalOrderName ? shipment.externalOrderName : shipment.externalOrderId }}</p>
<h2>{{ shipment.externalId ? shipment.externalId : shipment.shipmentId }}</h2>
<p v-if="shipment.shipmentItemCount">{{ shipment.shipmentItemCount }} {{ (shipment.shipmentItemCount > 1 ? 'Items' : 'Item') }}</p>
</ion-label>
<ion-note slot="end">{{ shipment.estimatedArrivalDate ? ($filters.formatDate(shipment.estimatedArrivalDate)) : shipment.statusDesc }}</ion-note>
<ion-label class="ion-text-end" slot="end">
<p>{{ shipment.estimatedArrivalDate ? ($filters.formatDate(shipment.estimatedArrivalDate)) : shipment.statusDesc }}</p>
<p class="overline"> {{ shipment.trackingIdNumber }}</p>
</ion-label>
</ion-item>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import {
IonItem,
IonLabel,
IonNote
IonLabel
} from '@ionic/vue'
import { useRouter } from 'vue-router'
import { useStore } from 'vuex';
Expand All @@ -24,7 +26,7 @@ export default defineComponent({
components: {
IonItem,
IonLabel,
IonNote,
},
props: ["shipment"],
methods: {
Expand Down
Loading

0 comments on commit 9d97a89

Please sign in to comment.