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
|
- Fix order draft back button redirect - #753 by @orzechdev
|
||||||
- Add manage product types and attributes permission - #768 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 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
|
## 2.10.1
|
||||||
|
|
||||||
|
|
|
@ -340,8 +340,6 @@ const OrderFulfillPage: React.FC<OrderFulfillPageProps> = props => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const availableQuantity = warehouseStock.quantity;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableCell
|
<TableCell
|
||||||
className={classes.colQuantity}
|
className={classes.colQuantity}
|
||||||
|
@ -386,7 +384,7 @@ const OrderFulfillPage: React.FC<OrderFulfillPageProps> = props => {
|
||||||
overfulfill ||
|
overfulfill ||
|
||||||
(line.variant.trackInventory &&
|
(line.variant.trackInventory &&
|
||||||
formsetStock.quantity >
|
formsetStock.quantity >
|
||||||
availableQuantity) ||
|
warehouseStock.quantityAllocated) ||
|
||||||
!!errors?.find(
|
!!errors?.find(
|
||||||
err =>
|
err =>
|
||||||
err.warehouse === warehouse.id &&
|
err.warehouse === warehouse.id &&
|
||||||
|
@ -401,7 +399,7 @@ const OrderFulfillPage: React.FC<OrderFulfillPageProps> = props => {
|
||||||
<div
|
<div
|
||||||
className={classes.remainingQuantity}
|
className={classes.remainingQuantity}
|
||||||
>
|
>
|
||||||
/ {availableQuantity}
|
/ {warehouseStock.quantityAllocated}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -105,8 +105,8 @@ export const orderToFulfill: OrderFulfillData_order = {
|
||||||
__typename: "Stock",
|
__typename: "Stock",
|
||||||
id: "U3RvY2s6NTE=",
|
id: "U3RvY2s6NTE=",
|
||||||
warehouse: warehouseList[2],
|
warehouse: warehouseList[2],
|
||||||
quantity: 20,
|
quantity: 760,
|
||||||
quantityAllocated: 20
|
quantityAllocated: 33
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "Stock",
|
__typename: "Stock",
|
||||||
|
|
|
@ -85636,47 +85636,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 760
|
/ 2
|
||||||
</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"
|
||||||
|
@ -85716,7 +85676,47 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
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>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -85801,7 +85801,7 @@ exports[`Storyshots Views / Orders / Fulfill order default 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 587
|
/ 0
|
||||||
</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"
|
||||||
>
|
>
|
||||||
/ 587
|
/ 1
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -86289,47 +86289,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 760
|
/ 2
|
||||||
</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"
|
||||||
|
@ -86369,7 +86329,47 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
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>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -86454,7 +86454,7 @@ exports[`Storyshots Views / Orders / Fulfill order error 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 587
|
/ 0
|
||||||
</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"
|
||||||
>
|
>
|
||||||
/ 587
|
/ 1
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -87058,7 +87058,7 @@ exports[`Storyshots Views / Orders / Fulfill order one warehouse 1`] = `
|
||||||
<div
|
<div
|
||||||
class="OrderFulfillPage-remainingQuantity-id"
|
class="OrderFulfillPage-remainingQuantity-id"
|
||||||
>
|
>
|
||||||
/ 587
|
/ 0
|
||||||
</div>
|
</div>
|
||||||
<fieldset
|
<fieldset
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
|
Loading…
Reference in a new issue