diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-06-09 16:50:17 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-06-09 16:50:17 +0200 |
commit | 352e23dbbc9a83b522964f3ba7fb06295d38c835 (patch) | |
tree | 05792a1747593465669710c9cdd196009182566d /packages/frontend/src/paths/instance/orders/create | |
parent | d626559c46437e94a853562162fbf5bf29fd806f (diff) | |
download | merchant-backoffice-352e23dbbc9a83b522964f3ba7fb06295d38c835.tar.gz merchant-backoffice-352e23dbbc9a83b522964f3ba7fb06295d38c835.tar.bz2 merchant-backoffice-352e23dbbc9a83b522964f3ba7fb06295d38c835.zip |
edit strings
Diffstat (limited to 'packages/frontend/src/paths/instance/orders/create')
-rw-r--r-- | packages/frontend/src/paths/instance/orders/create/CreatePage.tsx | 4 | ||||
-rw-r--r-- | packages/frontend/src/paths/instance/orders/create/InventoryProductForm.tsx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx b/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx index ef25500..1b47564 100644 --- a/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx +++ b/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx @@ -235,7 +235,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { in {inventoryList.reduce((prev, cur) => cur.quantity + prev, 0)} units, with a total price of {totalPriceInventory} </p> - } tooltip={i18n`add products to the order that already exist in the inventory`}> + } tooltip={i18n`Add products from managed inventory to the order.`}> <InventoryProductForm currentProducts={value.inventoryProducts || {}} onAddProduct={addProductToTheInventoryList} @@ -256,7 +256,7 @@ export function CreatePage({ onCreate, onBack }: Props): VNode { in {productList.reduce((prev, cur) => cur.quantity + prev, 0)} units, with a total price of {totalPriceProducts} </p> - } tooltip={i18n`add products to the order`}> + } tooltip={i18n`Add products without inventory management to the order.`}> <NonInventoryProductFrom value={editingProduct} onAddProduct={(p) => { setEditingProduct(undefined) return addNewProduct(p) diff --git a/packages/frontend/src/paths/instance/orders/create/InventoryProductForm.tsx b/packages/frontend/src/paths/instance/orders/create/InventoryProductForm.tsx index 5bb69f1..6cf48f8 100644 --- a/packages/frontend/src/paths/instance/orders/create/InventoryProductForm.tsx +++ b/packages/frontend/src/paths/instance/orders/create/InventoryProductForm.tsx @@ -41,27 +41,27 @@ export function InventoryProductForm({ currentProducts, onAddProduct }: Props): const submit = (): void => { if (!state.product) { - setErrors({ product: i18n`select a product first` }); + setErrors({ product: i18n`You must enter a valid product identifier.` }); return; } if (state.product.total_stock === -1) { onAddProduct(state.product, 1) } else { if (!state.quantity || state.quantity <= 0) { - setErrors({ quantity: i18n`should be greater than 0` }); + setErrors({ quantity: i18n`Quantity must be greater than 0!` }); return; } const currentStock = state.product.total_stock - state.product.total_lost - state.product.total_sold const p = currentProducts[state.product.id] if (p) { if (state.quantity + p.quantity > currentStock) { - setErrors({ quantity: i18n`cannot be greater than current stock and quantity previously added. max: ${currentStock - p.quantity}` }); + setErrors({ quantity: i18n`This quantity exceeds remaining stock. The current maximum value is ${currentStock - p.quantity}.` }); return; } onAddProduct(state.product, state.quantity + p.quantity) } else { if (state.quantity > currentStock) { - setErrors({ quantity: i18n`cannot be greater than current stock ${currentStock}` }); + setErrors({ quantity: i18n`This quantity exceeds remaining stock. The current maximum value is ${currentStock}.` }); return; } onAddProduct(state.product, state.quantity) |