fix(medusa, admin-ui): Fix edit order variant stock (#3512)

The stock column when adding variants in an order edit would just look at `inventory_quantity`, location-unaware. Updated this to now attempt to request location-aware stock information and updated the column to use this information and show total stock across how many locations, and a tooltip showing per-location stock.

![image](https://user-images.githubusercontent.com/948623/225901225-177a2ce4-7344-49d0-84d5-3f3b0ce9f62e.png)

Resolves CORE-1250

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
This commit is contained in:
Rares Stefan
2023-03-20 13:16:49 +00:00
committed by GitHub
co-authored by Philip Korsholm
parent 2176ff5027
commit a8423b8acc
4 changed files with 76 additions and 6 deletions
+2
View File
@@ -50,6 +50,7 @@
"emoji-picker-react": "^4.4.3",
"framer-motion": "^9.1.6",
"medusa-react": "*",
"pluralize": "^8.0.0",
"postcss": "^8.4.21",
"query-string": "^8.1.0",
"react": "^18.2.0",
@@ -81,6 +82,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/pluralize": "^0.0.29",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/react-table": "^7.7.9",