fixed ordine alfabetico capitolato

This commit is contained in:
2026-03-25 14:20:45 +01:00
parent 0645a0c675
commit b562eb4033
3 changed files with 16 additions and 5 deletions
+13 -4
View File
@@ -81,10 +81,19 @@ $(document).ready(function () {
data: { field_ids: fieldId },
success: function (res) {
const arr = res && res[fieldId] ? res[fieldId] : [];
extraFieldOptions = (arr || []).map((x) => ({
id: x.IdCustomFieldsValue,
label: x.Valore,
}));
extraFieldOptions = (arr || [])
.map((x) => ({
id: x.IdCustomFieldsValue,
label: x.Valore || "",
}))
.sort((a, b) =>
a.label.localeCompare(b.label, "it", {
sensitivity: "base",
numeric: true,
}),
);
done();
},
error: function () {