498 Commits

Author SHA1 Message Date
barsa
fb682c4c44 Refactor Error Handling Utilities and Update Service Implementations
- Renamed `getErrorMessage` to `extractErrorMessage` for clarity and to avoid confusion with the domain's `getMessageForErrorCode`.
- Introduced a deprecation notice for `getErrorMessage` to maintain backward compatibility.
- Updated various services and controllers to utilize the new `extractErrorMessage` function, ensuring consistent error handling across the application.
- Enhanced error handling in the `BillingController`, `SubscriptionsService`, and other modules to improve maintainability and clarity in API responses.
2025-12-26 18:17:37 +09:00
barsa
934a87330d Refactor Billing Controller to Improve Error Handling
- Replaced inline error throwing with NotFoundException in the BillingController to enhance error handling and provide clearer responses for missing WHMCS client mappings.
- Updated multiple methods to ensure consistent error management across the controller, improving maintainability and clarity in API responses.
2025-12-26 17:36:06 +09:00
barsa
465a62a3e8 Refactor Domain Mappings and Update Import Paths
- Removed the domain mappings module, consolidating related types and schemas into the id-mappings feature.
- Updated import paths across the BFF to reflect the new structure, ensuring compliance with import hygiene rules.
- Cleaned up unused files and optimized the codebase for better maintainability and clarity.
2025-12-26 17:27:22 +09:00
barsa
a3dbd07183 Enhance ESLint Rules and Refactor Domain Imports
- Updated ESLint configuration to enforce stricter import rules for the @customer-portal/domain package, promoting better import hygiene and preventing deep imports.
- Refactored various files across the BFF and portal applications to comply with the new import rules, ensuring that only the appropriate modules are imported from the domain.
- Cleaned up unused imports and optimized code structure for improved maintainability and clarity.
- Updated documentation to reflect changes in import practices and domain structure.
2025-12-26 14:53:03 +09:00
barsa
fcc9bc247e Refactor Controllers to Utilize Zod DTOs for Parameter Validation
- Updated InvoicesController, NotificationsController, OrdersController, and SubscriptionsController to replace inline parameter validation with Zod DTOs, enhancing code maintainability and clarity.
- Introduced new DTOs for invoice and notification ID parameters, ensuring consistent validation across endpoints.
- Refactored service method calls to utilize the new DTOs, improving type safety and reducing potential errors.
- Cleaned up unused imports and optimized code structure for better readability.
2025-12-26 13:40:10 +09:00
barsa
a1be0ea527 Refactor Notification Handling and Update API Response Structure
- Improved notification handling in the NotificationsController to ensure consistent response formats across different endpoints.
- Updated response types to utilize ApiErrorResponse for error scenarios, enhancing clarity in API responses.
- Refactored service methods to streamline notification processing and improve maintainability.
- Cleaned up unused imports and optimized code structure for better readability.
2025-12-26 13:04:47 +09:00
barsa
10c8461661 Implement Zod DTOs for Request Validation and Enhance ESLint Rules
- Introduced Zod DTOs for request validation across multiple controllers, replacing inline validation with structured classes for improved maintainability and clarity.
- Updated ESLint configuration to enforce a rule against importing Zod directly in BFF controllers, promoting the use of shared domain schemas for request validation.
- Removed the SecureErrorMapperService to streamline the security module, as its functionality was deemed unnecessary.
- Enhanced various controllers to utilize the new DTOs, ensuring consistent validation and response handling across the application.
2025-12-26 13:04:15 +09:00
barsa
851207b401 Refactor WHMCS HTTP Client Error Handling and Update API Response Types
- Modified error handling in WhmcsHttpClientService to avoid exposing sensitive response bodies in error messages, logging snippets only in development mode.
- Updated NotificationsController and SubscriptionsController to use ApiSuccessAckResponse for success responses, enhancing type safety and consistency.
- Refactored various service methods to return more specific response types, including ApiSuccessResponse for subscription-related actions and improved SIM management services.
- Cleaned up unused interfaces and types in the SIM management services, streamlining the codebase and improving maintainability.
2025-12-26 10:30:09 +09:00
barsa
b1ff1e8fd3 Refactor GitHub Workflows to Consolidate Node and pnpm Setup
- Unified Node.js and pnpm setup across deploy, pr-checks, and security workflows by introducing a custom action for streamlined configuration.
- Removed redundant setup steps to enhance workflow clarity and maintainability.
- Updated security workflow to include concurrency control for better job management.
2025-12-25 19:01:00 +09:00
barsa
84a11f7efc Enhance GitHub Workflows and Refactor BFF Code
- Added support for push and workflow_dispatch events in pr-checks.yml to improve CI flexibility.
- Implemented concurrency control in workflows to manage job execution more effectively.
- Updated pnpm setup to include caching and specified version for consistency.
- Removed redundant logging code from BFF application to streamline signal handling and improve readability.
- Introduced CSRF_SECRET_KEY validation in environment configuration for production hardening.
- Refactored logo component to use a fallback mechanism for image loading, enhancing user experience.
- Added linting scripts to package.json for improved code quality checks.
2025-12-25 18:34:45 +09:00
barsa
9b2ce83229 Refactor Environment Configuration and Update Script for BFF
- Updated app.config.ts to use process.cwd() for resolving environment file paths, improving compatibility with pnpm.
- Replaced ensure_env function with check_app_env in manage.sh to verify the existence of required environment files for BFF and optional files for Portal, enhancing error handling and user guidance.
2025-12-25 18:17:40 +09:00
barsa
8195e828e4 Update TypeScript Environment and Refactor Salesforce Mapper Logic
- Updated the import path in next-env.d.ts to reference the development types directory.
- Refactored the mapSimActivationFee function in the Salesforce mapper to remove reliance on Is_Default__c and Auto_Add__c fields, simplifying the logic for activation fees and handling default status through service fallback.
2025-12-25 17:55:44 +09:00
tema
827e23c9c6 Merge branch 'main' of https://github.com/NTumurbars/customer-portal 2025-12-25 17:51:13 +09:00
tema
f775a62c64 Update pnpm-lock.yaml and Refactor BFF Order Management
- Updated pnpm-lock.yaml to standardize quotes and improve consistency across dependencies.
- Added @nestjs/swagger and swagger-ui-express to the BFF package.json for enhanced API documentation.
- Refactored notifications service to utilize Prisma types for better type safety.
- Removed orders controller, DTO, and orchestrator service to streamline order management functionality.
- Enhanced next.config.mjs to support API proxying in development, improving local development experience.
2025-12-25 17:51:02 +09:00
NTumurbars
b8da286fce
Merge pull request #42 from NTumurbars/Homepage
Homepage small fixes
2025-12-25 17:31:20 +09:00
barsa
9b1e93b7cb Refactor Salesforce Query Logging and Error Handling
- Removed detailed logging of Salesforce query execution to streamline the process.
- Simplified error handling by logging only the error message instead of the full context and SOQL query.
- Enhanced readability and maintainability of the BaseServicesService class by reducing unnecessary log statements.
2025-12-25 17:30:39 +09:00
barsa
1b944f57aa Update Configuration Files and Refactor Code Structure
- Adjusted .prettierrc to ensure consistent formatting with a newline at the end of the file.
- Reformatted eslint.config.mjs for improved readability by aligning array elements.
- Updated pnpm-lock.yaml to use single quotes for consistency across dependencies.
- Simplified worktree setup in .cursor/worktrees.json for cleaner configuration.
- Enhanced documentation in .cursor/plans to clarify architecture refactoring.
- Refactored various service files for improved readability and maintainability, including rate-limiting and auth services.
- Updated imports and exports across multiple files for consistency and clarity.
- Improved error handling and logging in service methods to enhance debugging capabilities.
- Streamlined utility functions for better performance and maintainability across the domain packages.
2025-12-25 17:30:02 +09:00
NTumurbars
87766fb1d5
Merge pull request #41 from NTumurbars/Homepage
Homepage
2025-12-25 16:02:53 +09:00
barsa
75dc6ec15d Refactor Linting Configuration and Update GitHub Workflows
- Updated linting configuration to use 'eslint --fix' for automatic code formatting on staged files.
- Removed explicit version specification for pnpm in GitHub workflows to allow for flexibility in version management.
- Enhanced opportunity resolution service with locking mechanism to prevent race conditions during opportunity creation.
- Simplified Salesforce account service by querying the auto-generated account number instead of generating it manually.
- Improved cancellation date handling in internet cancellation service to avoid timezone issues.
2025-12-25 16:01:02 +09:00
barsa
a688121a16 Update Cache Documentation to Reflect Safety TTL Implementation
- Revised README and system overview documentation to clarify the introduction of a 12-hour safety TTL for cache invalidation alongside CDC events.
- Enhanced explanations regarding the caching strategy for services, emphasizing the importance of the safety TTL in maintaining data freshness and self-healing capabilities.
- Updated comments in the OrdersCacheService to align with the new caching approach, ensuring consistency across documentation and code.
2025-12-25 15:50:41 +09:00
barsa
0f8435e6bd Update Documentation and Refactor Service Structure
- Revised README and documentation links to reflect updated paths and improve clarity on service offerings.
- Refactored service components to enhance organization and maintainability, including updates to the Internet and SIM offerings.
- Improved user navigation and experience in service-related views by streamlining component structures and enhancing data handling.
- Updated internal documentation to align with recent changes in service architecture and eligibility processes.
2025-12-25 15:48:57 +09:00
tema
c8e803ac8c chore: save work in progress 2025-12-25 15:47:01 +09:00
barsa
a4d5d03d91 Refactor Service Caching and Enhance Data Handling
- Improved ServicesCacheService to optimize caching strategies and ensure data consistency across service components.
- Updated utility functions for SOQL query building to enhance performance and maintainability.
- Refined existing service classes for internet, SIM, and VPN offerings to leverage new caching mechanisms.
- Enhanced integration with Salesforce Change Data Capture for real-time updates on service eligibility and availability.
2025-12-25 13:59:48 +09:00
barsa
76361d6422 Implement Salesforce Integration for Services and Cache Management
- Introduced ServicesCdcSubscriber for handling Salesforce Change Data Capture events, enabling real-time updates for product and account eligibility changes.
- Developed utility functions for building SOQL queries related to services, enhancing data retrieval capabilities.
- Created base service classes for internet, SIM, and VPN offerings, improving code organization and maintainability.
- Implemented ServicesCacheService for efficient caching and invalidation of service data, leveraging CDC for real-time updates.
- Enhanced existing service components to utilize new caching mechanisms and ensure data consistency across the application.
2025-12-25 13:59:28 +09:00
barsa
38bb40b88b Add Service and Component Structure for Internet and SIM Offerings
- Introduced new controllers for internet eligibility and service health checks to enhance backend functionality.
- Created service modules for internet, SIM, and VPN offerings, improving organization and maintainability.
- Developed various components for internet and SIM configuration, including forms and plan cards, to streamline user interactions.
- Implemented hooks for managing service configurations and eligibility checks, enhancing frontend data handling.
- Updated utility functions for pricing and catalog operations to support new service structures and improve performance.
2025-12-25 13:20:45 +09:00
barsa
6bc7695b22 Refactor Service Components and Update Dependencies
- Replaced Heroicons with Lucide icons across various service components for a consistent design.
- Updated ServicesPage to utilize ServicesGrid for improved layout and maintainability.
- Enhanced BusinessSolutionsPage and OnsiteSupportPage with new icon imports and streamlined code.
- Added lucide-react dependency to package.json for icon usage.
- Updated pnpm-lock.yaml to reflect changes in dependencies and ensure consistency.
2025-12-25 11:54:33 +09:00
barsa
d313ba0c2c Enhance Internet Offering Components and Improve User Guidance
- Updated InternetImportantNotes component for better clarity and user understanding.
- Simplified InternetOfferingCard layout by removing unused props, enhancing usability.
- Improved PlanComparisonGuide with collapsible sections for easier navigation.
- Enhanced PublicOfferingCard to support custom call-to-action labels and click handlers.
- Updated SimTypeSelector with additional EID information and verification notices for improved user guidance.
- Refined PublicInternetPlans and PublicSimPlans views to highlight new services and enhance overall presentation.
2025-12-24 19:03:01 +09:00
barsa
3bb4e8ce40 Refactor Internet Components and Enhance User Experience
- Updated InternetImportantNotes component title for clarity.
- Refined InternetOfferingCard by removing unused props and simplifying the layout for better usability.
- Enhanced PlanComparisonGuide with collapsible sections for improved navigation and readability.
- Streamlined PublicOfferingCard to support custom call-to-action labels and click handlers.
- Improved SimTypeSelector with additional EID information and verification notices for better user guidance.
- Updated PublicInternetPlans and PublicSimPlans views to incorporate new service highlights and improve overall presentation.
2025-12-24 19:01:21 +09:00
barsa
47414f10e0 Enhance Internet Offering Card and Public Internet Views
- Integrated InternetTierPricingModal into InternetOfferingCard for improved pricing visibility in preview mode.
- Updated pricing display logic to conditionally show pricing based on preview mode.
- Refined feature display in InternetOfferingCard to enhance user experience.
- Revamped PublicInternetConfigure and PublicInternetPlans views for a cleaner, more focused signup flow and improved FAQ section.
- Streamlined offering card presentation and added dynamic FAQ item expansion for better user engagement.
2025-12-24 14:58:56 +09:00
barsa
530245f43a Refactor Internet Eligibility Handling and Update Configuration
- Updated env.validation.ts to retain unused Salesforce fields for future compatibility.
- Modified CatalogCdcSubscriber to set requestId as undefined, reflecting its non-use in the current environment.
- Adjusted CatalogCacheService to initialize eligibility payload with null values for unused fields.
- Enhanced InternetCatalogService to remove references to unused fields and improve cache data validation.
- Updated PublicInternetPlans and InternetPlansContainer to streamline plan display and improve user experience with new offering configurations.
2025-12-24 13:24:13 +09:00
barsa
a6bc9666e1 Enhance Dashboard and Notification Features
- Introduced MeStatus module to aggregate customer status, integrating dashboard summary, payment methods, internet eligibility, and residence card verification.
- Updated dashboard hooks to utilize MeStatus for improved data fetching and error handling.
- Enhanced notification handling across various modules, including cancellation notifications for internet and SIM services, ensuring timely user alerts.
- Refactored related schemas and services to support new dashboard tasks and notification types, improving overall user engagement and experience.
2025-12-23 17:53:08 +09:00
barsa
a61c2dd68b Enhance Opportunity Management and Eligibility Handling
- Updated SalesforceOpportunityService to allow filtering by stages during opportunity retrieval, improving flexibility in eligibility checks.
- Integrated DistributedLockService into InternetCatalogService and OrderOrchestrator to prevent race conditions when creating or reusing opportunities.
- Refactored opportunity matching logic to ensure proper handling of stages during eligibility requests and order placements.
- Improved documentation to clarify the opportunity lifecycle and eligibility verification processes, ensuring better understanding for future development.
2025-12-23 16:44:45 +09:00
barsa
3af18af502 Fix error handling in GlobalAuthGuard to allow public route access without session validation. Simplified catch block to ignore errors, enhancing user experience on public endpoints. 2025-12-23 15:19:47 +09:00
barsa
4573b94484 Enhance WHMCS Integration and Add Internet Cancellation Features
- Introduced WhmcsAccountDiscoveryService to streamline client account discovery processes.
- Expanded WhmcsCacheService to include caching for subscription invoices and client email mappings, improving data retrieval efficiency.
- Updated WhmcsClientService to utilize caching for client ID lookups by email, enhancing performance.
- Implemented new internet cancellation features in SubscriptionsController, allowing users to preview and submit cancellation requests for internet services.
- Added validation schemas for internet cancellation requests, ensuring data integrity and user guidance during the cancellation process.
- Refactored various components and services to integrate new cancellation functionalities, improving user experience and operational flow.
2025-12-23 15:19:20 +09:00
barsa
4d645adcdd Refactor Account Checkout Container and Enhance Eligibility Handling
- Replaced multiple conditional AlertBanner components with a new CheckoutStatusBanners component to streamline eligibility status display.
- Integrated eligibility handling logic into the CheckoutStatusBanners for improved readability and maintainability.
- Updated the resolveOrderType method in CheckoutParamsService to normalize order types more effectively, enhancing the checkout process.
- Modified the normalizeOrderType function in the schema to handle non-string inputs, improving robustness.
2025-12-23 14:01:51 +09:00
barsa
d5ad8d3448 Remove Checkout Registration Module and Simplify Checkout Flow
- Deleted the CheckoutRegistrationModule and its associated components, streamlining the checkout process to require user authentication before proceeding.
- Updated the app.module.ts and router.config.ts to remove references to the CheckoutRegistrationModule.
- Refactored the checkout flow to utilize the AccountCheckoutContainer for handling user registration and checkout in a single-page flow.
- Enhanced the checkout store to eliminate guest info and registration states, focusing solely on authenticated user data.
- Standardized order types to PascalCase across the application for consistency.
- Updated relevant schemas and documentation to reflect the removal of guest checkout and the new authentication-first approach.
2025-12-23 13:21:29 +09:00
barsa
cfb4afac27 Refactor Notification Handling and Improve User Engagement
- Updated the NotificationsModule to enhance notification management for user actions and events.
- Improved integration with the CheckoutRegistrationService to streamline SIM order notifications.
- Refactored CatalogCdcSubscriber to ensure timely creation of notifications for account status changes.
- Enhanced frontend components to better display notification alerts, improving user experience and accessibility.
2025-12-23 11:37:34 +09:00
barsa
2b183272cf Implement Notifications Feature and Enhance BFF Modules
- Introduced a new Notification model in the Prisma schema to manage in-app notifications for users.
- Integrated the NotificationsModule into the BFF application, allowing for the handling of notifications related to user actions and events.
- Updated the CatalogCdcSubscriber to create notifications for account eligibility and verification status changes, improving user engagement.
- Enhanced the CheckoutRegistrationService to create opportunities for SIM orders, integrating with the new notifications system.
- Refactored various modules to include the NotificationsModule, ensuring seamless interaction and notification handling across the application.
- Updated the frontend to display notification alerts in the AppShell header, enhancing user experience and accessibility.
2025-12-23 11:36:44 +09:00
barsa
d9734b0c82 Enhance Signup Workflow and Update Catalog Components
- Refactored the SignupWorkflowService to throw a DomainHttpException for legacy account conflicts, improving error handling.
- Updated the SignupForm component to include initialEmail and showFooterLinks props, enhancing user experience during account creation.
- Improved the AccountStep in the SignupForm to allow users to add optional details, such as date of birth and gender, for a more personalized signup process.
- Enhanced the PasswordStep to include terms acceptance and marketing consent options, ensuring compliance and user engagement.
- Updated various catalog views to improve layout and user guidance, streamlining the onboarding process for new users.
2025-12-22 18:59:38 +09:00
barsa
90fa9443d4 Enhance Authentication Flow in Catalog Views
- Added redirect functionality to the LoginForm component, allowing for dynamic redirection after login.
- Updated PublicInternetConfigure and PublicSimConfigure views to utilize modals for user authentication, improving user experience by avoiding full-page redirects.
- Enhanced PublicInternetPlans and PublicSimPlans views with updated button labels for clarity and consistency.
- Refactored plan configuration views to display detailed plan information and prompt users for account creation or login, streamlining the onboarding process.
2025-12-19 16:33:53 +09:00
barsa
ab429f91dc Enhance Internet Eligibility Features and Update Catalog Integration
- Added new fields for internet eligibility in the environment validation schema to support Salesforce integration.
- Updated CatalogCdcSubscriber to extract and handle additional eligibility details from Salesforce events.
- Refactored InternetEligibilityController to return detailed eligibility information, improving user experience.
- Enhanced CatalogCacheService with a new method for setting eligibility details, optimizing cache management.
- Updated InternetCatalogService to retrieve and process comprehensive eligibility data, ensuring accurate service availability checks.
- Improved public-facing components to reflect the new eligibility status and provide clearer user guidance during the checkout process.
2025-12-19 15:15:36 +09:00
barsa
7ab5e12051 Add Residence Card Submission and Verification Features
- Introduced ResidenceCardSubmission model to handle user submissions of residence cards, including status tracking and file management.
- Updated User model to include a relation to ResidenceCardSubmission for better user data management.
- Enhanced the checkout process to require residence card submission for SIM orders, improving compliance and verification.
- Integrated VerificationModule into the application, updating relevant modules and routes to support new verification features.
- Refactored various components and services to utilize the new residence card functionality, ensuring a seamless user experience.
- Updated public-facing views to guide users through the residence card submission process, enhancing clarity and accessibility.
2025-12-18 18:12:20 +09:00
barsa
7cfac4c32f Enhance Checkout Process with Internet Availability Step
- Added an availability confirmation step in the checkout process for internet orders, ensuring users verify service eligibility before proceeding to payment.
- Updated the CheckoutWizard component to conditionally include the new AvailabilityStep based on the order type.
- Refactored AddressStep to navigate to the AvailabilityStep for internet orders, improving user flow.
- Enhanced the checkout store to track internet availability requests and updated the state management for better handling of checkout steps.
- Updated relevant schemas and documentation to reflect the new checkout flow and requirements.
2025-12-17 18:47:59 +09:00
barsa
9d2c4ff921 Add Internet Eligibility Features and Update Catalog Module
- Introduced InternetEligibilityController to handle user eligibility checks for internet services.
- Enhanced InternetCatalogService with methods for retrieving and requesting internet eligibility.
- Updated catalog.module.ts to include the new InternetEligibilityController.
- Refactored various components and views to utilize the new eligibility features, improving user experience and service accessibility.
- Adjusted routing paths and links to align with the new catalog structure, ensuring seamless navigation for users.
2025-12-17 17:59:55 +09:00
barsa
4edf0e801e Refactor Account Portal Components and Update Routing
- Further refined the account portal structure by updating existing components and enhancing their functionality.
- Improved routing paths to ensure better navigation and accessibility within the account portal.
- Enhanced user experience by integrating additional features and optimizing existing ones for seamless interaction.
2025-12-17 15:45:11 +09:00
barsa
963e30e817 Implement Account Portal Restructuring and Component Updates
- Introduced a new plan for restructuring the account portal, resulting in over 60 file operations including the addition of new components and the deletion of outdated routes.
- Updated various components to enhance user experience, including the addition of AccountRouteGuard and AccountDashboardPage.
- Refactored routing paths to align with the new account structure, ensuring seamless navigation across billing, orders, and support sections.
- Enhanced the checkout process by integrating new components and improving error handling for better user feedback.
- Updated public-facing features to streamline contact and support functionalities, improving accessibility for users.
2025-12-17 15:44:46 +09:00
barsa
ce42664965 Add Checkout Registration Module and Enhance Public Contact Features
- Integrated CheckoutRegistrationModule into the application for handling checkout-related functionalities.
- Updated router configuration to include the new CheckoutRegistrationModule for API routing.
- Enhanced SalesforceAccountService with methods for account creation and email lookup to support checkout registration.
- Implemented public contact form functionality in SupportController, allowing unauthenticated users to submit inquiries.
- Added rate limiting to the public contact form to prevent spam submissions.
- Updated CatalogController and CheckoutController to allow public access for browsing and cart validation without authentication.
2025-12-17 14:07:22 +09:00
barsa
a2e81798ef Refactor color tokens across components for improved consistency and clarity
- Removed legacy color aliases from globals.css to streamline design tokens.
- Updated various components, including Badge, Button, Checkbox, and Input, to utilize new color tokens for error states.
- Enhanced error messaging styles in components like ErrorBoundary and AlertBanner for better visual coherence.
- Standardized color usage in billing and subscription components to align with updated design tokens.
- Improved overall styling consistency across the application by adopting the new color system.
2025-12-16 18:12:12 +09:00
barsa
666129191a Refactor global styles and component tokens for improved consistency and clarity
- Updated globals.css to streamline design tokens and enhance semantic color usage across the application.
- Refined error and loading components to utilize new color tokens for better visual coherence.
- Adjusted various components, including AppShell, Header, and Sidebar, to align with updated design tokens and improve styling consistency.
- Enhanced utility classes in utilities.css to reflect the consolidated color system and improve component styling.
- Improved documentation in tokens.css to clarify the purpose and structure of design tokens.
2025-12-16 17:43:02 +09:00
barsa
c13e2df55f Refactor billing components for improved styling and consistency
- Updated InvoiceStatusBadge to include iconColor for better visual representation of statuses.
- Enhanced BillingSummary and PaymentMethodCard components with consistent color tokens and improved layout.
- Refined DataUsageChart to standardize color usage for data thresholds and loading states.
- Updated SubscriptionDetails and SubscriptionStatusBadge for consistent text colors and improved user feedback.
- Adjusted CardBadge styles to align with new design tokens for better visual coherence.
2025-12-16 17:11:43 +09:00