-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(medusa,inventory,types): Expand list-reservation capabilities #3979
Conversation
🦋 Changeset detectedLatest commit: 950ac84 The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
packages/medusa/src/types/common.ts
Outdated
@@ -164,6 +168,28 @@ export class StringComparisonOperator { | |||
lte?: string | |||
} | |||
|
|||
export class StringSearchOperator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought(non-blocking): Are these necessary? Wouldn't it suffice to use our existing simple text search mechanism?
Just dreading that we are adding unnecessary complexity to the UI implementation/filters in admin. What's your take?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is nice to have but maybe not a must, something we can discuss but otherwise I ve written a comment to move the prepare method to an util as part of the buildQuery utils.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, think it is a nice-to-have, but I am fine keeping it in. I like the verbosity of this approach compared to alternatives. And this is consistent with the in
and nin` operators introduced in the products module.
@srindom – I would like you to sign off on this too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally use snake_case for things passed to the API, so if we keep the StringSearchOperator, we could change that.
I realise we haven't had nested "multi-syllable word filters" (only lte, gt, etc.), but I just thought it would make for a more consistent API.
packages/medusa/src/api/routes/admin/reservations/list-reservations.ts
Outdated
Show resolved
Hide resolved
packages/medusa/src/api/routes/admin/reservations/list-reservations.ts
Outdated
Show resolved
Hide resolved
packages/medusa/src/types/common.ts
Outdated
@@ -164,6 +168,28 @@ export class StringComparisonOperator { | |||
lte?: string | |||
} | |||
|
|||
export class StringSearchOperator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is nice to have but maybe not a must, something we can discuss but otherwise I ve written a comment to move the prepare method to an util as part of the buildQuery utils.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
+1 on moving the prepareSearchQuery
to utils, but I don't find it to be a blocker for this PR to be merged :)
@adrien2p – can I get you to give this another round of review today to not let it hang? :) |
Sure I ll do another round |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@olivermrbl I updated the description querying as discussed, wanna take another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a comment :)
What
How
Fixes CORE-1373