1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-27 16:23:19 +01:00

Correzione per rimozione righe da azione rapida API

This commit is contained in:
Dasc3er 2021-02-24 17:40:48 +01:00
parent 65c78d8197
commit 169067b217
2 changed files with 7 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}