Changes after code review
This commit is contained in:
parent
41a749d5af
commit
9036294491
4 changed files with 94 additions and 96 deletions
|
@ -54,7 +54,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
|||
- Fix order draft back button redirect - #753 by @orzechdev
|
||||
- Add manage product types and attributes permission - #768 by @orzechdev
|
||||
- Fix isPublished and isAvailable behaviour for products, collections and pages - #780 by @mmarkusik
|
||||
- Fix for fulfilling an order when product quantity is 1 - #788 by @GrzegorzDerdak
|
||||
- Fix for fulfilling order when allocated quantity equals total quantity - #788 by @GrzegorzDerdak
|
||||
|
||||
## 2.10.1
|
||||
|
||||
|
|
|
@ -340,8 +340,6 @@ const OrderFulfillPage: React.FC<OrderFulfillPageProps> = props => {
|
|||
);
|
||||
}
|
||||
|
||||
const availableQuantity = warehouseStock.quantity;
|
||||
|
||||
return (
|
||||
<TableCell
|
||||
className={classes.colQuantity}
|
||||
|
@ -386,7 +384,7 @@ const OrderFulfillPage: React.FC<OrderFulfillPageProps> = props => {
|
|||
overfulfill ||
|
||||
(line.variant.trackInventory &&
|
||||
formsetStock.quantity >
|
||||
availableQuantity) ||
|
||||
warehouseStock.quantityAllocated) ||
|
||||
!!errors?.find(
|
||||
err =>
|
||||
err.warehouse === warehouse.id &&
|
||||
|
@ -401,7 +399,7 @@ const OrderFulfillPage: React.FC<OrderFulfillPageProps> = props => {
|
|||
<div
|
||||
className={classes.remainingQuantity}
|
||||
>
|
||||
/ {availableQuantity}
|
||||
/ {warehouseStock.quantityAllocated}
|
||||
</div>
|
||||
)
|
||||
}}
|
||||
|
|
|
@ -105,8 +105,8 @@ export const orderToFulfill: OrderFulfillData_order = {
|
|||
__typename: "Stock",
|
||||
id: "U3RvY2s6NTE=",
|
||||
warehouse: warehouseList[2],
|
||||
quantity: 20,
|
||||
quantityAllocated: 20
|
||||
quantity: 760,
|
||||
quantityAllocated: 33
|
||||
},
|
||||
{
|
||||
__typename: "Stock",
|
||||
|
|
|
@ -85636,47 +85636,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 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
|
||||
/ 2
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -85716,7 +85676,47 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 760
|
||||
/ 33
|
||||
</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"
|
||||
>
|
||||
/ 4
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -85801,7 +85801,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 587
|
||||
/ 0
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -85846,7 +85846,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 587
|
||||
/ 1
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -86289,47 +86289,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 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
|
||||
/ 2
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -86369,7 +86329,47 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 760
|
||||
/ 33
|
||||
</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"
|
||||
>
|
||||
/ 4
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -86454,7 +86454,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 587
|
||||
/ 0
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -86499,7 +86499,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 587
|
||||
/ 1
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
@ -87058,7 +87058,7 @@ exports[`Storyshots Views / Orders / Fulfill order one warehouse 1`] = `
|
|||
<div
|
||||
class="OrderFulfillPage-remainingQuantity-id"
|
||||
>
|
||||
/ 587
|
||||
/ 0
|
||||
</div>
|
||||
<fieldset
|
||||
aria-hidden="true"
|
||||
|
|
Loading…
Reference in a new issue