19 Commits

Author SHA1 Message Date
0ff37e8999 feat: Implement automatic sermon archiving based on dates
Add intelligent auto-archiving system that automatically moves sermons to the "Previous Sermons" list when they are 1 day past their most recent date.

Features:
- Auto-archive logic that checks both primary and additional sermon dates
- Finds the most recent date across all dates for a sermon
- Archives sermon 1 day after the most recent date has passed
- Manual trigger via "Run Auto-Archive Now" button on admin page
- Automatic daily execution via scheduled cleanup task
- Clear admin UI with explanatory text and status messages
- Manual archive/unarchive functionality preserved

Implementation:
- Added getMostRecentSermonDate() helper to find latest date from primary and additional dates
- Added autoArchiveOldSermons() function to database utils
- Created /api/sermons/auto-archive endpoint for manual triggering
- Integrated into daily cleanup plugin schedule
- Updated admin UI with auto-archive button and status indicators
- Added unarchiveSermon() function for completeness

The system runs automatically every 24 hours and can be manually triggered by admins. Sermons are moved to the previous sermons dropdown on the home page exactly 1 day after their final presentation date, ensuring the main page always shows current and upcoming content while preserving access to past sermons.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 09:53:17 -05:00
66172e0baa Add sermon retention policy feature
Implemented a configurable retention policy system for sermons with automatic cleanup:
- Added settings table to store retention policy configuration
- Created API endpoints for getting/setting retention policy
- Added Database Settings section to admin page with retention options (forever, 1-10 years)
- Implemented manual cleanup endpoint for on-demand deletion
- Added automated daily cleanup task via Nitro plugin
- Sermons are deleted based on their date field according to the retention policy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 14:07:14 -05:00
a505edcae7 created by for sermons 2025-10-12 01:01:01 -04:00
773ea92f5d security & footer fix 2025-10-12 00:18:01 -04:00
329becfb08 security improvements 2025-10-07 13:39:53 -04:00
27fcedfcd5 Songs & dates 2025-10-02 08:59:05 -04:00
4daea87cd1 Add unarchive functionality and show archived status in admin dropdown 2025-10-02 00:05:45 -04:00
4b47f56b30 Add archive functionality: database schema, API endpoint, and helper functions 2025-10-01 23:49:44 -04:00
4b2ae9482b Add complete edit functionality for sermons with update API endpoint and enhanced Bible reference management 2025-10-01 23:00:51 -04:00
fbb0ec8469 Actually remove the conflicting [id].delete.ts file from git 2025-10-01 22:38:02 -04:00
af72305c80 Fix route conflict: move delete endpoint to /api/sermons/delete/[id] to avoid conflict with [slug].get 2025-10-01 22:33:39 -04:00
bd0539118c Add sermon management functionality with delete capability to admin page 2025-10-01 22:29:50 -04:00
1b282c05fe Complete sermon itinerary application with Nuxt 3, SQLite, authentication, and Docker deployment 2025-10-01 22:15:01 -04:00
793f395795 Starting over 2025-10-01 22:00:32 -04:00
Ryderjj89
eb7d2b6e8c fix: Define generateSlug locally in server/api/sermons/index.post.ts 2025-10-01 19:13:00 -04:00
Ryderjj89
c83cf7dd82 fix: Rename database utility to .server.ts and update imports 2025-10-01 19:07:02 -04:00
Ryderjj89
c818d43f4e Fix logo size, improve CSS styling with universal selector, and add error handling 2025-09-29 19:43:53 -04:00
Ryderjj89
eb21825f77 Fix issues: reduce logo size, improve CSS styling, fix API error handling 2025-09-29 19:36:05 -04:00
Ryderjj89
c033410c2e Complete sermon management system with Nuxt 4, authentication, SQLite database, QR codes, and Docker deployment 2025-09-29 18:59:31 -04:00