diff --git a/myproject/orders/templates/orders/order_form.html b/myproject/orders/templates/orders/order_form.html index cc3a02b..9d737cd 100644 --- a/myproject/orders/templates/orders/order_form.html +++ b/myproject/orders/templates/orders/order_form.html @@ -243,6 +243,9 @@ + @@ -531,6 +534,223 @@ document.addEventListener('DOMContentLoaded', function() { } }); }); + + // === ВРЕМЕННЫЕ КОМПЛЕКТЫ === + + // Модальное окно для создания временного комплекта + const tempKitModal = document.getElementById('tempKitModal'); + const tempKitForm = document.getElementById('temp-kit-form'); + const tempKitComponentsContainer = document.getElementById('temp-kit-components'); + let tempKitComponentIndex = 0; + + // Добавление компонента в временный комплект + document.getElementById('add-temp-kit-component-btn').addEventListener('click', function() { + addTempKitComponent(); + }); + + function addTempKitComponent(productId = '', productName = '', quantity = '1') { + const componentHtml = ` +