Add feature to automatically delete old sales data for legal compliance

Implements a data purge system, scheduler, and API endpoints for stats and manual execution.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/c3a86207-4ee0-47f9-8062-2dbbae696290.jpg
This commit is contained in:
michaelschal committed 2025-07-09 20:04:18 +00:00
1 parent 686512516d
commit 7404dc6443
5 files changed
+316 -1

No files matched your search

+12 -1
View File
@@ -41,6 +41,8 @@ Preferred communication style: Simple, everyday language.
5. **Sales History**: Complete transaction history with date filtering and search
6. **Data Export**: CSV export functionality for regulatory reporting
7. **Role-Based Permissions**: Different access levels for Admin, Manager, and Employee roles
8. **Automated Data Purge**: Regulatory compliance with automatic deletion of sales data older than 19 months
9. **Backup & Recovery**: Complete database backup system with import/export capabilities
### Authentication & Authorization
- **Administrators**: Full access to all features including user/store management
@@ -180,4 +182,13 @@ Preferred communication style: Simple, everyday language.
- ✅ Enhanced login page to hide default admin credentials (admin/admin123) once password is changed
- ✅ Added dynamic credential visibility based on whether default password is still in use
- ✅ Security warning displayed when default credentials are shown
- ✅ API endpoint to check default credential status with password hash comparison
- ✅ API endpoint to check default credential status with password hash comparison
### Automatic Data Purge System (January 9, 2025)
- ✅ Implemented automatic purge system for sales data older than 19 months
- ✅ Scheduled purge execution on the 1st of each month at 02:00 (Europe/Paris timezone)
- ✅ Manual purge execution available in administration panel
- ✅ Comprehensive statistics dashboard showing purge-eligible records
- ✅ Regulatory compliance with French fireworks sales data retention requirements
- ✅ Safety confirmation dialogs for manual purge operations
- ✅ Real-time monitoring of data retention status with visual indicators