Andrey Smakotin 98501c1c26 refactor(products): extract Order Item Select2 to reusable module
Moved order item selection logic from order_form.html to select2-product-search.js
for better code reusability and maintainability.

Changes:
- Extended select2-product-search.js with initOrderItemSelect2() function (~87 lines)
  - Wraps initProductSelect2 for order item context
  - Handles product/kit selection and form field updates
  - Manages custom price indicators
  - Supports data-ajax-url attribute for URL configuration

- Updated order_form.html:
  - Added data-ajax-url to order item select elements
  - Removed inline initOrderItemSelect2 function (~73 lines)
  - Updated dependency check to use initOrderItemSelect2

Benefits:
- No code duplication - reuses existing initProductSelect2
- Cleaner template (79 lines removed)
- Consistent with existing patterns
- Easy to maintain in one place

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 15:30:09 +03:00
Description
No description provided
6.3 MiB
Languages
Python 57%
HTML 32%
JavaScript 9.5%
CSS 1.1%
Shell 0.4%