-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/available-stock-display
- Loading branch information
Showing
30 changed files
with
377 additions
and
169 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,5 @@ | ||
--- | ||
"@medusajs/admin-ui": patch | ||
--- | ||
|
||
feat(admin-ui): added breadcrumbs for categories on create/edit modal |
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,5 @@ | ||
--- | ||
"@medusajs/medusa": patch | ||
--- | ||
|
||
fix(medusa): Resolve on scope instead of req |
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,5 @@ | ||
--- | ||
"@medusajs/admin-ui": patch | ||
--- | ||
|
||
fix(admin-ui): remove allocate button if no more allcoations can be made |
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,5 @@ | ||
--- | ||
"@medusajs/medusa": patch | ||
--- | ||
|
||
feat(oas): add @schema OAS for address request payloads |
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,5 @@ | ||
--- | ||
"medusa-react": patch | ||
--- | ||
|
||
fix(medusa-react): invalidate all reservations list queries |
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,5 @@ | ||
--- | ||
"@medusajs/admin-ui": patch | ||
--- | ||
|
||
Fix(admin-ui): Fix minor bugs related to the edit-allocation modal |
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
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
54 changes: 54 additions & 0 deletions
54
packages/admin-ui/ui/src/domain/product-categories/components/tree-crumbs.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,54 @@ | ||
import React from "react" | ||
import { ProductCategory } from "@medusajs/medusa" | ||
import { getAncestors } from "../utils" | ||
|
||
type TreeCrumbsProps = React.HtmlHTMLAttributes<HTMLDivElement> & { | ||
nodes: ProductCategory[] | ||
currentNode: ProductCategory | ||
showPlaceholder: boolean | ||
placeholderText: string | ||
} | ||
|
||
const TreeCrumbs: React.FC<TreeCrumbsProps> = ({ | ||
nodes, | ||
currentNode, | ||
showPlaceholder = false, | ||
placeholderText = "", | ||
...props | ||
}) => { | ||
const ancestors = getAncestors(currentNode, nodes) | ||
|
||
return ( | ||
<span {...props}> | ||
<span className="text-grey-40"> | ||
{ancestors.map((ancestor, index) => { | ||
const categoryName = ancestor.name | ||
|
||
return ( | ||
<div key={ancestor.id} className="inline-block"> | ||
<span> | ||
{categoryName.length > 25 | ||
? categoryName.substring(0, 25) + "..." | ||
: categoryName} | ||
</span> | ||
|
||
{(showPlaceholder || ancestors.length !== index + 1) && ( | ||
<span className="mx-2">/</span> | ||
)} | ||
</div> | ||
) | ||
})} | ||
|
||
{showPlaceholder && ( | ||
<span> | ||
<span className="border-grey-40 rounded-[10px] border-[1px] border-dashed px-[8px] py-[4px]"> | ||
{placeholderText} | ||
</span> | ||
</span> | ||
)} | ||
</span> | ||
</span> | ||
) | ||
} | ||
|
||
export default TreeCrumbs |
Oops, something went wrong.