{{ $t("Ordered") }} 27th January 2020 9:24 PM EST
+{{ translate("Ordered") }} 27th January 2020 9:24 PM EST
{{ $t("Ordered") }} 28th January 2020 2:32 PM EST
+{{ translate("Ordered") }} 28th January 2020 2:32 PM EST
{{ $t('picklists', { count: picklists.length }) }}
+ {{ translate('All') }} +{{ translate('picklists', { count: picklists.length }) }}
{{ $t("Ordered") }} {{ formatUtcDate(order.orderDate, 'dd MMMM yyyy t a ZZZZ') }}
+{{ translate("Ordered") }} {{ formatUtcDate(order.orderDate, 'dd MMMM yyyy t a ZZZZ') }}
{{ $t("Last brokered") }} {{ formatUtcDate(order.reservedDatetime, 'dd MMMM yyyy t a ZZZZ') }}
+{{ translate("Last brokered") }} {{ formatUtcDate(order.reservedDatetime, 'dd MMMM yyyy t a ZZZZ') }}
' }) + return this.searchedQuery === '' ? translate("doesn't have any orders in progress right now.", { facilityName: this.currentFacility.facilityName }) : translate( "No results found for . Try searching Open or Completed tab instead. If you still can't find what you're looking for, try switching stores.", { searchedQuery: this.searchedQuery, lineBreak: '
' }) }, getInProgressOrders() { return JSON.parse(JSON.stringify(this.inProgressOrders.list)).splice(0, (this.inProgressOrders.query.viewIndex + 1) * (process.env.VUE_APP_VIEW_SIZE as any) ); @@ -359,26 +359,26 @@ export default defineComponent({ async packOrder(order: any) { const confirmPackOrder = await alertController .create({ - header: this.$t("Pack order"), - message: this.$t("You are packing an order. Select additional documents that you would like to print.", {space: '
'}), + header: translate("Pack order"), + message: translate("You are packing an order. Select additional documents that you would like to print.", {space: '
'}), inputs: [{ name: 'printShippingLabel', type: 'checkbox', - label: this.$t('Shipping labels'), + label: translate('Shipping labels'), value: 'printShippingLabel', checked: this.userPreference.printShippingLabel, }, { name: 'printPackingSlip', type: 'checkbox', - label: this.$t('Packing slip'), + label: translate('Packing slip'), value: 'printPackingSlip', checked: this.userPreference.printPackingSlip }], buttons: [{ - text: this.$t("Cancel"), + text: translate("Cancel"), role: 'cancel' }, { - text: this.$t("Pack"), + text: translate("Pack"), role: 'confirm', handler: async (data) => { const params = { @@ -431,26 +431,26 @@ export default defineComponent({ async packOrders() { const alert = await alertController .create({ - header: this.$t("Pack orders"), - message: this.$t("You are packing orders. Select additional documents that you would like to print.", {count: this.inProgressOrders.list.length, space: '
'}), + header: translate("Pack orders"), + message: translate("You are packing orders. Select additional documents that you would like to print.", {count: this.inProgressOrders.list.length, space: '
'}), inputs: [{ name: 'printShippingLabel', type: 'checkbox', - label: this.$t('Shipping labels'), + label: translate('Shipping labels'), value: 'printShippingLabel', checked: this.userPreference.printShippingLabel, }, { name: 'printPackingSlip', type: 'checkbox', - label: this.$t('Packing slip'), + label: translate('Packing slip'), value: 'printPackingSlip', checked: this.userPreference.printPackingSlip }], buttons: [{ - text: this.$t("Cancel"), + text: translate("Cancel"), role: 'cancel' }, { - text: this.$t("Pack"), + text: translate("Pack"), role: 'confirm', handler: async (data) => { emitter.emit('presentLoader'); @@ -547,9 +547,9 @@ export default defineComponent({ // This variable is used in messages to display name of first rejected item from the itemsToReject array const rejectedItem = itemsToReject[0]; if (itemsToReject.length === 1) { - message = this.$t('is identified as. This order item will be unassigned from the store and sent to be rebrokered.', { productName: rejectedItem.productName, rejectReason: ((this.rejectReasons.find((rejectReason: {[key: string]: any}) => rejectReason.enumId === rejectedItem.rejectReason)).description).toLowerCase() }); + message = translate('is identified as. This order item will be unassigned from the store and sent to be rebrokered.', { productName: rejectedItem.productName, rejectReason: ((this.rejectReasons.find((rejectReason: {[key: string]: any}) => rejectReason.enumId === rejectedItem.rejectReason)).description).toLowerCase() }); } else { - message = this.$t(', and other products were identified as unfulfillable. These items will be unassigned from this store and sent to be rebrokered.', { productName: rejectedItem.productName, products: itemsToReject.length - 1, space: '
' }); + message = translate(', and other products were identified as unfulfillable. These items will be unassigned from this store and sent to be rebrokered.', { productName: rejectedItem.productName, products: itemsToReject.length - 1, space: '
' }); } } else { const productName = outOfStockItem.productName @@ -559,24 +559,24 @@ export default defineComponent({ const ordersCount = this.inProgressOrders.list.map((inProgressOrder: any) => inProgressOrder.items.filter((item: any) => itemsToRejectNotInStock.some((outOfStockItem: any) => outOfStockItem.productSku === item.productSku) && item.orderId !== order.orderId))?.filter((item: any) => item.length).length; if (itemsToReject.length === 1 && ordersCount) { - message = this.$t("is identified as unfulfillable. other containing this product will be unassigned from this store and sent to be rebrokered.", { productName, space: '
', orders: ordersCount, orderText: ordersCount > 1 ? 'orders' : 'order' }) + message = translate("is identified as unfulfillable. other containing this product will be unassigned from this store and sent to be rebrokered.", { productName, space: '
', orders: ordersCount, orderText: ordersCount > 1 ? 'orders' : 'order' }) } else if (itemsToReject.length === 1 && !ordersCount) { - message = this.$t("is identified as unfulfillable. This order item will be unassigned from this store and sent to be rebrokered.", { productName, space: '
' }) + message = translate("is identified as unfulfillable. This order item will be unassigned from this store and sent to be rebrokered.", { productName, space: '
' }) } else if (itemsToReject.length > 1 && ordersCount) { - message = this.$t(", and other products are identified as unfulfillable. other containing these products will be unassigned from this store and sent to be rebrokered.", { productName, products: itemsToReject.length - 1, space: '
', orders: ordersCount, orderText: ordersCount > 1 ? 'orders' : 'order' }) + message = translate(", and other products are identified as unfulfillable. other containing these products will be unassigned from this store and sent to be rebrokered.", { productName, products: itemsToReject.length - 1, space: '
', orders: ordersCount, orderText: ordersCount > 1 ? 'orders' : 'order' }) } else { - message = this.$t(", and other products are identified as unfulfillable. These order items will be unassigned from this store and sent to be rebrokered.", { productName, products: itemsToReject.length - 1, space: '
' }) + message = translate(", and other products are identified as unfulfillable. These order items will be unassigned from this store and sent to be rebrokered.", { productName, products: itemsToReject.length - 1, space: '
' }) } } const alert = await alertController .create({ - header: this.$t("Report an issue"), + header: translate("Report an issue"), message, buttons: [{ - text: this.$t("Cancel"), + text: translate("Cancel"), role: 'cancel' }, { - text: this.$t("Report"), + text: translate("Report"), role: 'confirm', handler: async() => { await this.updateOrder(order); @@ -938,7 +938,7 @@ export default defineComponent({ async recycleInProgressOrders() { const alert = await alertController.create({ header: translate('Reject all in progress orders'), - message: this.$t('Reject in progress orders.', { ordersCount: this.inProgressOrders.total }), + message: translate('Reject in progress orders.', { ordersCount: this.inProgressOrders.total }), buttons: [{ text: translate('Cancel'), role: 'cancel' @@ -1019,7 +1019,8 @@ export default defineComponent({ hasPermission, checkmarkDoneOutline, pricetagOutline, - store + store, + translate } } }); diff --git a/src/views/OpenOrders.vue b/src/views/OpenOrders.vue index 6c86f9ff..fd0536ab 100644 --- a/src/views/OpenOrders.vue +++ b/src/views/OpenOrders.vue @@ -5,12 +5,12 @@
{{ method.ordersCount }} {{ $t("orders") }}, {{ method.count }} {{ $t("items") }}
+{{ method.ordersCount }} {{ translate("orders") }}, {{ method.count }} {{ translate("items") }}
{{ $t("Ordered") }} {{ formatUtcDate(orders.doclist.docs[0].orderDate, 'dd MMMM yyyy t a ZZZZ') }}
+{{ translate("Ordered") }} {{ formatUtcDate(orders.doclist.docs[0].orderDate, 'dd MMMM yyyy t a ZZZZ') }}
{{ $t("Last brokered") }} {{ formatUtcDate(orders.doclist.docs[0].reservedDatetime, 'dd MMMM yyyy t a ZZZZ') }}
+{{ translate("Last brokered") }} {{ formatUtcDate(orders.doclist.docs[0].reservedDatetime, 'dd MMMM yyyy t a ZZZZ') }}
' }) + return this.searchedQuery === '' ? translate("doesn't have any outstanding orders right now.", { facilityName: this.currentFacility.facilityName }) : translate( "No results found for . Try searching In Progress or Completed tab instead. If you still can't find what you're looking for, try switching stores.", { searchedQuery: this.searchedQuery, lineBreak: '
' }) }, getOpenOrders() { return this.openOrders.list.slice(0, (this.openOrders.query.viewIndex + 1) * (process.env.VUE_APP_VIEW_SIZE as any) ); @@ -301,7 +301,7 @@ export default defineComponent({ async recycleOutstandingOrders() { const alert = await alertController.create({ header: translate('Reject all open orders'), - message: this.$t('Reject open orders.', { ordersCount: this.openOrders.total }), + message: translate('Reject open orders.', { ordersCount: this.openOrders.total }), buttons: [{ text: translate('Cancel'), role: 'cancel' @@ -364,7 +364,8 @@ export default defineComponent({ optionsOutline, pricetagOutline, printOutline, - store + store, + translate } } }); diff --git a/src/views/PackagingPopover.vue b/src/views/PackagingPopover.vue index 9e1094c2..4e0cadd4 100644 --- a/src/views/PackagingPopover.vue +++ b/src/views/PackagingPopover.vue @@ -3,15 +3,15 @@
{{ $t("Ordered") }} 27th January 2020 9:24 PM EST
+{{ translate("Ordered") }} 27th January 2020 9:24 PM EST
{{ $t("Ordered") }} 28th January 2020 2:32 PM EST
+{{ translate("Ordered") }} 28th January 2020 2:32 PM EST