Fixed multiple issues:
1. Enhanced closeInstantCustomization to properly reset state
2. Clear customization containers and config state
3. Re-render instant servers when returning from customize
4. Fixed tab switching to preserve instant server selection
5. Auto-select first instant server when switching back to instant tab
Now instant plans work correctly:
- After customizing, clicking back returns to instant grid
- Switching tabs preserves instant server functionality
- Selected server state is properly maintained
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The code had improper indentation in the storage rendering section,
causing JavaScript errors and preventing plans from showing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Instead of parsing storage strings and trying to match:
- Parse configoption IDs directly from WHMCS order URL
- Use these exact IDs to preselect components
- For storage, use the preselected values in the pooled grid
- Original drives marked as €0 (included in base price)
This ensures the customization shows exactly what WHMCS has configured:
- 4x Crucial T705 4TB + 2x Kioxia CM7-V 3.2TB
- Not trying to guess or parse storage descriptions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major changes:
- Track original drives to avoid double-charging for included components
- For instant customization, original drives have 0 cost (included in base price)
- When user changes drives, only charge the price difference
- Separate storage pricing from other component pricing
This ensures the €1520 instant server keeps its base price when customizing,
and only adds charges for actual upgrades beyond the included configuration.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update renderDynamicOptions to accept storageRequirements parameter
- Pass storageRequirements from customize handler to renderDynamicOptions
- Ensures storage configuration is properly preserved when customizing instant servers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Separate storage options handling from individual component matching
- Pass storage requirements to pooled grid for proper pre-filling
- Improve brand and capacity matching logic for storage drives
- Reset slots to None before filling with instant server configuration
- Add console warnings for debugging unmatched drives
This ensures that when customizing an instant server, the storage configuration
is correctly preserved (e.g., 4x Crucial T705 4TB + 2x Kioxia CM7-V 3.2TB)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Enhanced component matching algorithm with scoring system
- Improved storage matching with capacity, type, and brand detection
- Pre-fill pooled storage grid with instant server configuration
- Display correct quantities for preselected storage drives
- Better RAM, network, and location matching
When user clicks Customize on an instant server, the system now:
1. Analyzes the instant server specs (CPU, RAM, Storage, Network)
2. Intelligently matches them with available configuration options
3. Pre-selects the matching components in the configuration tool
4. Allows user to modify the pre-configured setup
5. Maintains all specifications in the WHMCS order URL
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>