diff --git a/src/API/App/v1/Flash/Intervento.php b/src/API/App/v1/Flash/Intervento.php index 96a4d8721..0bb72ae00 100644 --- a/src/API/App/v1/Flash/Intervento.php +++ b/src/API/App/v1/Flash/Intervento.php @@ -84,7 +84,9 @@ class Intervento extends Resource implements UpdateInterface // Salvataggio delle modifiche foreach ($records as [$record, $risorsa]) { - if (!empty($record['remote_id'])) { + if (!empty($record['deleted_at'])) { + $risorsa->deleteRecord($record['id']); + } elseif (!empty($record['remote_id'])) { $risorsa->updateRecord($record); } else { $risorsa->createRecord($record); diff --git a/src/Common/Components/Component.php b/src/Common/Components/Component.php index 508a17c2a..f43b9e0f1 100644 --- a/src/Common/Components/Component.php +++ b/src/Common/Components/Component.php @@ -180,7 +180,10 @@ abstract class Component extends Model $original->getDocument()->triggerEvasione($this); } - reorderRows($this->table, $this->getDocumentID(), $this->getDocument()['id']); + // Ordine delle righe successivamente alla rimozione + if (empty($this->disableOrder)) { + reorderRows($this->table, $this->getDocumentID(), $this->getDocument()['id']); + } return $result; }