update
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -109,6 +109,20 @@
|
||||
return html;
|
||||
}
|
||||
|
||||
function buildOrderStatusActionConfig(namePrefix) {
|
||||
var html = '<select class="form-control" name="' + namePrefix + '[order_status_code]">'
|
||||
+ '<option value="">-- Wybierz docelowy status zamowienia --</option>';
|
||||
|
||||
(data.orderStatusOptions || []).forEach(function(statusOption) {
|
||||
html += '<option value="' + escapeHtml(statusOption.code || '') + '">'
|
||||
+ escapeHtml(statusOption.name || statusOption.code || '')
|
||||
+ '</option>';
|
||||
});
|
||||
|
||||
html += '</select>';
|
||||
return html;
|
||||
}
|
||||
|
||||
function addCondition() {
|
||||
var idx = getNextIndex(conditionsContainer);
|
||||
var namePrefix = 'conditions[' + idx + ']';
|
||||
@@ -144,6 +158,7 @@
|
||||
+ '<option value="send_email" selected>Wyslij e-mail</option>'
|
||||
+ '<option value="issue_receipt">Wystaw paragon</option>'
|
||||
+ '<option value="update_shipment_status">Zmiana statusu przesylki</option>'
|
||||
+ '<option value="update_order_status">Zmiana statusu zamowienia</option>'
|
||||
+ '</select>'
|
||||
+ '<div class="automation-row__config">'
|
||||
+ buildEmailActionConfig(namePrefix)
|
||||
@@ -190,6 +205,10 @@
|
||||
}
|
||||
if (select.value === 'update_shipment_status') {
|
||||
configDiv.innerHTML = buildShipmentStatusActionConfig(namePrefix);
|
||||
return;
|
||||
}
|
||||
if (select.value === 'update_order_status') {
|
||||
configDiv.innerHTML = buildOrderStatusActionConfig(namePrefix);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user