Commit graph

34 commits

Author SHA1 Message Date
sebastiencarceles
35f4874b69 allow integers only 2023-02-27 15:16:40 +01:00
Damien Le Thiec
17f8475b07 Refacto comparaison typed id 2023-02-23 11:00:09 +01:00
Damien Le Thiec
61d2edc42e Cache champ attributes 2023-02-22 20:05:36 +01:00
Damien Le Thiec
2052bc7840 Remove dependency type_de_champ -> procedure 2023-02-21 16:00:58 +01:00
Damien Le Thiec
dce4c84f9a Merge branch 'main' into feature/prefill_repetible 2023-02-16 17:08:30 +01:00
Damien Le Thiec
6231c75e07 Fix tests conflicts 2023-02-16 16:58:55 +01:00
sebastiencarceles
d5ffd61ab6 validate values inclusion 2023-02-16 10:49:15 +01:00
Damien Le Thiec
96b9ec3f42 First fix tests 2023-02-15 18:13:16 +01:00
Damien Le Thiec
539b9e4f10 Merge branch 'main' into feature/prefill_repetible 2023-02-15 17:53:06 +01:00
Damien Le Thiec
4876d583b6 Merge branch 'main' into feature/prefill_repetible 2023-02-15 17:39:19 +01:00
sebastiencarceles
edf90a77f3 validate epci to reject incorrect prefill values 2023-02-15 12:14:11 +01:00
sebastiencarceles
f836f57e98 transform the input value to assignable attributes
Use the prefill decorator to transform the input value (for example
['01', '200042935']) into assignables attributes (for example
{ code_departement: '01', value: '200042935' }), in order to let the
champ be prefilled successfully.
2023-02-15 12:14:11 +01:00
Damien Le Thiec
2533ca50d4 Merge branch 'main' into feature/prefill_repetible 2023-02-15 11:07:56 +01:00
Sébastien Carceles
12abf9045b add external_id and value validation 2023-02-14 09:23:11 +01:00
Damien Le Thiec
fc94aaaa21 Use "to_assignable_attributes" 2023-02-12 11:55:28 +01:00
Damien Le Thiec
c5f1f80d25 Add prefill params tests repetition 2023-02-08 17:38:51 +01:00
Damien Le Thiec
e7c78321d9 Fix new failing tests 2023-02-01 13:35:32 +01:00
Damien Le Thiec
f91cc05d95 Small fix link to prefill type de champ 2023-01-31 16:24:32 +01:00
Damien Le Thiec
20ba96ba3c POST working with prefill query example for repeating fields 2023-01-31 14:54:23 +01:00
Damien Le Thiec
81df033282 First draft repeatable 2023-01-26 17:57:57 +01:00
Sébastien Carceles
49ce255e29
feat(dossier): prefill region champ (#8442)
* make regions champ prefillable

* add possible and example value

* add external_id and value validation
2023-01-24 11:25:17 +00:00
Damien Le Thiec
3a8a50a216
Allow prefill pays type de champs (#8344)
* Allow prefill pays type de champs

* Avoid conditional prefil params for pays champ

* Clean pays data with batch update

* Fix bug and add test batch update pays value

* Improve performance batch_update_pays

* Fix associated country code problem

* Fix after party task name

* Format country name if needed in batch update
2023-01-18 12:52:38 +01:00
Damien Le Thiec
5e26acb0e1
Make date and datetime prefillable (#8304)
* Make date and datetime prefillable

* Format in ISO8601 format
2023-01-12 17:42:02 +01:00
Sébastien Carceles
06b8a0f734
feat(dossier): prefill boolean champs (#8381) 2023-01-06 14:01:59 +01:00
Damien Le Thiec
c4e427642f Allow prefill civility 2022-12-20 14:38:05 +01:00
Sébastien Carceles
0a10a08c21
feat(demarche): describe procedure prefilling (#8187)
* feat(demarche): description

Show the description of an opendata procedure (published or draft),
with help about how to prefill a dossier for this procedure.

Co-authored-by: Damien Le Thiec <damien.lethiec@gmail.com>
2022-12-19 11:32:09 +00:00
Sébastien Carceles
b8ff0ba4a2
feat(demarche): sign up when prefilling a dossier (#8247)
* store prefill params in session

Instead of using query params on /dossier/new, we assume the user comes
from /commencer/:path, which is the new prefill link.

There, we store the prefill params in session, and use them to prefill
the dossier when creating it, in /dossiers/new.

* spec: cover the case

* review: serialize with json instead of yaml

* review: rename method

* review: store only query params

* review: comment why we dont override already stored params
2022-12-15 10:58:17 +01:00
sebastiencarceles
69d61913f5 review: unauthorize complex champs 2022-12-08 15:27:39 +01:00
sebastiencarceles
bf03e3b35a review: prefix typed ids with 'champ_' 2022-12-08 15:27:39 +01:00
sebastiencarceles
11fed2c934 review: champs exist because stable ids exist 2022-12-08 15:27:39 +01:00
sebastiencarceles
a5c1c68a91 review: style 2022-12-08 15:27:39 +01:00
Damien Le Thiec
006a1257b5 Refacto prefill_params construction (remove merge) 2022-12-08 15:27:39 +01:00
sebastiencarceles
1e21a3d3e1 review: query the db only once 2022-12-08 15:27:39 +01:00
sebastiencarceles
f4e1a09e73 prepare prefilled values from ctrl params 2022-12-08 15:27:39 +01:00