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 | |
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')
4 files changed, 10 insertions, 11 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) diff --git a/packages/frontend/src/paths/instance/orders/list/Table.tsx b/packages/frontend/src/paths/instance/orders/list/Table.tsx index fb97346..4057ca2 100644 --- a/packages/frontend/src/paths/instance/orders/list/Table.tsx +++ b/packages/frontend/src/paths/instance/orders/list/Table.tsx @@ -151,7 +151,7 @@ function EmptyTable(): VNode { <p> <span class="icon is-large"><i class="mdi mdi-emoticon-sad mdi-48px" /></span> </p> - <p><Translate>No orders has been found</Translate></p> + <p><Translate>No orders have been found matching your query!</Translate></p> </div> } @@ -229,4 +229,3 @@ export function RefundModal({ id, onCancel, onConfirm }: RefundModalProps): VNod </ConfirmModal> } - diff --git a/packages/frontend/src/paths/instance/orders/list/index.tsx b/packages/frontend/src/paths/instance/orders/list/index.tsx index 60d9428..c85db0b 100644 --- a/packages/frontend/src/paths/instance/orders/list/index.tsx +++ b/packages/frontend/src/paths/instance/orders/list/index.tsx @@ -66,7 +66,7 @@ export default function ({ onUnauthorized, onLoadError, onCreate, onSelect, onNo async function testIfOrderExistAndSelect() { if (!orderId) { - setErrorOrderId('place an order id here') + setErrorOrderId('Enter an order id') return; } try { @@ -88,7 +88,7 @@ export default function ({ onUnauthorized, onLoadError, onCreate, onSelect, onNo <div class="level-item"> <div class="field has-addons"> <div class="control"> - <input class={errorOrderId ? "input is-danger" : "input"} type="text" value={orderId} onChange={e => setOrderId(e.currentTarget.value)} placeholder={i18n`go to order id`} /> + <input class={errorOrderId ? "input is-danger" : "input"} type="text" value={orderId} onChange={e => setOrderId(e.currentTarget.value)} placeholder={i18n`order id`} /> {errorOrderId && <p class="help is-danger">{errorOrderId}</p>} </div> <div class="control"> @@ -120,7 +120,7 @@ export default function ({ onUnauthorized, onLoadError, onCreate, onSelect, onNo </a> </div>} <div class="control"> - <input class="input" type="text" readonly value={!filter.date ? '' : format(filter.date, 'yyyy/MM/dd')} placeholder={i18n`pick a date`} /> + <input class="input" type="text" readonly value={!filter.date ? '' : format(filter.date, 'yyyy/MM/dd')} placeholder={i18n`date (YYYY/MM/DD)`} /> </div> <div class="control"> <a class="button" onClick={() => { setPickDate(true) }}> |