9 Commits

Author SHA1 Message Date
3bd334f239 Integrate Azure Key Vault and refactor authentication
Updated the application to use Azure Key Vault for managing secrets, including the addition of a new `SurgeKeyVaultSecretManager` class. Modified configuration files to include `KeyVaultName` and removed sensitive `Jwt` sections for enhanced security.

Refactored `IAuthService` and `IUserRepository` to utilize DTOs instead of the `User` entity. Removed the `UserMap` class and updated the `UserRepository` to focus on DTOs for user management.

The `AuthService` class now communicates with an external API for authentication, and new classes for API requests and responses have been added. Updated project dependencies to support Azure Key Vault integration.
2025-04-24 16:32:26 -05:00
9703517974 Update configuration and mailing service functionality
- Added HTTP client configuration for SendGrid in Program.cs.
- Cleaned up appsettings files for development and production environments.
- Modified MailingService to use IHttpClientFactory for SendGrid.
- Enhanced NewMailings component with cancel functionality and confirmation dialog.
- Updated project dependencies in .csproj and created package-lock.json.
2025-04-09 11:57:32 -05:00
f5b1fe6397 Update mailing and target management features
- Added new methods for creating mailings and testing targets.
- Updated configuration files for JWT settings and connection strings.
- Introduced new DTOs for target column updates and test targets.
- Enhanced MailingStatistic with a new SentDate property.
- Created new components for handling cancelled mailings and target samples.
- Refactored authentication in Login.tsx to use fetch API.
- Updated various services and repositories to support new functionalities.
2025-04-07 12:13:44 -05:00
26abe9e028 Add mailing features and update notification system
- Updated `MailingsController` with new endpoints for name availability and next available name.
- Modified existing methods to accept optional date parameters.
- Introduced `TestMailingDto` for testing mailings with email addresses.
- Updated `IMailingRepository` and `IMailingService` interfaces for new methods.
- Enhanced `MailingRepository` and `MailingService` to support new logic for testing and sending emails.
- Updated `appsettings.json` with new SendGrid settings and default unsubscribe URL.
- Modified `MailingEdit` component to fetch next available name and handle test mailings.
- Added search filters for start and end dates in `CompletedMailings` component.
- Included `react-toastify` for notifications in `package.json` and `package-lock.json`.
- Updated `App` component to include `ToastContainer` for displaying notifications.
2025-03-30 08:32:57 -05:00
f4ac033c70 Refactor mailing and target sample management features
- Updated `UpdateMailing` to convert dates from UTC to local time.
- Renamed `GetTargetSample` to `TestTargetAsync` in `TargetsController`.
- Added `ConnectionStringTemplate` to `appsettings.Development.json`.
- Introduced `TestTargetSql` in `appsettings.json` for SQL queries.
- Created a new `TargetSample` class for target sample data structure.
- Updated `ITargetRepository` and `ITargetService` interfaces for new method signatures.
- Implemented `TestTargetAsync` in `TargetRepository` for sample data retrieval.
- Enhanced `MailingEdit.tsx` with new imports and validation for date fields.
- Added `MailingView` component for displaying mailing details.
- Introduced `ScheduleMailings` component for managing scheduled mailings.
- Updated `TargetSampleViewer` to accommodate new data structure.
- Modified routing in `App.tsx` to include scheduled mailings.
- Adjusted `NewMailings` component to manage mailing updates and removals.
2025-03-23 19:15:17 -05:00
a5fd034a31 Add mailing functionality and improve authentication
- Implemented Logout and RefreshToken methods in AuthenticationController.
- Added IMailingService and IMailingRepository to Program.cs.
- Updated project structure in Surge365.MassEmailReact.API.csproj.
- Modified API host address and endpoints in Server.http.
- Introduced AuthAppCode in appsettings.json for context distinction.
- Changed GenerateTokens method to async in IAuthService.
- Initialized string properties in User.cs to avoid null values.
- Added new Mailing mapping in DapperConfiguration.cs.
- Created MailingsController for handling mailing operations.
- Developed Mailing, MailingUpdateDto, IMailingService, and IMailingRepository classes.
- Updated frontend with MailingEdit and NewMailings components.
- Enhanced authentication handling in AuthCheck.tsx and AuthContext.tsx.
- Introduced ProtectedPageWrapper for route protection based on roles.
- Added EmailList component for email input validation.
- Updated utils.ts for token and cookie management functions.
- Modified vite.config.ts for new HTTPS certificate name.
- Updated CHANGELOG.md to reflect recent changes.
2025-03-21 07:38:46 -05:00
4180e50c9c Refactor authentication and implement target management
- Updated `AuthenticationController` to return user data instead of token.
- Added `ITargetService` and `ITargetRepository` to `Program.cs`.
- Enhanced `appsettings.json` with connection timeout and security notes.
- Modified `IAuthService` to reflect new authentication response structure.
- Implemented connection retry mechanism in `DataAccess.cs`.
- Refactored UI components to use MUI styling in `Layout.tsx`, `App.tsx`, and others.
- Created new files for target management, including `TargetsController`, `TargetUpdateDto`, and related services.
- Added `TargetEdit` modal for editing target details and `LineChartSample` for data visualization.
- Updated package dependencies in `package-lock.json` and project file.
2025-02-26 17:42:40 -06:00
b3f266f9a8 Enhance authentication features and refactor codebase
Updated `AuthenticationController` with new methods for authentication, token refresh, and password recovery. Improved error handling and response structure.

Refactored dependency injection in `Program.cs` and added JWT settings in `appsettings.json`. Removed unused `Class1.cs` files.

Introduced new DTOs for authentication requests and updated `IAuthService` and `IUserRepository` interfaces. Enhanced `User` class and added `AuthResult` enum for standardized responses.

Expanded `DataAccess` for better database operations and updated `UserRepository` and `AuthService` to implement new authentication logic.

Front-end changes include renaming variables for consistency and updating the `ForgotPasswordModal` and `Login.tsx` components to use usernames instead of email addresses.

Updated API proxy path in `vite.config.ts` and ensured proper typing for `API_BASE_URL` in global TypeScript definitions.
2025-02-22 18:45:37 -06:00
88bcac382c Refactor project structure and update dependencies
- Updated project setup to use Vite for React application.
- Removed unnecessary files and simplified configurations.
- Enhanced authentication and routing in the application.
- Improved code quality with ESLint and updated styles.
- Added new components for better user experience, including a password recovery modal.
- Updated documentation for clearer setup instructions.
2025-02-20 09:55:56 -06:00