-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[ACTION] booking experts - filters #19315
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughThis PR adds multiple new filters and fields to the list-bookings action, a helper to serialize arrays, and extends the app with a customerId prop plus listCustomers; it also updates several module version numbers and bumps the package version. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a8468bf to
23fe25f
Compare
23fe25f to
4a50028
Compare
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (19)
components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs(1 hunks)components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs(1 hunks)components/booking_experts/actions/delete-guest/delete-guest.mjs(1 hunks)components/booking_experts/actions/get-booking/get-booking.mjs(1 hunks)components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs(1 hunks)components/booking_experts/actions/get-reservation/get-reservation.mjs(1 hunks)components/booking_experts/actions/list-availabilities/list-availabilities.mjs(1 hunks)components/booking_experts/actions/list-bookings/list-bookings.mjs(3 hunks)components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs(1 hunks)components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs(1 hunks)components/booking_experts/actions/list-reservations/list-reservations.mjs(1 hunks)components/booking_experts/actions/search-contacts/search-contacts.mjs(1 hunks)components/booking_experts/actions/update-guest/update-guest.mjs(1 hunks)components/booking_experts/booking_experts.app.mjs(3 hunks)components/booking_experts/package.json(1 hunks)components/booking_experts/sources/booking-updated/booking-updated.mjs(1 hunks)components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs(1 hunks)components/booking_experts/sources/new-booking-created/new-booking-created.mjs(1 hunks)components/booking_experts/sources/new-inventory-object-created/new-inventory-object-created.mjs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/booking_experts/actions/list-bookings/list-bookings.mjs (1)
components/booking_experts/booking_experts.app.mjs (11)
page(12-16)page(33-38)page(55-60)page(85-90)page(99-103)page(119-124)page(166-172)page(192-197)page(214-219)page(235-241)page(274-279)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (24)
components/booking_experts/actions/list-rentabletype-availabilities/list-rentabletype-availabilities.mjs (1)
8-8: Version bump with no functional changes—clarify rationale.The version is incremented from
0.0.2to0.0.3without any changes to the action's logic, props, or exported interface. While the AI summary indicates this mirrors similar version updates across the PR, it's unclear why a version bump is warranted for a purely cosmetic or dependency-level change.Confirm whether this version bump should be applied. If it's necessary to reflect dependency updates elsewhere in the codebase, consider adding a comment or release note explaining the rationale.
components/booking_experts/actions/update-guest/update-guest.mjs (1)
7-7: Version bump is appropriate.This is a collateral version update (0.0.2 → 0.0.3) as part of the broader PR versioning strategy. The action logic remains unchanged and intact.
components/booking_experts/actions/get-booking/get-booking.mjs (2)
22-30: The bookingId propDefinition is correctly available and compatible in the updated app.mjs.Verification confirms:
bookingIdpropDefinition exists inbooking_experts.app.mjs(line 69) with async options accepting{ page, administrationId }- The mapper pattern in
get-booking.mjs(lines 26–28) correctly passesadministrationIdcontext to filter optionsgetBooking()method exists (line 331–337) and accepts bothadministrationIdandbookingIdparameters- The integration pattern is consistent across actions (
get-booking.mjs,list-bookings.mjs)No breaking changes detected. The version bump is safe.
33-33: No issues found —getBookingmethod signature is compatible with current call site.The
getBookingmethod at line 331 inbooking_experts.app.mjsacceptsadministrationId,bookingId, and...opts. The call site at lines 33–37 passesadministrationId,bookingId, and$, which is correctly captured by the spread operator and forwarded to_makeRequest. No breaking changes detected.components/booking_experts/sources/booking-updated/booking-updated.mjs (1)
8-8: LGTM: Version bump coordinated with package release.This metadata-only change aligns with the broader version sweep across the booking_experts module.
components/booking_experts/actions/add-guest-to-reservation/add-guest-to-reservation.mjs (1)
7-7: LGTM: Version bump coordinated with package release.components/booking_experts/package.json (1)
3-3: LGTM: Package version bump reflects minor enhancements.The version increment from 0.3.0 to 0.3.1 appropriately signals a patch-level update consistent with the addition of new filter parameters to list-bookings.
components/booking_experts/actions/create-agenda-period/create-agenda-period.mjs (1)
7-7: LGTM: Version bump coordinated with package release.components/booking_experts/actions/list-availabilities/list-availabilities.mjs (1)
7-7: LGTM: Version bump coordinated with package release.components/booking_experts/actions/delete-guest/delete-guest.mjs (1)
7-7: LGTM: Version bump coordinated with package release.components/booking_experts/actions/list-reservations/list-reservations.mjs (1)
7-7: LGTM: Version bump coordinated with package release.components/booking_experts/actions/search-contacts/search-contacts.mjs (1)
8-8: LGTM: Version bump coordinated with package release.components/booking_experts/actions/list-inventory-objects/list-inventory-objects.mjs (1)
7-7: LGTM! Version bump aligns with package updates.The metadata version update is consistent with the broader version refresh across booking_experts components in this PR.
components/booking_experts/sources/new-inventory-object-created/new-inventory-object-created.mjs (1)
8-8: LGTM! Version bump is consistent with other sources.Metadata update aligns with the version increments across the booking_experts package.
components/booking_experts/actions/get-complex-prices/get-complex-prices.mjs (1)
7-7: LGTM! Version bump is appropriate.The version increment is consistent with the package-wide version updates in this PR.
components/booking_experts/sources/inventory-object-updated/inventory-object-updated.mjs (1)
8-8: LGTM! Version update is consistent.Metadata change aligns with the broader version refresh pattern in this PR.
components/booking_experts/actions/get-reservation/get-reservation.mjs (1)
7-7: LGTM! Version increment is appropriate.The version bump from 0.0.1 to 0.0.2 aligns with the package-wide updates.
components/booking_experts/sources/new-booking-created/new-booking-created.mjs (1)
8-8: LGTM! Version update is consistent.Metadata change aligns with other sources in this PR.
components/booking_experts/booking_experts.app.mjs (3)
69-92: Excellent enhancement with mapper customization!The addition of a configurable
mapperparameter allows callers to customize how bookings are displayed in dropdowns. The early return guard for!administrationIdprevents unnecessary API calls.
263-291: Well-implemented customerId prop with robust label handling!The label logic gracefully handles missing name fields by falling back to email or ID. The early return guard and async options pattern are consistent with other propDefinitions.
479-486: LGTM! listCustomers method follows established patterns.The implementation is consistent with other list methods in the app and properly constructs the API path.
components/booking_experts/actions/list-bookings/list-bookings.mjs (3)
7-7: LGTM! Version bump reflects feature additions.The version increment from 0.0.4 to 0.0.5 appropriately reflects the new filter capabilities.
42-130: Excellent implementation of all required filters!All filters from issue #19312 are properly implemented:
filter[ID]via filterIdfilter[customer]via customerIdsfilter[reservations]via reservationIdsfilter[booking_nr]via bookingNrfilter[confirmed_at]via confirmedAtfields[booking]via fieldsBookingfilter[reference_nr]via referenceNrThe props have appropriate types, descriptions, and leverage propDefinitions for dynamic options.
140-176: LGTM! Run method properly utilizes all new filters.The destructuring and parameter mapping correctly passes all filter values to the API with the appropriate parameter names. The implementation aligns with the Booking Experts API documentation.
WHY
Resolves #19312
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.