Commit graph

1640 commits

Author SHA1 Message Date
clemkeirua
d01a53eb72 remove :cached_notifications gate 2020-09-21 08:28:42 +00:00
kara Diaby
5c68d75107 add titre_identite champ 2020-09-18 14:57:08 +02:00
clemkeirua
1e32a3c11f add complexity check to admin account creation 2020-09-18 11:16:34 +02:00
clemkeirua
5a8fbde0e7 remove dead code in admin model 2020-09-18 11:16:34 +02:00
clemkeirua
de3118bc7b force password reset on admin promotion or creation 2020-09-17 16:39:13 +02:00
clemkeirua
0307beecd6 Revert "Merge pull request #5576 from tchak/soft-delete-users"
This reverts commit bf0d3914ce, reversing
changes made to 503527459e.
2020-09-17 15:39:16 +02:00
Paul Chavard
a0dd3604a4 User discard_and_anonymize! 2020-09-17 11:16:56 +02:00
Paul Chavard
337b20661a Add discared_at to users 2020-09-17 11:16:56 +02:00
clemkeirua
01ac4d7e19 remove operation_log_serialize_subject 2020-09-17 09:24:50 +02:00
Paul Chavard
bbcdff0ccf Use IGN plan v2 and add MNHN data sources 2020-09-15 14:39:02 +02:00
simon lehericey
e4de522b48 only retrieve id of procedures with notifications 2020-09-11 09:43:04 +00:00
clemkeirua
3697c610b6 make polynesia mobile phone number valid 2020-09-09 09:00:07 +02:00
clemkeirua
c7b96d3d43 add feature-flip for instructeurs on cached notifications 2020-09-08 15:40:42 +00:00
clemkeirua
52ea5ef89a make Dossier#with_notifications great again
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-09-08 15:40:42 +00:00
Paul Chavard
91bc2db594 Expose revisions on GraphQL API 2020-09-08 10:54:13 +02:00
clemkeirua
61cf33e3ca remove duplicate private champ 2020-09-04 15:40:23 +02:00
Paul Chavard
6d4425885d Fix champ order joins sql error 2020-09-03 18:32:43 +02:00
Paul Chavard
11a1e44fbe Remove procedure_id from type_de_champ 2020-09-03 15:23:58 +02:00
Paul Chavard
d1de1587d3 Always serialize type_de_champ stable_id as id 2020-09-03 15:23:58 +02:00
kara Diaby
ae61c279af migrate emails text editor to new interface 2020-09-03 14:42:22 +02:00
Paul Chavard
5ceae8235b Ignore type_de_champ procedure_id 2020-09-02 11:26:26 +02:00
Paul Chavard
ec72fdd164 Remove migration service 2020-09-02 11:26:26 +02:00
Christophe Robillard
090a247ba9 validates phone champ server side 2020-08-20 15:33:03 +02:00
Christophe Robillard
f77cc06a91 prend en compte le nom de l'enseigne pour l'établissement 2020-08-20 14:23:02 +02:00
Pierre de La Morinerie
a7361fdbd3 models: require belong_to associations on mail templates 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
29e8c43e5e models: require belong_to associations on groupe_instructeur 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
5a7bd24fba models: require belong_to associations on type_de_champ
- Make `type_de_champ.procedure` a requirement;
- Move the procedure_id assignation to `before_validation` (otherwise
the record is invalid, and never gets saved);
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
6328011f60 models: require belong_to associations on champ
- Make `champ.dossier` a requirement;
- Move the dossier_id assignation to `before_validation` (otherwise
the record is invalid, and never gets saved);
- Allow specs to only build the champ (instead of saving it to the
database), which bypasses the requirement to have a dossier.
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
eb22dc9d8f models: require belong_to associations on module_api_carto 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
71d9774d58 models: require belong_to associations on trusted_device_token 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
d807700c7b models: require belong_to associations on traitement 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
059c147ffc models: require belong_to associations on service 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
ce53e219e0 models: require belong_to associations on procedure_presentation
Some tests are still failing
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
802d3804f5 models: require belong_to associations on invite 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
fe8804f208 models: require belong_to associations on individual 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
afb1c33154 models: require belong_to associations on geo_area 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
aff2713032 models: require belong_to associations on follow 2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
91619b16e8 models: require belong_to associations on feedback 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
79fcf5e814 models: require belong_to associations on exercice 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
51d392a1dc models: require belong_to associations on dossier 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
01248022bf models: require belong_to associations on deleted_dossier 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
dd1bed9340 models: require belong_to associations on commentaire 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
32e55a6d37 models: require belong_to associations on avis 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
aefdd5d2a1 models: require belong_to associations on attestation_template 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
1ea4c2aa36 models: require belong_to associations on attestation 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
c1e2928ce7 models: require belong_to associations on assign_to 2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
11456109c0 models: explicitly mark optional belongs_to relationship as so
This prepares making the `belongs_to` relationship required by default.
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
c01d640997 models: return procedure revisions in deterministic order
Fixes a randomly-failing spec in spec/models/procedure_revision_spec.rb.
2020-08-13 17:27:37 +02:00
Pierre de La Morinerie
2892fdbeef models: remove columns that have been deleted from db schema
These columns are gone, so we can't stop ignoring them.
2020-08-12 12:06:58 +02:00
Pierre de La Morinerie
6d28069539 models: generate annotations 2020-08-12 11:45:53 +02:00
Pierre de La Morinerie
8962db38cc models: render attestations in a simpler way
The older method of instanciating an entire new rendering stack can be
made simpler using Rails >= 5.0 methods.

See https://api.rubyonrails.org/classes/ActionController/Renderer.html#method-i-render
2020-08-04 16:53:46 +02:00
jpoulvel
bf94cc021b
Merge pull request #5424 from betagouv/new_design_edit_attestation
New design page admin/attestation_templates/edit
2020-07-31 11:18:22 +02:00
Christophe Robillard
03e3e8fb1c rename Dossier#modifier_annotations!
give a more accurate name to the method

Co-authored-by: clemkeirua <clement@keiruaprod.fr>
2020-07-30 10:18:44 +02:00
Judith
5df3838173 - tranferred controllers from admin to mew_administrateur
- removed admin/attestation_templates views
- changed routes accordingly
2020-07-29 12:26:27 +02:00
Paul Chavard
1fca481c6e Cleanup after clone 2020-07-28 17:04:06 +02:00
clemkeirua
7e085c657d specific deactivation of rubocop DS/ApplicationName rule 2020-07-23 16:20:16 +02:00
Paul Chavard
a08e318617 Add implicit_order_column on revisions 2020-07-22 12:25:06 +02:00
Paul Chavard
69ab2e44fb Insert type_de_champ with correct initial position 2020-07-22 11:09:51 +02:00
Paul Chavard
3193784c24 Remove unused revision_id from payload 2020-07-22 11:09:06 +02:00
Paul Chavard
0338080430 Remove unused procedure move type_de_champ code 2020-07-21 19:35:30 +02:00
Paul Chavard
d18a9c8162 Migrate procedures “on demand” 2020-07-21 19:35:30 +02:00
Paul Chavard
0a0912503b Add type_de_champ mutation methods to revision 2020-07-21 19:35:30 +02:00
Paul Chavard
9de917592b Add revisions models and relationships 2020-07-21 19:35:30 +02:00
Christophe Robillard
7f90bdeec4 only instructeurs of the avis dossier or claimant can revive expert 2020-07-21 13:14:07 +02:00
Christophe Robillard
52e8f32e19 expert can only revoke avis claimed by him/her 2020-07-16 21:07:20 +02:00
Christophe Robillard
3ea34834a7 revoke expert avis 2020-07-16 21:05:11 +02:00
Paul Chavard
b628169053 Remove unsused drop_down_list model 2020-07-16 15:29:01 +02:00
clemkeirua
7b9a954473 include procedure in usual_traitement_time 2020-07-15 09:27:23 +00:00
clemkeirua
96e82c75d6 use more idiomatic update 2020-07-15 09:00:12 +00:00
clemkeirua
299c86141c added before_save to PieceJustificativeChamp in order to set skip_pj_validation 2020-07-15 09:00:12 +00:00
clemkeirua
bdbe57debd add skip_pj_validation accessor to TypeDeChamp 2020-07-15 09:00:12 +00:00
Paul Chavard
cc7e6853e7 Disable usual_traitement_time 2020-07-12 12:32:28 +02:00
Paul Chavard
ef259c361d Fix exception when purge_later is called before save 2020-07-08 19:25:05 +02:00
Paul Chavard
a74e52c828 Call remove_drop_down_list on before_save 2020-07-08 19:25:05 +02:00
Paul Chavard
3c9cc6c070 Remove repetition types_de_champ on type_champ change 2020-07-08 19:25:05 +02:00
Christophe Robillard
2c56511204 validate api_entreprise_token 2020-07-08 18:59:22 +02:00
Christophe Robillard
f38e16e371 avoid n+1 queries 2020-07-08 18:15:15 +02:00
Christophe Robillard
1253bb5994 store instructeur_email in traitement 2020-07-08 18:15:15 +02:00
Christophe Robillard
9b6c5fd7fd update termine_close_to_expiration with traitement 2020-07-08 18:15:15 +02:00
Christophe Robillard
0be4b50ade update usual_traitement_time with traitement model 2020-07-08 18:15:15 +02:00
Christophe Robillard
a072d35211 use traitement model
when a dossier is terminated (accepte, refuse or classe_sans_suite),
we store now `processed_at` and `motivation` in a traitement instance
2020-07-08 18:15:15 +02:00
Christophe Robillard
f631acd118 update state date in aasm after callbacks
call aasm event methods, not state methods directly
2020-07-08 18:15:15 +02:00
Pierre de La Morinerie
cd65dc14dd models: fix ProcedurePresentation#sorted_ids
The `Dossier#with_notifications` scope needs to be composed with an
`instructeurs` scope. But it seems Rails 6 will only generate proper
SQL if the `instructeurs` scope is merged before filtering on
`with_notifications`.
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
4aeb8c392f bill_signature: fix reading unsaved attachments
Since Rails 6, an unsaved attachment_changes can contain either
a Tempfile, or an hash with an :io key.

squash! bill_signature: fix reading unsaved attachments
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
a4ed845e43 models: fix attestation template rendering on Rails 6 2020-07-07 18:03:56 +02:00
Paul Chavard
c9ab80c880 WIP 2020-07-07 18:03:56 +02:00
Paul Chavard
6a24c3f812 Rails app:update 2020-07-07 18:03:56 +02:00
Christophe Robillard
83fba55b29 refactor instruction_instructeur_avis_url 2020-06-30 09:17:27 +02:00
Paul Chavard
210389d0f8 Remove admin creation notification email 2020-06-25 16:29:06 +02:00
Paul Chavard
97f91513c8 Store drop_down_list values as jsonb 2020-06-25 13:14:17 +02:00
Pierre de La Morinerie
84149218db dossier: refactor piece_justificative export helpers 2020-06-24 15:42:30 +02:00
clemkeirua
6b3631dbfe extract rendering condition 2020-06-24 14:11:58 +02:00
clemkeirua
5c39f22417 seuil d'affichages des checbox/radio à 5 elements 2020-06-24 12:18:56 +02:00
clemkeirua
342129c893 display small multiple selects as checkboxes 2020-06-24 12:18:56 +02:00
clemkeirua
22fc4c4195 display small selects as radio buttons 2020-06-24 12:18:56 +02:00
Paul Chavard
34df07bc96 Fix oui/non filter on type_de_champ_private 2020-06-23 11:33:46 +02:00
jpoulvel
adaf0753b0
Merge branch 'dev' into instruct-filter-yes-no 2020-06-16 14:53:22 +02:00
Paul Chavard
c4896b45ad Prepare to remove dossier procedure_id 2020-06-11 16:13:44 +02:00
Christophe Robillard
8b802ae2c8 add destroy dependent option for exports 2020-06-11 12:33:29 +02:00
Christophe Robillard
56ed8dd36a remove useless dependent option 2020-06-11 10:24:04 +02:00