Changelog


2024-09-28 - Add support for web push and WhatsApp notifications
- Introduced web push and WhatsApp notifications.

2024-08-12 - Fix foreign key and update nullable properties
- Updated DynamicPriceItemState and ItemState classes to allow nullable properties. Enhanced IDynamicPriceItemStateService and DynamicPriceItemStateService with new methods and return types.
-Improved NotifierBackgroundWorker with null checks and error handling. -Updated ApplicationDbContextModelSnapshot to reflect schema changes. Incremented assembly versions. Uncommented PreBuild target in csproj.
- Added migration to fix foreign key constraints. Updated changelog with recent changes.

2024-08-12 - Add dynamic pricing functionality
- Introduced dynamic pricing to highlight items with dynamic prices and track price changes. Key changes include:

- Added new properties to `WorkerItem`, `AppUser`, and `ItemState` classes.
- Added extension methods for price conversion and dynamic price checking.
- Updated repository and service interfaces to support dynamic pricing.
- Implemented dynamic price notifications in background workers.
- Updated database schema with new migration for dynamic price item states.
- Added new DTOs, services, and mappings for dynamic pricing.
- Updated front-end to display dynamic price icons and notifications.
- Added localization strings for dynamic price notifications.

2024-07-31 - Add email read tracking and refactor email sending
- Added `Read` property to `ItemStateResponseDto` and `ItemState` classes.
- Introduced `SetAsReadAsync` method in `IItemStateService` and implemented it in `ItemStateService`.
- Created `ISmtpSenderService` interface and `SmtpSenderService` class for handling SMTP email sending.
- Refactored `SmtpEmailSender` to use `ISmtpSenderService`.
- Updated `NotifierBackgroundWorker` to use `ISmtpSenderService` and support HTML/text templates.
- Added migration `AddEmailTracking` to include `Read` column in `ItemStates` table.
- Updated `ApplicationDbContextModelSnapshot` for the new `Read` column.
- Added new text email templates and updated `IEmailTemplateProvider` and `EmailTemplateProvider`.
- Modified `TooGoodToGoNotifier.Resources.csproj` to embed new text templates.
- Updated `SmtpClient` to include a tracking image in the email body.
- Added `TrackingController` to handle email read tracking and return a tracking image.
- Registered `ISmtpSenderService` in `ServiceCollectionExtensions`.

2024-07-31 - Add notification properties and update database schema
- Added `Mail`, `Signal`, and `Data` properties to `ItemStateRequestDto` and `ItemStateResponseDto`.
- Imported `TooGoodToGoNotifier.Core.Entities` in `ItemStateResponseDto.cs`.
- Added `AppUser` property to `ItemStateResponseDto`.
- Added `Data` property to `ItemState` entity.
- Imported `Newtonsoft.Json` in `NotifierBackgroundWorker.cs`.
- Serialized `workItem` to JSON and assigned it to `Data` property in `NotifierBackgroundWorker`.
- Created migrations `20240731163715_AddWorkItemData` and `20240731173333_FixQuery` to update `ItemStates` table.
- Updated `ApplicationDbContextModelSnapshot` to reflect new `Data` column and updated seed data.
- Corrected project entry for `TooGoodToGoNotifier.Smtp` in `TooGoodToGoNotifier.sln`.
- Updated assembly version and file version in `AssemblyInfo.cs`.
- Updated `revision_2024_3.txt` with new revision number.
- Commented out `PreBuild` target in `TooGoodToGoNotifier.csproj`.
- Added `RenderSectionAsync` for styles and "Logs" link in `_Layout.cshtml`.

2024-07-30 - Enhance markdown processing and update version info
- Updated `HomeController.cs` to use `MarkdownPipeline` for better markdown to HTML conversion.
- Incremented `AssemblyVersion` and `AssemblyFileVersion` in `AssemblyInfo.cs`.
- Enhanced `AssemblyInfo.tt` with new functions and improved changelog formatting.
- Updated `revision_2024_3.txt` with the new revision number.
- Improved `Changelog.cshtml` with better CSS for `pre` and `code` elements.
- Reformatted `changelog.md` for better readability using collapsible sections.

2024-07-30 - Update version, improve changelog formatting
- Incremented assembly and file version in `AssemblyInfo.cs` to `2024.3.212.173`.
- Modified Git log command in `AssemblyInfo.tt` to include date in short format.
- Updated revision number in `revision_2024_3.txt` to `173`.
- Added line break in `Changelog.cshtml` for better display.
- Reformatted `changelog.md` to use dates instead of commit hashes and added new entries.

2024-07-30 - Refactor email sending and add changelog feature
- Removed SendGridEmailSender and dependencies.
- Updated SmtpEmailSender to use ISmtpClient interface.
- Added TooGoodToGoNotifier.Smtp project with ISmtpClient.
- Updated TooGoodToGoNotifier.Core.csproj for new dependencies.
- Included TooGoodToGoNotifier.Smtp in solution file.
- Added Changelog action and view in HomeController.
- Updated HtmlHelperExtensions for changelog link.
- Enhanced AssemblyInfo.tt to generate changelog.
- Updated Dockerfile for TooGoodToGoNotifier.Smtp.
- Included Markdig package for markdown processing.
- Updated assembly and file versions in AssemblyInfo.cs.
- Added changelog.md for storing changelog content.
- Updated revision_2024_3.txt with new revision number.

2024-07-23 - Enhanced user management and API security
This commit introduces significant enhancements across the application, focusing on improving user management, API security, and overall application robustness. Key changes include:

- Initialization of data models in `Favorites.cs` to prevent null references, simplifying null checks across the application.
- `ItemStateService.cs` now integrates user management via `UserManager<AppUser>` and refines item sent checks with user-specific quiet hours, enhancing notification logic.
- Updated project dependencies in `.csproj` files for better performance and new features.
- Expanded user roles and introduced quiet hours handling, removing conditional compilation in quiet hours checks, indicating a move towards more dynamic user management and notification settings.
- Added database migration for new user roles, supporting the application's evolving authorization strategy.
- Updated user information and roles in `ApplicationDbContextModelSnapshot.cs`, and enhanced localization and API management in the admin and account management areas.
- Introduced new classes and namespaces for expanded identity management capabilities and improved API documentation with Swagger enhancements.
- Shifted towards a more API-focused approach with changes in service registration and authentication schemes, including enhanced security settings and middleware for API access control.
- UI and styling updates for a better user experience, alongside package updates for improved application performance and reliability.

These updates collectively aim to make the application more secure, user-friendly, and maintainable, with a strong focus on API security and user management.

2024-07-20 - Added new features and updated existing ones across multiple files
- Added new `Location` property to `WorkerItem` class and `GetSubName` method to `TooGoodToGoExtensions` class. Introduced `AddressPart` enum and `GetAddressPart` method to split and return address parts. Updated `IsItemAlreadySent` method to check if item was sent within last 24 hours. Updated and added new strings in `Messages` resource files. Updated `AssemblyVersion` and `AssemblyFileVersion` in `AssemblyInfo.cs`. Added `PreBuild` target to `TooGoodToGoNotifier.csproj` for 'Debug' configuration. Updated `Index.cshtml` and `LoadMoreStores.cshtml` to use new methods. Updated `NotifierBackgroundWorker.cs` and `TooGoodToGoBackgroundWorker.cs` for enhanced notification and culture setting.

2024-07-20 - Updated services, UI, and configuration for enhanced functionality
- Updated various files to enhance functionality and user experience. `ItemStateService.cs` now includes a method for time comparison and `HomeController.cs` has a new method for language selection. Cookie options in `ExternalLogin.cshtml.cs`, `Login.cshtml.cs`, and `Language.cshtml.cs` have been modified for better security and longevity. `HtmlHelperExtensions.cs` and `ServiceCollectionExtensions.cs` have new methods for version retrieval and service addition respectively. `Startup.cs` now uses method chaining for service addition and localization. Assembly information and versioning are now generated using `AssemblyInfo.cs` and `AssemblyInfo.tt`. The project file `TooGoodToGoNotifier.csproj` has been updated for assembly information generation and CSS bundling. UI changes include a language selection dropdown and version display in `_Layout.cshtml`, with corresponding CSS in `site.css` and JS in `site.js` for handling language selection.

2024-07-11 - Enhanced task processing and email notifications
This commit introduces significant enhancements across the application, focusing on improving background task processing, email notification functionalities, and overall system robustness. Key changes include:

- Added `DequeueForAllUserAsync` in `BackgroundTaskQueue` for efficient batch processing of tasks per user.
- Introduced new properties (`Image`, `Email`, `Signal`) in `WorkerItem` and entity classes to support detailed tracking and handling of work items and notification preferences.
- Implemented `SendGridEmailSender` and `SmtpEmailSender` classes, leveraging `Mail.dll` and `SendGrid` packages for advanced email sending capabilities.
- Updated the `IBackgroundTaskQueue` interface to include the new asynchronous dequeue method.
- Enhanced `NotifierBackgroundWorker` and `TooGoodToGoBackgroundWorker` to utilize new features for improved task processing and notification delivery.
- Conducted a database migration (`20240710225000_AddSmtpSender`) to add `Email` and `Signal` columns, facilitating the tracking of notification delivery methods.
- Updated user entity properties (`ConcurrencyStamp`, `SecurityStamp`, `PasswordHash`) in `ApplicationDbContextModelSnapshot.cs`, indicating user data updates or migrations.
- Added email notification templates (`Notification.html`, `Notifications-EN.html`, `Notifications-NL.html`) and introduced `IEmailTemplateProvider` for managing these templates as embedded resources.
- Expanded localization support with updated resource files and modifications in `TooGoodToGoNotifier.Resources.csproj`.
- Streamlined service registration in `Startup.cs` and `ServiceCollectionExtensions.cs`, enhancing the application's email sending and template handling capabilities.
- Removed `<DockerDefaultTargetOS>` from `TooGoodToGoNotifier.csproj` as part of project configuration updates.

These updates collectively enhance the application's efficiency in processing tasks, sending notifications, and managing user preferences, while also improving code maintainability and project structure.

2024-07-08 - Enhancements and refactors for quiet hours
This commit introduces significant enhancements and refactors related to the "Quiet Hours" feature across the application. Key changes include:

- Added and updated properties in the `AppUser` entity to support quiet hours functionality, including `UseQuietHours`, `QuietHoursStart`, and `QuietHoursEnd`.
- Improved localization support in extension methods and added new resource entries for better internationalization, particularly for the quiet hours feature.
- Implemented quiet hours logic in `NotifierBackgroundWorker` to prevent notifications during specified times and added logging integration.
- Conducted database migrations to add and update quiet hours fields in the `AspNetUsers` table, aligning the database schema with the new feature requirements.
- Refactored the quiet hours feature, including updates to the database schema, entity models, and UI text for enhanced functionality and user experience.
- Enhanced the Notifications page with new features for managing notification preferences and quiet hours, including UI adjustments for better usability.
- Streamlined the login process by changing the persistence of the external login session and performed code cleanup to remove unnecessary references.
- Updated the project file to include a new package reference for view features enhancements and introduced an HtmlHelperExtensions class for future HTML helper functionalities.
- Made various UI improvements across the application, including font size adjustments, icon replacements, and layout changes for consistency and improved responsiveness.
- Expanded administrative functionalities with a new admin dropdown menu for user and role management and added a logout feature for scenarios involving impersonation.

These updates collectively improve the application's functionality related to quiet hours, enhance internationalization support, streamline the login process, and refine the user interface for a better overall user experience.

2024-07-08 - Add admin pages

2024-07-08 - Add font awesome

2024-07-07 - Shift from WhatsApp to Signal for notifications
This commit represents a significant overhaul of the application's notification system, transitioning from WhatsApp to Signal. Key changes include:

- WorkerItem.cs and AppUser.cs have been updated to replace WhatsApp properties and settings with Signal equivalents.
- The ISignalNotificationService interface and SignalNotificationService.cs have been updated to support Signal's messaging capabilities, including sending notifications to multiple phone numbers and improving HTTP request logic.
- Modifications in ItemStateService.cs and NotifierBackgroundWorker.cs enhance logic for item sending checks and user culture settings for localized notifications.
- TooGoodToGoBackgroundWorker.cs, ApplicationDbContextModelSnapshot.cs, and various resource files have been adjusted to align with the shift to Signal, including updates to database models and localization messages.
- Index.cshtml.cs and Notifications.cshtml.cs pages now utilize Signal for verification codes and user notification preferences management.
- A new migration, `RemoveWhatsappAndAddSignal`, updates the database schema to reflect these changes, including renaming columns and updating user records for data integrity.
- Additional updates include Dockerfile and TooGoodToGoExtensions.cs enhancements, privacy policy and cookie consent adjustments, and styling and layout improvements to modernize the user interface.

Overall, this commit marks a strategic pivot to Signal for messaging support, ensuring the application remains current with messaging trends and user preferences.

2024-07-07 - Refactor and enhance app functionality
- Introduced methods for user ID retrieval across client services.
- Added `ItemStates` property in `AppUser` for managing item states.
- Removed WhatsApp notification service and related configurations.
- Implemented mapping for `ItemState` DTOs and added new DBSet.
- Simplified using directives and updated project structure.
- Enhanced localization by removing and adding resource files.
- Expanded service registration for notifications and background tasks.
- Updated UI with new methods, improved navigation, and dynamic JavaScript.
- Introduced background task queue and services for notifications.
- Added migrations for database schema updates related to item states.
- Created and updated resource files for multilingual support.
- Implemented Bootstrap toast scripting for enhanced UI notifications.

2024-07-06 - Initial commit

2024-07-06 - Add .gitattributes, .gitignore, and README.md.