feat(dashboard) admin 3.0 order edit (#6665)

**What**
- added Order Edit creation flow

**NOTES**
- since the state is managed on the server upon changing input / adding items a request is fired to update the edit
- on save we only confirm the edit

---

**TODO**
- [x] item removal functionality

---

https://github.com/medusajs/medusa/assets/16856471/01aa85ea-1fb1-4dff-9cf4-d8d79029c2cc
This commit is contained in:
Frane Polić
2024-03-20 08:54:22 +01:00
committed by GitHub
parent 873c21355c
commit 189b03c485
16 changed files with 917 additions and 7 deletions

View File

@@ -6,14 +6,16 @@ type MoneyAmountCellProps = {
currencyCode: string
amount?: number | null
align?: "left" | "right"
className?: string
}
export const MoneyAmountCell = ({
currencyCode,
amount,
align = "left",
className,
}: MoneyAmountCellProps) => {
if (!amount) {
if (typeof amount === "undefined" || amount === null) {
return <PlaceholderCell />
}
@@ -21,10 +23,14 @@ export const MoneyAmountCell = ({
return (
<div
className={clx("flex h-full w-full items-center overflow-hidden", {
"justify-start text-left": align === "left",
"justify-end text-right": align === "right",
})}
className={clx(
"flex h-full w-full items-center overflow-hidden",
{
"justify-start text-left": align === "left",
"justify-end text-right": align === "right",
},
className
)}
>
<span className="truncate">{formatted}</span>
</div>