Skip to content

Commit

Permalink
Feat(medusa, admin-ui): Update edit allocation modal (#4071)
Browse files Browse the repository at this point in the history
* update edit-allocation modal

* add changeset

* update edit-allocation modal

* update allocation modal
  • Loading branch information
pKorsholm authored May 22, 2023
1 parent c0e527d commit 0476f52
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 101 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-buckets-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---

feaet(medusa): add description to reservation default fields
5 changes: 5 additions & 0 deletions .changeset/curly-carpets-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/admin-ui": patch
---

feat(admin-ui): update edit allocation modal design
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import clsx from "clsx"
import ImagePlaceholderIcon from "../../fundamentals/icons/image-placeholder-icon"
import clsx from "clsx"

type Props = {
src?: string | null
className?: string
size?: "small" | "medium" | "large"
size?: "xsmall" | "small" | "medium" | "large"
}

export const Thumbnail = ({ src, className, size = "small" }: Props) => {
Expand All @@ -13,6 +13,7 @@ export const Thumbnail = ({ src, className, size = "small" }: Props) => {
className={clsx(
"bg-grey-5 rounded-rounded flex items-center justify-center overflow-hidden",
{
"h-6 w-[18px]": size === "xsmall",
"h-10 w-[30px]": size === "small",
"h-12 w-9": size === "medium",
"h-[226px] w-[170px]": size === "large",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Controller, useForm, useWatch } from "react-hook-form"
import { LineItem } from "@medusajs/medusa"
import { NestedForm, nestedForm } from "../../../../utils/nested-form"
import React, { useEffect, useMemo } from "react"
import {
Expand All @@ -13,14 +12,15 @@ import Button from "../../../../components/fundamentals/button"
import CrossIcon from "../../../../components/fundamentals/icons/cross-icon"
import FocusModal from "../../../../components/molecules/modal/focus-modal"
import InputField from "../../../../components/molecules/input"
import { LineItem } from "@medusajs/medusa"
import { ReservationItemDTO } from "@medusajs/types"
import Select from "../../../../components/molecules/select/next-select/select"
import Thumbnail from "../../../../components/atoms/thumbnail"
import clsx from "clsx"
import { getErrorMessage } from "../../../../utils/error-messages"
import { getFulfillableQuantity } from "../create-fulfillment/item-table"
import { sum } from "lodash"
import useNotification from "../../../../hooks/use-notification"
import { ReservationItemDTO } from "@medusajs/types"

type AllocationModalFormData = {
location?: { label: string; value: string }
Expand Down Expand Up @@ -205,6 +205,7 @@ export type AllocationLineItemForm = {
inventory_item_id: string
line_item_id: string
quantity: number
description?: string | null
}

export const AllocationLineItem: React.FC<{
Expand Down
Loading

0 comments on commit 0476f52

Please sign in to comment.