Encoded the `location_id` into the query params and ensured it gets parsed on mount, into defaults. This allows safer refreshes of the locations table or accurate deep-links to be shared.
Resolves CORE-1252
I believe that changing the requiredness of the `address_1` and `country_code` fields when any part of the address was filled was not being registered correctly with the form state representation of those fields. ~~Have added an effect that unregisters the fields when the requiredness state changes and allows them to be re-registered with the correct `required` value when the next re-render happens due to that state having changed.~~
Have updated the submit button to be available even if form is invalid.
Resolves CORE-1266
Previously, if an order had two fulfilments that fully satisfied the order, then only one was shipped, the status would change to `partially_shipped` and show the "Create Fulfillment" button again, which would open a buggy modal with no items to fulfil. Added another check that looks at the items in the order and compares `quantity` and `fulfilled_quantity`, so that we can hide the button based on this as well, rather than just the order's `fulfillment_status`, which can be misleading.
Also added a status icon to the Fulfillment card's title bar for the `partially_shipped` status, as this area was blank before in that state.
Resolves CORE-1262
**What**
- Fix stock locations quantities being shown as `undefined` and `NaN`
- Throw if updates to location levels are made with negative quantities through the api
- Show "allocated" in order summary for partially fulfilled orders
Fixes CORE-1268, CORE-1267, CORE-1265
* init deploy command
* add include flag
* add 'shortcut' flag
* add dev command, fix var replacement, change default behaviour
* cleanup params of build command
* fix defaults when using the plugin to serve admin
* add changeset
* fix globals
* update README
* throw error on no build found
---------
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
- Add check to see if any items is unfulfilled when validating reservations for allocation indicator
- Add reservations refresh to onSuccess when creating a fulfillment to automatically update indicators on fulfillment
Fixes CORE-1248
Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
**What**
- Remove related inventory levels and reservation items when a stock location is removed
**How**
- Add bulk deletion methods for both inventory levels and reservation items to the inventory service api
- invoke both on location removal
Fixes CORE-1232
**What**
- Toggle manage inventory in the inventory management modal
**How**
- Create/update/remove inventory item based on if `manage_inventory` is set and if an inventory item already exists
- Move all stock location updates to when the modal is submitted
- Add create-inventory-item endpoint in the core
Fixes CORE-1196
Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
**What**
- include location id when creating a fulfillment
- Allow location updates to reservations without passing along quantity
**Why**
- location_id on fulfillment was null after creation
Fixes CORE-1242, CORE-1243
This PR aims to tackle a few different small fixes and tweaks related to inventory and order details UI, in connection to multiwarehousing features.
- Successfully deleting an allocation should now only present one toast
- Updated copy in allocation editing toasts
- Inventory table search should now be the same height as the location selection trigger
- Inventory table rows should now correctly visually indicate that they are clickable
- Removed Filters from Inventory table for the time being
- Added actions to Inventory table rows for adjusting availability (same action as clicking the row, which remains) and going to the product detail page for the inventory item
Resolves CORE-1229, CORE-1228, CORE-1227, CORE-1233, CORE-1230
* add location_id to request_return endpoint to support "receive_now" returns
* changeset
* admin request return
* add locations to recieving returns
* cleanup test
* add check for inventory service
What:
- increase tree depth in react nestable
- scope categories on store queries
- allow categories relation in products API
RESOLVES CORE-1238
RESOLVES CORE-1237
RESOLVES CORE-1236
**What**
- Fix `delete-reservation` endpoint to allow deletions of reservations
- remove `inventory_item_id` from reservation update call to properly update reservation
- invalidate all list caches to properly update order overview after an allocation has been created
- Fix overlap for long product titles in edit-allocation-modal
Fixes CORE-1214
* add "get-variant" endpoint
* import from a different place
* fix unit test
* add changeset
* inventory management for orders
* add changeset
* initial create-fulfillment
* add changeset
* type oas and admin
* Move inv. creation and listing from admin repo
* Fix location editing bug (CORE-1216)
* Fix default warehouse on inventory table view
* remove actions from each table line
* Use feature flag hook instead of context directly
* remove manage inventory action if inventory management is not enabled
* Address review comments
* fix queries made when inventorymodules are disabled
* variant form changes for feature enabled
* move exclamation icon into warning icon
* ensure queries are not run unless feature is enabled for create-fulfillment
---------
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com>
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
* Create cuddly-seahorses-thank.md
* add integration tests
* revert back from master to develop
* fix expand
* add new integration test
* add missing default relations
* add missing refunds relation
* re work
* fix tests
* init
* fix order page according to fixes to expand
* expand shipping on returns
* Create .changeset/cuddly-beers-tease.md
---------
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
- A series of minor fixes for admin-ui relating to managing stock locations:
- make "create location" `primary`
- add delete prompt when cancelling creation if information has been input
- avoid clipping focus border on country select when creating a stock location
- allow removals of sales channels from stock locations
Fixes CORE-1191, CORE-1192, CORE-1190, CORE-1189