Skip to content

Conversation

@bwl21
Copy link
Owner

@bwl21 bwl21 commented Dec 13, 2025

Summary

This PR adds bulk operations functionality, completely overhauls the appointment details modal, and fixes tag filtering to work client-side.

Major Changes

1. Bulk Operations Widget

  • Added reusable BulkActionsWidget component for bulk operations across admin panels
  • Implemented checkbox selection in AdminTable with selectable prop
  • Created useBulkAppointmentActions composable for appointment extension
  • Integrated bulk appointment extension (3-24 months) in ExpiringAppointmentsAdmin

2. Appointment Details Modal Overhaul

  • Complete modal redesign with card-based layout
  • Added fetchAppointmentSeries() API function for full appointment data
  • Display all appointment fields: subtitle, address, link, calendar color, description, image
  • Fixed series repetition display using repeatId (DAILY=1, WEEKLY=7, etc.)
  • Collapsible exceptions list (show 10, expand for all)
  • Fixed data structure issues:
    • Image: Use imageUrl from Image object
    • Description: Use correct description field (not deprecated note)
    • Additionals: Handle array of objects with date field
    • Series ID: Use base.id for row-key

3. Tag Filtering Improvements

  • Changed to client-side filtering (no API reload on tag change)
  • Load all appointments once, filter locally in applyFilters()
  • Fixed dropdown positioning to appear directly under widget
  • Dropdown follows widget on scroll instead of closing
  • Fixed watch initialization order to prevent errors

Technical Improvements

  • Performance: Reduced API calls, instant tag filtering
  • UX: Better modal layout, smooth filtering, improved dropdown behavior
  • Code Quality: Reusable components, TypeScript interfaces, error handling
  • Reactivity: Fixed Set reactivity issues in AdminTable

Testing

  • Tested with appointments containing many exceptions (29+)
  • Tested with appointments containing additional dates (21+)
  • Tag filtering tested with multiple tag combinations
  • Bulk extension tested with various month selections
  • Dropdown positioning tested with scroll and resize

Files Changed

  • src/components/common/BulkActionsWidget.vue (new)
  • src/components/common/AdminTable.vue
  • src/components/common/TagMultiSelect.vue
  • src/components/expiring-appointments/ExpiringAppointmentsAdmin.vue
  • src/composables/useBulkAppointmentActions.ts (new)
  • src/composables/useExpiringAppointments.ts
  • src/services/churchtools.ts

Documentation

See docs/DEVELOPMENT_SESSION_2025-12-12_Appointment_Details_Modal.md for detailed session notes.

Breaking Changes

None

Next Steps

  • Consider removing debug logs for production
  • Add bulk operations to other admin panels
  • Add more bulk actions (delete, duplicate, etc.)

bwl21 and others added 14 commits December 3, 2025 20:17
- Enable text wrapping for description cells
- Set max-width and word-break properties
- Add specific styling for description cells
- Update table container scrolling behavior
- Add more intuitive date range options (e.g., '6 Monate', '12 Monate')
- Extend the maximum range to 18 months
- Bump version to 1.0.10
- Display tags as styled badges with proper colors
- Add tooltips showing tag descriptions on hover
- Sort tags alphabetically within each cell
- Fix tag data processing in API response
- Improve tag styling to match design system
- Fix time filter by properly handling cached data
- Separate data fetching from filtering logic
- Improve tag filtering integration
- Ensure proper reactivity for all filters
- Create reusable TagMultiSelect component with modern chip design
- Match tag colors with existing table implementation
- Add select all/none functionality
- Improve dropdown positioning and z-index handling
- Add responsive design for better mobile experience
- Include proper TypeScript types and documentation
- Updated tag display in appointment details modal to match table styling
- Fixed background and text color application for tags
- Ensured consistent tag appearance across the application
- Resolved issue with color codes being displayed as text
- Add BulkActionsWidget component for reusable bulk operations UI
- Add selection support to AdminTable with checkboxes
- Implement bulk appointment extension functionality
- Fix checkbox reactivity by creating new Set instances
- Normalize appointment data to use seriesId for proper selection
- Add useBulkAppointmentActions composable for bulk operations
- Update AutomaticGroupsAdmin with selection count display

Co-authored-by: Ona <no-reply@ona.com>
- Add fetchAppointmentSeries API function for complete series data
- Restructure modal with card-based layout for better organization
- Add all appointment fields: subtitle, address, link, calendar color
- Implement proper series repetition display using repeatId
- Add collapsible exceptions list for many items (show 10, expand all)
- Fix image display using imageUrl from Image object
- Fix description field (was using deprecated note field)
- Fix additionals structure (array of objects with date field)
- Add performance logging for API calls
- Improve date formatting and address display
- Add two-column responsive grid layout
- Separate cards for: details, series info, tags, description, image

Co-authored-by: Ona <no-reply@ona.com>
- Make tag filtering client-side only (no API reload on tag change)
- Load all appointments once, filter locally in applyFilters()
- Fix dropdown positioning with better scroll/resize handling
- Add debug logging for filter operations
- Fix watch initialization order to prevent 'before initialization' error
- Remove immediate: true from filter watch to avoid race condition

Co-authored-by: Ona <no-reply@ona.com>
…rovements

Co-authored-by: Ona <no-reply@ona.com>
- Fix useToast import (use showSuccess/showError/showWarning instead of showToast)
- Add type annotations for API responses in useBulkAppointmentActions
- Handle both AppointmentBase and AppointmentCalculated types in churchtools.ts
- Add proper type casting for additionals array mapping

Co-authored-by: Ona <no-reply@ona.com>
@bwl21 bwl21 merged commit 4f75014 into main Dec 13, 2025
1 check 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.

2 participants