289 Commits

Author SHA1 Message Date
barsa
1a3032bbd3 Refactor Address Handling in Signup and Profile Components
- Updated address handling in Salesforce account and contact services to remove unnecessary address fields during signup, improving data management.
- Refactored address input fields in the SignupForm and AddressForm components to ensure proper labeling and validation for Japanese address formats.
- Enhanced address display logic in ProfileContainer and AddressConfirmation components for better user experience.
- Standardized address field names and improved placeholder texts for clarity and consistency across the application.
2026-01-06 16:13:59 +09:00
barsa
cc0200bd5e Update pnpm-lock.yaml and Dockerfile for Dependency Management
- Standardized quotes in pnpm-lock.yaml for improved consistency across dependencies.
- Added new dependencies including '@types/node' and 'zod' with specified versions to enhance type safety and validation.
- Updated Dockerfile to disable workspace package injection, ensuring symlinks are used for the domain package during installation, which improves build reliability.
2026-01-06 14:09:32 +09:00
barsa
0f1c134bc9 Update Next.js Configuration to Support Monorepo Package Bundling
- Added `transpilePackages` configuration in `next.config.mjs` to ensure proper bundling of the `@customer-portal/domain` package in the monorepo setup, enhancing build efficiency and compatibility.
2026-01-05 19:03:18 +09:00
barsa
c37bdd2b9c Refactor Support Views to Improve Loading State Handling
- Updated SupportCaseDetailView, SupportCasesView, and SupportHomeView to remove direct loading state checks and replace them with a unified `showLoading` variable, enhancing code clarity.
- Adjusted loading prop in PageLayout components to reflect the new loading state logic, ensuring a smoother user experience during data fetching.
2026-01-05 18:39:55 +09:00
barsa
655d26da4f Refactor Subscription Module and Enhance Subscription Detail View
- Updated the subscriptions module to register CancellationController alongside SimController, ensuring more specific route matching for cancellation actions.
- Enhanced SubscriptionDetail component by adding a header action button for canceling Internet services, improving user experience and navigation.
- Removed deprecated Internet service actions from the SubscriptionDetail view, streamlining the component and promoting cleaner code.
2026-01-05 18:35:05 +09:00
barsa
b19c213931 Implement Unified Cancellation Features for SIM and Internet Services
- Added new methods in SalesforceOpportunityService to retrieve cancellation statuses for both Internet and SIM services by Opportunity ID, enhancing cancellation handling.
- Updated BFF module to include a new CancellationModule, improving service organization and modularity.
- Refactored portal routes and components to unify cancellation navigation, streamlining user experience.
- Introduced new domain schemas for unified cancellation previews, ensuring consistent data structure and validation across services.
- Removed deprecated cancellation components from the portal, promoting cleaner code and improved maintainability.
2026-01-05 17:09:10 +09:00
barsa
922fd3dab0 Refactor Salesforce Opportunity Integration for Enhanced Cancellation Handling
- Updated opportunity field mappings to align with new requirements for SIM and Internet cancellations, improving data accuracy.
- Introduced distinct data structures for SIM and Internet cancellations, enhancing type safety and validation processes.
- Refactored SalesforceOpportunityService to manage updates for both cancellation types, ensuring precise data handling.
- Enhanced cancellation query fields to accommodate new SIM cancellation specifications, streamlining the cancellation workflow.
- Cleaned up portal integration to reflect updated opportunity source fields, promoting better data integrity and tracking.
2026-01-05 17:08:33 +09:00
barsa
6096c15659 Refactor Salesforce Opportunity Integration for SIM and Internet Cancellations
- Updated opportunity field mappings to replace deprecated fields with new ones for SIM and Internet cancellations, enhancing clarity and consistency.
- Introduced separate data structures for Internet and SIM cancellation data, improving type safety and validation.
- Refactored SalesforceOpportunityService to handle updates for both Internet and SIM cancellations, ensuring accurate data handling.
- Enhanced cancellation query fields to support new SIM cancellation requirements, improving the overall cancellation process.
- Cleaned up the portal integration to reflect changes in opportunity source fields, promoting better data integrity and tracking.
2026-01-05 17:08:33 +09:00
tema
2b001809c3 Merge branch 'main' of https://github.com/NTumurbars/customer-portal 2026-01-05 15:59:09 +09:00
tema
4712463919 Adjust sim management layout and clean billing hook 2026-01-05 15:57:50 +09:00
barsa
a41f2bf47e Enhance BFF Modules and Update Domain Schemas
- Added new modules for SIM management, internet management, and call history to the BFF, improving service organization and modularity.
- Updated environment validation schema to reflect changes in Salesforce event channels, ensuring accurate configuration.
- Refactored router configuration to include new subscription-related modules, enhancing API routing clarity.
- Cleaned up Salesforce integration by removing unused service files and optimizing event handling logic.
- Improved support service by adding cache invalidation logic for case comments, ensuring real-time updates for users.
- Updated domain schemas to remove deprecated fields and enhance validation for residence card verification, promoting data integrity.
- Enhanced utility functions in the portal for better address formatting and confirmation prompts, improving user experience.
2026-01-05 15:11:56 +09:00
tema
8a31f1b9c3 Update pnpm-lock.yaml and package.json for Dependency Consistency
- Standardized quotes in pnpm-lock.yaml for improved consistency across dependencies.
- Added 'ogl' package with version ^1.0.11 to the portal's package.json to enhance graphics rendering capabilities.
2026-01-05 11:32:57 +09:00
barsa
fd5336f499 Implement Case Messaging and Commenting Features in Salesforce Integration
- Added methods in `SalesforceCaseService` to fetch and add case messages, unifying email messages and case comments into a chronological conversation thread.
- Enhanced `SupportService` and `SupportController` to handle case message retrieval and comment addition, integrating new DTOs for request and response validation.
- Updated `SupportCaseDetailView` in the Portal to display conversation messages and allow users to add comments, improving user interaction with support cases.
- Introduced new schemas in the domain for case messages and comments, ensuring robust validation and type safety.
- Refactored Salesforce mappers to transform email messages and case comments into a unified format for display in the portal.
2025-12-29 18:39:13 +09:00
barsa
928ad18d7e Refactor User Profile Management and Enhance Authentication Flow
- Improved `accountService` to streamline user profile management, including enhanced fetching and updating mechanisms for profile and address information.
- Updated `auth.store` to optimize client-side authentication state handling, ensuring a more robust login, signup, and session management process.
- Centralized exports for authentication services in `auth/api/index.ts` for better organization and accessibility.
- Enhanced overall service architecture by refining API services related to billing and checkout functionalities, promoting maintainability and clarity across the portal features.
2025-12-29 18:21:48 +09:00
barsa
87fa789fce Add Account and Auth API Services with Profile Management
- Introduced `accountService` for managing user profiles, including fetching and updating profile and address information.
- Created `auth.store` to handle client-side authentication state, including login, signup, and session management.
- Added centralized exports for authentication services in `auth/api/index.ts`.
- Implemented API services for billing and checkout functionalities, enhancing the overall service architecture.
- Established a new structure for service APIs, promoting better organization and maintainability across the portal features.
2025-12-29 18:19:27 +09:00
barsa
74d469ce22 Refactor API Client Error Handling and Update Date Formatting
- Enhanced error handling in various API client services by integrating `redactForLogs` for sensitive data protection in logs.
- Updated date formatting across multiple components and services to utilize `formatIsoDate` and `formatIsoRelative`, improving consistency and readability.
- Removed unused imports and optimized code structure for better maintainability.
- Streamlined retry logic in the Freebit and WHMCS services to improve resilience and error management during API requests.
2025-12-29 17:17:36 +09:00
barsa
a938c605c7 Enhance Salesforce Case Integration and Update Eligibility Logic
- Added new fields for notes and case ID in the ServicesCdcSubscriber to improve eligibility detail tracking.
- Refactored the SalesforceCaseService to unify case creation for various case types, including customer support and internal workflow cases.
- Updated InternetServicesService to create internal workflow cases for eligibility checks, enhancing tracking and management.
- Improved error handling and logging consistency across services when creating cases.
- Cleaned up unused imports and optimized code structure for better maintainability.
2025-12-29 16:53:32 +09:00
barsa
a55967a31f Refactor Error Handling and Improve Service Consistency
- Introduced `mapHttpStatusToErrorCode` function in the domain to standardize error code mapping from HTTP status codes, enhancing error handling across the application.
- Updated various services and controllers to utilize the new error mapping function, ensuring consistent error responses and improved clarity in logging.
- Refactored error handling in the BillingController and other modules to align with the updated practices, promoting maintainability and clarity in API responses.
- Cleaned up unused imports and optimized code structure for better maintainability across the BFF modules.
2025-12-29 15:44:01 +09:00
barsa
03eccd1db2 Enhance Error Handling and Logging Consistency Across Services
- Replaced instances of `getErrorMessage` with `extractErrorMessage` in various services to ensure consistent error handling and improve clarity in logging.
- Updated error logging in the Whmcs, Salesforce, and subscription services to utilize the new error extraction method, enhancing maintainability and debugging capabilities.
- Adjusted ESLint configuration to prevent the use of `console.log` in production code, promoting the use of a centralized logging solution.
- Refactored error handling in the Agentforce widget and other components to align with the updated logging practices, ensuring a consistent approach to error management across the application.
- Cleaned up unused imports and optimized code structure for better maintainability.
2025-12-29 15:07:11 +09:00
barsa
cdcdb4c172 Enhance User ID Handling and Validation Across Services
- Added optional userId parameter to payment capture methods in WhmcsService and WhmcsInvoiceService to improve tracking and management of user-related transactions.
- Updated invoice retrieval and user profile services to utilize parseUuidOrThrow for user ID validation, ensuring consistent error messaging for invalid formats.
- Refactored SIM billing and activation services to include userId in one-time charge creation, enhancing billing traceability.
- Adjusted validation logic in various services to improve clarity and maintainability, ensuring robust handling of user IDs throughout the application.
2025-12-29 14:21:55 +09:00
barsa
ed5c2ead63 Refactor Salesforce Integration and Update Billing Logic
- Replaced the OrderFieldConfigModule with SalesforceOrderFieldConfigModule in the Salesforce integration module to streamline configuration management.
- Updated SalesforceOrderService to utilize SalesforceOrderFieldMapService, enhancing consistency in order field mapping.
- Refactored multiple controllers to remove inline query parsing, directly using query parameters for improved clarity and maintainability.
- Adjusted the ResidenceCardService to enhance error handling and response consistency when interacting with Salesforce.
- Cleaned up unused imports and optimized code structure for better maintainability across the BFF modules.
2025-12-29 14:09:33 +09:00
barsa
ea188f098b Refactor Residence Card Verification Logic and Enhance Error Handling
- Updated the MeStatusService to include a safe method for fetching residence card verification, improving error handling and providing a fallback response in case of failures.
- Refactored the ResidenceCardService to utilize a normalization utility for date handling and improved payload validation, ensuring consistent and safe responses from Salesforce.
- Enhanced logging for error scenarios to aid in debugging and maintainability.
- Updated the Next.js configuration to allow direct API calls, providing a solution to bypass Next's internal dev proxy and avoid deprecation warnings.
- Expanded documentation to guide users on configuring the environment for development.
2025-12-29 12:59:36 +09:00
barsa
2a1b4d93ed Refactor API Response Handling and Update Service Implementations
- Removed the TransformInterceptor to streamline response handling, ensuring that all responses are returned directly without a success envelope.
- Updated various controllers and services to utilize new action response schemas, enhancing clarity and consistency in API responses.
- Refactored error handling in the CsrfController and CheckoutController to improve logging and error management.
- Cleaned up unused imports and optimized code structure for better maintainability and clarity across the application.
2025-12-29 11:12:20 +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
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
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
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
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