-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dashboard): Draft orders create (#6680)
**What** - Adds Create draft order form - Updates draft order details page to also display "custom" items. **Note** - Currently, the form is missing a way to input a discount code. Need to rethink this a bit, as the we can't implement the design in Figma. - The current design is missing a way to select from a customers existing shipping addresses, we should add that to keep the features we have today. - This PR uses `useInfiniteQuery` which does not work on our staging (due to duplicate dependencies as a result of building straight from the monorepo), so you will need to test locally.
- Loading branch information
1 parent
20132d7
commit 26531c5
Showing
54 changed files
with
3,395 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
"@medusajs/ui-preset": patch | ||
"@medusajs/ui": patch | ||
"@medusajs/medusa": patch | ||
"@medusajs/client-types": patch | ||
--- | ||
|
||
feat(ui-preset): Pull latest styles from Figma. | ||
fix(ui): Fix invalid state styling of Select, so it correctly shows when aria-invalid is true. | ||
fix(medusa): Align query params between `/admin/products/:id/variants` and `/admin/variants`. | ||
chore(client-types): Update `medusa` client types to reflect changes to the API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...es/admin-next/dashboard/src/components/common/conditional-tooltip/conditional-tooltip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Tooltip } from "@medusajs/ui" | ||
import { PropsWithChildren, ReactNode } from "react" | ||
|
||
type ConditionalTooltipProps = PropsWithChildren<{ | ||
content: ReactNode | ||
showTooltip?: boolean | ||
}> | ||
|
||
export const ConditionalTooltip = ({ | ||
children, | ||
content, | ||
showTooltip = false, | ||
}: ConditionalTooltipProps) => { | ||
if (showTooltip) { | ||
return <Tooltip content={content}>{children}</Tooltip> | ||
} | ||
|
||
return children | ||
} |
1 change: 1 addition & 0 deletions
1
packages/admin-next/dashboard/src/components/common/conditional-tooltip/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./conditional-tooltip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/admin-next/dashboard/src/components/common/divider/divider.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { clx } from "@medusajs/ui" | ||
import { ComponentPropsWithoutRef } from "react" | ||
|
||
interface DividerProps | ||
extends Omit<ComponentPropsWithoutRef<"div">, "children"> { | ||
orientation?: "horizontal" | "vertical" | ||
variant?: "dashed" | "solid" | ||
} | ||
|
||
export const Divider = ({ | ||
orientation = "horizontal", | ||
variant = "solid", | ||
className, | ||
...props | ||
}: DividerProps) => { | ||
return ( | ||
<div | ||
aria-orientation={orientation} | ||
role="separator" | ||
className={clx( | ||
{ | ||
"w-full border-t": orientation === "horizontal", | ||
"h-full border-l": orientation === "vertical", | ||
"border-dashed": variant === "dashed", | ||
}, | ||
className | ||
)} | ||
{...props} | ||
/> | ||
) | ||
} |
1 change: 1 addition & 0 deletions
1
packages/admin-next/dashboard/src/components/common/divider/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./divider" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.