Paul Chavard
86b271997b
Invite experts to linked dossiers
...
closes #3669
2019-10-23 13:10:09 +02:00
clemkeirua
87741f4b49
introduce constant for exports
2019-10-22 09:51:14 +02:00
clemkeirua
cdab08b198
UI work
2019-10-22 09:51:14 +02:00
clemkeirua
43424e4f4e
merge with the work of paul, using 3 links
2019-10-22 09:51:14 +02:00
clemkeirua
70ea5e167e
procedure download is performed through a controller in order not to leak the URL
2019-10-22 09:50:58 +02:00
simon lehericey
6b8cefa551
Procedure: defaut_groupe_instructeur is the first group
...
Especially useful when the defaut groupe is renamed ...
2019-10-17 15:48:14 +02:00
simon lehericey
5897464224
Build Dossier champ only once
2019-10-17 15:48:14 +02:00
simon lehericey
0c15326df6
User: inactive user have never signed_in
2019-10-08 10:09:16 +02:00
simon lehericey
3e0f1b9c66
User: eager load instructeur and administrateur to remove 2 db requests per http request
2019-10-08 09:53:40 +02:00
simon lehericey
451387d32d
Dossier: add conditions on joins for with_notifications scope
2019-09-26 15:46:20 +02:00
Nicolas Bouilleaud
03c950ea97
Move followed_dossiers_with_notifications to a Dossier scope
...
Instead of instructeur.followed_dossiers_with_notifications, we can now write instructeur.followed_dossiers.with_notifications.
Yay composition!
2019-09-25 14:10:00 +02:00
Nicolas Bouilleaud
a4166d3c57
Refactor Instructeur.notifications_* methods
...
- rename `dossiers_id_with_notifications` to `followed_dossiers_with_notifications`,
- rename `notifications_per_procedure` to `procedures_with_notifications`,
- return an ActiveRecord::Relation instead of the result of the query, so that the call place can compose it,
- `merge` with the wanted Dossier scope in the call places, don’t bother passing it as a parameter,
- use the “state” (now “scope”) parameter as a scope method that can be just applied on `Dossier`.
2019-09-25 14:10:00 +02:00
Paul Chavard
eb7aba18e6
Add dossier champs and annotations 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
a7fc4df09b
Resolve models and types
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
f74fde3f80
Avoid sending notification emails about archived dossiers
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
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
simon lehericey
e2acb0a946
ProcedurePresentation: can use groupe instructeur
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
Nicolas Bouilleaud
0c98f29d59
Move the cached procedure stats queries to a ProcedureStatsConcern
2019-09-17 16:43: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
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
Paul Chavard
88842918f9
Prepare to drop columns
2019-09-17 12:37:37 +02:00
simon lehericey
acb99609ba
Move defaut_groupe_instructeur as has_one and eager_load
2019-09-16 15:57:07 +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
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
Paul Chavard
3eb3ae001e
Rename “Passé en construction le” to 'Déposé le' for clarity
2019-09-10 14:59:10 +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
simon lehericey
ad7ef6c739
Link assign_to and procedure by groupe_instructeur
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
ba24958035
Procedure add missing_instructeurs?
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
Paul Chavard
3c6b35d720
Fix attestation preview
2019-08-28 16:33:51 +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
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
b7b46e9a82
Improve clone of procedure attachements
2019-08-20 17:30:44 +02:00
simon lehericey
c1a622efa1
Add User.create_or_promote_to_administrateur
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
dab1519b8c
Remove credenticals synchronisation logic
2019-08-16 11:35:19 +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
1b38d4071d
temporary remove password complexity check
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
simon lehericey
5fdac38cb2
Fix instructeur invitation
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
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
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
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
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
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
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
25db21467d
Stop using Flipflop as switch for Fog
2019-07-31 15:15:09 +02:00
Paul Chavard
fc75580a3c
Start using pundit
2019-07-30 18:09:28 +02:00
Paul Chavard
8c72470a6c
Add default etablissement champ name
2019-07-30 17:17:36 +02:00
Paul Chavard
ab1170bcfc
Fix export dossier n+1 query
2019-07-30 17:17:36 +02:00
Pierre de La Morinerie
95e24392f9
models: remove old pieces justificatives
2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
ea1c8ea7e3
models: remove associations to old pieces justificatives
2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
0da0a2b446
model: remove support for cloning procedures with old pj
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
e975fe4ade
tasks: remove task to migrate old pieces justificatives
2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
0018f36b44
gestionnaire: remove UI for filtering pieces justificatives
2019-07-30 16:11:16 +02:00