63 Commits

Author SHA1 Message Date
NTumurbars
fcc5872fda refactor: unify api client usage around openapi client 2025-09-18 16:23:56 +09:00
T. Narantuya
a22b84f128 Refactor and clean up BFF and portal components for improved maintainability
- Removed deprecated files and components from the BFF application, including various auth and catalog services, enhancing code clarity.
- Updated package.json scripts for better organization and streamlined development processes.
- Refactored portal components to improve structure and maintainability, including the removal of unused files and components.
- Enhanced type definitions and imports across the application for consistency and clarity.
2025-09-18 14:52:26 +09:00
T. Narantuya
ed6fae677d Enhance memory management and refactor components for improved performance
- Updated package.json scripts to optimize memory usage during type-checking and building processes.
- Refactored BFF application scripts to include memory management options for build, dev, and test commands.
- Introduced new type-check scripts for better memory handling in the BFF application.
- Reorganized imports and components in the portal application for better structure and maintainability.
- Replaced large component files with dedicated view components to streamline rendering and improve load times.
2025-09-18 12:34:26 +09:00
T. Narantuya
52adc29016 Refactor catalog services and update product types for improved clarity and functionality
- Updated Internet and SIM catalog services to utilize new product types, enhancing type safety and consistency.
- Refactored methods to return specific catalog item types, including InternetPlanCatalogItem, InternetInstallationCatalogItem, and SimActivationFeeCatalogItem.
- Adjusted API responses and frontend components to align with updated product structures, ensuring accurate data handling.
- Removed deprecated fields and streamlined type definitions across the catalog services and related components.
2025-09-18 11:22:22 +09:00
T. Narantuya
a95ec60859 Refactor address management and update related services for improved clarity and functionality
- Updated address retrieval in user service to replace billing info with a dedicated address method.
- Adjusted API endpoints to use `PATCH /api/me/address` for address updates instead of billing updates.
- Enhanced documentation to reflect changes in address management processes and API usage.
- Removed deprecated types and services related to billing address handling, streamlining the codebase.
2025-09-17 18:43:43 +09:00
T. Narantuya
001de16e38 Add domain types and utilities for customer portal
- Introduced new TypeScript types for catalog products, including Internet, SIM, and VPN plans, along with their respective addons and installation options.
- Created a new domain package with essential configurations, including package.json and tsconfig.json for TypeScript support.
- Added common types and utility functions for type safety and data handling across the application.
- Established a structured export pattern for domain types, enhancing organization and accessibility for future development.
2025-09-17 18:43:31 +09:00
T. Narantuya
449ec05d47 script 2025-09-11 17:11:58 +09:00
T. Narantuya
bef5abcbda Refactor Freebit service and update SIM management components for improved clarity and functionality
- Consolidated and cleaned up type definitions in Freebit service interfaces for better readability.
- Enhanced error handling and logging in Freebit service methods to provide clearer feedback.
- Updated SIM management pages to streamline user interactions and improve UI components.
- Removed deprecated subscription detail page and restructured routing for better navigation.
- Added new notice and info row components in SIM cancellation page for improved user experience.
2025-09-11 16:21:54 +09:00
T. Narantuya
86cd636b87 Refactor OrderStatusPage and SimChangePlanPage for improved readability and functionality
- Removed duplicate text and unnecessary comments in OrderStatusPage for cleaner code.
- Moved the status section to the top for better user experience.
- Simplified the handling of item types in SimChangePlanPage and added new state variables for global IP assignment and scheduling.
- Streamlined form submission and error handling in SimChangePlanPage, enhancing user feedback.
2025-09-11 16:21:47 +09:00
T. Narantuya
15af220369 Add SIM fulfillment service and integrate into order orchestration
- Introduced SimFulfillmentService to handle SIM-specific order fulfillment, including validation and activation via Freebit API.
- Updated OrderFulfillmentOrchestrator to include SIM fulfillment logic, adding a new step for SIM orders and integrating the service.
- Enhanced order initialization to accommodate SIM-specific configurations and validation in the checkout process.
- Refactored existing order orchestration steps to ensure proper handling of SIM-related fulfillment requirements.
2025-09-11 15:06:23 +09:00
T. Narantuya
db98311b8e Add .env backup file for development configuration and update .gitignore
- Created a new .env backup file for the development environment, providing essential configurations for database, Redis, and application settings.
- Updated .gitignore to exclude API documentation containing sensitive details.
- Refactored token-blacklist service error handling to simplify catch block.
- Adjusted Freebit API configuration validation to reflect updated base URL.
- Enhanced email service interfaces to allow optional 'from' field.
- Improved order orchestrator service to include additional fields in SOQL query.
- Added new SIM order activation service and controller for managing SIM activations.
- Updated subscriptions module to include new services and controllers for SIM management.
- Enhanced error handling in SIM management service for better user feedback.
- Refactored various components in the portal for improved user experience and consistency.
2025-09-11 15:03:08 +09:00
tema
ea2fe81606 Add SIM fulfillment support to order orchestration
- Integrated SimFulfillmentService into OrderFulfillmentOrchestrator to handle SIM-specific fulfillment steps.
- Updated initializeSteps method to conditionally include SIM fulfillment based on order type.
- Enhanced CheckoutContent to validate required SIM fields for order processing, ensuring necessary data is provided before activation.
2025-09-11 14:52:26 +09:00
T. Narantuya
59cf55ae95 Refactor layout components and enforce import restrictions in portal pages
- Removed direct imports of DashboardLayout from various portal pages to enforce the use of shared layout components.
- Introduced ESLint rules to prevent importing DashboardLayout directly in (portal) pages, encouraging the use of the shared route-group layout.
- Updated navigation methods to utilize Next.js router instead of window.location for improved routing consistency.
- Enhanced loading states and error handling across multiple pages for better user experience.
2025-09-11 14:23:33 +09:00
T. Narantuya
deae9c0520 Add new pages for billing, profile, invoices, payments, catalog, subscriptions, and support
- Introduced new components for billing and address management, including a detailed billing information page.
- Created profile management page for user details and password changes.
- Added invoice management page with pagination and search functionality.
- Implemented payment methods page for managing user payment options.
- Developed catalog pages for internet, SIM, and VPN services, including configuration options.
- Established subscription management pages for viewing and managing user subscriptions.
- Created support case management pages for users to view and create support cases.
2025-09-11 14:23:27 +09:00
T. Narantuya
4c819a9a7b Update pnpm-lock.yaml and TypeScript configurations for improved dependency management and code structure
- Standardized string quotes in pnpm-lock.yaml for consistency.
- Updated TypeScript configuration files to include type definitions and type roots for better type management.
- Enhanced SalesforcePubSubSubscriber class with replay corruption recovery logic and refactored subscription handling for improved reliability.
- Removed unused backup file for dashboard layout to streamline the codebase.
2025-09-11 13:17:10 +09:00
tema
bccc476283 Refactor SIM management and Freebit service for improved error handling and type safety
- Consolidated error handling in SimManagementService and FreebititService to provide clearer logging and user feedback.
- Enhanced type safety in FreebititService by refining type definitions for API requests and responses.
- Updated various components to ensure consistent error handling and improved user experience during SIM management actions.
2025-09-10 18:31:16 +09:00
tema
c30afc4bec Add email notification functionality to SIM management actions
- Introduced email notifications for various SIM management actions (e.g., top-ups, plan changes, cancellations) in SimManagementService.
- Updated SendGridEmailProvider to allow custom 'from' addresses in email options.
- Enhanced the SimCancelPage component to provide user feedback and confirmation regarding cancellation requests.
- Refactored email service integration to improve error handling and logging for email notifications.
2025-09-10 16:33:24 +09:00
tema
adf653e5e1 Enhance eSIM reissue functionality with optional EID transfer
- Updated SimManagementService to allow reissuing eSIM profiles with an optional new EID, including validation for the EID format.
- Modified SubscriptionsController to accept a new EID in the request body for the eSIM reissue endpoint.
- Implemented a new React component for the eSIM reissue page, featuring form validation and user feedback for successful or failed requests.
2025-09-09 18:50:31 +09:00
T. Narantuya
0bf872e249 Refactor code formatting and improve documentation clarity
- Adjusted YAML and JSON files for consistent formatting, including healthcheck commands and package exports.
- Enhanced readability in various TypeScript files by standardizing string quotes and improving line breaks.
- Updated documentation across multiple files to improve clarity and consistency, including address system and logging levels.
- Removed unnecessary package-lock.json from shared package directory to streamline dependencies.
2025-09-09 18:19:54 +09:00
tema
f21db44611 Lint fixes 2025-09-09 16:13:17 +09:00
tema
5f7fb483d7 Refactor error handling and type safety across services
- Simplified error handling in TokenBlacklistService by removing unnecessary error variable.
- Enhanced type safety in SimUsageStoreService with improved type assertions and error handling.
- Updated FreebititService to provide clearer error messages and consistent error handling across multiple methods.
- Standardized import statements in WhmcsInvoiceService for better organization and clarity.
- Added missing imports in dev-prep script to ensure proper functionality.
2025-09-09 16:07:48 +09:00
tema
de35397cf9 Refactor order and subscription services for improved type safety and error handling
- Updated billing cycle assignment in OrderOrchestrator to ensure proper type handling.
- Enhanced error handling in SimManagementService and related components to use more specific types for exceptions.
- Standardized error handling across various components to improve consistency and clarity.
- Adjusted function signatures in multiple services and controllers to return more precise types, enhancing type safety.
2025-09-09 15:59:30 +09:00
tema
05817e8c67 Refactor code for improved readability and consistency across components
- Standardized import statements and formatting in various files for better code clarity.
- Enhanced error messages and logging for improved debugging and user experience.
- Adjusted whitespace and line breaks in multiple components to follow best practices.
- Updated environment variable handling and configuration for consistency across services.
2025-09-09 15:45:03 +09:00
tema
425ef83dba Update SIM management service and UI components for Freebit API compliance
- Adjusted quota validation in SimManagementService to enforce limits of 100MB to 51200MB for Freebit API compatibility.
- Updated cost calculation to round up GB usage for billing, ensuring accurate invoice generation.
- Modified top-up modal and related UI components to reflect new limits of 1-50 GB, aligning with Freebit API constraints.
- Enhanced documentation to clarify pricing structure and API data flow adjustments.
2025-09-09 15:40:13 +09:00
tema
2325cf2753 Refactor Freebit plan change request and improve error handling
- Updated FreebititPlanChangeRequest interface to use 'planCode' instead of 'plancode' for consistency.
- Enhanced error handling in WhmcsInvoiceService to provide a default message for payment errors.
- Removed unused state variables for global IP assignment and scheduling in SIM change plan components to streamline the user interface.
2025-09-08 18:45:00 +09:00
tema
5a0c5272e0 Update SIM management calculations and configurations
- Changed the base URL for Freebit API in environment validation to the new test URL.
- Updated data usage calculations in SimManagementService and related components to use 1000 instead of 1024 for MB to GB conversions.
- Adjusted the top-up modal and related components to reflect the new GB input method and validation rules.
- Enhanced documentation to align with the updated API and usage metrics.
2025-09-06 17:02:20 +09:00
T. Narantuya
3f01656bbb Update package.json and health route to enhance functionality and environment configuration
- Added new script "plesk:images" to package.json for building images.
- Modified health route to include environment and version information in the response.
- Updated portal-backend.env.sample to include new environment variables for application name and rate limiting settings.
2025-09-06 14:05:18 +09:00
tema
ac259ce902 Enhance SIM management service with payment processing and API integration
- Implemented WHMCS invoice creation and payment capture in SimManagementService for top-ups.
- Updated top-up logic to calculate costs based on GB input, with pricing set at 500 JPY per GB.
- Simplified the Top Up Modal interface, removing unnecessary fields and improving user experience.
- Added new methods in WhmcsService for invoice and payment operations.
- Enhanced error handling for payment failures and added transaction logging for audit purposes.
- Updated documentation to reflect changes in the SIM management flow and API interactions.
2025-09-06 13:57:18 +09:00
T. Narantuya
ae56477714 Refactor SIM cancel page layout and improve readability
- Updated the formatting of the SIM cancel page for better readability, including consistent use of quotes and improved line breaks in text.
- Enhanced the layout of buttons and links for a more user-friendly interface.
- Added a "Back" link to improve navigation options for users.
2025-09-06 10:11:39 +09:00
NTumurbars
781e4c9b6a
Merge branch 'main' into Tema-v1 2025-09-06 10:05:23 +09:00
tema
e115a3ab15 Add daily SIM usage tracking and persistence functionality
- Introduced SimUsageDaily model to store daily usage snapshots for SIM accounts.
- Updated SimManagementService to persist daily usage data and clean up previous months' records.
- Enhanced error handling for usage persistence failures.
- Updated SubscriptionsModule to include SimUsageStoreService for managing usage data.
- Improved user interface text for clarity in SIM management pages.
2025-09-06 10:01:52 +09:00
T. Narantuya
f305ee6e1a Implement Salesforce Platform Events for Order Provisioning
- Added support for Salesforce Platform Events, specifically subscribing to `OrderProvisionRequested__e` to trigger provisioning jobs.
- Introduced new environment variables for Salesforce event configuration, including SF_EVENTS_ENABLED, SF_PROVISION_EVENT_CHANNEL, and SF_PUBSUB_ENDPOINT.
- Refactored order fulfillment process to utilize event-driven architecture, enhancing reliability and scalability.
- Updated documentation to reflect changes in the provisioning workflow and environment variable requirements.
- Removed deprecated webhook handling code to streamline the integration.
2025-09-06 10:01:44 +09:00
tema
9d4505d6be Refactor SIM management components and enhance user experience
- Updated CatalogPage and SimPlansPage to improve descriptions and layout for better clarity.
- Removed unused SignalIcon from CatalogPage.
- Enhanced ChangePlanModal to allow selection of new plans with improved validation and user feedback.
- Updated SimActions to handle navigation and contextual information for actions.
- Improved SimDetailsCard to format current plan codes for better readability.
- Enhanced SimFeatureToggles to support embedded rendering and streamlined service options management.
- Refactored SimManagementSection layout for better organization of SIM details and actions.
2025-09-05 18:22:55 +09:00
tema
735828cf32 Implement SIM features update functionality and enhance UI components
- Added new SimFeaturesUpdateRequest interface to handle optional SIM feature updates.
- Implemented updateSimFeatures method in SimManagementService to process feature updates including voicemail, call waiting, international roaming, and network type.
- Expanded SubscriptionsController with a new endpoint for updating SIM features.
- Introduced SimFeatureToggles component for managing service options in the UI.
- Enhanced DataUsageChart and SimDetailsCard components to support embedded rendering and improved styling.
- Updated layout and design for better user experience in the SIM management section.
2025-09-05 15:39:43 +09:00
tema
d9f7c5c8b2 Enhance Freebit SIM management features and UI components
- Added optional service features to SimDetails interface: voiceMailEnabled, callWaitingEnabled, internationalRoamingEnabled, and networkType.
- Updated FreebitService to include new service feature flags based on SIM data.
- Enhanced SimDetailsCard component to display service features for eSIMs, including voice mail, call waiting, international roaming, and network type.
- Improved conditional rendering for optional fields in SimDetailsCard.
- Updated SimActions component with an ID for better accessibility.
2025-09-05 12:30:57 +09:00
tema
9e552d6a21 Enhance SIM management features and order details
- Added new environment variables for Freebit API configuration in env.validation.ts.
- Updated OrderOrchestrator to include unit price, total price, and billing cycle in order item details.
- Expanded SubscriptionsController with new SIM management endpoints for debugging, retrieving details, usage, top-ups, plan changes, cancellations, and eSIM reissues.
- Integrated SimManagementService into SubscriptionsModule and SubscriptionsController.
- Updated OrdersPage and SubscriptionDetailPage to display additional order item information and conditionally render SIM management sections.
2025-09-04 18:34:28 +09:00
tema
75e205b1e3 Update field mapping for billing address and enhance order page components
- Updated default field mappings for billing address in SalesforceFieldMap to maintain backward compatibility.
- Added new icons for service types in OrdersPage and OrderStatusPage for improved visual representation.
- Revised next action and timeline messages for clarity and consistency across order status components.
- Enhanced layout and styling for better user experience in order details and service overview sections.
2025-09-02 18:55:17 +09:00
T. Narantuya
98f998db51 Refactor code for improved readability and maintainability
- Simplified import statements in auth.controller.ts and consolidated DTO imports.
- Streamlined accountStatus method in AuthController for better clarity.
- Refactored error handling in AuthService for existing mapping checks and password validation.
- Cleaned up whitespace and formatting across various files for consistency.
- Enhanced logging configuration in logging.module.ts to reduce noise and improve clarity.
- Updated frontend components for better formatting and readability in ProfilePage and SignupPage.
2025-09-02 16:09:17 +09:00
T. Narantuya
cc2a6a3046 Enhance authentication and password management features
- Added new endpoint for retrieving account status by email in AuthController.
- Implemented change password functionality with validation in AuthService.
- Updated password strength validation to require special characters across relevant DTOs.
- Introduced optional API Access Key in environment configuration for WHMCS.
- Refactored user address update logic in UsersController to improve clarity and maintainability.
- Enhanced error handling in various services to provide more user-friendly messages.
- Updated frontend components to support new password change and account status features.
2025-09-02 13:52:13 +09:00
T. Narantuya
0f7d680782 Update throttler configuration and enhance logging setup
- Adjusted authentication rate limit TTL from 15 minutes to 10 minutes for stricter control.
- Improved logging configuration to reduce noise by ignoring specific HTTP requests and customizing serializers.
- Refactored logging in checkout components to utilize useCallback for better performance and removed unnecessary console logs.
2025-09-01 18:47:30 +09:00
T. Narantuya
4d0baed4b2 Update Plesk environment configuration and enhance Docker setup
- Added detailed instructions for Plesk deployment in `.env.plesk` and `compose-plesk.yaml`.
- Updated `.gitignore` to exclude Docker-related files.
- Enhanced Dockerfiles for both frontend and backend to optimize for Plesk deployment.
- Refined TypeScript configurations across various files for improved module resolution and compatibility.
- Removed obsolete logger fixes summary file to streamline documentation.
2025-09-01 15:11:42 +09:00
T. Narantuya
b0c8103ee2 Refactor TypeScript configurations and enhance logging setup
- Updated nest-cli.json to enable output directory deletion and refined TypeScript compiler options.
- Modified package.json to improve development command for BFF with preserved watch output.
- Adjusted tsconfig.json to extend from a higher-level configuration and removed unnecessary options.
- Enhanced logging.module.ts to simplify logger configuration and improve log message formatting.
- Updated next.config.mjs to manage server-only libraries and optimize Webpack configuration.
- Refined error logging in various components for better clarity and consistency.
2025-08-30 18:22:31 +09:00
T. Narantuya
cde7cb3e3c Update package configurations and enhance BFF module structure
- Modified build command in package.json for improved reporting.
- Updated pnpm-lock.yaml to remove obsolete dependencies and add new ones.
- Enhanced TypeScript configuration in BFF for better compatibility with ES2024.
- Refactored app.module.ts for clearer module organization and added comments for better understanding.
- Adjusted next.config.mjs to conditionally enable standalone output based on environment.
- Improved InternetPlansPage to fetch and display installation options alongside internet plans.
- Cleaned up unnecessary comments and code in VPN plans page for better readability.
- Updated manage.sh script to build shared packages and BFF before starting development applications.
2025-08-30 16:45:22 +09:00
NTumurbars
b99f256da3
Merge branch 'main' into Tema-v1 2025-08-30 15:51:31 +09:00
T. Narantuya
d055ba34d8 Remove obsolete deployment guides and ESLint report files to streamline project documentation and improve clarity. Updated package configurations and scripts for better development experience and logging integration. 2025-08-30 15:47:48 +09:00
tema
a8f02ebc2b Add temporary debug endpoints and methods for WHMCS payment methods testing
- Introduced `testPaymentMethods` endpoint in InvoicesController to directly test WHMCS payment methods for a specific client ID.
- Added `testWhmcsPaymentMethods` method in InvoicesService for detailed logging and error handling during WHMCS API calls.
- Implemented cache bypassing and enhanced logging in `getPaymentMethods` method of WhmcsPaymentService for debugging purposes.
- Updated payment method transformation logic in WhmcsDataTransformer to handle variations in WHMCS API responses.
- Added debug information in Checkout and AddressConfirmation components to assist in troubleshooting address confirmation flow.
2025-08-30 15:41:08 +09:00
tema
1640fae457 Add new payment methods and health check endpoints in Auth and Invoices services
- Introduced `validateSignup` endpoint in AuthController for customer number validation during signup.
- Added `healthCheck` method in AuthService to verify service integrations and database connectivity.
- Implemented `getPaymentMethods`, `getPaymentGateways`, and `refreshPaymentMethods` endpoints in InvoicesController for managing user payment options.
- Enhanced InvoicesService with methods to invalidate payment methods cache and improved error handling.
- Updated currency handling across various services and components to reflect JPY as the default currency.
- Added new dependencies in package.json for ESLint configuration.
2025-08-30 15:10:24 +09:00
T. Narantuya
ca68cabe76 Add public directory creation in Dockerfile to ensure it exists during build process 2025-08-29 14:17:15 +09:00
T. Narantuya
01c01d516a Add world-countries dependency to package.json and pnpm-lock.yaml for enhanced geographical data support 2025-08-29 14:12:12 +09:00
T. Narantuya
4f087d5c4c Enhance order processing and address management across components
- Updated pnpm-lock.yaml to include new dependencies and ensure consistent package versions.
- Refactored order handling in OrderOrchestrator to utilize centralized field mapping for Salesforce queries.
- Modified SalesforceOrder interface to replace Order_Type__c with Type for clarity.
- Improved error handling in UsersService during WHMCS updates to provide user-friendly messages.
- Enhanced BillingPage and ProfilePage components to streamline address management and improve user experience.
- Updated documentation to reflect changes in address handling and system architecture.
2025-08-29 14:05:33 +09:00