feat(v1.5): complete phases 40-43 workflow cleanup
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -35,6 +35,20 @@
|
||||
return html;
|
||||
}
|
||||
|
||||
function buildShipmentStatusCheckboxes(namePrefix) {
|
||||
var html = '<div class="checkbox-group">';
|
||||
Object.keys(data.shipmentStatusOptions || {}).forEach(function(statusKey) {
|
||||
var config = data.shipmentStatusOptions[statusKey] || {};
|
||||
var label = config.label || statusKey;
|
||||
html += '<label class="checkbox-label">'
|
||||
+ '<input type="checkbox" name="' + namePrefix + '[shipment_status_keys][]" value="' + escapeHtml(statusKey) + '"> '
|
||||
+ escapeHtml(label)
|
||||
+ '</label>';
|
||||
});
|
||||
html += '</div>';
|
||||
return html;
|
||||
}
|
||||
|
||||
function buildEmailActionConfig(namePrefix) {
|
||||
var html = '<select class="form-control" name="' + namePrefix + '[template_id]">'
|
||||
+ '<option value="">-- Wybierz szablon --</option>';
|
||||
@@ -63,6 +77,7 @@
|
||||
row.innerHTML = '<div class="automation-row__fields">'
|
||||
+ '<select class="form-control automation-row__type" name="' + namePrefix + '[type]" onchange="window.AutomationForm.onConditionTypeChange(this)">'
|
||||
+ '<option value="integration" selected>Integracja (kanal sprzedazy)</option>'
|
||||
+ '<option value="shipment_status">Status przesylki</option>'
|
||||
+ '</select>'
|
||||
+ '<div class="automation-row__config">'
|
||||
+ buildIntegrationCheckboxes(namePrefix)
|
||||
@@ -107,6 +122,10 @@
|
||||
|
||||
if (select.value === 'integration') {
|
||||
configDiv.innerHTML = buildIntegrationCheckboxes(namePrefix);
|
||||
return;
|
||||
}
|
||||
if (select.value === 'shipment_status') {
|
||||
configDiv.innerHTML = buildShipmentStatusCheckboxes(namePrefix);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user