Fix for fulfilling order when product quantity is 1
This commit is contained in:
parent
6fa2d5810a
commit
c9040d9e8b
3 changed files with 89 additions and 91 deletions
|
@ -340,9 +340,7 @@ const OrderFulfillPage: React.FC<OrderFulfillPageProps> = props => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const availableQuantity =
|
const availableQuantity = warehouseStock.quantity;
|
||||||
warehouseStock.quantity -
|
|
||||||
warehouseStock.quantityAllocated;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableCell
|
<TableCell
|
||||||
|
|
|
@ -105,8 +105,8 @@ export const orderToFulfill: OrderFulfillData_order = {
|
||||||
__typename: "Stock",
|
__typename: "Stock",
|
||||||
id: "U3RvY2s6NTE=",
|
id: "U3RvY2s6NTE=",
|
||||||
warehouse: warehouseList[2],
|
warehouse: warehouseList[2],
|
||||||
quantity: 760,
|
quantity: 20,
|
||||||
quantityAllocated: 33
|
quantityAllocated: 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "Stock",
|
__typename: "Stock",
|
||||||
|
|
|
@ -85636,7 +85636,47 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 758
|
/ 760
|
||||||
|
</div>
|
||||||
|
<fieldset
|
||||||
|
aria-hidden="true"
|
||||||
|
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
|
||||||
|
style="padding-left:8px"
|
||||||
|
>
|
||||||
|
<legend
|
||||||
|
class="PrivateNotchedOutline-legend-id"
|
||||||
|
style="width:0"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</legend>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantity-id"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id MuiInputBase-adornedEnd-id MuiOutlinedInput-adornedEnd-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
aria-invalid="false"
|
||||||
|
class="MuiInputBase-input-id MuiOutlinedInput-input-id OrderFulfillPage-quantityInnerInput-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
|
||||||
|
max="20"
|
||||||
|
min="0"
|
||||||
|
style="text-align:right"
|
||||||
|
type="number"
|
||||||
|
value="0"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
|
>
|
||||||
|
/ 20
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -85676,47 +85716,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 727
|
/ 760
|
||||||
</div>
|
|
||||||
<fieldset
|
|
||||||
aria-hidden="true"
|
|
||||||
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
|
|
||||||
style="padding-left:8px"
|
|
||||||
>
|
|
||||||
<legend
|
|
||||||
class="PrivateNotchedOutline-legend-id"
|
|
||||||
style="width:0"
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</legend>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td
|
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantity-id"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id MuiInputBase-adornedEnd-id MuiOutlinedInput-adornedEnd-id"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
aria-invalid="false"
|
|
||||||
class="MuiInputBase-input-id MuiOutlinedInput-input-id OrderFulfillPage-quantityInnerInput-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
|
|
||||||
max="760"
|
|
||||||
min="0"
|
|
||||||
style="text-align:right"
|
|
||||||
type="number"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
|
||||||
>
|
|
||||||
/ 756
|
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -85846,7 +85846,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 586
|
/ 587
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -86289,7 +86289,47 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 758
|
/ 760
|
||||||
|
</div>
|
||||||
|
<fieldset
|
||||||
|
aria-hidden="true"
|
||||||
|
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
|
||||||
|
style="padding-left:8px"
|
||||||
|
>
|
||||||
|
<legend
|
||||||
|
class="PrivateNotchedOutline-legend-id"
|
||||||
|
style="width:0"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</legend>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantity-id"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id MuiInputBase-adornedEnd-id MuiOutlinedInput-adornedEnd-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
aria-invalid="false"
|
||||||
|
class="MuiInputBase-input-id MuiOutlinedInput-input-id OrderFulfillPage-quantityInnerInput-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
|
||||||
|
max="20"
|
||||||
|
min="0"
|
||||||
|
style="text-align:right"
|
||||||
|
type="number"
|
||||||
|
value="0"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
|
>
|
||||||
|
/ 20
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -86329,47 +86369,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 727
|
/ 760
|
||||||
</div>
|
|
||||||
<fieldset
|
|
||||||
aria-hidden="true"
|
|
||||||
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
|
|
||||||
style="padding-left:8px"
|
|
||||||
>
|
|
||||||
<legend
|
|
||||||
class="PrivateNotchedOutline-legend-id"
|
|
||||||
style="width:0"
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</legend>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td
|
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id OrderFulfillPage-colQuantity-id"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id MuiInputBase-adornedEnd-id MuiOutlinedInput-adornedEnd-id"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
aria-invalid="false"
|
|
||||||
class="MuiInputBase-input-id MuiOutlinedInput-input-id OrderFulfillPage-quantityInnerInput-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
|
|
||||||
max="760"
|
|
||||||
min="0"
|
|
||||||
style="text-align:right"
|
|
||||||
type="number"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
|
||||||
>
|
|
||||||
/ 756
|
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -86499,7 +86499,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 586
|
/ 587
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
|
Loading…
Reference in a new issue