Skip to content

chore: patch cancel#24

Merged
eugbyte merged 14 commits into
mainfrom
chore/patch-cancel
Sep 2, 2025
Merged

chore: patch cancel#24
eugbyte merged 14 commits into
mainfrom
chore/patch-cancel

Conversation

@eugbyte
Copy link
Copy Markdown
Owner

@eugbyte eugbyte commented Aug 30, 2025

No description provided.

@eugbyte eugbyte requested a review from Copilot August 30, 2025 16:01

This comment was marked as outdated.

@eugbyte eugbyte requested a review from Copilot September 2, 2025 13:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements a comprehensive filtering system for gatherings, along with several refactoring improvements. The main purpose is to add category-based filtering and enhance the user interface for searching and filtering gatherings.

  • Adds category filtering functionality with support for multiple category selection
  • Introduces a new FilterBar component with collapsible design and improved search interface
  • Refactors booking cancellation to use a dedicated API endpoint instead of generic update

Reviewed Changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Evently.Server.Test/Features/Gatherings/Services/GatheringServiceTests.cs Adds categoryIds parameter to test method call
src/evently.client/src/setup-tests.ts Adds global setState declaration for testing
src/evently.client/src/routes/healthcheck/-index.test.tsx Updates test wrapper component name
src/evently.client/src/routes/gatherings/index.tsx Major refactor to add filtering functionality and loader
src/evently.client/src/routes/gatherings/-index.test.tsx Updates tests for new filtering functionality
src/evently.client/src/routes/gatherings/-components/filter-bar.tsx New component implementing filtering interface
src/evently.client/src/routes/gatherings/-components/gathering-form.tsx Updates function name for date formatting
src/evently.client/src/routes/gatherings/$gatheringId/index.tsx Replaces booking update with dedicated cancel function
src/evently.client/src/lib/services/gathering-service.ts Adds categoryIds support to API calls
src/evently.client/src/lib/services/booking-service.ts Replaces updateBooking with cancelBooking function
src/evently.client/src/lib/services/util-service.ts Renames and adds date formatting functions
src/evently.client/src/lib/components/test-wrappers.tsx Refactors test wrapper components
src/Evently.Server/Features/Gatherings/Services/GatheringService.cs Adds categoryIds filtering to service
src/Evently.Server/Features/Gatherings/Controllers/GatheringsController.cs Adds categoryIds parameter and logging
src/Evently.Server/Features/Bookings/Controllers/BookingsController.cs Replaces update endpoint with cancel endpoint
Files not reviewed (1)
  • src/evently.client/pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

const date: Date | null = !value.isValid ? null : value.startOf("day").toJSDate();
handleParamsChange({
...queryParams,
startDateAfter: date as any
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'as any' type assertion bypasses TypeScript's type safety. Consider defining the proper type or using a more specific type assertion.

Copilot uses AI. Check for mistakes.
const date: Date | null = !value.isValid ? null : value.endOf("day").toJSDate();
handleParamsChange({
...queryParams,
endDateBefore: date as any
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'as any' type assertion bypasses TypeScript's type safety. Consider defining the proper type or using a more specific type assertion.

Copilot uses AI. Check for mistakes.
bool? isCancelled,
long[]? categoryIds,
int? offset, int? limit) {
logger.LogInformation("categoryIds: {}", string.Join(",", categoryIds ?? []));
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This debug logging statement should be removed or moved to a more appropriate log level (Debug/Trace) as it will log on every request in production.

Suggested change
logger.LogInformation("categoryIds: {}", string.Join(",", categoryIds ?? []));
logger.LogDebug("categoryIds: {}", string.Join(",", categoryIds ?? []));

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +81
booking.CancellationDateTime = DateTimeOffset.UtcNow;
booking = await bookingService.UpdateBooking(bookingId, bookingReqDto: booking.ToBookingDto());
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name 'bookingReqDto' is explicitly specified but the method is still using the generic UpdateBooking. Consider creating a dedicated CancelBooking method in the service layer for better semantic clarity.

Suggested change
booking.CancellationDateTime = DateTimeOffset.UtcNow;
booking = await bookingService.UpdateBooking(bookingId, bookingReqDto: booking.ToBookingDto());
booking = await bookingService.CancelBooking(bookingId);

Copilot uses AI. Check for mistakes.
@eugbyte eugbyte merged commit 92f2f0c into main Sep 2, 2025
1 check passed
@eugbyte eugbyte deleted the chore/patch-cancel branch September 2, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants