Feature/mailcount #5

Merged
BothimTV merged 2 commits from feature/mailcount into main 2026-01-30 17:16:10 +00:00
BothimTV commented 2026-01-30 17:07:23 +00:00 (Migrated from github.com)

Summary by CodeRabbit

  • New Features
    • Added email count tracking for students. The admin mail interface now displays the total number of emails sent to each recipient in a new "Mails" column, enabling administrators to monitor communication history.

✏️ Tip: You can customize this high-level summary in your review settings.

<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added email count tracking for students. The admin mail interface now displays the total number of emails sent to each recipient in a new "Mails" column, enabling administrators to monitor communication history. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2026-01-30 17:07:29 +00:00 (Migrated from github.com)
📝 Walkthrough

Walkthrough

Adds mail count tracking to student records. Backend schema migrations add a mailcount field to the Schüler table with a default value of zero. Backend mail sending logic increments this counter for each real student (excluding test dummy). Frontend displays the mail count in a sortable table column and updates it locally after successful sends.

Changes

Cohort / File(s) Summary
Database Schema
backend/prisma/migrations/20260130101000_add_mailcount/migration.sql, backend/prisma/schema.prisma
Migration and schema model updated to add mailcount integer field with default value of 0 to Schüler table.
Backend Mail Counter
backend/src/routes/mail/POST.ts
Added logic to increment mailcount in database after sending mail to each student (excluding test student), with error handling that logs failures without interrupting the send loop.
Frontend Display & State
frontend/src/pages/verwaltung/mail.vue
Added mailcount field to Schueler interface, renders new "Mails" table column, initializes counter for test entries, and propagates local updates to mailcount after successful batch sends.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A counter for each letter sent so true,
Tracking mails through and through,
No more guessing who's been reached,
Database and frontend both now teach,
Rabbits hopping, numbers leap! 📬


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough Adds mail count tracking to student records. Backend schema migrations add a `mailcount` field to the Schüler table with a default value of zero. Backend mail sending logic increments this counter for each real student (excluding test dummy). Frontend displays the mail count in a sortable table column and updates it locally after successful sends. ## Changes |Cohort / File(s)|Summary| |---|---| |**Database Schema** <br> `backend/prisma/migrations/20260130101000_add_mailcount/migration.sql`, `backend/prisma/schema.prisma`|Migration and schema model updated to add `mailcount` integer field with default value of 0 to Schüler table.| |**Backend Mail Counter** <br> `backend/src/routes/mail/POST.ts`|Added logic to increment mailcount in database after sending mail to each student (excluding test student), with error handling that logs failures without interrupting the send loop.| |**Frontend Display & State** <br> `frontend/src/pages/verwaltung/mail.vue`|Added `mailcount` field to Schueler interface, renders new "Mails" table column, initializes counter for test entries, and propagates local updates to mailcount after successful batch sends.| ## Estimated code review effort 🎯 2 (Simple) | ⏱️ ~12 minutes ## Poem > 🐰 A counter for each letter sent so true, > Tracking mails through and through, > No more guessing who's been reached, > Database and frontend both now teach, > Rabbits hopping, numbers leap! 📬✨ </details> <!-- walkthrough_end --> <!-- tips_start --> --- > [!NOTE] > <details> > <summary>🎁 Summarized by CodeRabbit Free</summary> > > Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting <https://app.coderabbit.ai/login>. > > </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end --> <!-- internal state start --> <!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyRUDuki2VmgoBPSACMxTWpTTjx8XADo08SBAB8AKB2gIO8WgYBrMrQD0ABwpJmac83hEquePgyJzAJgAMXgGw+AIwAzMHhPj4A+mi0tFF28AA2TNgYuA5OLm4YSogAjkkcWgBEZVoAxBWQAIIAksRksjT0Ak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rAOF1xamWluSP7LgFawYiWkcG6ESaA67LLosG4uln4GpxfGxNdMDXZgXHmAsijizfDLBWastYtD1mbpNJl7cACsXdrwT20FoPQUAzDYXOAQB8Z80osDllwXgI12hiCViOKg8hFAqDUJoB94AoBMFYIoKIDNEBRAHllOgUQp4kBIFEAcwh9gQcgxASAl6AAsCKugAHYAAcJBiNeHEF0Lwl6fCGloDOHw/gyP+EvV0cQZHKMMCI9tM4XQgheHUGAe9j61iwdwPBmGSHMqTlQ+hzDz7NBAA=== --> <!-- internal state end -->
Commenting is not possible because the repository is archived.
No description provided.