Skip to content

Commit

Permalink
Merge pull request #263 from sanskar345/fulfillment-pwa/#261
Browse files Browse the repository at this point in the history
Implemented: alert message for Damaged , Worn display and Mismatch while reporting an issue in progress orders (#261)
  • Loading branch information
ravilodhi authored Sep 18, 2023
2 parents 688cc1a + 4483e46 commit d8324ba
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 @@ -89,6 +89,7 @@
"Generate shipping label": "Generate shipping label",
"Go to OMS": "Go to OMS",
"Go to Launchpad": "Go to Launchpad",
"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 @@ -263,5 +264,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?": "You are shipping { count } order. { space } You cannot unpack and edit orders after they have been shipped. Are you sure you are ready to ship this order? | You are shipping { count } orders. { space } You cannot unpack and edit orders after they have been shipped. Are you sure you are ready to ship these orders?",
"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. other orders 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 orders containing these products will be unassigned from this store and sent to be rebrokered."
", and other products are identified as unfulfillable. other orders 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 orders 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 @@ -89,6 +89,7 @@
"Generate shipping label": "Generate shipping label",
"Go to OMS": "Go to OMS",
"Go to Launchpad": "Go to Launchpad",
"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 @@ -264,5 +265,6 @@
"You are packing orders. Select additional documents that you would like to print.": "Estás empacando {count} pedidos. {space} Selecciona documentos adicionales que te gustaría imprimir.",
"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. other orders containing these products will be unassigned from this store and sent to be rebrokered.": "{productName}, y {products} otros productos se identificaron como no realizables. {space} {orders} otros pedidos que contienen estos productos serán desasignados de esta tienda y enviados para ser reasignados."
", and other products are identified as unfulfillable. other orders containing these products will be unassigned from this store and sent to be rebrokered.": "{productName}, y {products} otros productos se identificaron como no realizables. {space} {orders} otros pedidos que contienen estos productos serán desasignados de esta tienda y enviados para ser reasignados.",
", 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
Expand Down

0 comments on commit d8324ba

Please sign in to comment.