Skip to content

Commit

Permalink
Fixed: dismissed loader on API fail and added missing labels (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
k2maan committed Jul 25, 2023
1 parent 8dbd8fe commit b5c9617
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"Customer letter": "Customer letter",
"Damaged": "Damaged",
"Define custom label for": "Define custom label for {field}",
"Dismiss": "Dismiss",
"Documents to print when packing orders": "Documents to print when packing orders",
"Download": "Download",
"Download orders that are packed and haven't been shipped yet. Use the downloaded file to send the packed order details to a carrier where shipping labels and tracking codes will be generated.": "Download orders that are packed and haven't been shipped yet. Use the downloaded file to send the packed order details to a carrier where shipping labels and tracking codes will be generated.",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"Customer letter": "Carta al Cliente",
"Damaged": "Dañado",
"Define custom label for": "Definir etiqueta personalizada para {field}",
"Dismiss": "Dismiss",
"Documents to print when packing orders": "Documentos para imprimir al empacar pedidos",
"Download": "Descargar",
"Download orders that are packed and haven't been shipped yet. Use the downloaded file to send the packed order details to a carrier where shipping labels and tracking codes will be generated.": "Descarga los pedidos que están empacados y aún no se han enviado. Utiliza el archivo descargado para enviar los detalles de los pedidos empacados a una empresa de transporte donde se generarán las etiquetas de envío y los códigos de seguimiento.",
Expand Down Expand Up @@ -80,6 +81,7 @@
"Ordered": "Ordenado",
"Order ID": "ID del Pedido",
"Order packed successfully": "Pedido empacado exitosamente",
"Order packed successfully. Document generation in process": "Order packed successfully. Document generation in process",
"Order shipped successfully": "Pedido enviado exitosamente",
"Order Shipment ID": "ID de Envío del Pedido",
"Order unpacked successfully": "Pedido desempacado exitosamente",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const showToast = async (message: string, canDismiss?: boolean, manualDismiss?:
if (canDismiss) {
config.buttons = [
{
text: 'Dismiss',
text: translate('Dismiss'),
role: 'cancel',
},
]
Expand Down
3 changes: 3 additions & 0 deletions src/views/InProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ export default defineComponent({
} catch (err) {
showToast(translate('Failed to pack orders'))
logger.error('Failed to pack orders', err)
} finally {
// in case of error, if loader is not dismissed above
emitter.emit('dismissLoader');
}
}
}]
Expand Down

0 comments on commit b5c9617

Please sign in to comment.