Commit graph

2006 commits

Author SHA1 Message Date
kara Diaby
06958cbdd1 fix service and utf-8 encoding 2021-06-21 13:54:01 +02:00
Christophe Robillard
8cbbae8984 use cache for traitement time for instructeurs 2021-06-17 16:31:53 +02:00
Christophe Robillard
45ffae9eb3 affiche evolution temps de traitement 2021-06-17 16:31:53 +02:00
Pierre de La Morinerie
b5bde6608c routes: replace the email param in the Avis URLs by a query param 2021-06-17 11:15:51 +02:00
kara Diaby
ab781204bc modify groupe instructeur controller 2021-06-15 11:20:20 +02:00
François Vantomme
c9b1095d1e Refactor (Rubocop): replace map{ … }.compact by filter_map
In Ruby 2.7, Enumerable#filter_map has been added.
This cop identifies places where map { … }.compact can be replaced by filter_map.

See: https://docs.rubocop.org/rubocop-performance/cops_performance.html#performancemapcompact
2021-06-11 15:38:09 +02:00
Christophe Robillard
41569efe9d extract estimate_weight
and rename nb_dossiers by nb_dossiers_termines
2021-06-09 10:52:38 +02:00
simon lehericey
f2ba83a704 cout_dossier_termines_by_month for groupe_instructeurs
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-09 10:52:38 +02:00
simon lehericey
83d60c7b63 archive for all the groups
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-09 10:52:38 +02:00
simon lehericey
e933a80c55 remove useless archivable_months
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-09 10:52:38 +02:00
simon lehericey
1c1e990d2a remove useless count
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-09 10:52:38 +02:00
simon lehericey
09b3cf98f6 use nb_dossiers to estimate total weight
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-09 10:52:38 +02:00
simon lehericey
895eed5a27 UI uses average_dossier_weight
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-09 10:52:38 +02:00
Christophe Robillard
7002811ba5 optim count nb_dossiers per month for archive
`Traitement#count_dossiers_termines_by_month` removes n+1 queries

Co-authored-by: LeSim <mail@simon.lehericey.net>
2021-06-09 10:52:38 +02:00
kara Diaby
b3c5fcb4c5 fix procedure not found 2021-06-08 17:55:38 +02:00
kara Diaby
6ed339e7aa modify controllers 2021-06-04 15:29:08 +02:00
Paul Chavard
f076fa803e Handle GeoJSON validation errors 2021-06-02 12:43:24 +02:00
François Vantomme
bc6d5aca0e Fix (Sentry): prefer Rails secrets over ENV variables 2021-05-27 11:12:27 +02:00
Paul Chavard
9b0dae4cc2 Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
Paul Chavard
dfc46a8736 Enable add descriptions to cadastres 2021-05-26 11:27:09 +02:00
lydiasan
2d6ad4f2c1
Merge branch 'main' into localize-dropdown-button 2021-05-25 14:45:52 +02:00
lydiasan
e85dcf4c58
Update app/controllers/application_controller.rb
Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
2021-05-25 13:32:26 +02:00
lydiasan
71069c0e1b correction de la variable d'environnement 'LOCALIZATION_ENABLED' 2021-05-25 10:05:52 +02:00
Paul Chavard
3b85ade440 Add compatibility cadsatre layer with old API GEO 2021-05-24 11:57:00 +02:00
simon lehericey
63311eceb0 avoid serializing long id list in case of huge procedure, search on it before 2021-05-20 12:08:04 +02:00
simon lehericey
3c01488db2 use set to avoid duplicate in @dossier_count 2021-05-18 11:43:20 +02:00
simon lehericey
663d287962 proposition de simplification 2021-05-18 11:43:17 +02:00
simon lehericey
02e2128fb7 proposition de simplification 2021-05-18 11:42:11 +02:00
kara Diaby
7d9cf63056 add and modify controllers 2021-05-18 11:42:10 +02:00
lydiasan
42153d1d37 ajout du selecteur de langue 2021-05-12 16:30:35 +02:00
Paul Chavard
8a74438dc1 Use conservation_extension instead of en_construction_conservation_extension 2021-05-11 17:33:53 +02:00
Paul Chavard
1e0d6ea28f Rename en_construction_conservation_extension to conservation_extension 2021-05-11 14:08:51 +02:00
Paul Chavard
bcbfcdc537 Revert "Merge pull request #6142 from tchak/enable_brouillon_extend_conservation"
This reverts commit 48eb4d9778, reversing
changes made to 5539d5cb8c.

# Conflicts:
#	app/models/dossier.rb
#	db/schema.rb
2021-05-04 16:03:29 +02:00
Christophe Robillard
01f180022b prend en compte uniquement les pj pour estimer la taille d'un dossier 2021-05-04 12:50:12 +02:00
Paul Chavard
f6508899de Refactor NotificationMailer 2021-05-04 12:05:06 +02:00
Paul Chavard
a4fd629f4a Enable user destruction 2021-05-04 12:05:06 +02:00
Paul Chavard
b2a867266a Allow users to extend conservation on drafts 2021-04-29 19:50:30 +02:00
Christophe Robillard
f40d96fbd2 Revert "Revert "Export de tous les dossier d'une démarche""
This reverts commit d9a588b52e.
2021-04-29 17:29:47 +02:00
krichtof
d9a588b52e
Revert "Export de tous les dossier d'une démarche" 2021-04-29 16:07:18 +02:00
simon lehericey
22811e1cc2 remove unused kaminari stuff 2021-04-29 11:23:41 +02:00
simon lehericey
db23a853a9 fetch all notification at once 2021-04-29 11:23:41 +02:00
simon lehericey
20fb756097 one less count 2021-04-29 11:23:41 +02:00
simon lehericey
8b73d8804c fetch all exports at once by groupe_instructeurs_ids 2021-04-29 11:23:41 +02:00
simon lehericey
951d4c0025 eager load procedure logo 2021-04-29 11:23:41 +02:00
Christophe Robillard
8bee53fe77 rend plus robuste la création de l'archive 2021-04-28 11:40:58 +02:00
Christophe Robillard
fa4f6190c4 exporte aussi les démarches archivées 2021-04-28 11:40:58 +02:00
Christophe Robillard
71a5e41e5b add archive_zip_globale feature flag 2021-04-28 11:40:58 +02:00
Christophe Robillard
8b2849408c instructeurs can create and download archives 2021-04-28 11:40:58 +02:00
Christophe Robillard
fba0d78153 generate pdf export inside pieces_justificatives_service 2021-04-28 11:40:58 +02:00
simon lehericey
275b71abac includes champs: :type_de_champ 2021-04-27 13:45:57 +02:00
Pierre de La Morinerie
51d6faabee controllers: log invalid tokens in Users::SessionsController
This is an attempt to understand why we have so many of these
errors in production.
2021-04-22 19:23:47 +02:00
Paul Chavard
2a068fb9b0 Remove user feedback buttons 2021-04-22 15:40:40 +01:00
Pierre de La Morinerie
d530b272a1 password: add specific page for reset instructions 2021-04-22 14:24:15 +02:00
simon lehericey
553e1d973c remove old methods 2021-04-22 10:46:04 +02:00
simon lehericey
0c845c937d use DossierProjectionService 2021-04-22 10:46:04 +02:00
kara Diaby
01a91fb35b modify controllers 2021-04-19 10:23:45 +02:00
Christophe Robillard
db48ea02aa [manager] list superadmins 2021-04-15 10:12:11 +02:00
Pierre de La Morinerie
16f695031b manager: add Mailjet emails to the sent emails list 2021-04-13 10:58:30 +02:00
Pierre de La Morinerie
5e8327ff09 manager: refactor SendInBlue unblock action 2021-04-13 10:57:26 +02:00
Pierre de La Morinerie
76e74003ad manager: fix SendInBlue emails 2021-04-13 10:57:26 +02:00
simon lehericey
376013ef03 simplify ever more 2021-04-13 09:32:48 +02:00
simon lehericey
6055fd1b0b remove for_procedure 2021-04-13 09:32:48 +02:00
simon lehericey
e7bc53237b simplify followed_dossiers 2021-04-13 09:32:48 +02:00
simon lehericey
430acb1cb0 Fetch all count at once (- 400ms on pass culture) 2021-04-13 09:32:48 +02:00
simon lehericey
9a5a41d0bb add assign_tos and groupe_instructeur_ids methods 2021-04-13 09:32:48 +02:00
simon lehericey
46517e997b extract procedure_id 2021-04-13 09:32:48 +02:00
kara Diaby
6bb61ca64f add condition regarding experts emails in dossier controller instructeur 2021-04-09 13:09:22 +02:00
Paul Chavard
651a928b7c Improuve export UI 2021-04-08 14:40:26 +01:00
Paul Chavard
3ac4a1b339 Revert "New attemp to fix orange badge hell"
This reverts commit e83762c4e3.
2021-04-07 20:02:53 +01:00
Paul Chavard
e83762c4e3 New attemp to fix orange badge hell 2021-04-07 18:43:09 +01:00
Paul Chavard
3f994a6fc8 Revert "Try to fix orange badge hell"
This reverts commit 1fd92565f3.
2021-04-07 18:43:09 +01:00
Paul Chavard
1fd92565f3 Try to fix orange badge hell 2021-04-07 15:07:05 +01:00
simon lehericey
b87a691176 use env for localization to avoid db round trip 2021-04-06 18:23:14 +02:00
simon lehericey
6f2b2c3c1f use env for maintenance mode to avoid DB roundtrip 2021-04-06 18:23:14 +02:00
Pierre de La Morinerie
62051c926a app: move update_allow_decision_access to ExpertsController 2021-04-06 14:54:18 +02:00
Pierre de La Morinerie
c82c72402d app: move the experts list to ExpertsProceduresController 2021-04-06 14:29:02 +02:00
Pierre de La Morinerie
7acb4cee83 controllers: use standard action names in ExpertsProceduresController 2021-04-06 13:45:51 +02:00
Pierre de La Morinerie
3f25624a5a routes: nest ExpertsProcedures routes in a resource 2021-04-06 13:18:51 +02:00
Pierre de La Morinerie
95b6fdf86d controllers: unload failed avis from dossier
This avoid the subsequent dossier update to fail because some Avis
may be invalid.
2021-04-06 12:12:57 +02:00
kara Diaby
2a0c40c25f add experts_procedures controller 2021-04-06 10:39:25 +02:00
kara Diaby
f9e4d9c982 add variable to dossier controller 2021-04-06 10:39:24 +02:00
kara Diaby
436f567067 change create avis concern 2021-04-06 10:39:24 +02:00
kara Diaby
f4acc83269 change procedures controller 2021-04-06 10:38:46 +02:00
Pierre de La Morinerie
3499f5af9a models: remove invalid Dossier ↔︎ Champ inverse relationship
`Dossier.champs` is not really an inverse of `Champs.dossier`: when a
Champ record is created, it should not always be added to dossier.champs
(for instance if the champ is private).

NB: this breaks the workaround we added in #3907 to fix the parent
dossier not being touched in some cases (the workaround was to add an
inverse relationship, but we now have to remove it).

The new workaround is to watch for `changed_for_autosave?` on champs.
Unlike `changed?`, `changed_for_autosave?` also detects changes to
attachments. This allows us to touch both `last_champ_updated_at` and
`updated_at` in a single pass.
2021-04-06 10:26:17 +02:00
Pierre de La Morinerie
fc4d8362dc models: fix typo in comments 2021-04-06 10:26:17 +02:00
Christophe Robillard
dbfc878bf5 supprime la page accessibilité 2021-03-30 15:12:18 +02:00
Pierre de La Morinerie
3f3d6ae399 controllers: use template: rather than file: to render PDFs
ActionView now throws an error if a relative path is used with `file:`.
2021-03-25 13:24:53 +01:00
Paul Chavard
0b22788d60 experts_procedure should not be optional 2021-03-23 13:46:33 +01:00
kara Diaby
38740d1b5b modify experts avis controllers, concern and serializer 2021-03-18 11:38:52 +01:00
kara Diaby
c55e4d0d98 remove unused instructeur logic 2021-03-18 11:38:52 +01:00
kara Diaby
d2ab2debb6 add expert logic 2021-03-18 11:27:51 +01:00
Christophe Robillard
60cc4d3697 add pdf to pjs export 2021-03-16 15:13:17 +01:00
kara Diaby
6383e6b9e7 Revert "Revert "Claimant type to avis table""
This reverts commit f4fd220d43.
2021-03-10 08:48:55 +01:00
Paul Chavard
70500e3d56 Groupe instructeur selector default blank 2021-03-09 14:47:23 +01:00
Paul Chavard
9c3e72c84a Use revision instead of groupe instructeur as dossier procedure link 2021-03-09 14:47:23 +01:00
Kara Diaby
f4fd220d43
Revert "Claimant type to avis table" 2021-03-09 13:40:10 +01:00
kara Diaby
0211d1f105 modify create_avis_concern 2021-03-07 22:47:53 +01:00
Paul Chavard
1c811083c0 Cleanup feature flags usage 2021-03-04 11:06:04 +01:00
Paul Chavard
e7ba380d95 Fix JSON.parse crashing on empty values 2021-03-03 17:31:05 +01:00
Pierre de La Morinerie
aae452cc67 gems: update chunky_png
And pass it a proper IO object, to avoid "Undefined method
`set_encoding`" errors.
2021-02-16 16:31:30 +00:00