feat(reports): record deaf attendance separately for sign-language congregations - #5320
feat(reports): record deaf attendance separately for sign-language congregations#5320ux-git wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (23)
WalkthroughChangesDeaf attendance recording was added to settings, attendance entry, centralized statistics, monthly views, and S-88 PDF exports. Export columns now use captions, and PDF hyphenation behavior was customized. Deaf attendance feature
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant WeekBox
participant AttendanceService
participant Database
User->>WeekBox: Enter hearing or deaf attendance values
WeekBox->>AttendanceService: Save structured values
AttendanceService->>Database: Persist attendance fields
AttendanceService-->>WeekBox: Updated attendance state
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ 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 |
react-pdf hyphenates with English patterns by default, so narrow table cells rendered "Total atten-dance" and "Average At-tendance Each Week" on the S-88. Words below 14 characters now wrap whole. Longer ones are still offered break points, but only at vowel-consonant boundaries, so translations with long compounds keep fitting their cell instead of overflowing it.
e98e2a1 to
19a422c
Compare
…ngregations Sign-language congregations need to report both the total attendance and the number of deaf attendees. A new congregation setting adds "Deaf" and "Hearing" inputs to the attendance record, and switches the S-88 export to show the total in the left block and the deaf count in the right block. Stored counts keep their meaning: present/online remain the totals, the new optional present_deaf/online_deaf hold the deaf share, so every existing report keeps working without migration. Also replaces the duplicated per-meeting attendance math in the export, the monthly history and the monthly summary with a single shared service helper.
19a422c to
a9287e0
Compare
|
|
Tick the box to add this pull request to the merge queue (same as
|



Description
Sign-language congregations count attendance differently: they record both the number of deaf attendees and the total attendance (deaf + hearing). They also use the S-88 differently — the left block holds the total, the right block holds the deaf count for the same service year.
A new congregation setting Record deaf attendance separately (next to Record online meeting attendance, so it also shows up in the attendance page quick settings) enables this. When it is on:
Data model
present/onlinekeep their current meaning — the totals, deaf included. The deaf share is stored in the new optionalpresent_deaf/online_deaf, and the hearing count is derived for the input only. That means no migration, no API contract change (theweek_*objects are already encrypted as a whole), and every existing consumer — S-1 report, dashboard, yearly averages — keeps working untouched. Turning the setting off leaves the totals correct; turning it back on restores the split.There is no second S-88 template. The export payload's
yearsbecamecolumns, so the deaf variant is the same form at the same size with a different column caption.Backend
The API needs to accept the new congregation setting
cong_settings.attendance_deaf_record— same shape and handling as the existingattendance_online_record([{ type, value, updatedAt, _deleted }], one entry per data view, encryptedsharedon the client). If the congregation settings document uses a strict schema or an allowlist, the key must be added there, otherwise the setting is dropped on sync. Attendance data needs nothing: the deaf counts live inside the already-encryptedweek_1..week_5objects.Drive-by
Two things came out of the work and are kept in separate commits:
fix(ui)— react-pdf hyphenates with English patterns by default, which renderedTotal atten-danceandAverage At-tendance Each Weekin the S-88 header. Words below 14 characters now wrap whole; longer ones still get break points, but only at vowel-consonant boundaries, so long compounds in other languages keep fitting their cell instead of overflowing it. This applies to every exported form.meetingAttendanceGetStatshelper (net −366 lines).Fixes #4695
Type of change
Testing
Verified in the running app: all four states of the attendance record (both settings off / online only / deaf only / both), desktop and mobile, light and dark theme, language-group boxes, read-only rendering for users without settings rights, and the round trip of turning the setting off after deaf counts were recorded. Both S-88 variants and the S-21 were exported and checked, including a stress test with deliberately long German strings.
Not covered: the S-140 / S-89 exports, which need imported meeting sources, and the sync round trip against the API.
Checklist: