Chore/form category#21
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds category functionality to the gatherings feature, allowing users to associate categories with events. The change enhances event organization and filtering capabilities.
- Introduces category selection UI in gathering forms
- Updates data models to include gathering category details
- Adds category service for fetching available categories
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/evently.client/src/routes/gatherings/index.tsx | Updates query parameter from startDateAfter to endDateAfter |
| src/evently.client/src/routes/(auth)/gatherings/create.tsx | Adds category loading and passes categories to form component |
| src/evently.client/src/routes/(auth)/gatherings/-components/gathering-form.tsx | Implements category selection UI with dropdown and badge display |
| src/evently.client/src/routes/(auth)/gatherings/$gatheringId/update.tsx | Adds category loading and file initialization for updates |
| src/evently.client/src/lib/services/gathering-service.ts | Refactors form data creation and adds category detail handling |
| src/evently.client/src/lib/services/category-service.ts | New service for fetching categories |
| src/evently.client/src/lib/domains/models/upsert-dtos.ts | Adds GatheringCategoryDetailReqDto model and updates GatheringReqDto |
| src/evently.client/src/lib/components/card.tsx | Fixes CSS spacing for category badges |
| src/Evently.Server/Features/Gatherings/Services/GatheringService.cs | Updates gathering update logic to include category details |
| src/Evently.Server/Common/Extensions/MapperExtension.cs | Adds category detail mapping between DTOs and entities |
| src/Evently.Server/Common/Domains/Models/GatheringReqDto.cs | Adds GatheringCategoryDetails property |
| src/Evently.Server/Common/Domains/Models/GatheringCategoryDetailDto.cs | New DTO for gathering category relationships |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ); | ||
| } | ||
|
|
||
| console.log({ newValue }); |
There was a problem hiding this comment.
This debug console.log statement should be removed before production deployment.
| console.log({ newValue }); |
|
|
||
| const onSubmit = async (values: GatheringReqDto): Promise<void> => { | ||
| setToastMsg(new ToastContent(true, "Updating...")); | ||
| console.log({ values }); |
There was a problem hiding this comment.
This debug console.log statement should be removed before production deployment.
| console.log({ values }); | |
| <span>{`${start.toLocaleString(DateTime.DATETIME_MED)} — ${end.toLocaleString(DateTime.DATETIME_MED)}`}</span> | ||
| </div> | ||
| <div className="flex flex-row flex-wrap space-x-2"> | ||
| <div className="flex flex-row flex-wrap space-y-1 space-x-2"> |
There was a problem hiding this comment.
Using both space-y-1 and space-x-2 together can cause unexpected spacing behavior in Tailwind CSS. Consider using gap-1 gap-x-2 or a single gap utility instead for more predictable layout.
| <div className="flex flex-row flex-wrap space-y-1 space-x-2"> | |
| <div className="flex flex-row flex-wrap gap-x-2 gap-y-1"> |
No description provided.