-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(admin-ui,medusa): Reservations management #4081
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: c50594c The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
908ea81
to
945dd53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very strong work! I've added a couple of initial comments and thoughts. Will give it another review tomorrow :)
Deleting a reservation item succeeds but never closes the confirmation modal. I am struck here:
Switching between locations should clear the selected item:
CleanShot.2023-05-16.at.19.36.43.mp4
Also, a changeset is missing
packages/admin-ui/ui/src/components/molecules/item-search/index.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/components/molecules/item-search/index.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/components/molecules/select/next-select/use-select-props.tsx
Outdated
Show resolved
Hide resolved
...dmin-ui/ui/src/components/templates/reservations-table/components/reservation-form/index.tsx
Outdated
Show resolved
Hide resolved
...dmin-ui/ui/src/components/templates/reservations-table/components/reservation-form/index.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/components/templates/reservations-table/index.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/components/templates/reservations-table/new/index.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/domain/orders/details/allocations/edit-allocation-modal.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very strong work! I've added a couple of initial comments and thoughts. Will give it another review tomorrow :)
Deleting a reservation item succeeds but never closes the confirmation modal. I am stuck here:
Switching between locations should clear the selected item:
CleanShot.2023-05-16.at.19.36.43.mp4
Also, a changeset is missing
packages/admin-ui/ui/src/components/templates/reservations-table/index.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/components/templates/reservations-table/index.tsx
Show resolved
Hide resolved
packages/admin-ui/ui/src/domain/orders/details/allocations/edit-allocation-modal.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/domain/orders/details/allocations/edit-allocation-modal.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/domain/orders/details/allocations/edit-allocation-modal.tsx
Outdated
Show resolved
Hide resolved
8c76592
to
d480350
Compare
packages/admin-ui/ui/src/components/molecules/item-search/index.tsx
Outdated
Show resolved
Hide resolved
packages/admin-ui/ui/src/components/molecules/item-search/index.tsx
Outdated
Show resolved
Hide resolved
nit: Can we add cache invalidation to transferring reservations from one location to another? Right now, I am seeing an incorrect availability by doing:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will review filters separately 💪
Great work @pKorsholm !
packages/generated/client-types/src/lib/models/DecoratedInventoryItemDTO.ts
Show resolved
Hide resolved
import Button from "../../../../components/fundamentals/button" | ||
import CrossIcon from "../../../../components/fundamentals/icons/cross-icon" | ||
import InputField from "../../../../components/molecules/input" | ||
import { LineItem } from "@medusajs/medusa" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Create type to live in @medusajs/types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ comment
* type: number | ||
* description: The total quantity of the item available across levels | ||
*/ | ||
export type DecoratedInventoryItemDTO = InventoryItemDTO & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: should this move to the types package? Maybe not now since there is a coupling with the variant but the idea would be to have a variant dto as well, we should get rid of returning entity type as it forces us to be structured around the ORM
packages/medusa/src/api/routes/admin/inventory-items/list-inventory-items.ts
Outdated
Show resolved
Hide resolved
* description: inventory item from inventory module | ||
* $ref: "#/components/schemas/InventoryItemDTO" | ||
*/ | ||
export type ExtendedReservationItem = ReservationItemDTO & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as the previous comment, but probably not as part of that pr but as we move towards modules
packages/medusa/src/api/routes/admin/reservations/list-reservations.ts
Outdated
Show resolved
Hide resolved
…oryItemDTO.ts Co-authored-by: Oliver Windall Juhl <[email protected]>
What
note: filtering is not part of this pr but the boilerplate has been copied over
Fixes CORE-1386