Compare commits
1 Commits
main
...
feature/ma
| Author | SHA1 | Date | |
|---|---|---|---|
| 9969cc9edc |
@ -1474,8 +1474,8 @@ $(document).ready(function () {
|
||||
},
|
||||
});
|
||||
|
||||
// Ripristina il valore se valido
|
||||
if (partId && partId !== "new" && currentValue) {
|
||||
// === MODIFICA CHIRURGICA: solo qui ===
|
||||
if (currentValue && currentValue !== "new") {
|
||||
const matrice = matrici.find((m) => m.IdMatrice == currentValue);
|
||||
if (matrice) {
|
||||
const option = new Option(
|
||||
@ -1487,11 +1487,15 @@ $(document).ready(function () {
|
||||
$select.append(option).trigger("change");
|
||||
partMatrice[partNumber] = matrice.IdMatrice;
|
||||
} else {
|
||||
// Aggiusta valore non valido
|
||||
$select.val(null).trigger("change");
|
||||
partMatrice[partNumber] = null;
|
||||
}
|
||||
} else {
|
||||
// Nessun valore: assicurati che sia vuoto
|
||||
$select.val(null).trigger("change");
|
||||
partMatrice[partNumber] = null;
|
||||
}
|
||||
// === FINE MODIFICA ===
|
||||
|
||||
$select.on("change", function () {
|
||||
const idmatrice = $(this).val();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user