demarches-normaliennes/app
Pierre de La Morinerie 96037069ff autosave: remove the repetition row after deletion
Before, when autosaving a draft, removing a repetition row would
send `_destroy` inputs to the controller – but not remove the row
from the DOM. This led to the `_destroy` inputs being sent again
on the next autosave request, which made the controller raise
(because the row fields were already deleted before).

To fix this, we let the controller response remove the deleted
row(s) from the DOM.

Doing it using a controller response avoids the need to keep track
of operations on the Javascript side: the controller can easily
know which row was just deleted, and emit the relevant changes for
the DOM. This keeps the autosave requests robust: even if a request
is skipped (e.g. because of a network interruption), the next request
will still contain the relevant informations to succeed, and not let the
form in an unstable state.

Fix #5470
2020-08-25 14:39:34 +02:00
..
assets views: add a "None" option to optional radio lists 2020-08-25 11:42:30 +02:00
controllers autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
dashboards define SHOW_PAGE_ATTRIBUTES for bill dashboard 2020-07-07 08:06:37 +00:00
fields manager: remove support for old pj 2019-07-30 16:11:17 +02:00
graphql graphql: possibility to filter dossiers by archived 2020-07-29 16:59:34 +02:00
helpers prend en compte le nom de l'enseigne pour l'établissement 2020-08-20 14:23:02 +02:00
javascript autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
jobs jobs: add health-related keywords to dubious procedures scanner 2020-08-25 12:04:10 +00:00
lib prend en compte le nom de l'enseigne pour l'établissement 2020-08-20 14:23:02 +02:00
mailers ajout du nom d'application dans les mailers 2020-07-23 16:17:52 +02:00
models validates phone champ server side 2020-08-20 15:33:03 +02:00
policies policies: clarify the role of ChampPolicy 2020-06-24 15:42:30 +02:00
serializers expose effectif_annuel dans api graphql 2020-04-23 09:53:27 +02:00
services services: make etablissement save raise on error 2020-08-18 14:56:40 +02:00
validators validate api_entreprise_token 2020-07-08 18:59:22 +02:00
views autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00