Commit graph

4909 commits

Author SHA1 Message Date
Paul Chavard
eb7aba18e6 Add dossier champs and annotations types 2019-09-24 10:47:21 +02:00
Paul Chavard
1c10718c11 Add messages and avis types 2019-09-24 10:47:21 +02:00
Paul Chavard
8928eaba11 Add demarche champs and annotations types 2019-09-24 10:47:21 +02:00
Paul Chavard
bf6fbbf2b6 Add graphql end point 2019-09-24 10:47:21 +02:00
Paul Chavard
5a7eb734ff Dump graphql schema for reference 2019-09-24 10:47:21 +02:00
Paul Chavard
ba683a107c Add authorizations to root queries 2019-09-24 10:47:21 +02:00
Paul Chavard
a7fc4df09b Resolve models and types 2019-09-24 10:47:21 +02:00
Paul Chavard
e06051bc96 Add graphql root types 2019-09-24 10:47:21 +02:00
Paul Chavard
52e84f2ffe Add graphql object types 2019-09-24 10:47:21 +02:00
Paul Chavard
9bb52dfb8c Add graphql base types 2019-09-24 10:47:21 +02:00
Paul Chavard
d2fdaacb5d Add Api::V2::Schema 2019-09-24 10:47:21 +02:00
Paul Chavard
2e854f2ac3 Add graph loading scopes to Dossier and Procedure 2019-09-24 10:47:21 +02:00
Nicolas Bouilleaud
e962fb26e0 Allow sorting Dossiers by “has notifications” in traites
fixes #4351
2019-09-24 09:37:42 +02:00
Nicolas Bouilleaud
00b1aa0ea1 Disable turbolinks for links to Stats pages
This is a workaround for #350
2019-09-23 14:25:04 +02:00
Nicolas Bouilleaud
f74fde3f80 Avoid sending notification emails about archived dossiers 2019-09-20 11:06:33 +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
Nicolas Bouilleaud
769621de46 Explicitly pass the “state” param in notifications_*_procedure methods 2019-09-20 11:06:33 +02:00
Nicolas Bouilleaud
8a06c01f13 Reorder methods in instructeur.rb
Move token stuff together, out of notification-related stuff.
2019-09-20 10:48:08 +02:00
Nicolas Bouilleaud
4f0871dab0 Use a single query in dossiers_id_with_notifications (instead of four)
This is used in /procedures#show and /procedures#index, to display badges on the “suivis” and “traités” tabs of each procedure. Rails cache helps when it’s the exact same query, but it’s not the case for different tabs.

I’m not certain it’ll be a visible performance improvement but it shouldn’t hurt.
2019-09-20 09:45:59 +02:00
simon lehericey
faddbc23ef Eager load procedure: :groupe_instructeurs for export 2019-09-19 12:30:12 +02:00
simon lehericey
a2f82ab8be Add groupe_instructeur_label to export v2 2019-09-19 12:30:12 +02:00
simon lehericey
f577484aa2 Add groupe_instructeur_label to export v1 2019-09-19 12:30:12 +02:00
simon lehericey
3bc20bdb06 Procedure.routee? 2019-09-19 12:30:12 +02:00
simon lehericey
8660d4af30 Instructeur: only export its dossiers 2019-09-19 12:24:40 +02:00
Paul Chavard
f4d4a896a0
Merge pull request #4342 from tchak/revert-proxy
Revert "Upload through proxy"
2019-09-19 09:14:32 +02:00
Paul Chavard
6533ec420b Revert "Upload through proxy"
This reverts commit 91815ad709.
2019-09-19 09:13:41 +02:00
simon lehericey
e2acb0a946 ProcedurePresentation: can use groupe instructeur 2019-09-18 15:51:02 +02:00
simon lehericey
f5bbc9e2f9 InstructeurProcedureShow: show dossier for all the gi involved 2019-09-18 15:51:02 +02:00
simon lehericey
9b16bd2037 Dossier: retrieve all dossiers for a procedure 2019-09-18 15:51:02 +02:00
simon lehericey
21577a0f0b Instructeur: dedup procedures with multiple gi 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
Paul Chavard
91815ad709 Upload through proxy 2019-09-17 17:04:52 +02:00
Pierre de La Morinerie
4b883a57bf stylesheets: make the actions bar sticky 2019-09-17 16:58:11 +02:00
Pierre de La Morinerie
1f8f38f492 stylesheets: align the buttons vertically 2019-09-17 16:58:11 +02:00
Pierre de La Morinerie
974c1b1150 stylesheets: move the dossier floating bar CSS to dossier_edit.scss
forms.scss is supposed to be for generic elements.
2019-09-17 16:58:11 +02:00
pedong
09a0f21cac use same look with .champs-editor.buttons 2019-09-17 16:58:11 +02:00
pedong
d2a78abc3a [fix #3975] set buttons floating in dossier page 2019-09-17 16:58:11 +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
8806eab8d6 Properly validate Procedure.lien_site_web is set when publishing 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
Nicolas Bouilleaud
e9c6ed80e4 Migration: Index and make Procedure.path nonnull 2019-09-17 16:30:48 +02:00
maatinito
ae34e48624 [fix #4311] Unable to reinvite admin 2019-09-17 16:15:04 +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
8a691d534a Fix AdministrateurUsageStatisticsService 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
88842918f9 Prepare to drop columns 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
b97cbd3402 Serialize champ repetition for tags
closes #4272
2019-09-12 17:23:18 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00
simon lehericey
82bef0f651 use notifications_per_procedure properly 2019-09-11 20:49:48 +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
c370c2f475 Cleanup FlipFlop 2019-09-10 23:52:44 +02:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
clemkeirua
feb9c32537 search attachments inside bloc repetables 2019-09-10 15:30:44 +02:00
Paul Chavard
347f03d2a9 Redirect to pdf attachement old name if not attached 2019-09-10 15:06:47 +02:00
Paul Chavard
3eb3ae001e Rename “Passé en construction le” to 'Déposé le' for clarity 2019-09-10 14:59:10 +02:00
Chaïb Martinez
dd6c6bfe7a mailers: add a NO_REPLY address to transactional emails 2019-09-10 13:37:28 +02:00
Pierre de La Morinerie
aa1cf6788b mailers: turn revert_to_instruction into a notification email 2019-09-10 13:29:06 +02:00
pedong
a7d3bbb8cc Del SIRET in service for API 2019-09-10 11:06:28 +02:00
pedong
25596ca2f2 [fix #4181] add service to procedure API 2019-09-10 11:06:28 +02:00
Paul Chavard
d8402fbd2c Remove last reference to commentaire.file 2019-09-10 10:49:12 +02:00
Paul Chavard
434210de2e Ignore to be removed columns 2019-09-10 10:49:12 +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
clemkeirua
6849fd6afe change le texte de la messagerie selon le type d'utilisateur 2019-09-09 16:25:02 +02:00
Pierre de La Morinerie
c26da5ec37 mailers: prevent the signature from being auto-linked
Some emails clients (Gmail or Mail.app) may turn the signature into
a clickable link.

This can distract users, and make them think we are a good point of
contact (where they should contact their administration or use the
website directly instead).
2019-09-09 11:43:57 +02:00
Chaïb Martinez
9f60365500 [fix #4266] Add 'Revenir sur le site de mon administration' on commencer page 2019-09-03 15:46:25 +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
d0bfb62fec Procedure Factory: use procedure.new_dossier 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
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
31cb056351 Procedure: remove direct instructeurs access
Add shortcut for the spec to assign instructeurs directly to the defaut groupe
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
simon lehericey
ba24958035 Procedure add missing_instructeurs? 2019-09-02 11:41:12 +02:00
simon lehericey
64d28dba2f cleaning : use missing_steps 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
simon lehericey
25991c2892 Assign a procedure assign a group as well 2019-09-02 11:41:12 +02:00
simon lehericey
97884c4349 Link AssignTo et GroupeInstructeur 2019-09-02 11:41:12 +02:00
simon lehericey
115d91387c A procedure has a default groupe instructeur 2019-09-02 11:41:12 +02:00
simon lehericey
f296318072 Create GroupeInstructeur 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
2b510a15a2 Update _informations.html.haml 2019-08-28 15:02:44 +02:00
benjaminhenkel
73d643d1be Update flash message for test demarche 2019-08-28 14:54:17 +02:00
clemkeirua
4032fc61e3 move to only one pipedrive account 2019-08-28 12:16:25 +02:00
Paul Chavard
0ecf5b47eb Call ActiveStorage::Filename.to_s 2019-08-28 11:01:58 +02:00
Paul Chavard
64dccbab5c Only rename logo param if it is present 2019-08-28 11:01:58 +02:00
Paul Chavard
15148a4fe1 Fix invalid characters in repetition champs sheet_name for xls export 2019-08-28 10:47: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
maatinito
ae059dc029 Corrected placeholder on champ carte 2019-08-27 15:13:10 +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
Chaïb Martinez
5f20d657d0 Add target blank
[fix #3536]

Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-08-27 10:45:26 +02:00
Chaïb Martinez
7640911ab9 Remove sign up form sign in
Add link to sign up help

Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-08-27 10:45:26 +02:00
Paul Chavard
d02e0fc556 Fix and test migrate_procedure_logo task 2019-08-22 11:28:03 +02:00
Paul Chavard
cc35a04e26 Migrate procedure logo to active_storage 2019-08-21 11:15:00 +02:00
Paul Chavard
6215ccb3d7 Fix carte initialize 2019-08-21 10:48:49 +02:00
Paul Chavard
b7b46e9a82 Improve clone of procedure attachements 2019-08-20 17:30:44 +02:00
Philémon
0528026631 retrait d'un s
par souci de cohérence entre "satisfaction usagerø" et "contact usagerø" :) 
la bise!
2019-08-20 13:53:24 +02:00
Philémon
e6e0f5ed31 changement de wording
changement de wording "Connectez-vous pour donner votre avis" > "Cliquez ici pour donner votre avis", ça permet de clarifier (sinon les usagers peuvent penser que c'est le lien pour se connecter à ds (/sign_in).
c'est le fruit de discussion avec des admin :)
2019-08-20 13:53:24 +02:00
simon lehericey
b7f8bb2fea Simplify ip_service 2019-08-20 13:29:29 +02:00
simon lehericey
c1a622efa1 Add User.create_or_promote_to_administrateur 2019-08-20 12:20:12 +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
97d0855d47 add User.create_or_promote_to_instructeur 2019-08-20 12:20:12 +02:00
simon lehericey
e913b01c52 fix_manager_reset_password 2019-08-20 12:12:20 +02:00
simon lehericey
ebe871819d Fix admin deletion by an administration 2019-08-20 12:01:36 +02:00
Paul Chavard
e9ba7700d4 Remove commentaire file uploader 2019-08-20 10:24:13 +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
416a07d2dd SessionView: simplify 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
d5ddd182a7 remove useless session views 2019-08-14 18:04:26 +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
e3e6bc7689 ! NEED JOB REBOOT Move remind activation logic to user 2019-08-14 16:34: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
1b38d4071d temporary remove password complexity check 2019-08-14 15:06:16 +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
simon lehericey
81f44fa76b Link user and administrateur 2019-08-14 15:06:15 +02:00
Paul Chavard
e68d2cf5e2 Enable champ repetition for all 2019-08-14 12:53:51 +01:00
Paul Chavard
9eaf14968f Enable export v2 for all 2019-08-14 12:53:51 +01:00
Paul Chavard
0969b1f85f Enable email_login_token for all gestionnaires 2019-08-14 12:53:51 +01:00
Pierre de La Morinerie
182a9a5df2 service: remove the mandatory SIRET field 2019-08-14 10:38:36 +02:00