add more custom file namings

This commit is contained in:
2026-05-12 15:26:52 +02:00
parent 25d2f24cad
commit a28e2968f8
+18 -4
View File
@@ -204,10 +204,6 @@ function getArraySortKey(propertyName, item) {
function getArrayItemName(propertyName, item, index, totalCount) { function getArrayItemName(propertyName, item, index, totalCount) {
var itemSuffix = null; var itemSuffix = null;
if (propertyName === 'translationsTabMapper' && item && typeof item === 'object' && item.order != null) {
itemSuffix = String(item.order);
}
if (propertyName === 'formSchemaData' && item && typeof item === 'object' && item.id != null) { if (propertyName === 'formSchemaData' && item && typeof item === 'object' && item.id != null) {
itemSuffix = String(item.id); itemSuffix = String(item.id);
} }
@@ -252,6 +248,24 @@ function getArrayItemName(propertyName, item, index, totalCount) {
} }
} }
if (propertyName === 'translationsTabMapper' && item && typeof item === 'object' && item.order != null) {
itemSuffix = String(item.order);
}
if (propertyName === 'validationTypes' && typeof item === 'string') {
const rawOrderValue = extractXmlValueFromSection(item, 'Dati', 'COL0003');
if (rawOrderValue) {
const sanitized = sanitizeFileName(rawOrderValue);
if (sanitized) {
itemSuffix = sanitized;
}
}
}
if (propertyName === 'translationsValidationTabMapper' && item && typeof item === 'object' && item.code != null) {
itemSuffix = String(item.code);
}
if (!itemSuffix) { if (!itemSuffix) {
itemSuffix = padIndex(index, totalCount); itemSuffix = padIndex(index, totalCount);
} }