Skip to content

[WIP] In our calendar functionality we have a card made using renderEventCard that shows information about the booking. WE should show information about who created the booking in the same style we are showing the custodian. This should resolve #1978.#1982

Merged
DonKoko merged 9 commits intomainfrom
copilot/fix-1e681296-1a3e-4955-b284-c4d415a1d775
Aug 21, 2025

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 20, 2025

  • Analyze current calendar event card implementation and booking data structure
  • Understand how custodian information is displayed using TeamMemberBadge component
  • Confirm that creator data is already available in booking queries but not passed to calendar
  • Update CalendarExtendedProps type to include creator information
  • Modify getBookingsForCalendar to include creator data in extendedProps
  • Update AdvancedAssetBooking type to include creator data
  • Add creator display to EventCardContent component similar to custodian display
  • Update advanced asset index query to include creator data in SQL
  • Fix advanced-asset-columns.tsx to include creator data in booking objects
  • Complete implementation following existing patterns and styling

Implementation Summary

Added creator information to calendar booking cards as requested in issue #1978. The implementation:

  1. Enhanced Data Structure: Updated CalendarExtendedProps to include creator field matching custodian structure
  2. Updated Booking Queries: Modified both the main booking service and advanced asset queries to include creator data
  3. Consistent UI: Added "Created by:" section in event cards using the same TeamMemberBadge component as custodian
  4. Type Safety: Updated all relevant TypeScript types to support creator information
  5. Backward Compatibility: Handles cases where creator data might be null/undefined

The creator information now displays in the same style as custodian information when hovering over bookings in the calendar view, resolving the feature request.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
shelf-docs Ignored Ignored Preview Aug 21, 2025 2:40pm

Co-authored-by: DonKoko <7840007+DonKoko@users.noreply.github.com>
@DonKoko DonKoko marked this pull request as ready for review August 21, 2025 07:24
- Add missing 'border' class to HoverCardTrigger in advanced-asset-columns.tsx to fix issue where only top border was visible
- Remove 'divide-y' class from PopoverContent to prevent styling conflicts
- Improve EventCardContent layout by arranging custodian and creator info side by side
- Add creator data to asset booking queries in data.server.ts and use-asset-availability-data.ts
- Clean up whitespace and formatting in assets-list.tsx
@DonKoko
Copy link
Copy Markdown
Contributor

DonKoko commented Aug 21, 2025

@copilot had to fix some issues. Please check the commits i did.

Copy link
Copy Markdown
Contributor

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 PR adds creator information to calendar booking cards to match the existing custodian display pattern, resolving issue #1978. The implementation follows consistent styling and data structure patterns already established in the codebase.

  • Enhanced calendar event cards to display booking creator information alongside custodian details
  • Updated booking queries and data structures to include creator data throughout the system
  • Maintained consistent UI patterns using the existing TeamMemberBadge component

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/routes/_layout+/calendar.tsx Added creator field to CalendarExtendedProps type definition
app/modules/booking/service.server.ts Updated getBookingsForCalendar to include creator data in query and response
app/modules/asset/types.ts Added optional creator field to AdvancedAssetBooking type
app/modules/asset/query.server.ts Enhanced SQL query to include creator data with proper joins
app/modules/asset/data.server.ts Added creator selection to booking include in simple mode loader
app/components/calendar/event-card.tsx Added "Created by" section to event card content with TeamMemberBadge
app/components/assets/assets-index/use-asset-availability-data.ts Updated asset availability data to include creator information
app/components/assets/assets-index/assets-list.tsx Removed unnecessary empty line
app/components/assets/assets-index/advanced-asset-columns.tsx Added creator data to upcoming bookings popover

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

Comment thread app/components/assets/assets-index/use-asset-availability-data.ts
Comment thread app/components/assets/assets-index/advanced-asset-columns.tsx
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 21, 2025

@copilot had to fix some issues. Please check the commits i did.

I've reviewed your commits (7804ab0 and 35c5f4d) and they're excellent improvements:

Key fixes you made:

  • Layout enhancement: Changed custodian and creator info to display side-by-side with flex gap-5 for better UI
  • Border fix: Added missing border class to HoverCardTrigger to fix visibility issues
  • Data consistency: Updated use-asset-availability-data.ts to use proper booking object instead of raw b properties
  • Query completion: Added creator data to data.server.ts simple mode loader
  • Code cleanup: Removed styling conflicts and improved formatting

The side-by-side layout for custodian/creator is much more compact and user-friendly than the original stacked approach. The border fixes resolve visual issues with the hover cards, and using the typed booking object instead of raw properties improves code consistency.

Your changes address real usability and code quality issues that became apparent during testing. No further changes needed - the implementation is now complete and robust.

DonKoko and others added 3 commits August 21, 2025 16:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DonKoko DonKoko merged commit 880eee3 into main Aug 21, 2025
6 checks passed
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.

3 participants