Commit graph

4868 commits

Author SHA1 Message Date
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
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
Paul Chavard
86b9ed2079 Run load scripts after ujs responces 2019-08-13 17:03:55 +01: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
a84e07a376 Remove instructeur devise methods 2019-08-13 15:15:16 +02:00
simon lehericey
dd4ffb926c Link user and instructeur 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
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
Pierre de La Morinerie
3a37c1eeae dossiers: rename .mixed-buttons-bar to .header-actions 2019-08-13 15:07:22 +02:00
Pierre de La Morinerie
219f690b96 dossiers: move header actions to a partial 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
benjaminhenkel
6ed5cd6feb navbar: improve wording, and allow two-lines layout 2019-08-13 12:26:11 +02:00
benjaminhenkel
efb7883bd1 Update _monavis.html.haml 2019-08-12 16:54:00 +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
simon lehericey
7e78b7d62d Administrateur password, remove one level of indirection 2019-08-12 13:43:03 +02:00
clemkeirua
6c56fc73d7 used new constant for genders 2019-08-01 20:46:58 +02:00
clemkeirua
1e6847bc6f introduce constants for M./Mme 2019-08-01 17:42:32 +02:00
clemkeirua
d7105cb6f8 added spec for dossier#update_with_france_connect 2019-08-01 17:42:32 +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
maatinito
3bf32b6d43 #3928 redesign of password panel (complexity bar & explanation) 2019-08-01 17:12:14 +02:00
maatinito
0b0ef8a318 #3928 Zxcvbn service to compute password complexity 2019-08-01 17:12:14 +02:00
Paul Chavard
02904f55b1 Fix champ policy 2019-08-01 16:41:53 +02:00
Paul Chavard
b8d3e4c41b Fix attestation url for dossiers with no attestation 2019-08-01 15:53:50 +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
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
Paul Chavard
6cfad01d12 Stop using Flipflop as switch for weekly_overview 2019-07-31 15:15:09 +02:00