- Mark migrations as completed (u21 applied + 74 rows seeded)
- Mark ChargeDiscountWallet as fully implemented
- Update status from pending to done with details
Problem: ActivateClubMembership overwrites ActivatedAt on re-purchase,
losing the original club activation date. Commission check uses
ActivatedAt to determine 'new member this week'.
Solution: New ClubMembershipCycle table
- Each package purchase creates a new cycle record
- ClubMembership.ActivatedAt = first-time only (never overwritten)
- Commission uses Cycle.PackagePurchasedAt instead of ActivatedAt
- IsCurrentCycle flag tracks active cycle
- Full history preserved for all purchase cycles
Also updated:
- SPEC: section 7.5 (entity), 7.6 (migration), 8.2 (SP change), 8.3 (handler)
- PLAN: phase 1 (entity), phase 2 (activate handler), phase 4 (date query)
- Checklist: added 4 new items
- Exit requires BOTH simultaneously: Balance==0 AND TotalDeposited>=100M
- If Balance=0 but cap not reached → still Magic (can charge more)
- If cap reached but Balance>0 → still Magic (can spend more)
- Added examples: partial deposit (50M/100M) stays in Magic
- Fixed handler 8.1 pseudo-code
- Updated test scenarios in PLAN (7 scenarios covering edge cases)
- Cap resets every time user buys a new 56M package and re-enters Magic
- MagicTotalDeposited & MagicTotalCredited reset to 0 on each new cycle
- Added multi-cycle example (cycle 1, 2, 3... ∞)
- Added section 4.3: reset behavior on re-entry
- Added test scenarios for cycle reset
- PurchaseCycleCount tracks cycles but has no limit
- New folder: roadmap/ for upcoming features
- MAGIC-WALLET-SPEC: full business rules, state machine, x2.5 multiplier,
100M deposit cap, API flow, data model changes, transaction logging
- MAGIC-WALLET-PLAN: 6-phase implementation, checklist, time estimates
- Note: ChargeDiscountWallet completion is independent (not Magic Wallet)
- Note: WalletChangeLog is mandatory (not optional)
- Updated master index with roadmap section
Converted 40+ ASCII art diagrams across 12 files to Mermaid:
- flowchart TD/LR for process flows and architecture
- erDiagram for entity relationships
- graph TD for tree structures (binary tree, categories)
- gantt for roadmap sprints
Files: BUSINESS-01 to 05, TECH-01/03/04/05, OVERVIEW-01/02/05
Directory tree structures kept as plain code blocks (Mermaid N/A)
Matches code fix — IPG now charges DiscountBalance = BasePackageAmount × 2
Same as DayaLoan and ManualPayment. Total for all methods: 56M + 112M = 168M
- Added DiscountProductImage entity and related configurations for product image gallery.
- Created commands and queries for managing product images.
- Developed GetAllDiscountOrders API for admin order management with various filters.
- Implemented VAT calculation service and integrated it into order processing.
- Created Sales Reports API with support for daily, weekly, and monthly reports.
- Completed gRPC services for BackOffice.BFF to expose new APIs.
- Updated Proto files and project references accordingly.
- Added SystemConstants class to centralize hardcoded values for club configuration, commission configuration, and package amounts.
- Introduced SmsTemplates class to manage SMS message templates for various user notifications.
- Implemented automatic SMS sending for Daya Loan approval notifications.
- Updated BackOffice UI to include App Version management features.
- Fixed mapping issues in Mapster profiles for improved data handling.
- Updated changelog and documentation to reflect recent changes and configurations.
- Add CHANGELOG-2025-12-26.md for App Version Management feature
- Update 00-INDEX.md with latest achievements and version 2.5
- Update BackOffice README with App Version Management info
- Update BackOffice.BFF README with new package versions
- Update FrontOffice README with ReferralCode feature
- Implement Chatika account activation via background job
- Create IChatikaApiService interface and its implementation
- Add Club Features system documentation detailing features and entities
- Introduce ClubFeatureType enum to replace hardcoded IDs
- Update SQL scripts for Club Membership migration
- Fix various bugs in BackOffice UI and improve Products page functionality
- Added PersianDateTimeService for converting Gregorian dates to Persian format in the BackOffice frontend.
- Updated multiple frontend pages (Dashboard, UserPayouts, WorkerControl, UserNetworkInfo) to utilize the new Persian date service.
- Enhanced GetUserNetworkPositionDto with 28+ new fields for comprehensive user network data.
- Updated GetUserNetworkPositionQueryHandler to include new methods for calculating network statistics.
- Modified Protobuf messages to accommodate the new fields, increasing from 14 to 42.
- Refined week number calculation algorithm to ensure consistency across C# and SQL implementations.
- Created new CSV and Excel files for binary plan calculations.
- Ensured all changes are tested and validated for accuracy and performance.
- Added last updated date and refined project status for Backend and Frontend.
- Updated completion percentages for FrontOffice UI and BFF.
- Documented completed tasks for BackOffice in the current sprint.
- Added new high-priority tasks related to commission calculation fixes.
- Resolved blockers and minor issues, providing a clearer progress summary.
docs: Create commission-calculation-fix.md for weekly commission calculation analysis
- Documented critical issues affecting commission calculations.
- Provided a detailed plan for fixing the commission calculation logic.
- Included code analysis, affected files, and step-by-step tasks for implementation.
- Outlined the expected timeline and important notes regarding changes.
- Added FINAL-STATUS.md detailing project completion and key metrics
- Created QUICK-REFERENCE.md for quick access to essential documents
- Updated README.md with project overview and quick start guide
- Established STRUCTURE.md outlining the final documentation structure
- Organized and archived old files, ensuring a clean and efficient directory
- Enhanced documentation quality with comprehensive metrics and checklists