fix(medusa): Order edit confirmation conflict line items update (#5867)
* fix(medusa): Order edit confirmation conflict line items update * naming * Create serious-flowers-provide.md * another proposal * fixes
This commit is contained in:
committed by
GitHub
parent
1c6c759aa8
commit
2826605b01
@@ -24,6 +24,7 @@ export * from "./promise-all"
|
||||
export * from "./remote-query-object-from-string"
|
||||
export * from "./remote-query-object-to-string"
|
||||
export * from "./remove-nullisih"
|
||||
export * from "./selector-constraints-to-string"
|
||||
export * from "./set-metadata"
|
||||
export * from "./simple-hash"
|
||||
export * from "./string-to-select-relation-object"
|
||||
|
||||
16
packages/utils/src/common/selector-constraints-to-string.ts
Normal file
16
packages/utils/src/common/selector-constraints-to-string.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
export function selectorConstraintsToString(
|
||||
selector: object | object[]
|
||||
): string {
|
||||
const selectors = Array.isArray(selector) ? selector : [selector]
|
||||
|
||||
return selectors
|
||||
.map((selector_) => {
|
||||
return Object.entries(selector_)
|
||||
.map(
|
||||
([key, value]: [string, any]) =>
|
||||
`${key}: ${value._type ? `${value._type}(${value._value})` : value}`
|
||||
)
|
||||
.join(", ")
|
||||
})
|
||||
.join(" or ")
|
||||
}
|
||||
Reference in New Issue
Block a user