From 16bc91886913df4759292502b0c9effae4b5d4ca Mon Sep 17 00:00:00 2001 From: k2maan Date: Thu, 9 Nov 2023 10:22:48 +0530 Subject: [PATCH 1/4] Implemented: UI to show generate and QR code modal (#355) --- package-lock.json | 15 ++++++++ package.json | 1 + src/components/QRCodeModal.vue | 66 ++++++++++++++++++++++++++++++++++ src/locales/en.json | 1 + src/locales/es.json | 1 + src/views/InProgress.vue | 20 +++++++++-- 6 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 src/components/QRCodeModal.vue diff --git a/package-lock.json b/package-lock.json index bfdadc54..7cbfb2ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "file-saver": "^2.0.5", "luxon": "^2.4.0", "mitt": "^2.1.0", + "qrcode.vue": "^3.4.1", "register-service-worker": "^1.7.1", "vue": "3.2.26", "vue-logger-plugin": "^2.2.3", @@ -27793,6 +27794,14 @@ "teleport": ">=0.2.0" } }, + "node_modules/qrcode.vue": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-3.4.1.tgz", + "integrity": "sha512-wq/zHsifH4FJ1GXQi8/wNxD1KfQkckIpjK1KPTc/qwYU5/Bkd4me0w4xZSg6EXk6xLBkVDE0zxVagewv5EMAVA==", + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/qs": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", @@ -56279,6 +56288,12 @@ "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", "dev": true }, + "qrcode.vue": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-3.4.1.tgz", + "integrity": "sha512-wq/zHsifH4FJ1GXQi8/wNxD1KfQkckIpjK1KPTc/qwYU5/Bkd4me0w4xZSg6EXk6xLBkVDE0zxVagewv5EMAVA==", + "requires": {} + }, "qs": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", diff --git a/package.json b/package.json index c4a9db89..de26408f 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "file-saver": "^2.0.5", "luxon": "^2.4.0", "mitt": "^2.1.0", + "qrcode.vue": "^3.4.1", "register-service-worker": "^1.7.1", "vue": "3.2.26", "vue-logger-plugin": "^2.2.3", diff --git a/src/components/QRCodeModal.vue b/src/components/QRCodeModal.vue new file mode 100644 index 00000000..41576724 --- /dev/null +++ b/src/components/QRCodeModal.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/src/locales/en.json b/src/locales/en.json index 02b809c7..40ce15a0 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -98,6 +98,7 @@ "Full Address": "Full Address", "Fulfillment capacity": "Fulfillment capacity", "Generate packing slip": "Generate packing slip", + "Generate QR code": "Generate QR code", "Generate shipping label": "Generate shipping label", "Go to OMS": "Go to OMS", "Go to Launchpad": "Go to Launchpad", diff --git a/src/locales/es.json b/src/locales/es.json index e5805a98..684f8b00 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -98,6 +98,7 @@ "Full Address": "Dirección Completa", "Fulfillment capacity": "Capacidad de cumplimiento", "Generate packing slip": "Generar documento de embalaje", + "Generate QR code": "Generate QR code", "Generate shipping label": "Generar etiqueta de envío", "Go to OMS": "Ir a OMS", "Go to Launchpad": "Ir a Launchpad", diff --git a/src/views/InProgress.vue b/src/views/InProgress.vue index 2b191eb2..9cc2e708 100644 --- a/src/views/InProgress.vue +++ b/src/views/InProgress.vue @@ -196,6 +196,10 @@ {{ translate("Print Picklist") }} + + + {{ translate("Generate QR code") }} + @@ -246,9 +250,10 @@ import { cubeOutline, ellipsisVerticalOutline, pencilOutline, + optionsOutline, pricetagOutline, printOutline, - optionsOutline + qrCodeOutline } from 'ionicons/icons' import PackagingPopover from "@/views/PackagingPopover.vue"; import { mapGetters, useStore } from 'vuex'; @@ -269,11 +274,11 @@ import EditPickersModal from '@/components/EditPickersModal.vue'; import ShipmentBoxTypePopover from '@/components/ShipmentBoxTypePopover.vue' import OrderActionsPopover from '@/components/OrderActionsPopover.vue' import ShippingLabelErrorModal from '@/components/ShippingLabelErrorModal.vue' +import QRCodeModal from '@/components/QRCodeModal.vue' export default defineComponent({ name: 'InProgress', components: { - ShopifyImg, IonButton, IonButtons, IonCard, @@ -304,6 +309,7 @@ export default defineComponent({ IonThumbnail, IonTitle, IonToolbar, + ShopifyImg, ViewSizeSelector }, computed: { @@ -1020,7 +1026,14 @@ export default defineComponent({ } }); return shippingLabelErrorModal.present(); - } + }, + async openQRCodeModal(picklistId: string) { + const qrCodeModal = await modalController.create({ + component: QRCodeModal, + componentProps: { picklistId } + }); + return qrCodeModal.present(); + }, }, async mounted () { this.store.dispatch('util/fetchRejectReasons') @@ -1049,6 +1062,7 @@ export default defineComponent({ hasPermission, checkmarkDoneOutline, pricetagOutline, + qrCodeOutline, store, translate } From 6b06c6c081f5d630e27aee3f6651ce4583c471b4 Mon Sep 17 00:00:00 2001 From: k2maan Date: Thu, 9 Nov 2023 16:34:26 +0530 Subject: [PATCH 2/4] Implemented: link generation with login details and picklist ID (#355) --- .env.example | 3 ++- src/components/QRCodeModal.vue | 8 ++++---- src/views/InProgress.vue | 16 +++++++++++----- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index adae7492..e0f4baed 100644 --- a/.env.example +++ b/.env.example @@ -10,4 +10,5 @@ VUE_APP_MAPPING_IMPORD={"orderId": { "label": "Order ID", "value": "" }, "facili VUE_APP_MAPPING_EXPORD={"shipment-id": { "label": "Shipment ID", "value": "" }, "order-id": { "label": "Order ID", "value": "" },"to-name": { "label": "To Name", "value": "" },"address1": { "label": "Address 1", "value": "" },"address2": { "label": "Address 2", "value": "" },"city": { "label": "City", "value": "" },"state": { "label": "State", "value": "" },"zip-code": { "label": "Zip Code", "value": "" },"country-code": { "label": "Country Code", "value": "" },"full-to-address": { "label": "Full Address", "value": "" },"phone-number": { "label": "Phone Number", "value": "" },"email-address": { "label": "Email", "value": "" },"weight": { "label": "Weight", "value": "" },"quantity": { "label": "Quantity", "value": "" },"product-name": { "label": "Product Name", "value": "" },"product-sku": { "label": "Product Sku", "value": "" },"shipping-method": { "label": "Shipping Method", "value": "" },"facility-name": { "label": "Facility Name", "value": "" },"facility-address1": { "label": "Facility Address 1", "value": "" },"facility-address2": { "label": "Facility Address 2", "value": "" },"facility-city": { "label": "Facility City", "value": "" },"facility-state": { "label": "Facility State", "value": "" },"facility-zip-code": { "label": "Facility Zip Code", "value": "" },"facility-phone": { "label": "Facility Phone", "value": "" },"facility-full-address": { "label": "Facility Full Address", "value": "" }} VUE_APP_LOCALES={"en-US": "English", "es-ES": "Español"} VUE_APP_DEFAULT_LOG_LEVEL="error" -VUE_APP_LOGIN_URL="http://launchpad.hotwax.io/login" \ No newline at end of file +VUE_APP_LOGIN_URL="http://launchpad.hotwax.io/login" +VUE_APP_PICKING_LOGIN_URL="https://picking.hotwax.io/login" \ No newline at end of file diff --git a/src/components/QRCodeModal.vue b/src/components/QRCodeModal.vue index 41576724..b04599f4 100644 --- a/src/components/QRCodeModal.vue +++ b/src/components/QRCodeModal.vue @@ -10,8 +10,8 @@ - - + + @@ -42,7 +42,7 @@ export default defineComponent({ IonToolbar, QrcodeVue }, - props: ["picklistId"], + props: ["picklistId", "link"], methods: { closeModal() { modalController.dismiss({ dismissed: true }); @@ -51,7 +51,7 @@ export default defineComponent({ setup() { return { closeOutline - }; + } }, }); diff --git a/src/views/InProgress.vue b/src/views/InProgress.vue index 9cc2e708..3011e803 100644 --- a/src/views/InProgress.vue +++ b/src/views/InProgress.vue @@ -186,6 +186,12 @@ + + + + {{ translate("Generate QR code") }} + + @@ -196,10 +202,6 @@ {{ translate("Print Picklist") }} - - - {{ translate("Generate QR code") }} - @@ -275,6 +277,7 @@ import ShipmentBoxTypePopover from '@/components/ShipmentBoxTypePopover.vue' import OrderActionsPopover from '@/components/OrderActionsPopover.vue' import ShippingLabelErrorModal from '@/components/ShippingLabelErrorModal.vue' import QRCodeModal from '@/components/QRCodeModal.vue' +import { useAuthStore } from '@hotwax/dxp-components' export default defineComponent({ name: 'InProgress', @@ -1028,9 +1031,10 @@ export default defineComponent({ return shippingLabelErrorModal.present(); }, async openQRCodeModal(picklistId: string) { + const link = `${process.env.VUE_APP_PICKING_LOGIN_URL}?oms=${this.authStore.oms}&token=${this.authStore.token.value}&expirationTime=${this.authStore.token.expiration}&picklistId=${picklistId}` const qrCodeModal = await modalController.create({ component: QRCodeModal, - componentProps: { picklistId } + componentProps: { picklistId, link } }); return qrCodeModal.present(); }, @@ -1045,10 +1049,12 @@ export default defineComponent({ emitter.off('updateOrderQuery', this.updateOrderQuery) }, setup() { + const authStore = useAuthStore() const store = useStore(); return { Actions, + authStore, caretDownOutline, copyToClipboard, cubeOutline, From f15df3fc52374162bff30fb2b502b8c7a3f2aabf Mon Sep 17 00:00:00 2001 From: k2maan Date: Fri, 10 Nov 2023 15:06:40 +0530 Subject: [PATCH 3/4] Updated: DXP version and login page naming (#355) --- package-lock.json | 16 +++++++++------- package.json | 2 +- src/router/index.ts | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7cbfb2ad..f72a0711 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@capacitor/core": "^2.4.7", "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", - "@hotwax/dxp-components": "^1.9.1", + "@hotwax/dxp-components": "^1.11.0", "@hotwax/oms-api": "^1.11.0", "@ionic/core": "6.7.5", "@ionic/vue": "6.7.5", @@ -2992,9 +2992,9 @@ "integrity": "sha512-PnJTqTbFvvl9N23yi1DjL4aNmTkpYFrayyoJyfH1qDJXADFbQ9kB7gJmKcfiPpyYMGR86Yf3Is5ct0+wReUJGQ==" }, "node_modules/@hotwax/dxp-components": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.9.1.tgz", - "integrity": "sha512-iViIoOqqGFVoBPrFLJWuC6+85QNbI6BP4u05ClYP1uvtFi9lJeA31hlH1vf7lk7HVMnOdkvUFGbelRK+mZ8bGw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.11.0.tgz", + "integrity": "sha512-z9UNzi1veT8Aj8Y1WWAGBGOR+I0s6A58qrsFj+L3LkpxTkq6zGN/JS80tTv29obEeeOfONm6XyLHvNOM6TFKyA==", "dependencies": { "@hotwax/oms-api": "^1.8.1", "@ionic/core": "^6.7.5", @@ -3004,6 +3004,7 @@ "luxon": "^3.3.0", "pinia": "2.0.36", "pinia-plugin-persistedstate": "^3.1.0", + "register-service-worker": "^1.7.2", "vue": "^3.3.4", "vue-barcode-reader": "^1.0.3", "vue-i18n": "^9.2.2" @@ -36621,9 +36622,9 @@ "integrity": "sha512-PnJTqTbFvvl9N23yi1DjL4aNmTkpYFrayyoJyfH1qDJXADFbQ9kB7gJmKcfiPpyYMGR86Yf3Is5ct0+wReUJGQ==" }, "@hotwax/dxp-components": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.9.1.tgz", - "integrity": "sha512-iViIoOqqGFVoBPrFLJWuC6+85QNbI6BP4u05ClYP1uvtFi9lJeA31hlH1vf7lk7HVMnOdkvUFGbelRK+mZ8bGw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.11.0.tgz", + "integrity": "sha512-z9UNzi1veT8Aj8Y1WWAGBGOR+I0s6A58qrsFj+L3LkpxTkq6zGN/JS80tTv29obEeeOfONm6XyLHvNOM6TFKyA==", "requires": { "@hotwax/oms-api": "^1.8.1", "@ionic/core": "^6.7.5", @@ -36633,6 +36634,7 @@ "luxon": "^3.3.0", "pinia": "2.0.36", "pinia-plugin-persistedstate": "^3.1.0", + "register-service-worker": "^1.7.2", "vue": "^3.3.4", "vue-barcode-reader": "^1.0.3", "vue-i18n": "^9.2.2" diff --git a/package.json b/package.json index de26408f..4ac09e7c 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@capacitor/core": "^2.4.7", "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", - "@hotwax/dxp-components": "^1.9.1", + "@hotwax/dxp-components": "^1.11.0", "@hotwax/oms-api": "^1.11.0", "@ionic/core": "6.7.5", "@ionic/vue": "6.7.5", diff --git a/src/router/index.ts b/src/router/index.ts index 463a059f..99c77a3a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -21,7 +21,7 @@ declare module 'vue-router' { } } import SavedMappings from "@/views/SavedMappings.vue" -import { useAuthStore, Login } from '@hotwax/dxp-components' +import { useAuthStore, DxpLogin } from '@hotwax/dxp-components' import { loader } from '@/utils/user'; const authGuard = async (to: any, from: any, next: any) => { @@ -116,7 +116,7 @@ const routes: Array = [ { path: '/login', name: 'Login', - component: Login, + component: DxpLogin, beforeEnter: loginGuard }, { From 63850fbb41c0154939115137985e9fdb7e952251 Mon Sep 17 00:00:00 2001 From: k2maan Date: Tue, 14 Nov 2023 15:15:24 +0530 Subject: [PATCH 4/4] Updated: label entries for new login error UI (#355) --- src/locales/en.json | 8 ++++++++ src/locales/es.json | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/locales/en.json b/src/locales/en.json index 40ce15a0..ee9d93e5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -20,6 +20,7 @@ "Are you sure you want to reject in progress order(s)?": "Are you sure you want to reject { ordersCount } in progress order(s)?", "Are you sure you want to update box selection?": "Are you sure you want to update box selection?", "Assign Pickers": "Assign Pickers", + "Back to Launchpad": "Back to Launchpad", "Box added successfully": "Box added successfully", "Boxes": "Boxes", "Cancel": "Cancel", @@ -58,6 +59,8 @@ "Enter key": "Enter key", "Enter mapping name": "Enter mapping name", "Enter value": "Enter value", + "Error getting preferred product store.": "Error getting preferred product store.", + "Error getting user profile.": "Error getting user profile.", "EXIM": "EXIM", "Export": "Export", "Export Orders": "Export Orders", @@ -119,6 +122,7 @@ "Last brokered": "Last brokered", "Loading": "Loading", "Login": "Login", + "Login failed": "Login failed", "Logging in": "Logging in", "Logging out": "Logging out", "Logout": "Logout", @@ -203,6 +207,7 @@ "Product Store": "Product Store", "Provide a value greater than 0": "Provide a value greater than 0", "Quantity": "Quantity", + "Reason:": "Reason:", "Ready to pack": "Ready to pack", "Reject": "Reject", "Reject all": "Reject all", @@ -262,6 +267,7 @@ "Shipping labels": "Shipping labels", "Some of the mapping fields are missing in the CSV: ": "Some of the mapping fields are missing in the CSV: {missingFields}", "Something went wrong": "Something went wrong", + "Something went wrong while getting complete user permissions.": "Something went wrong while getting complete user permissions.", "Something went wrong, could not fetch order details.": "Something went wrong, could not fetch order details.", "Something went wrong, could not edit picker(s)": "Something went wrong, could not edit picker(s)", "Something went wrong while login. Please contact administrator.": "Something went wrong while login. Please contact administrator.", @@ -306,6 +312,8 @@ "Update mapping": "Update mapping", "Update time zone": "Update time zone", "Upload": "Upload", + "User is not associated with any facilities.": "User is not associated with any facilities.", + "User is not associated with any product stores.": "User is not associated with any product stores.", "Username": "Username", "Value": "Value", "View details": "View details", diff --git a/src/locales/es.json b/src/locales/es.json index 684f8b00..50662398 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -20,6 +20,7 @@ "Are you sure you want to reject in progress order(s)?": "¿Estás seguro/a de que quieres rechazar { ordersCount } pedido(s) en curso?", "Are you sure you want to update box selection?": "Are you sure you want to update box selection?", "Assign Pickers": "Asignar Recolectores", + "Back to Launchpad": "Back to Launchpad", "Box added successfully": "Caja agregada exitosamente", "Boxes": "Cajas", "Cancel": "Cancelar", @@ -58,6 +59,8 @@ "Enter key": "Ingresar clave", "Enter mapping name": "Insertar nombre de mapeo", "Enter value": "Ingresar valor", + "Error getting preferred product store.": "Error getting preferred product store.", + "Error getting user profile.": "Error getting user profile.", "EXIM": "Inicio", "Export": "Exportar", "Export Orders": "Exportar Ordenes", @@ -119,6 +122,7 @@ "Last brokered": "Última intermediación", "Loading": "Cargando", "Login": "Iniciar Sesión", + "Login failed": "Login failed", "Logging in": "Iniciando sesión", "Logging out": "Cerrando sesión", "Logout": "Cerrar Sesión", @@ -203,6 +207,7 @@ "Product Store": "Tienda de productos", "Provide a value greater than 0": "Proporciona un valor mayor a 0", "Quantity": "Cantidad", + "Reason:": "Reason:", "Ready to pack": "Listo para empacar", "Reject": "Rechazar", "Reject all": "Rechazar todo", @@ -262,6 +267,7 @@ "Shipping labels": "Etiquetas de Envío", "Some of the mapping fields are missing in the CSV: ": "Algunos de los campos de mapeo faltan en el CSV: {missingFields}", "Something went wrong": "Algo salió mal", + "Something went wrong while getting complete user permissions.": "Something went wrong while getting complete user permissions.", "Something went wrong, could not fetch order details.": "Something went wrong, could not fetch order details.", "Something went wrong, could not edit picker(s)": "Algo salió mal, no se pudieron editar los selectores", "Something went wrong while login. Please contact administrator.": "Algo salió mal al iniciar sesión. Por favor contacte al administrador.", @@ -306,6 +312,8 @@ "Update mapping": "Mapeo Actualizado", "Update time zone": "Actualizar zona horaria", "Upload": "Cargar", + "User is not associated with any facilities.": "User is not associated with any facilities.", + "User is not associated with any product stores.": "User is not associated with any product stores.", "Username": "Nombre de Usuario", "Value": "Valor", "View details": "View details",