Commit graph

1653 commits

Author SHA1 Message Date
simon lehericey
5143d341ec Admin: 1 query for crips 2019-10-08 09:53:40 +02:00
clemkeirua
053cc5cfc5 [fix #4058] instructeur peut passer accepte → instruction 2019-10-07 15:17:33 +02:00
clemkeirua
d3063c0b63 remove download_as_zip feature flag 2019-10-03 10:48:24 +02:00
Paul Chavard
bf6fbbf2b6 Add graphql end point 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
0c98f29d59 Move the cached procedure stats queries to a ProcedureStatsConcern 2019-09-17 16:43:48 +02:00
Nicolas Bouilleaud
06d60cd943 Cache requests in procedures/stats 2019-09-17 16:43:48 +02:00
Nicolas Bouilleaud
3e2985b305 First attempt at procedure stats
fixes #3945, #3946, #3948
2019-09-17 16:43:48 +02:00
Nicolas Bouilleaud
543f9894c1 Make sure the “commencer” link uses the proper test path 2019-09-17 16:30:48 +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
bd1e0aba38 Add Procedure path suggestion 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
99f986b815 Cleanup Procedure retrieval in “Commencer”
Make sure to only fetch active (brouillons or published) procedures.
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
Nicolas Bouilleaud
b9968b76b0 Remove “avec_lien” helpers now that Procedure.path cannot be nil 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
8fa630d2bb Remove Gestionnaire.visible_procedures
It is actually the same thing as Gestionnaire.procedures. It already included the procedures with paths as well as the archived procedures, and in production, there were no Gestionnaire for who procedures was returning a different result than visible_procedures (expect for two baddata brouillon procedures with a nil path).

In addition, Procedure.path is now nonnull, which means the Procedure.avec_lien scope is pointless.

Finally, the current spec showed that the only procedure not visible to the gestion was the one he was not assigned to.
2019-09-17 16:30:48 +02:00
maatinito
ae34e48624 [fix #4311] Unable to reinvite admin 2019-09-17 16:15:04 +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
3eeebd62eb Use built in active_storage helper 2019-09-17 11:11:08 +02:00
simon lehericey
acb99609ba Move defaut_groupe_instructeur as has_one and eager_load 2019-09-16 15:57:07 +02:00
simon lehericey
afa0237349 remove logo n+1 2019-09-16 15:48:19 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00
Pierre de La Morinerie
503c393a87 helpscout: use replies_sent to compute contact rate
The `conversations_count` we previously used counts replies, but also
all conversations that were tagged or re-tagged during the month – with
made counting the actual work spent on user support brittle.

Counting the replies is a better estimation of what we get.

Unfortunately this also removes the filtering-by-tag feature. To
mitigate this, the reports are now scoped to a specific mailbox. This
allows to create extra mailboxes for conversations that should't be
counted in the stats.
2019-09-11 17:26:10 +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
Paul Chavard
7ffb98e616 Remove carrierwave uploaders 2019-09-10 10:49:12 +02:00
simon lehericey
6a83adf336 StatController: work by groupe_instructeur 2019-09-03 06:47:02 +02:00
simon lehericey
ad7ef6c739 Link assign_to and procedure by groupe_instructeur 2019-09-03 06:47:02 +02:00
simon lehericey
4da12ed3e8 User/DossierController: dossier are linked to default group by default 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
a82d49aa60 Procedure: save procedure while cloning
This is required to be able to assign the administrateur.instructeur to the defaut_groupe_instructeur of the new procedure
2019-09-02 11:41:12 +02:00
simon lehericey
b541ef0b41 Procedure has many instructeurs with defaut_groupe_instructeur 2019-09-02 11:41:12 +02:00
clemkeirua
c2916e9d05 remove possibility to create carte with parcelle agricole 2019-08-29 16:01:35 +02:00
Paul Chavard
3c6b35d720 Fix attestation preview 2019-08-28 16:33:51 +02:00
benjaminhenkel
73d643d1be Update flash message for test demarche 2019-08-28 14:54:17 +02:00
Paul Chavard
64dccbab5c Only rename logo param if it is present 2019-08-28 11:01:58 +02:00
Paul Chavard
5edbc08542 Render attesation apercu inline 2019-08-27 17:44:02 +02:00
Paul Chavard
32563c3675 Redirect to active_storage files when available 2019-08-27 17:43:33 +02:00
Paul Chavard
a19b10b118 Migrate attestation files to active_storage 2019-08-27 17:42:52 +02:00
clemkeirua
188e0fd6b2 removed ask_birthday for new procedures & dossiers 2019-08-27 15:32:17 +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
Paul Chavard
cc35a04e26 Migrate procedure logo to active_storage 2019-08-21 11:15:00 +02:00
simon lehericey
01a91e68ca Simply avis controller 2019-08-20 12:20:12 +02:00
simon lehericey
98a24bea51 Simplify invite_instructeur 2019-08-20 12:20:12 +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
9c715b2969 SessionController: new User in view 2019-08-16 16:48:22 +02:00
simon lehericey
27085af9b5 SessionController: remove remember_me
It is somehow taken care by warden
2019-08-16 16:48:22 +02:00
simon lehericey
002510d5cb SessionController: remove complicated try_to_authenticate 2019-08-16 16:48:22 +02:00
simon lehericey
67cc2c1a87 SessionController: remove instructeur_signed_in? 2019-08-16 16:48:22 +02:00
simon lehericey
a3b9bf90d4 SessionController: remove useless code
- the redirection of a locked user is made by the sign_in method
- because of the paranoid mode it displays the devise.failure.invalid error message
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
dab1519b8c Remove credenticals synchronisation logic 2019-08-16 11:35:19 +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
149b0b5797 Fix Sign out 2019-08-14 16:58:50 +02:00
simon lehericey
d0ac1c3301 Fix manager invite administrateur 2019-08-14 16:34:50 +02:00
simon lehericey
c380d807ab Spec: sign_in with administrateur.user 2019-08-14 15:08:14 +02:00
simon lehericey
4142acf8d3 Replace administrateur devise methods in app 2019-08-14 15:06:16 +02:00
simon lehericey
840be2408e Remove administrateur devise methods 2019-08-14 15:06:15 +02:00
Paul Chavard
0969b1f85f Enable email_login_token for all gestionnaires 2019-08-14 12:53:51 +01:00
Paul Chavard
ef66defcd1 Fix invite instructeur from manager 2019-08-13 20:12:46 +01:00
Pierre de La Morinerie
4e9895c11b app: mark the contact forms as not sensitive to trusted tokens
Instructeurs waiting for a confirmation token should be able to
access the contact form (especially to ask for help).

Fix #4198
2019-08-13 19:48:11 +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
efd793f266 AdminProcedureController: fix self assignation as instructeur 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
47b7dc368b Remove or fix now nonsense code 2019-08-13 15:15:16 +02:00
simon lehericey
c8a7bde5e0 Replace instructeur devise methods in app 2019-08-13 15:15:16 +02:00
simon lehericey
e3fd1cc33a Remove weird switch_devise_profile_service 2019-08-13 15:15:16 +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
simon lehericey
7ac243ac44 Use proper token to find the administrateur ... how can it works otherwise ? 2019-08-12 13:43:03 +02:00
clemkeirua
707e8a0004 dossier_controller#new uses info from FC if any 2019-08-01 17:42:32 +02:00
maatinito
8d3e3baabc #3928 administrator new & edit pwd pages 2019-08-01 17:12:14 +02:00
maatinito
220b38ad2a #3928 different pwd edit page for administrators 2019-08-01 17:12:14 +02:00
Paul Chavard
02904f55b1 Fix champ policy 2019-08-01 16:41:53 +02:00
Paul Chavard
c75e39884e Save selection utilisateur as geo area 2019-08-01 11:38:09 +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
fc75580a3c Start using pundit 2019-07-30 18:09:28 +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
7205f4da9e L'enfer du Nord Paris-Roubaix (Tour de France, Tour de France) 2019-07-30 14:47:48 +02:00
pedong
9438f962c5 add alert for account is locked 2019-07-29 17:48:44 +02:00
pedong
0ed9c4cbd4 add check access_locked? when login 2019-07-29 17:48:44 +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
pedong
0f957ec77b [fixe #3974] add message for invite mail 2019-07-23 18:54:58 +02:00
clemkeirua
af436500fd better button 2019-07-23 16:11:15 +02:00
clemkeirua
f166077f5e ajout d'un bouton de suppression des admin dans le manager 2019-07-23 16:11:15 +02:00
Pierre de La Morinerie
858b093314 mailers: use the standard view mechanism to render notifications
Instead of rendering a view as a template, consider the view as a normal
view.
2019-07-23 14:53: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
Pierre de La Morinerie
a8354bd103 dossiers: unify deletion of dossiers between manager and user
The code paths for deleting a dossier were different, depending on
whether the dossier was deleted by the user, or from the Manager.

This commit unifies the two code paths into one.

This has the effect of:

- An operation log is now recorded when an user deletes its own dossier;
- Gestionnaires are now notified even when the dossier is deleted from
  the Manager;
- The `support:delete_user_account` task now requires the email address
  of the author.
2019-07-16 16:22:20 +02:00
clemkeirua
25f81f1d3c download a dossier as zip with all attachments 2019-07-16 09:11:25 +02:00
Chaïb Martinez
5cb6ba2f3b Fix tests
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-15 12:10:56 +02:00
Chaïb Martinez
d968e7e6bd Add some admin usage info for contextual help with crisp
Fix #4052

Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-15 12:10:56 +02:00
Pierre de La Morinerie
d5f360c85f manager: fix the deletion email not being sent
When deleting a dossier from the manager, the deletion notification
email was not being sent. This is because the returned object from
`Dossier#hide!` was invalid.
2019-07-15 10:01:16 +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
Pierre de La Morinerie
7ca3d5fce2 procedure: select for_individual by default 2019-07-10 18:47:34 +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
06afc3890f france_connect: raise an error if some validation error occurs
If a validation error occurs in `find_or_create`, an object without `id`
will be returned–and the code will crash soon after.

Ensure that we crash immediately, so that we can report the root cause
(the validation error) instead of a seemingly-unrelated crash later.
2019-07-09 15:50:28 +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
ecfccae6f0 dossiers: remove support for Dossier#expects_multiple_submissions 2019-07-09 14:50:11 +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
Nicolas Bouilleaud
7e98213829 Pass the signed-in user as the commentaire author from /contact 2019-07-08 16:06:44 +02:00
Nicolas Bouilleaud
72fd5d250f Respect dossier.messagerie_available? in SupportController (/contact) 2019-07-08 16:06:44 +02:00
simon lehericey
c7e10fc43f Manager: remove repasser_en_instruction 2019-07-02 18:40:20 +02:00
simon lehericey
b2c987ff0d [fix #3683] Dossier: add repasser_en_instruction! 2019-07-02 18:40:20 +02:00
simon lehericey
b79220e711 UI 2019-07-02 18:35:47 +02:00
Paul Chavard
fb0ef15e3c Export dossiers v2 2019-07-02 14:20:29 +02:00
Paul Chavard
1781a49932 Add order param to API 2019-06-20 15:28:16 +02:00
Nicolas Bouilleaud
eb592f8ddf Add manager controller for bill signatures 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
1ac6cad132 Display previous followers in “personnes impliquées” 2019-06-12 17:33:53 +02:00
Chaïb Martinez
eccd456325 Add crisp
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-06-05 17:41:47 +02:00
Paul Chavard
d5911071f8 Return dossiers on api with stable order 2019-06-04 15:34:49 +02:00
Paul Chavard
ff44b7a600 Refactor purge pj to be more generic 2019-05-29 15:54:51 +02:00
Chaïb Martinez
920c8c0c32 Add Gestionnaire ID and ROLES
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-05-27 16:30:03 +02:00
Paul Chavard
6a3413018a Refresh attachments with virus scan result 2019-05-21 14:21:55 +02:00
Paul Chavard
4a9ef5d12e Always use purge_later 2019-05-21 14:05:33 +02:00
Paul Chavard
348b15f595 Put devtools behind feature flags 2019-05-15 18:10:25 +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
Paul Chavard
b8bf662c6d Track dossier demander un avis 2019-05-14 14:31:03 +02:00
Paul Chavard
9c472e6524 Track dossier private annotations modifications 2019-05-14 14:31:03 +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
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
Pierre de La Morinerie
67fb561119 Apply suggestions from code review
Co-Authored-By: n-b <nico@bou.io>
2019-05-06 16:19:08 +02:00
Nicolas Bouilleaud
3ff0c83485 Add multi-admin UI
refs #1626
2019-05-06 16:19:08 +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
Paul Chavard
1c71355574 Better warnings in test mode 2019-04-30 11:03:24 +02:00
simon lehericey
1d051dc3ef Can change a piece_justificative_template on a type_de_champ 2019-04-18 11:13:35 +02:00