Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/hotwax/fulfillment-pwa into…
Browse files Browse the repository at this point in the history
… fulfillment-pwa/#260
  • Loading branch information
sanskar345 committed Sep 18, 2023
2 parents 7b2b09b + d8324ba commit 3f68e2f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"Go to Launchpad": "Go to Launchpad",
"is identified as unfulfillable. other containing this product will be unassigned from this store and sent to be rebrokered.": "{ productName } is identified as unfulfillable. { space } { orders } other { orderText } containing this product will be unassigned from this store and sent to be rebrokered.",
"is identified as unfulfillable. This order item will be unassigned from this store and sent to be rebrokered.": "{ productName } is identified as unfulfillable. { space } This order item will be unassigned from this store and sent to be rebrokered.",
"is identified as. This order item will be unassigned from the store and sent to be rebrokered.": "{ productName } is identified as { rejectReason }. This order item will be unassigned from the store and sent to be rebrokered.",
"item": "item",
"items": "items",
"Import": "Import",
Expand Down Expand Up @@ -267,5 +268,6 @@
"You do not have permission to access this page": "You do not have permission to access this page",
"Zip Code": "Zip Code",
", and other products are identified as unfulfillable. These order items will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products are identified as unfulfillable. { space } These order items will be unassigned from this store and sent to be rebrokered.",
", and other products are identified as unfulfillable. other containing these products will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products are identified as unfulfillable. { space } { orders } other { orderText } containing these products will be unassigned from this store and sent to be rebrokered."
", and other products are identified as unfulfillable. other containing these products will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products are identified as unfulfillable. { space } { orders } other { orderText } containing these products will be unassigned from this store and sent to be rebrokered.",
", and other products were identified as unfulfillable. These items will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products were identified as unfulfillable. { space } These items will be unassigned from this store and sent to be rebrokered."
}
4 changes: 3 additions & 1 deletion src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"Go to Launchpad": "Go to Launchpad",
"is identified as unfulfillable. other containing this product will be unassigned from this store and sent to be rebrokered.": "{ productName } is identified as unfulfillable. { space } { orders } other { orderText } containing this product will be unassigned from this store and sent to be rebrokered.",
"is identified as unfulfillable. This order item will be unassigned from this store and sent to be rebrokered.": "{ productName } is identified as unfulfillable. { space } This order item will be unassigned from this store and sent to be rebrokered.",
"is identified as. This order item will be unassigned from the store and sent to be rebrokered.": "{ productName } is identified as { rejectReason }. This order item will be unassigned from the store and sent to be rebrokered.",
"item": "artículo",
"items": "artículos",
"Import": "Importar",
Expand Down Expand Up @@ -268,5 +269,6 @@
"You are shipping orders. You cannot unpack and edit orders after they have been shipped. Are you sure you are ready to ship this orders?": "Estás enviando {count} pedido. {space} No puedes desempacar ni editar los pedidos una vez que se hayan enviado. ¿Estás seguro/a de que estás listo/a para enviar este pedido? | Estás enviando {count} pedidos. {space} No puedes desempacar ni editar los pedidos una vez que se hayan enviado. ¿Estás seguro/a de que estás listo/a para enviar estos pedidos?",
"Zip Code": "Zip Code",
", and other products are identified as unfulfillable. These order items will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products are identified as unfulfillable. { space } These order items will be unassigned from this store and sent to be rebrokered.",
", and other products are identified as unfulfillable. other containing these products will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products are identified as unfulfillable. { space } { orders } other { orderText } containing these products will be unassigned from this store and sent to be rebrokered."
", and other products are identified as unfulfillable. other containing these products will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products are identified as unfulfillable. { space } { orders } other { orderText } containing these products will be unassigned from this store and sent to be rebrokered.",
", and other products were identified as unfulfillable. These items will be unassigned from this store and sent to be rebrokered.": "{ productName }, and { products } other products were identified as unfulfillable. { space } These items will be unassigned from this store and sent to be rebrokered."
}
11 changes: 9 additions & 2 deletions src/views/InProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,15 @@ export default defineComponent({
// TODO: update alert message when itemsToReject contains a single item and also in some specific conditions
let message;
if(!outOfStockItem) {
message = this.$t('Are you sure you want to perform this action?')
if (!outOfStockItem) {
// 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() });
} 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: '<br /><br />' });
}
} else {
const productName = outOfStockItem.productName
const itemsToRejectNotInStock = itemsToReject.filter((item: any) => item.rejectReason === 'NOT_IN_STOCK');
Expand Down

0 comments on commit 3f68e2f

Please sign in to comment.