Commit graph

1267 commits

Author SHA1 Message Date
clemkeirua
4373cb22cb Revert "Merge pull request #4552 from tchak/champ-communes"
This reverts commit 4cec26f73a, reversing
changes made to 0ef25ef36c.
2020-01-13 16:26:27 +01:00
Christophe Robillard
9a62d3fe0c delete a user 2020-01-13 10:06:43 +01:00
Paul Chavard
c6326bfa77 Fix tests involving attachment urls 2020-01-08 14:46:18 +01:00
Pierre de La Morinerie
7f5b0d8bf3 specs: don't create an implicit brouillon in all test cases 2020-01-07 17:59:11 +01:00
Pierre de La Morinerie
630c6de967 specs: move the query for individual to the individual context 2020-01-07 17:59:11 +01:00
Paul Chavard
e61e39d345 Remove unused code and tests 2020-01-07 11:52:51 +01:00
Pierre de La Morinerie
8eb295d67e dossiers: avoid exceptions on invalid AASM transitions
When attempting an invalid transition on a dossier, provide a meaningful
error message (instead of letting an `AASM::InvalidTransition` exception
propagate).

This handles not only the case where the same state is applied twice
(which was already handled manually), but all cases where the transition
is invalid.
2019-12-19 13:25:32 +01:00
simon lehericey
60538c9c28 Controller use new export model 2019-12-18 13:13:15 +01:00
simon lehericey
d0f0533a32 Remove unused code 2019-12-18 13:13:15 +01:00
simon lehericey
c02e8b9553 Routing: send emails to the right group 2019-12-16 17:47:08 +01:00
simon lehericey
058442c84e [link to #4557] An instructeur cannot change its email on its own 2019-12-11 17:18:21 +01:00
simon lehericey
e06733d01b Clean spec 2019-12-11 17:18:21 +01:00
Paul Chavard
6b5793f0b9 [GraphQL] fix a crash in mutations with an attachment 2019-12-11 13:22:32 +01:00
Paul Chavard
422b7f37ec [GraphQL] expose file information 2019-12-11 12:34:49 +01:00
Paul Chavard
2f060fc30a Add depubliee state to procedures 2019-12-04 16:52:41 +01:00
Paul Chavard
b5eafdab56 [GraphQL]: informations du service 2019-12-04 14:21:40 +01:00
Paul Chavard
fd42fafcb4 [GraphQL]: informations du demandeur du dossier 2019-12-04 12:39:29 +01:00
Paul Chavard
7b947feae4 Rename demarche archivée to demarche close 2019-11-28 15:07:16 +01:00
simon lehericey
6657459f9c Fix add instructeur with empty mail
As select2 does not handle required attribute, we can only add server side logic
2019-11-27 14:39:16 +01:00
Paul Chavard
e9f993fe0c [GraphQL]: normalize date names in French 2019-11-27 12:23:00 +01:00
maatinito
9de9a1fd71 Use time.zone functions instead of server time functions
(Time.zone.today vs Date.today)
2019-11-26 14:26:36 +01:00
Paul Chavard
0c6705f7fd Drop old export service 2019-11-21 10:25:40 +01:00
Christophe Robillard
b42f21264e permet le suivi auto après envoi instructeur
Close #4163
2019-11-20 16:41:30 +01:00
Pierre de La Morinerie
8b8a96abda dossiers: save draft by default (instead of submitting)
Make the default behavior of `update_brouillon` be to update the draft,
instead of submitting the dossier.

This makes all requests made to `update_brouillon` without specifying
an extra `submit_draft` parameter to just save the draft. It will make
autosaving the draft easier and safer.
2019-11-20 11:24:31 +01:00
simon lehericey
dae7a3bfd0 [fix #4529] Log user email in manager space 2019-11-19 12:15:03 +01:00
Paul Chavard
e600aceccc [GraphQL]: add dossier state change mutations 2019-11-19 11:51:34 +01:00
simon lehericey
9ca026a630 Use a select2 box for looking to instructeurs 2019-11-18 17:08:51 +01:00
Paul Chavard
ba03dbf8dd [GraphQL] Add dossierEnvoyerMessage mutation 2019-11-13 19:54:27 +01:00
Paul Chavard
f0ac01bf19 [GraphQL]: test unauthorized mutation 2019-11-13 19:54:27 +01:00
Paul Chavard
ea6667ff9f [GraphQL]: démarche and dossier number should be a number 2019-11-13 15:53:56 +01:00
Paul Chavard
fa741c9bae [GraphQL]: do not return dossiers brouillons 2019-11-07 22:07:42 +01:00
Paul Chavard
990c867c2e [GraphQL] Add more filters to dossiers 2019-11-07 22:07:42 +01:00
Paul Chavard
4231b81727 [GraphQL] Add create direct upload mutation 2019-11-07 12:48:51 +01:00
Pierre de La Morinerie
8df91df9fa assigns: strip and lowercase the search filter 2019-11-06 12:16:30 +01:00
Pierre de La Morinerie
0eeac59ecd assigns: fix search among the unassigned instructeurs
This was broken since moving the email out of the Instructeur column.
2019-11-06 12:16:30 +01:00
Pierre de La Morinerie
f63cd86811 webhook: fix a crash when the Helpscout customer is unknown 2019-11-04 18:36:52 +01:00
Pierre de La Morinerie
d78d206544 instructeurs: fix expert creation not to use Instructeur.email
It kind of worked until now, because the email field is disabled, and
thus never accessed.

But better make it clean, by accessing an object (User) where the email
field actually exists.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
a462edb9bc instructeurs: alias instructeur.email
This also means we need to replace instances of `pluck` on the email
column.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
cd478b489e instructeurs: replace calls to Instructeur.find_by(email: …) 2019-11-04 10:44:23 +01:00
Nicolas Bouilleaud
72b7ff221c move procedure to new design 2019-10-31 10:27:19 +01:00
simon lehericey
477f7c9837 Remove instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
79b808470c Add instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
94081a3997 Show Groupe Instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
4491dca19a Index Groupe Instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
07aefdd40b Fix test in new_admin/groupe_instructeur_controller 2019-10-30 14:27:51 +01:00
simon lehericey
35bba62297 Update routing critéria name 2019-10-23 21:47:20 +02:00
simon lehericey
a5ffe9f54b Remove instructeur from the group 2019-10-23 21:47:20 +02:00
simon lehericey
a6deafd885 Add instructeurs to groupe 2019-10-23 21:47:20 +02:00
simon lehericey
3dd3af8482 Groupe instructeur update 2019-10-23 21:47:20 +02:00
simon lehericey
9a6336f508 Groupe instructeur create 2019-10-23 21:47:20 +02:00
simon lehericey
733e83cc54 Groupe instructeur show 2019-10-23 21:47:20 +02:00
simon lehericey
2749c00ce3 Groupe instructeur index 2019-10-23 21:47:20 +02:00
Paul Chavard
86b271997b Invite experts to linked dossiers
closes #3669
2019-10-23 13:10:09 +02:00
clemkeirua
053cc5cfc5 [fix #4058] instructeur peut passer accepte → instruction 2019-10-07 15:17:33 +02:00
Paul Chavard
3f36153807 [GraphQL] Add groupe_instructeurs to demarche 2019-09-26 11:25:14 +02:00
Paul Chavard
4b885f7a12 Add basic graphql test 2019-09-24 10:47:21 +02:00
Nicolas Bouilleaud
a2131d0fcc Don’t unfollow when archiving
It was slightly broken in two ways:
- it doesn’t make other instructeurs unfollow the dossier
- if the dossier is unarchived, instructeurs don’t refollow automatically.
2019-09-20 11:06:33 +02:00
simon lehericey
8660d4af30 Instructeur: only export its dossiers 2019-09-19 12:24:40 +02:00
simon lehericey
f5bbc9e2f9 InstructeurProcedureShow: show dossier for all the gi involved 2019-09-18 15:51:02 +02:00
Paul Chavard
8fcf1353f3 Remove duplicated attachments 2019-09-17 18:12:53 +02:00
simon lehericey
dec42e4886 Instructeur procedure index: show stats by procedure
Also sum the count from differents groupe_instructeur from the same procedure
2019-09-17 17:19:14 +02:00
Nicolas Bouilleaud
c26a701a17 Refactor and redesign publish modal
* remove the autocomplete menu
* use ujs to pre-validate the procedure
* tweak the UI
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
00c37eccb3 Simplify procedure.path and publish event
* Get rid of the “reopen” event, merge it with “publish” (it’s the same code)
* Remove the “availability” states; “available with brouillon” makes no sense since the brouillons path are always uuids
* Instead of checking if publish can happen, just try it and handle the errors
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
92e6032115 Remove path availability dead code when creating/editing a procedure
There’s no “path” field anymore in the Procedure form, it can only be set when publishing.
2019-09-17 16:30:48 +02:00
clemkeirua
949a0c21e6 gestion des 2 formats de bouton monavis 2019-09-17 13:39:45 +02:00
Paul Chavard
ff2b6ca3ea Fix service controller 2019-09-17 12:37:37 +02:00
Paul Chavard
adfa80142a Cleanup application_controller and current_user 2019-09-17 12:37:37 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
Paul Chavard
347f03d2a9 Redirect to pdf attachement old name if not attached 2019-09-10 15:06:47 +02:00
pedong
25596ca2f2 [fix #4181] add service to procedure API 2019-09-10 11:06:28 +02:00
Paul Chavard
7ffb98e616 Remove carrierwave uploaders 2019-09-10 10:49:12 +02:00
Pierre de La Morinerie
2724f4667b groupe_instructeur: unsassign instructeurs on group destroy
Fix #4282
2019-09-09 17:29:29 +02:00
simon lehericey
ad7ef6c739 Link assign_to and procedure by groupe_instructeur 2019-09-03 06:47:02 +02:00
simon lehericey
d582af0962 Fix Instructeur Procedure Index 2019-09-03 06:47:02 +02:00
simon lehericey
3cc8f0c792 Link Dossier and GroupeInstructeur 2019-09-03 06:47:02 +02:00
simon lehericey
b541ef0b41 Procedure has many instructeurs with defaut_groupe_instructeur 2019-09-02 11:41:12 +02:00
simon lehericey
85499365a0 Instructeur has_many procedures through groupe_instructeur 2019-09-02 11:41:12 +02:00
Paul Chavard
a19b10b118 Migrate attestation files to active_storage 2019-08-27 17:42:52 +02:00
simon lehericey
7b9b90a3e0 [fix #4238] When the token does not exist, redirect to home page without sending a new link 2019-08-27 15:01:46 +02:00
simon lehericey
7ffad1e6ae Spec: factorize 2019-08-27 15:01:46 +02:00
simon lehericey
e9cabafcc5 Spec: resend token if it's invalid 2019-08-27 15:01:46 +02:00
Paul Chavard
cc35a04e26 Migrate procedure logo to active_storage 2019-08-21 11:15:00 +02:00
simon lehericey
ebe871819d Fix admin deletion by an administration 2019-08-20 12:01:36 +02:00
simon lehericey
80cb8b87fe Keep only the FC logic and use devise for the rest 2019-08-16 16:48:22 +02:00
simon lehericey
54d7effe28 Spec: specify france_connect logic 2019-08-16 16:48:22 +02:00
simon lehericey
4be9c79e03 Spec : specify remember me 2019-08-16 16:48:22 +02:00
simon lehericey
08bb393ced Spec: specify locked logic 2019-08-16 16:48:22 +02:00
simon lehericey
1b14d85c77 Rerender if wrong credentials 2019-08-16 16:48:22 +02:00
simon lehericey
9a6b3c3757 Spec: specify the redirections when logged in 2019-08-16 16:48:22 +02:00
simon lehericey
56d34173e6 Spec: remove multi devise account tests 2019-08-16 12:04:54 +02:00
simon lehericey
95cd301d0d Spec: remove superfluous code 2019-08-16 11:47:53 +02:00
simon lehericey
f87e316a5d Spec: remove outdated trusted_device logic
This is tested on the application controller
2019-08-16 11:45:40 +02:00
simon lehericey
58ecf18390 ActivateController: add tests and clean a bit 2019-08-16 11:22:36 +02:00
simon lehericey
972b6793f7 Remove useless sessions_controller 2019-08-14 18:04:26 +02:00
simon lehericey
d0ac1c3301 Fix manager invite administrateur 2019-08-14 16:34:50 +02:00
simon lehericey
c08e356367 Remove or fix nonsense code 2019-08-14 15:08:14 +02:00
simon lehericey
c380d807ab Spec: sign_in with administrateur.user 2019-08-14 15:08:14 +02:00
Paul Chavard
0969b1f85f Enable email_login_token for all gestionnaires 2019-08-14 12:53:51 +01:00
simon lehericey
640e3668a8 Strange session ... 2019-08-13 15:15:16 +02:00
simon lehericey
8fa3c9e4f7 Fix expert invitation 2019-08-13 15:15:16 +02:00
simon lehericey
5fdac38cb2 Fix instructeur invitation 2019-08-13 15:15:16 +02:00
simon lehericey
ad31822a68 Spec: sign_in with instructeur.user 2019-08-13 15:15:16 +02:00
simon lehericey
65a53909e1 Update instructeur factory 2019-08-13 15:15:16 +02:00
simon lehericey
47b7dc368b Remove or fix now nonsense code 2019-08-13 15:15:16 +02:00
Pierre de La Morinerie
79784089a4 dossiers: refresh the whole header actions bar on status change
This ensure the other state-dependant buttons get updated to–like the
"Follow" or "Archive" button.

Fix #4186
2019-08-13 15:07:22 +02:00
simon lehericey
5bda753735 Remove all devise route and controller for instructeur and administrateur 2019-08-13 14:13:48 +02:00
simon lehericey
a4b9eecded Remove unused devise session controller 2019-08-13 14:13:48 +02:00
simon lehericey
3fde2a6f70 Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
simon lehericey
6902f84b85 Brutally rename gestionnaire filename to instructeur 2019-08-12 13:47:01 +02:00
simon lehericey
bb8d65c6b4 Subtly rename admin/instructeurs to admin/assigns 2019-08-12 13:47:01 +02:00
clemkeirua
d7105cb6f8 added spec for dossier#update_with_france_connect 2019-08-01 17:42:32 +02:00
clemkeirua
6c52c71eee add redirection spec for dossier_controller#new 2019-08-01 17:42:32 +02:00
maatinito
8d3e3baabc #3928 administrator new & edit pwd pages 2019-08-01 17:12:14 +02:00
Paul Chavard
b8d3e4c41b Fix attestation url for dossiers with no attestation 2019-08-01 15:53:50 +02:00
clemkeirua
f5d3818e3c remove unnecessary retransition methods 2019-08-01 10:40:08 +02:00
Keirua
2f82dd9a3d improve typography and texts
Co-Authored-By: Nicolas Bouilleaud <nico@bou.io>
2019-08-01 10:29:51 +02:00
clemkeirua
38b48f4217 transition from accepte to instruction as superadmin 2019-08-01 10:29:51 +02:00
Paul Chavard
b266915892 Add repetitions to api 2019-08-01 10:04:35 +02:00
Paul Chavard
fba195c0b5 Add attestation url to dossier on api 2019-07-31 18:30:40 +02:00
Pierre de La Morinerie
ffe081c1f2 specs: remove old pieces_justificative from specs and factories 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
f69f325236 api: remove export of old pieces justificatives 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
5502f2e42e dossier: remove UI for uploading old pieces justificatives 2019-07-30 16:11:16 +02:00
Pierre de La Morinerie
0c4cb3b498 admin: remove UI for managing old pj 2019-07-30 16:11:16 +02:00
Nicolas Bouilleaud
b066ccbc89 Make sure Procedure.path is not null in our data 2019-07-29 13:53:33 +02:00
clemkeirua
314b0f5dc0 fix tests 2019-07-25 17:15:19 +02:00
clemkeirua
6f47655301 rendu lien_site_web obligatoire au moment de la publication 2019-07-25 15:46:04 +02:00
clemkeirua
6b19432d47 deplacement de l'URL qui envoie vers la procédure 2019-07-25 15:46:04 +02:00
Pierre de La Morinerie
2174172e34 admin: display CTA buttons in emails preview 2019-07-25 12:25:50 +02:00
clemkeirua
6d43465ee5 renammed into monavis_embed 2019-07-17 18:04:32 +02:00
clemkeirua
d8b63cd4c9 added 'monavis' inside the procedure and for users 2019-07-17 18:04:32 +02:00
clemkeirua
25f81f1d3c download a dossier as zip with all attachments 2019-07-16 09:11:25 +02:00
simon lehericey
768a298c2d Same for go back in instruction 2019-07-11 12:50:15 +02:00
simon lehericey
5f39d3eac8 Fix bug when instruction repasse en construction twice 2019-07-11 12:50:15 +02:00
simon lehericey
6de1e2ec58 Fix bug when an instructeur closes a dossier already closed 2019-07-11 12:50:15 +02:00
Pierre de La Morinerie
c2c9b19b3b procedure: remove individual_with_siret
It isn't used anymore (see #3077)
2019-07-11 11:58:21 +02:00
Paul Chavard
3cb39c2840 Refactor message attachements to use active_storage 2019-07-10 15:35:29 +02:00
Pierre de La Morinerie
03fc555edf profile: send an email when the account is already taken 2019-07-10 11:31:09 +02:00
Pierre de La Morinerie
6b27ac8514 france_connect: make existing user lookup case-insensitive
Fix #4053
2019-07-09 15:50:28 +02:00
Pierre de La Morinerie
d05bab3df3 france_connect: refactor specs 2019-07-09 15:50:28 +02:00
simon lehericey
d36f6ebcd7 [fix #1709] A user can change its email 2019-07-09 11:55:17 +02:00
simon lehericey
d68d2be798 Profil: accessible to all roles 2019-07-09 11:55:17 +02:00
Pierre de La Morinerie
422f4b9cdb dossiers_controller: warn properly when instructing a dossier twice
Fix #4055
2019-07-08 17:58:45 +02:00
Paul Chavard
0d80c48b7e Add avis to api 2019-06-27 14:40:17 +02:00
Paul Chavard
1781a49932 Add order param to API 2019-06-20 15:28:16 +02:00
Pierre de La Morinerie
51aacabf13 models: fix touch not propagating when using nested attributes
Sometimes, when using nested attributes, touch doesn’t propagate to
parent relationships. (see https://github.com/rails/rails/issues/26726)

Specifically, this happens in our app when updating a dossier with
only new attachements (but without changing the value of any fields).

To work around this, we need to define the parent relationship
explicitely. This is good practice anyway.

Fix #3906
2019-06-17 13:44:07 +02:00
Paul Chavard
ff44b7a600 Refactor purge pj to be more generic 2019-05-29 15:54:51 +02:00
clemkeirua
f06ae1631f no crash when q is missing on RechercheController::index 2019-05-22 15:02:57 +02:00
Paul Chavard
42235e81b1 Use active storage load hook to extend blob 2019-05-16 20:43:01 +02:00
Paul Chavard
9725f2a418 Enable new champs editor for all 2019-05-14 16:18:29 +02:00
Paul Chavard
3446782cd0 Remove deprecated editor 2019-05-14 16:18:29 +02:00
Pierre de La Morinerie
f5f7dfba40 france_connect: fix for params entirely missing from the callback
Fix a Sentry exception encountered in production.
2019-05-13 15:45:12 +02:00
pedong
b1f11c0b0a add explanation to spec login 2019-05-13 15:28:25 +02:00
pedong
a226999382 redirect to same path after use signup 2019-05-13 15:28:25 +02:00
clemkeirua
4aab72be68 implementation du systeme de PJ de motivation 2019-05-07 08:54:29 +02:00
Paul Chavard
2f633b5d23 Load leaflet from a separate chunk 2019-05-02 14:10:48 +02:00
Pierre de La Morinerie
e06e32238c api_entreprise: display a specific error message on network errors 2019-05-02 11:24:38 +02:00
Pierre de La Morinerie
7c1c61248e spec: cleanup siret_controller_spec.rb 2019-05-02 11:24:22 +02:00
Paul Chavard
9beff5ee9a Always create menu deroulant champs with a value 2019-04-11 14:38:21 +02:00
Mathieu Magnin
c550d40e3a [Fix #3064] Add preview test 2019-04-11 11:03:13 +02:00
Mathieu Magnin
28f9208ce8 When mail template is updated, stay on edit page to easily preview it 2019-04-11 11:03:13 +02:00
Paul Chavard
4fb889f10a Send browser support information and format user id 2019-04-04 14:21:32 +02:00
Pierre de La Morinerie
41ad89d8ac commencer: fix redirection with invalid path 2019-04-04 14:03:40 +02:00
Paul Chavard
b9be186d2c Sentry should send environment information 2019-04-03 18:19:16 +02:00
Pierre de La Morinerie
22f2ca105e commencer: display a FranceConnect button
Fix #3640
2019-04-03 16:08:09 +02:00
simon lehericey
65370b20a9 Use IPService to remove secure connexion from trusted networks 2019-04-03 15:21:19 +02:00
Pierre de La Morinerie
031c40aa55 stats: display 12 weeks of feedbacks 2019-04-02 17:22:38 +02:00
simon lehericey
f945b9ec63 Champ Siret: Fix siret-champ save
When a user enter a siret, it calls siret_controller in ajax. The champ value is stil nil, so champ.present? is false because champ.blank is redefined to focus on value. Thus the champ is not updated.
2019-04-02 14:17:21 +02:00
clemkeirua
0d71120f98 [fix #306] Possibilité de joindre un document à un avis 2019-03-28 15:45:14 +01:00
Pierre de La Morinerie
06e7355d5b commencer: fix invalid URL on test procedures
Fix #3693
2019-03-28 14:15:46 +01:00
Pierre de La Morinerie
30d11e0dac app: rename new_gestionnaire to gestionnaires 2019-03-26 10:48:59 +01:00
simon lehericey
39b710fdde Annotation: can use repetable 2019-03-25 11:08:53 +01:00
Pierre de La Morinerie
ded5b70444 app: rename new_user to users 2019-03-25 10:56:39 +01:00
Pierre de La Morinerie
549b17f75e help: add a custom help dropdown in dossier context 2019-03-20 11:06:54 +01:00
Paul Chavard
69a51e3296 Save SIRET data on search 2019-03-19 16:22:42 +01:00
simon lehericey
ed6828c66c Notification: UI 2019-03-18 16:37:51 +01:00
Mathieu Magnin
6b9dbb22af Remove unused stats 2019-03-13 11:00:14 +01:00
Paul Chavard
549eca44cb Enable flipflop on api requests 2019-03-12 14:02:55 +01:00
Paul Chavard
48701e80bd Enable flipflop for instructeurs 2019-03-12 12:14:34 +01:00
Paul Chavard
0e4b6e1ba2 Remove “Nombre d'administrations ayant dématérialisé N démarches” graph 2019-03-12 11:59:01 +01:00
Paul Chavard
c37f649453 Update specs to use multiple administrateurs 2019-03-12 11:59:01 +01:00
Mathieu Magnin
44f28ec565 Remove feature flag for publish draft 2019-03-12 11:26:07 +01:00
Paul Chavard
f7af01e0dc Create new procedures with administrateurs 2019-02-26 16:38:58 +01:00
simon lehericey
0b8619be77 Gestionnaire: login_token! -> create_trusted_device_token 2019-02-18 17:21:46 +01:00
simon lehericey
c16e30442a save path before redirect to link_sent_path 2019-02-18 17:20:49 +01:00
simon lehericey
7de3a18fd1 valid period depend on trusted_device_token.created_at 2019-02-18 17:20:49 +01:00
simon lehericey
bee9a108c5 split login and trusted_device logic 2019-02-18 17:20:00 +01:00
simon lehericey
9d92e43d8d [fix #3315] Migrate service organisme 2019-02-18 16:50:44 +01:00
simon lehericey
a7e068003a [fix #3427] Administration can soft delete a dossier 2019-02-14 18:09:08 +01:00
Pierre de La Morinerie
4bfc258cbd dossiers: refactor dossiers specs
- Use login_as instead of signing up in the browser
- Better name factory objects
- Group specs by use-case
2019-02-07 11:08:02 +01:00
Pierre de La Morinerie
803364490d carto: present API InternalServerError to the user, instead of failing 2019-01-28 18:22:55 +01:00
Pierre de La Morinerie
fb75461c78 procedure: delete dossiers on destroy 2019-01-23 17:19:36 +01:00
Pierre de La Morinerie
3f0f22d849 procedure: clarify controller spec 2019-01-23 17:14:14 +01:00
Pierre de La Morinerie
151e5744e6 contact: rewrite specs to use finer-grained mocks
Before the specs mocked entire controller methods–which caused them
not to be tested.

Now we use finer mocks (or no mocks at all), to actually run more code.
2019-01-22 16:12:13 +01:00
Pierre de La Morinerie
bb753ce23e commencer: redirect to the procedure page after sign-in and sign-up 2019-01-21 14:45:38 +01:00
Pierre de La Morinerie
016e5f2e6f commencer: add an independant page 2019-01-21 14:45:38 +01:00
Mathieu Magnin
0e6b5678ad Fix tests 2019-01-17 14:04:59 +01:00
Paul Chavard
41c9b21509 Use new editor 2019-01-17 11:20:31 +01:00
Pierre de La Morinerie
ae763d93f3 sign_up: display procedure context if available 2019-01-17 11:07:09 +01:00
Pierre de La Morinerie
4fd9fa6610 sign_in: extract the procedure context to a ProcedureContextConcern 2019-01-17 11:07:09 +01:00
Pierre de La Morinerie
e580d336e4 sessions: add a helper to clear the stored return path 2019-01-17 10:48:54 +01:00
Pierre de La Morinerie
908771e172 stats: use group_by_week to compute the week range
Fix #3242
2019-01-10 16:17:00 +01:00
simon lehericey
29fff9ee68 [fix #3269] bufferize login token email 2019-01-10 12:06:35 +01:00
simon lehericey
ac43038566 SessionControllerSpec: refactor #create tests 2019-01-09 13:49:47 +01:00
simon lehericey
b38fbc78ef SessionControllerSpec: remove specific attribut test
change user.update(log_in_with_france_connect: nil) as log_in_france_connect is an enum
2019-01-09 13:49:47 +01:00
simon lehericey
9e26b5f4d8 SessionControllerSpec: small cleaning 2019-01-09 13:49:47 +01:00
simon lehericey
f5fa0499ca SessionControllerSpec: remove duplicated tests 2019-01-09 13:49:47 +01:00
simon lehericey
9c335698f1 SessionControllerSpec: remove password syncing relating test 2019-01-09 13:49:47 +01:00
simon lehericey
f0139c5962 Spec Factory: an administrateur always has a gestionnaire 2019-01-09 13:49:47 +01:00
simon lehericey
5daa565a80 login_token: add missing tests 2019-01-07 08:18:29 +01:00
Pierre de La Morinerie
2c0108190c spec: fix specs failing randomly
This is because creating a procedure attempts to create an admin from
scratch, and fails to do so.

Broken by 802f2086d6
2019-01-03 17:42:43 +01:00
gregoirenovel
0596d53ac2 Enable the Lint/UnusedBlockArgument cop 2019-01-03 10:53:50 +01:00
gregoirenovel
386fbce776 Enable the Layout/SpaceBeforeBlockBraces cop 2019-01-03 10:53:50 +01:00
Chaïb Martinez
802f2086d6 Redirect admins with no démarches to the new demarche page 2018-12-28 18:57:51 +01:00
maatinito
4ad3a60e25 [Fix #2575] Créer automatiquement un compte instructeur aux administrateurs 2018-12-26 09:44:20 -10:00
gregoirenovel
03eb47016c Fix a gestionnaire sign in bug 2018-12-26 18:14:04 +01:00
Mathieu Magnin
b40c706d98 [Fix #3192] Clone service if procedure is transferred 2018-12-20 15:45:48 +01:00
gregoirenovel
df7e0a9881 Remove dead code 2018-12-19 14:59:15 +01:00
Mathieu Magnin
edf3eefa87 Fix Sentry 114, Instructeur can delete pj in private champs 2018-12-13 17:27:05 +01:00
simon lehericey
db6c86b242 DossierController: user can destroy pjs 2018-12-06 10:45:10 +01:00
Frederic Merizen
4699e515ed [Fix #2999] Send gestionnaire back to what they were doing after email verification 2018-12-06 10:03:21 +01:00
Paul Chavard
35494df78e Procedure export dossiers with champs siret 2018-12-05 17:09:39 +01:00
Paul Chavard
a08f170dbd Assign users and gestionnaires to commentaires
fix #2052
2018-12-05 13:40:57 +01:00
gregoirenovel
94b6783a65 Slightly change some tests to comply with puma 2018-12-03 16:28:18 +01:00
Paul Chavard
d77a5c9f15 More tests and fixes on carte champ 2018-11-30 13:28:30 +01:00
Paul Chavard
575a437f97 Remove carto from admin/procedure controller 2018-11-27 16:11:25 +01:00
Paul Chavard
9ff65efea8 Remove deprecated carto from dossiers controller 2018-11-27 16:11:25 +01:00
Paul Chavard
d988638c58 Simplify API carte serializer 2018-11-27 16:11:25 +01:00
Paul Chavard
37a7e26fc3 Remove unused users/carte_controller 2018-11-27 16:11:25 +01:00
Paul Chavard
febf625dd9 Make difference between error and empty geo json 2018-11-27 12:36:10 +01:00
Paul Chavard
f2e7feec1d Do not send error json to backend - it doesn’t need it and it creates bad data 2018-11-27 11:45:24 +01:00
Chaïb Martinez
0e8d235800 Add some params to track forms submissions 2018-11-21 18:25:47 +01:00
Paul Chavard
c99ef811b6 Do not save error json in database 2018-11-21 13:03:01 +01:00
Paul Chavard
d43068ace5 Disable carto for new procedures 2018-11-20 12:14:10 +01:00
Paul Chavard
0b017580c5 Expose migrated legacy carto champs on api 2018-11-20 10:53:14 +01:00
Paul Chavard
fe630847e9 Refactor legacy carto serializer 2018-11-20 10:53:14 +01:00
Paul Chavard
2462e42b53 Stop using legacy api carto after migration 2018-11-20 10:53:14 +01:00
Frederic Merizen
101e8e2588 [#2999] Rediriger vers la bonne page apres login
(ne corrige pas le cas ou l'utilisateur est passe par le mail de confirmation)
2018-11-16 15:44:20 +01:00
Paul Chavard
2eb61bd6ed Move dossier invites handler to invites controller 2018-11-14 15:16:49 +01:00
simon lehericey
fb76197404 SessionController: flipflop trusted device 2018-11-13 10:41:45 +01:00
simon lehericey
0d8d2de5a6 Session: add trusted_device cookie 2018-11-13 10:41:45 +01:00
simon lehericey
5690599289 Session: send a mail to confirm gestionnaire login 2018-11-13 10:41:45 +01:00
Pierre de La Morinerie
c7ac43cfe7 confirmation: add a dedicated page with confirmation instructions
Fix #2586
2018-11-08 16:20:05 +01:00
Paul Chavard
80189def98 Remove n+1 calls from API queries 2018-11-08 14:45:09 +01:00
Pierre de La Morinerie
b0541fba79 users: sign-in after confirming an account within a short time 2018-11-06 18:24:34 +01:00
Frederic Merizen
d564eb1225 [#835] Report failed and successful invitations 2018-11-06 16:40:42 +01:00
Frederic Merizen
8cf235f2fd [#835] Enable html5 validation of multiple mails 2018-11-06 15:44:43 +01:00
Frederic Merizen
c7358a8f53 [Fix #835] Enable asking for multiple avis at the same time 2018-11-06 15:44:43 +01:00
Paul Chavard
9ac85295c6 Do not serialize properties on carte champs 2018-11-06 14:26:32 +01:00
Paul Chavard
cfd1950e17 Migrate commencer to new_user 2018-11-01 13:10:41 +01:00