feat(medusa): categories can be ranked based on position (#3341)

* chore: categories can be ranked based on position

* chore: fix tests

* chore: sort categories by order

* chore: fix bug where mpath relationship is messed up

* chore: enable linting - lint changes

* Update packages/medusa/src/repositories/product-category.ts

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>

* chore: fixed specs

* chore: cleanup repository to new typeorm interfaces + cleanup

* chore: revert repository changes due to incorrect sql

* chore: addressed pr reviews

---------

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
This commit is contained in:
Riqwan Thamir
2023-03-06 15:49:16 +01:00
committed by GitHub
parent 67ba8be02b
commit 0a6aa0e624
16 changed files with 986 additions and 167 deletions

View File

@@ -335,3 +335,11 @@ function buildOrder<TEntity>(orderBy: {
return output
}
export function nullableValue(value: any): FindOperator<any> {
if (value === null) {
return IsNull()
} else {
return value
}
}