Skip to content

Commit

Permalink
Merge branch 'main' into #673-disable-filter-options
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Nov 20, 2024
2 parents 052d898 + c716e94 commit 86ad77a
Show file tree
Hide file tree
Showing 48 changed files with 519 additions and 198 deletions.
12 changes: 6 additions & 6 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": "fulfillment",
"version": "2.10.0",
"version": "2.11.1",
"private": true,
"description": "An Ionic project",
"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.15.5",
"@hotwax/dxp-components": "^1.16.0",
"@hotwax/oms-api": "^1.16.0",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
Expand Down
6 changes: 4 additions & 2 deletions src/adapter/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { api, client, getConfig, getNotificationEnumIds, getNotificationUserPrefTypeIds, getProductIdentificationPref, fetchGoodIdentificationTypes, getUserFacilities, hasError, initialise, logout, removeClientRegistrationToken, resetConfig, setProductIdentificationPref, setUserLocale, storeClientRegistrationToken,
subscribeTopic, unsubscribeTopic, updateInstanceUrl, updateToken, setUserTimeZone, getAvailableTimeZones } from '@hotwax/oms-api'
import { api, client, getConfig, getNotificationEnumIds, getNotificationUserPrefTypeIds, getProductIdentificationPref, fetchGoodIdentificationTypes, getUserFacilities, getUserPreference, hasError, initialise, logout, removeClientRegistrationToken, resetConfig, setProductIdentificationPref, setUserLocale, storeClientRegistrationToken,
subscribeTopic, unsubscribeTopic, updateInstanceUrl, updateToken, setUserTimeZone, setUserPreference, getAvailableTimeZones } from '@hotwax/oms-api'

export {
api,
Expand All @@ -11,6 +11,7 @@ export {
getProductIdentificationPref,
fetchGoodIdentificationTypes,
getUserFacilities,
getUserPreference,
hasError,
initialise,
logout,
Expand All @@ -24,5 +25,6 @@ export {
updateInstanceUrl,
updateToken,
setUserTimeZone,
setUserPreference,
getAvailableTimeZones
}
8 changes: 5 additions & 3 deletions src/components/DownloadRejectedOrdersModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
} from '@ionic/vue';
import { computed, defineComponent } from 'vue';
import { closeOutline, cloudDownloadOutline} from 'ionicons/icons';
import { getProductIdentificationValue, translate, useProductIdentificationStore } from '@hotwax/dxp-components';
import { getProductIdentificationValue, translate, useProductIdentificationStore, useUserStore } from '@hotwax/dxp-components';
import { mapGetters, useStore } from 'vuex';
import { escapeSolrSpecialChars, prepareSolrQuery } from '@/utils/solrHelper'
import { RejectionService } from '@/services/RejectionService'
Expand Down Expand Up @@ -136,8 +136,7 @@
computed: {
...mapGetters({
getProduct: 'product/getProduct',
rejectedOrders: 'rejection/getRejectedOrders',
currentFacility: 'user/getCurrentFacility',
rejectedOrders: 'rejection/getRejectedOrders'
})
},
methods: {
Expand Down Expand Up @@ -297,8 +296,10 @@
},
setup() {
const store = useStore()
const userStore = useUserStore()
const productIdentificationStore = useProductIdentificationStore();
let productIdentificationPref = computed(() => productIdentificationStore.getProductIdentificationPref)
let currentFacility: any = computed(() => userStore.getCurrentFacility)
return {
Expand All @@ -308,6 +309,7 @@
productIdentificationPref,
store,
translate,
currentFacility
}
}
});
Expand Down
6 changes: 4 additions & 2 deletions src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { arrowBackOutline, backspaceOutline, mailUnreadOutline, mailOpenOutline,
import { useStore } from "@/store";
import { useRouter } from "vue-router";
import { hasPermission } from "@/authorization";
import { translate } from '@hotwax/dxp-components';
import { translate, useUserStore } from '@hotwax/dxp-components';
export default defineComponent({
name: "Menu",
Expand All @@ -70,7 +70,6 @@ export default defineComponent({
computed: {
...mapGetters({
isUserAuthenticated: 'user/isUserAuthenticated',
currentFacility: 'user/getCurrentFacility',
})
},
methods: {
Expand All @@ -81,6 +80,8 @@ export default defineComponent({
setup() {
const store = useStore();
const router = useRouter();
const userStore = useUserStore()
let currentFacility: any = computed(() => userStore.getCurrentFacility)
const appPages = [
{
Expand Down Expand Up @@ -189,6 +190,7 @@ export default defineComponent({
appPages,
backspaceOutline,
checkmarkDoneOutline,
currentFacility,
hasPermission,
arrowBackOutline,
mailUnreadOutline,
Expand Down
10 changes: 6 additions & 4 deletions src/components/NotificationPreferenceModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ import {
modalController,
alertController,
} from "@ionic/vue";
import { defineComponent } from "vue";
import { defineComponent, computed } from "vue";
import { closeOutline, save } from "ionicons/icons";
import { mapGetters, useStore } from "vuex";
import { translate } from '@hotwax/dxp-components'
import { translate, useUserStore } from '@hotwax/dxp-components'
import { showToast } from "@/utils";
import emitter from "@/event-bus"
import { generateTopicName } from "@/utils/firebase";
Expand Down Expand Up @@ -82,7 +82,6 @@ export default defineComponent({
},
computed: {
...mapGetters({
currentFacility: 'user/getCurrentFacility',
instanceUrl: 'user/getInstanceUrl',
notificationPrefs: 'user/getNotificationPrefs'
}),
Expand Down Expand Up @@ -138,7 +137,7 @@ export default defineComponent({
}
},
async handleTopicSubscription() {
const facilityId = (this.currentFacility as any).facilityId
const facilityId = this.currentFacility?.facilityId
const subscribeRequests = [] as any
this.notificationPrefToUpdate.subscribe.map(async (enumId: string) => {
const topicName = generateTopicName(facilityId, enumId)
Expand Down Expand Up @@ -182,9 +181,12 @@ export default defineComponent({
},
setup() {
const store = useStore();
const userStore = useUserStore()
let currentFacility: any = computed(() => userStore.getCurrentFacility)
return {
closeOutline,
currentFacility,
translate,
save,
store
Expand Down
6 changes: 3 additions & 3 deletions src/components/ReportIssuePopover.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<ion-content>
<ion-list>
<ion-item v-for="reason in rejectReasons" :key="reason.enumId" @click="updateIssue(reason.enumId)" button>
{{ reason.description ? translate(reason.description) : reason.enumId }}
<ion-item v-for="reason in rejectReasonOptions" :key="reason.enumId" @click="updateIssue(reason.enumId)" button>
{{ reason.description ? translate(reason.description) : reason.enumDescription ? translate(reason.enumDescription) : reason.enumId }}
</ion-item>
</ion-list>
</ion-content>
Expand All @@ -28,7 +28,7 @@ export default defineComponent({
},
computed: {
...mapGetters({
rejectReasons: 'util/getRejectReasons'
rejectReasonOptions: 'util/getRejectReasonOptions'
})
},
props: ["shipmentPackages"],
Expand Down
4 changes: 3 additions & 1 deletion src/components/ScanOrderItemModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default defineComponent({
computed: {
...mapGetters({
getProduct: 'product/getProduct',
barcodeIdentifier: 'util/getBarcodeIdentificationPref'
}),
},
data() {
Expand Down Expand Up @@ -133,7 +134,7 @@ export default defineComponent({
let currentItem = {} as any;
const item = this.orderItems.find((orderItem: any) => {
const itemVal = getProductIdentificationValue(this.productIdentificationPref.primaryId, this.getProduct(orderItem.productId)) ? getProductIdentificationValue(this.productIdentificationPref.primaryId, this.getProduct(orderItem.productId)) : orderItem.productSku
const itemVal = getProductIdentificationValue(this.barcodeIdentifier, this.getProduct(orderItem.productId)) ? getProductIdentificationValue(this.barcodeIdentifier, this.getProduct(orderItem.productId)) : this.getProduct(orderItem.productId)?.internalName
if(itemVal === payload) currentItem = orderItem;
return itemVal === payload && !orderItem.isChecked;
});
Expand All @@ -154,6 +155,7 @@ export default defineComponent({
} else {
showToast(translate((currentItem.productSku ? "Product is already received:" : "Scanned item is not present within the shipment:"), { itemName: payload }))
}
this.queryString = ''
},
areAllItemsSelected() {
return !this.orderItems.some((item: any) => !item.isChecked)
Expand Down
12 changes: 7 additions & 5 deletions src/components/TransferOrderFilters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ import {
IonTitle,
IonToolbar
} from "@ionic/vue";
import { defineComponent } from "vue";
import { defineComponent, computed } from "vue";
import { albumsOutline, banOutline, barChartOutline, calendarNumberOutline, checkmarkDoneOutline, closeOutline, filterOutline, iceCreamOutline, libraryOutline, pulseOutline, settings, shirtOutline, ticketOutline } from "ionicons/icons";
import { mapGetters, useStore } from 'vuex'
import { escapeSolrSpecialChars, prepareOrderQuery } from '@/utils/solrHelper';
import { UtilService } from '@/services/UtilService';
import { hasError } from '@/adapter';
import logger from '@/logger';
import { translate } from '@hotwax/dxp-components';
import { translate, useUserStore } from '@hotwax/dxp-components';
export default defineComponent({
name: "TransferOrderFilters",
Expand All @@ -77,7 +77,6 @@ export default defineComponent({
},
computed: {
...mapGetters({
currentFacility: 'user/getCurrentFacility',
transferOrders: 'transferorder/getTransferOrders',
getStatusDesc: 'util/getStatusDesc',
getShipmentMethodDesc: 'util/getShipmentMethodDesc',
Expand Down Expand Up @@ -126,7 +125,7 @@ export default defineComponent({
filters: {
'-orderStatusId': { value: 'ORDER_CREATED' },
orderTypeId: { value: 'TRANSFER_ORDER' },
facilityId: { value: escapeSolrSpecialChars(this.currentFacility.facilityId) },
facilityId: { value: escapeSolrSpecialChars(this.currentFacility?.facilityId) },
productStoreId: { value: this.currentEComStore.productStoreId }
},
facet: {
Expand Down Expand Up @@ -172,14 +171,17 @@ export default defineComponent({
},
setup() {
const store = useStore();
const userStore = useUserStore()
let currentFacility: any = computed(() => userStore.getCurrentFacility)
return {
albumsOutline,
banOutline,
barChartOutline,
calendarNumberOutline,
checkmarkDoneOutline,
closeOutline,
currentFacility,
filterOutline,
iceCreamOutline,
libraryOutline,
Expand Down
3 changes: 2 additions & 1 deletion src/components/TransferOrderItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</div>
<div class="product-count">
<ion-item v-if="!item.shipmentId" lines="none">
<ion-input :label="translate('Qty')" label-placement="floating" ref="pickedQuantity" type="number" min="0" v-model="item.pickedQuantity" @ionInput="updatePickedQuantity($event, item); validatePickedQuantity($event, item); markPickedQuantityTouched()" :errorText="getErrorText(item)" />
<ion-input :label="translate('Qty')" label-placement="floating" ref="pickedQuantity" type="number" min="0" v-model="item.pickedQuantity" @ionInput="updatePickedQuantity($event, item); validatePickedQuantity($event, item); markPickedQuantityTouched()" :errorText="getErrorText(item)" :disabled="isForceScanEnabled" />
</ion-item>
<ion-item v-else lines="none">
<ion-label slot="end">{{ item.pickedQuantity }} {{ translate('packed') }}</ion-label>
Expand Down Expand Up @@ -97,6 +97,7 @@ export default defineComponent({
...mapGetters({
currentOrder: 'transferorder/getCurrent',
getProduct: 'product/getProduct',
isForceScanEnabled: 'util/isForceScanEnabled',
}),
},
methods: {
Expand Down
7 changes: 6 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"Auto reject related items": "Auto reject related items",
"Available to promise": "Available to promise",
"Back to Launchpad": "Back to Launchpad",
"Barcode Identifier": "Barcode Identifier",
"Billing Address 1": "Billing Address 1",
"Billing Address 2": "Billing Address 2",
"Billing City": "Billing City",
Expand Down Expand Up @@ -95,7 +96,6 @@
"Confirm": "Confirm",
"Configure the order fulfillment capacity of your facility.": "Configure the order fulfillment capacity of your facility.",
"Control whether the store's inventory should be made available for online sales or not.": "Control whether the store's inventory should be made available for online sales or not.",
"Control whether the store requires the force scan during order packing or not.": "Control whether the store requires the force scan during order packing or not.",
"Copied": "Copied { value }",
"Copied to clipboard": "Copied to clipboard",
"Copy ID": "Copy ID",
Expand Down Expand Up @@ -215,6 +215,7 @@
"Failed to update shipment method detail.": "Failed to update shipment method detail.",
"Failed to update tracking code settings.": "Failed to update tracking code settings.",
"Failed to update variance type.": "Failed to update variance type.",
"Fetching facilities": "Fetching facilities",
"Fetching gift card info.": "Fetching gift card info.",
"Fetching time zones": "Fetching time zones",
"Fetching order information...": "Fetching order information...",
Expand Down Expand Up @@ -306,6 +307,7 @@
"No carrier found.": "No carrier found.",
"No data available": "No data available",
"No data found": "No data found",
"No facilities found": "No facilities found",
"No rejection reasons found.": "No rejection reasons found.",
"No shipments have been shipped yet": "No shipments have been shipped yet",
"No shipping label error received from carrier.": "No shipping label error received from carrier",
Expand Down Expand Up @@ -343,6 +345,7 @@
"On": "On",
"Online Order Fulfillment": "Online Order Fulfillment",
"Only alphanumeric characters are allowed.": "Only alphanumeric characters are allowed.",
"Only allow shipped quantity to be incremented by scanning the barcode of products. If the identifier is not found, the scan will default to using the internal name.": "Only allow shipped quantity to be incremented by scanning the barcode of products. {space} If the identifier is not found, the scan will default to using the internal name.",
"Only methods for this carrier": "Only methods for this carrier",
"Only positive numbers are allowed.": "Only positive numbers are allowed.",
"Open": "Open",
Expand Down Expand Up @@ -502,6 +505,8 @@
"Select an issue": "Select an issue",
"Select CSV": "Select CSV",
"Select facility": "Select facility",
"Select Facility": "Select Facility",
"Search facilities": "Search facilities",
"Select store": "Select store",
"Select the column for the following information in the uploaded CSV.": "Select the column for the following information in the uploaded CSV.",
"Select the fields you want to include in your export": "Select the fields you want to include in your export",
Expand Down
Loading

0 comments on commit 86ad77a

Please sign in to comment.