fix(admin): Show correct reserved/available values when editing stock on variant (#3438)
Update displayed labels to use actual `reserved_quantity` and a calculation for available quantity, now that we have the correct fields on the level.  Resolves CORE-1194
This commit is contained in:
5
.changeset/kind-seas-roll.md
Normal file
5
.changeset/kind-seas-roll.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/admin-ui": patch
|
||||
---
|
||||
|
||||
fix(admin): Show correct reserved/available values when editing stock on variant
|
||||
@@ -150,12 +150,12 @@ const VariantStockForm = ({
|
||||
</div>
|
||||
<div className="flex ml-auto">
|
||||
<div className="flex flex-col mr-base text-small text-grey-50">
|
||||
<span className="whitespace-nowrap">
|
||||
{`${
|
||||
level.stocked_quantity - level.available_quantity
|
||||
} reserved`}
|
||||
<span className="text-right whitespace-nowrap">
|
||||
{`${level.reserved_quantity} reserved`}
|
||||
</span>
|
||||
<span className="whitespace-nowrap">{`${level.available_quantity} available`}</span>
|
||||
<span className="text-right whitespace-nowrap">{`${
|
||||
level.stocked_quantity - level.reserved_quantity
|
||||
} available`}</span>
|
||||
</div>
|
||||
<InputField
|
||||
placeholder={"0"}
|
||||
|
||||
Reference in New Issue
Block a user