feat(admin-ui,medusa): Reservations management (#4081)

* add location filtering to list-location levels

* cleanup

* add location filtering to list-location levels

* cleanup

* Initial work on route,table,new reservation form

* generated types

* add block

* udpate clients

* initial create reservation

* update actionables for reservation table

* update edit-allocation modal

* misc naming updates

* update reservations table

* add expand capabilities for list-reservations

* expand fields and show columns

* update oas

* make remove item work in focus modal

* add yarn lock

* add integration test

* Fix display when label doesn't match search term

* remove unused file

* Update packages/admin-ui/ui/src/components/templates/reservations-table/components/reservation-form/index.tsx

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/admin-ui/ui/src/domain/orders/details/allocations/edit-allocation-modal.tsx

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/admin-ui/ui/src/components/templates/reservations-table/new/index.tsx

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* initial changes

* add changeset

* update font size

* cleanup reservations table + select

* add decorated inventory item type

* use type

* feedback changes

* Update packages/admin-ui/ui/src/components/molecules/item-search/index.tsx

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>

* decorate response for list inventory item to include total quantities

* update decorated properties

* decorate type

* adrien feedback

* Update packages/generated/client-types/src/lib/models/DecoratedInventoryItemDTO.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* update join-utils

* fix caching

---------

Co-authored-by: Rares Capilnar <rares.capilnar@gmail.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
This commit is contained in:
Philip Korsholm
2023-05-23 05:24:28 +02:00
committed by GitHub
parent 87444488b5
commit 4f3c8f5d70
35 changed files with 1717 additions and 135 deletions

View File

@@ -2,7 +2,7 @@ import TableViewHeader from "../../components/organisms/custom-table-header"
import { useNavigate } from "react-router-dom"
type P = {
activeView: "inventory" | "locations"
activeView: "inventory" | "locations" | "reservations"
}
/*
@@ -17,10 +17,10 @@ function InventoryPageTableHeader(props: P) {
if (v === "inventory") {
navigate(`/a/inventory`)
} else {
navigate(`/a/inventory/locations`)
navigate(`/a/inventory/${v}`)
}
}}
views={["inventory", "locations"]}
views={["inventory", "locations", "reservations"]}
activeView={props.activeView}
/>
)

View File

@@ -1,12 +1,14 @@
import { Route, Routes } from "react-router-dom"
import InventoryView from "./inventory"
import Locations from "./locations"
import Reservations from "./reservations"
const Inventory = () => {
return (
<Routes>
<Route index element={<InventoryView />} />
<Route path="/locations/*" element={<Locations />} />
<Route path="/reservations/*" element={<Reservations />} />
</Routes>
)
}

View File

@@ -0,0 +1,22 @@
import Spacer from "../../../components/atoms/spacer"
import BodyCard from "../../../components/organisms/body-card"
import ReservationsTable from "../../../components/templates/reservations-table"
import InventoryPageTableHeader from "../header"
const Reservations = () => {
return (
<div className="flex h-full grow flex-col">
<div className="flex w-full grow flex-col">
<BodyCard
customHeader={<InventoryPageTableHeader activeView="reservations" />}
className="h-fit"
>
<ReservationsTable />
</BodyCard>
<Spacer />
</div>
</div>
)
}
export default Reservations