Paul Chavard
7aacb7565c
fix(dossiers): mark as read dossier on update_annotations
2022-03-22 09:19:24 +01:00
Pierre de La Morinerie
fbe0410702
models: fix a typo in a ProcedurePresentation's comment
2022-03-22 07:58:44 +01:00
Pierre de La Morinerie
6849a73aec
models: ignore deprecated User columns
2022-03-22 07:58:44 +01:00
Pierre de La Morinerie
31bd05f835
models: inverse the direction of the User role associations
2022-03-22 07:58:44 +01:00
Pierre de La Morinerie
d4da6502ba
models: remove double-write callback on User
2022-03-22 07:58:44 +01:00
Martin
98c1fb8abc
feat(archive): drop old feature
2022-03-18 14:26:09 +01:00
simon lehericey
31d52d2483
do not open all fd at once
2022-03-17 22:44:53 +01:00
Kara Diaby
8bcdf59778
change commentaire model
2022-03-17 13:57:49 +01:00
Kara Diaby
eda5f75ec3
modify dossier model
2022-03-17 13:57:49 +01:00
Paul Chavard
d2e9cb5253
fix(map): remove IGN token
2022-03-17 11:55:20 +01:00
Paul Chavard
31da6178cc
refactor(maplibre): improuve type imports
2022-03-17 11:55:20 +01:00
Paul Chavard
c530399eac
feat(procedure): display revisions diffs
2022-03-17 10:26:38 +01:00
Paul Chavard
6d69e153f3
fix(procedure): use non-breaking spaces
2022-03-17 10:26:38 +01:00
Paul Chavard
0cb34028d2
fix(procedure): use size instead of count
2022-03-17 10:26:38 +01:00
Martin
5739150f15
feat(service/archive_uploader): add an archive uploader class to upload files thru a custom script which handle file encryption of massive file (bigger than 4Go)
...
Update doc/object-storange-and-data-encryption.md
Co-authored-by: LeSim <mail@simon.lehericey.net>
Update app/services/archive_uploader.rb
Co-authored-by: LeSim <mail@simon.lehericey.net>
Update doc/object-storange-and-data-encryption.md
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
clean(doc): align document file name and document h1
clean(review): refactore based on various comments
clean(review): refactore based on various comments
2022-03-16 14:56:21 +01:00
Pierre de La Morinerie
ae3e360139
models: double-write to the newly created foreign keys
...
This code is only used to handle a live system creating new
Administrateurs, Instructeurs or Experts before the migration to the new
foreign keys.
2022-03-15 15:57:22 +01:00
Pierre de La Morinerie
48ea53b90d
db: add foreign keys to Administrateur, Instructeur and Expert
2022-03-15 15:15:51 +01:00
Pierre de La Morinerie
be834ba58d
models: reload old_user roles before destroying it
...
Otherwise ActiveRecord believes that old_user still has roles (although
they have been migrated to the new user), and attempts to delete them.
2022-03-15 15:13:45 +01:00
Pierre de La Morinerie
2cac7d96be
models: fix procedure_revision comments indentation
2022-03-15 15:13:45 +01:00
simon lehericey
44f2d93277
quick fix of sections in preview
2022-03-15 10:54:39 +01:00
Paul Chavard
77c2187747
fix(instructeur): avoid n+1 in instructeur_dossier#show and user_dossier#show
2022-03-15 09:57:54 +01:00
Paul Chavard
ec2f2dc78c
feat(graphql): expose more dossier informations
2022-03-14 15:58:02 +01:00
Paul Chavard
0695ea322a
refactor(instructeur): improuve dossiers list view
2022-03-11 14:06:34 +01:00
Paul Chavard
a50d07400e
refactor(instructeur): cleanup destroy / restore routes
2022-03-11 14:06:34 +01:00
Paul Chavard
78bf1147d0
refactor(instructeur): use better fallback location
2022-03-11 13:55:36 +01:00
Paul Chavard
c60a8970f1
perf(dossier): memoize champ.sections on dossier
2022-03-11 00:15:53 +01:00
François Vantomme
d5cd0101c8
feat(footer): customize using custom views & locales
2022-03-10 17:31:20 +01:00
Paul Chavard
d3ceba8955
feat(manager): display hidden_by_user_at and hidden_by_administration_at in manager views
2022-03-10 14:29:40 +01:00
Paul Chavard
54b559364a
feat(dossier): replace discarded with visible_by_administration
2022-03-10 14:29:40 +01:00
Paul Chavard
59b0f3961d
refactor(dossier): improuve dossiers_count_summary
2022-03-10 14:29:40 +01:00
Pierre de La Morinerie
3a16235868
db: Add a delete_orphans
db helper
2022-03-08 14:47:43 +01:00
Pierre de La Morinerie
a645c5781d
models: delete AdministrateursProcedure when destroying Procedure
2022-03-08 09:20:34 +01:00
mfo
62351153a1
Merge branch 'main' into patch-1
2022-03-03 17:01:16 +01:00
Benoît Bernier
8ee6c5fe1b
Typo correction
2022-03-03 16:48:26 +01:00
Benoît Bernier
02661b5ec7
Typo correction
2022-03-03 16:46:02 +01:00
simon lehericey
a01e523f08
more compression
2022-03-03 09:30:15 +01:00
simon lehericey
ebd4d6a067
update FC/AG images
2022-03-03 09:30:15 +01:00
Paul Chavard
91caef0bfe
fix(dossier): ensure submitted dossiers always have groupe instructeur
2022-03-02 16:57:12 +00:00
Paul Chavard
ac6e219074
feat(administrateur): dossiers count should only include relevant dossiers
2022-03-02 15:37:42 +00:00
Pierre de La Morinerie
087e438eb6
models: delete AdministrateursInstructeur when destroying Instructeur
...
By default, `has_and_belongs_to_many` properly deletes the record in
the join table.
However, as the association is declared manually with a
`has_many / through`, it doesn't delete the joined record automatically.
As we also lack a foreign-key contraint on the join table, that means
a dangling record remains in the join table.
To fix this, let's declare it a proper `has_and_belongs_to_many`
association, which will let the join record be deleted automatically
on destroy.
2022-03-02 11:26:53 +01:00
Pierre de La Morinerie
e32c9a9f94
models: don't attempt to format invalid phone numbers
...
This is a defensive-programming measure, because formatting an
invalid phone number may truncate some leading numbers.
2022-03-02 09:57:03 +00:00
Pierre de La Morinerie
f35d18cd5c
models: stop truncating DROM phone numbers
...
Fix #6996
2022-03-02 09:57:03 +00:00
Pierre de La Morinerie
5150e33212
models: ensure DROM phone numbers are valid
...
They were accepted before, because they were 'possible' – but now
they are explicitely considered as valid.
2022-03-02 09:57:03 +00:00
Paul Chavard
b8a22ae8b2
fix(multi-select): fix labels on multi select component
2022-03-02 09:48:54 +00:00
Pierre de La Morinerie
71e1b6c973
models: delete AdministrateursProcedure when destroying Administrateur
...
By default, `has_and_belongs_to_many` properly deletes the record in
the join table.
However, as the association is declared manually with a
`has_many / through`, it doesn't delete the joined record automatically.
As we also lack a foreign-key contraint on the join table, that means
a dangling record remains in the join table.
To fix this, let's declare it a proper `has_and_belongs_to_many`
association, which will let the join record be deleted automatically
on destroy.
2022-03-01 16:58:04 +01:00
Paul Chavard
2a42690388
fix(carto): show map UI before loading map styles
2022-03-01 11:08:07 +00:00
mfo
4346775169
Merge branch 'main' into US/fix-avis
2022-02-28 15:08:25 +01:00
Martin
48612028f4
fix(avis_controller#*): missing ACL
2022-02-28 14:24:41 +01:00
Martin
b808b4db00
fix(relation): avoid double association between procedure/procedure_revision/dossier_submitted_message
2022-02-25 14:01:18 +01:00
Martin
85a588541b
feat(dossier_submitted_message): add a new system to customize the standby page (/merci) after an user created his folder. this is a basic feature that will come with more options asap
...
wip(dossier_created_hook): add tile to administrateurs/procedure#show in order to crud dossier_created_hook
refactor(css.utilities): remove merge helpers.scss within utils.scss (same purpose). use scss each for spacer modifiers
refactor(dossiers/_merci.html): extract partial _merci so we can re-use it in preview of dossier_created_hook.
feat(wip): current progress
2022-02-25 14:01:18 +01:00
simon lehericey
83d2e44cd7
do not show connect button on agentconnect page
2022-02-24 12:23:12 +01:00
simon lehericey
0d74a6e45e
compact display to show agentconnect to small screen
2022-02-24 12:23:12 +01:00
simon lehericey
28005db9aa
do not show left column on small screen
2022-02-24 12:23:12 +01:00
simon lehericey
7883b08a5e
apply new style to agent connect
2022-02-24 12:23:12 +01:00
Paul Chavard
7c8e97f084
chore(eslint): ignore type of global react-query queryFn
2022-02-23 15:28:51 +01:00
Paul Chavard
cd2273ba54
chore(eslint): ignore any types in maplibre styles
2022-02-23 15:28:51 +01:00
Paul Chavard
67bfeb261a
chore(eslint): fix gon types
2022-02-23 15:28:51 +01:00
Paul Chavard
12ddaa0533
chore(eslint): disable types because we use mapbox plugin with maplibre
2022-02-23 15:28:51 +01:00
Paul Chavard
96e9024694
chore(eslint): disable types on complicated event handlers
2022-02-23 15:28:51 +01:00
Paul Chavard
4e218ba562
chore(eslint): fix react-query cancelable promise type
2022-02-23 15:28:51 +01:00
Paul Chavard
a914950982
chore(eslint): fix getJSON reponse type
2022-02-23 15:28:51 +01:00
Paul Chavard
beafa21796
chore(eslint): fix isNumeric types
2022-02-23 15:28:51 +01:00
Paul Chavard
95b9e47993
chore(eslint): fix flash message root element query
2022-02-23 15:28:51 +01:00
Paul Chavard
68e89af775
chore(eslint): make react-hooks/exhaustive-deps rule as an error
2022-02-23 15:28:51 +01:00
Pierre de La Morinerie
a2028e115b
controllers: fix crash on APIEntreprise::API::Error::TimedOut
...
In that case we want to display the nicely formatted error message to the
user, instead of a "Error 500" page.
2022-02-23 11:36:25 +01:00
Pierre de La Morinerie
56c2e57aee
controllers: fix crash on APIEntreprise::API::Error::ServiceUnavailable
...
In that case we want to display the nicely formatted error message to the
user, instead of a "Error 500" page.
2022-02-23 11:31:41 +01:00
kreushed
1c5b1c0030
Mise a jour du volet gauche de la page session new
2022-02-21 18:21:38 +01:00
kreushed
167cb100b6
Mise a jour du volet droit de la page session new
2022-02-21 18:21:38 +01:00
kreushed
e0bf1ea8cf
Mise a jour des images
2022-02-21 17:34:53 +01:00
Paul Chavard
2d396fcfb7
feat(dossier): rebase dossiers en construction and en instruction
2022-02-18 17:08:38 +01:00
Pierre de La Morinerie
c9f1a2b8ea
mailer: improve notify_new_answer wording
...
And also insert the reply email address directly in the email body.
2022-02-16 18:35:30 +01:00
Pierre de La Morinerie
0a1214114e
mailer: re-order notify_new_answer template
...
This avoids an `if !…` condition.
2022-02-16 18:26:45 +01:00
Pierre de La Morinerie
50cafc033f
js: fix OperationQueue error handling
...
When an exception is raised, `response.json()` may have been called
already. In that case, when accessing `response.text()` in the error
handler, a "Response.text: Body has already been
consumed." error will be raised.
2022-02-15 12:23:18 +01:00
Pierre de La Morinerie
90b5e938e3
stats: fix Matomo cookie domains setting
...
It was exported to the GON as `cookie_domain`, but imported
by the tracking code as `cookieDomain`.
2022-02-15 11:55:24 +01:00
François Vantomme
cc6cb2ea30
feat(matomo): use env variables to set the domain
2022-02-15 09:25:23 +01:00
Jon
97feca6305
feat(ClamAV): add config to disable clamav usage
2022-02-15 09:15:47 +01:00
François Vantomme
ac915494df
feat(landing): hide testimonial & users sections
2022-02-15 08:49:23 +01:00
Martin
f84b69276e
fix(expiration_banner.message): miss match when procedure was not expirable ; always showing expiration message
2022-02-11 15:49:37 +01:00
Paul Chavard
08030bcdb7
fix(attestation_template): handle attestation changes on procedures without revisions
2022-02-11 11:12:10 +01:00
Paul Chavard
76b1b85fa7
fix(attestation_template): add revision diff support
2022-02-11 08:45:32 +01:00
Paul Chavard
e269077c40
refactor(attestation_template): cleanup relationships
2022-02-11 08:45:32 +01:00
Paul Chavard
88e80e9e32
Merge pull request #6901 from adullact/feature/6859-jwt-token-expiration
...
[API Entreprise] Ajout du support des jetons JWT sans clé d'expiration
2022-02-10 11:48:39 +01:00
Kara Diaby
a6b2873bfc
modify instructeur model
2022-02-09 14:43:36 +01:00
Kara Diaby
0ce61f451e
modify dossier model
2022-02-09 14:43:36 +01:00
Paul Chavard
1f661325a5
refactor(carto): use maplibre instead of mapbox
2022-02-09 10:29:00 +01:00
Paul Chavard
ea6aec8b1a
chore(webpack): enable typescript
2022-02-09 10:29:00 +01:00
Paul Chavard
12151acb99
Revert "Revert "feat(attestation): revise attestations""
...
This reverts commit 4e7733e571
.
2022-02-08 16:22:59 +01:00
Pierre de La Morinerie
847abca122
config: simplify mailer configuration again
...
Move everything to initializers, and replace the email settings
interceptor by a BalancerDeliveryMethod.
It has the advantage that it can be configured entirely from the
`config/environment.rb` file, without an extra file to look at.
2022-02-08 12:44:43 +01:00
Pierre de La Morinerie
04cfc8ed9d
config: use alternate delivery methods to configure ActionMailer
...
Previously `SENDINBLUE_BALANCING` was used only when
`SENDINBLUE_ENABLED` was *disabled* (otherwise only SendInBlue was ever
used).
This commit:
- Ensure that `SENDINBLUE_BALANCING` is used only when SendInBlue is
*enabled* (which is more intuitive).
- Make it easier to add other delivery methods.
2022-02-08 12:44:43 +01:00
Paul Chavard
ad545771b7
Merge pull request #6918 from adullact/feature/6875-improve-landing-contrast
...
Amélioration du contraste de la landing page administration
2022-02-08 12:30:18 +01:00
LeSim
fe9adf061c
Merge pull request #6916 from adullact/feature/6873-dinum-vars
...
Déplacer toutes les mentions à la DINUM dans des variables
2022-02-08 11:58:05 +01:00
LeSim
fdc4e5bfbc
Merge pull request #6928 from adullact/feature/6886-watermark-url
...
Watermark depuis une URL distante
2022-02-08 11:45:26 +01:00
Pierre de La Morinerie
9a3109d960
stylesheet: add space between big number cards elements
2022-02-08 11:43:32 +01:00
Paul Chavard
0268511264
fix(manager): remove admins added for a day
...
fix #6855
2022-02-08 11:18:44 +01:00
François Vantomme
eba9a87123
refactor(API Entreprise): raise an error on blank token
2022-02-07 15:18:16 +01:00
Jon
88d3a6e4c3
feat: can have remote watemark file
2022-02-04 18:55:16 +01:00
François Vantomme
1f64d45ba4
refactor(footer): improve provided by rendering
2022-02-04 18:30:26 +01:00
François Vantomme
62562ff7a5
feat(landing): improve CTA rendering
2022-02-04 18:26:04 +01:00
François Vantomme
51cfd3d7ad
feat(env): add env variables for the provider data
2022-02-04 18:20:06 +01:00
Kara Diaby
5d10158fa6
Instructeur : ne peut plus cliquer sur un dossier supprimé dans la recherche
2022-02-03 11:17:39 +01:00
Christophe Robillard
b80ec84552
fix a11y-8.9.1 for attachement description error
2022-02-02 19:03:40 +01:00
Christophe Robillard
447612abdf
fix a11y-8.9.1
...
no p tag when Champ text with no value
2022-02-02 19:03:40 +01:00
Pierre de La Morinerie
e6cf07b810
stats: move date formatting out of the Stat model
...
Before this commit, the monthly dossiers count was serialized into the
Stat record using human-formatted dates, as:
```ruby
s.dossiers_in_the_last_4_months = {
"octobre 2021"=>409592,
"novembre 2021"=>497823,
"décembre 2021"=>38170,
"janvier 2022"=>0
}
```
Turns out the ordering of keys in a serialized hash is not guaranteed.
After a round-trip to the database, the keys will be wrongly sorted.
Instead we want to save raw Date objects, which will preserve the
ordering. The date formatting can be applied at display-time by the
controller.
Fix #6848
2022-02-02 14:13:53 +01:00
Kara Diaby
81249aa798
Instructeurs : fixe la recherche cassée dans la précédente release
2022-02-02 09:33:28 +01:00
Kara Diaby
8d2f4597fa
fix recherche on supprimes_recemment dossiers instructeurs
2022-02-01 16:54:09 +01:00
Pierre de La Morinerie
ca58e60dc0
validators: rename revisions
namespace to types_de_champ
2022-02-01 12:37:16 +01:00
Pierre de La Morinerie
d680602c84
models: validate private types_de_champ
2022-02-01 12:37:16 +01:00
Pierre de La Morinerie
e8e37cce15
models: refactor the types_de_champ validators
...
Context: we want to validate public and private types_de_champ
separately.
Before we validated the whole revision (and then validators themselves
enumerated all champs, public and private).
Now we validate the actual public types_de_champ, which will let us
validate separately the private types_de_champ.
2022-02-01 12:37:16 +01:00
Kara Diaby
82ddad125f
layout
2022-01-31 10:03:44 +01:00
Kara Diaby
0f968f4c4e
modify models
2022-01-27 17:01:27 +01:00
Kara Diaby
a94568e2ef
modify procedures controller
2022-01-27 17:01:09 +01:00
Pierre de La Morinerie
387701e7cb
config: add a new SAML_IDP_ENABLED env var
...
This fixes the app crashing on launch when using the production profile,
because the certificates are not present.
2022-01-26 16:45:50 +01:00
Paul Chavard
4e7733e571
Revert "feat(attestation): revise attestations"
...
This reverts commit e413872530
.
2022-01-25 18:26:34 +01:00
Paul Chavard
a9c4a81ab0
fix dossier mailer templates
2022-01-25 11:46:05 +01:00
Kara Diaby
2eb35065f8
fix dossier deletion mailers
2022-01-25 11:46:05 +01:00
Kara Diaby
0e3532a0b2
Fixe la liste 'tous' des dossiers instructeurs lorsqu'un dossier est en constructino et caché par l'usager
2022-01-24 16:47:47 +01:00
Martin
47fa95a577
feat(MonAvisEmbedValidator): allow mon avis button without title
2022-01-24 15:56:29 +01:00
Paul Chavard
e413872530
feat(attestation): revise attestations
2022-01-19 18:00:37 +01:00
Paul Chavard
c1cb89bb44
fix(revision): changed? conflicts with rails method
2022-01-19 18:00:37 +01:00
Paul Chavard
3d8471e064
fix(dossier): do not send notification on expiration when dossier is already deleted
2022-01-19 17:52:53 +01:00
Pierre de La Morinerie
68fd3aea39
config: rename SOURCE to LOGRAGE_SOURCE
2022-01-19 15:43:44 +01:00
Pierre de La Morinerie
d4fada9f6c
config: add MATOMO_HOST environment variable
2022-01-19 15:43:44 +01:00
Kara Diaby
8490826a78
import csv gi available only for published procedures
2022-01-18 13:21:11 +01:00
Paul Chavard
403e71b41f
feat(procedure): only purge procedures without dossiers
2022-01-18 11:22:04 +01:00
Paul Chavard
7937e58caa
fix(archives): only export dossiers in archive groupe_instructeurs
...
fix #6793
2022-01-18 11:16:20 +01:00
Paul Chavard
902f7f6cb3
fix(select): improuve multi select onBlure
2022-01-13 17:49:16 +01:00
Paul Chavard
7e81b257b1
test(system): simplify select menu selector
2022-01-13 17:49:16 +01:00
Paul Chavard
7e0d471a08
improuve discarded_expired scopes
2022-01-12 15:49:38 +01:00
Kara Diaby
68b45ae31d
modify instructeur procedures controller
2022-01-12 15:49:38 +01:00
Kara Diaby
e2caf5718f
modify instructeur model
2022-01-12 15:49:38 +01:00
Kara Diaby
4606650248
layout
2022-01-12 15:49:38 +01:00
Kara Diaby
894b065615
modify dossier model
2022-01-12 15:49:37 +01:00
Kara Diaby
006eac4240
modify controller
2022-01-12 15:49:37 +01:00
Paul Chavard
4a718eae92
fix(select): always show menu on click in the input
...
fix #6655
2022-01-11 12:11:45 +01:00
Paul Chavard
967699c305
fix(select): improuve no results found message
2022-01-11 12:10:20 +01:00
Pierre de La Morinerie
062f52feb9
Fix ProcedureAdministrateursController#destroy
...
- The "no remove oneself" rule wasn't actually enforced
- `flash.error` is not a flash category
2022-01-07 15:39:58 +01:00
Martin
383a92bcd9
fix(parallel_download_queue): tophoeus does not like raise from a request handler [crash straight to first frame]
2022-01-07 14:24:37 +01:00
Pierre de La Morinerie
2e1a3c32cb
helpers: handle flash[:error]
...
Errors generated by the `invisible-catcha` gem are reported as
`flash[:error]` (which differs from Rail's usual `flash[:alert]`).
We probably shouldn't use flash[:error] in our own codebase; but we can
handle its use in third-party libraries.
2022-01-06 14:09:31 +01:00
Pierre de La Morinerie
68b112e00a
helpers: don't crash on unknown flash level
...
Errors generated by the `invisible-catcha` gem are reported as
`flash[:error]` (which differs from Rail's usual `flash[:alert]`).
Avoid crashing when the flash level passed to this helper is not known.
2022-01-06 14:09:26 +01:00
Martin
f770ac4907
fix(users/champs/piece_justificative#update): ensure to bump dossier.last_champ_updated_at otherwise instructeurs are not notified when user update their piece_justificative
2022-01-06 13:09:57 +01:00
Martin
a9ffaf942e
feat(attestation): can enable/disable attestation no matter the state of the procedure
2022-01-05 18:20:11 +01:00
Paul Chavard
28c1763701
a11y(champs): generalize describedby and update to use new Combo props
2022-01-05 12:33:40 +01:00
Paul Chavard
3513182e7c
a11y(select): use new ComboMultiple component
2022-01-05 12:33:40 +01:00
Paul Chavard
d6b6bb0f2a
a11y(combobox): add support for describedby and labelledby and improuve external fields handling
2022-01-05 12:33:40 +01:00
Paul Chavard
fc058f721d
a11y(champs): expose ids for UI on champ
2022-01-05 12:33:40 +01:00
simon lehericey
00871cfe13
Fix ping controller in dev
...
For an unknown reason, ActiveRecord::Base.connected? does not work anymore in dev. It returns false negative.
This simple workaround can timeout. The caller has to monitor the response time.
2022-01-05 11:44:32 +01:00
Martin
3eb1c1a421
feat(async_backend): switch to typhoeus
2022-01-04 16:27:23 +01:00
Martin
ce1b189dcd
refactor(DownloadManager): extract parallel download in dedicated class. move error management in custom class for procedure exports using the didicated class
2022-01-04 16:17:03 +01:00
Martin
2ed9cccba0
extract download all attachments in dedicated class using async/async-http for better perf
2022-01-04 16:17:03 +01:00
Martin
252eee272b
feat(support#create): block with invisible captcha [avoid painful captcha]
2022-01-04 14:49:00 +01:00
Paul Chavard
7f0dde9be4
fix(a11y): add aria to tabs
2022-01-04 09:44:32 +01:00
Paul Chavard
6776a5e05a
fix(react): remove register component cache
2022-01-03 19:41:23 +01:00
Kara Diaby
1ca553e088
rename hidden_by_instructeur by hidden_by_administration
2022-01-03 11:51:25 +01:00
Paul Chavard
ad4be3c482
refactor(dossier): handle discard by admin and super admin
2022-01-03 11:51:25 +01:00
Kara Diaby
b408811c5a
l'expert ne voit pas les dossiers supprimés par l'instructeur
2022-01-03 11:51:25 +01:00
Kara Diaby
051d7b2028
change dossier method
2021-12-29 17:37:58 +01:00
Kara Diaby
37e991ccb8
User : delete the folder if the instructeur has hide it
2021-12-29 17:37:58 +01:00
Kara Diaby
7d7b847437
Instructeur : delete the folder if the user has hide it
2021-12-29 17:37:58 +01:00
Kara Diaby
22ac853815
add hidden_by_instructeur scope
2021-12-29 17:37:58 +01:00
Kara Diaby
f239d46a45
add hide_dossier method to instructeurs
2021-12-29 17:37:57 +01:00
Kara Diaby
cd95b730e0
add hidden_by_instructeur_at on dossiers
2021-12-29 17:37:57 +01:00
Martin
d0ab1711ff
fix(profil_controller#update_email): ensure we are not merging same account
...
fix(profil_controller#update_email): changing email from current_user.email to current_user.email destroy current user. whoops ☠️ '
Update config/locales/en.yml
Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
Update config/locales/fr.yml
Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
Update spec/controllers/users/profil_controller_spec.rb
Update config/locales/fr.yml
Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
Update spec/controllers/users/profil_controller_spec.rb
fix(spec): broken due to typo
2021-12-29 13:36:47 +01:00
Christophe Robillard
6e36fee7b3
superadmin can display list of procedures without zone
2021-12-23 19:18:46 +01:00
Christophe Robillard
90c971567d
superadmin can show zone for a procedure
2021-12-23 19:07:42 +01:00
Christophe Robillard
c7b5e57d2a
superadmin can get procedures from zone
2021-12-23 19:07:42 +01:00
Christophe Robillard
537e6066d8
add Zones dashboard for superadmin
2021-12-23 19:07:42 +01:00
Christophe Robillard
878f735a80
facilite le remplissage automatique de l'email
2021-12-23 19:00:10 +01:00
Paul Chavard
4e779f445d
fix(instructeur): copy notifications settings from previous groupe instructeur
...
fix #6763
2021-12-23 13:55:25 +01:00
Paul Chavard
2f6cd317bf
fix(instructeur): set notification settings on all groupe instruteur for given procedure
2021-12-23 13:55:25 +01:00
Christophe Robillard
eda8aacfe4
fix a11y problem for support page
...
L'interpolation de `support.index.product.answer_html` produisait des balises p vides, ce qui contrevenait au critère 8.9.1 RGAA (https://www.numerique.gouv.fr/publications/rgaa-accessibilite/methode/criteres/#test-8-9-1 )
2021-12-23 10:49:52 +01:00
Pierre de La Morinerie
07230870d3
js: don't track external links
...
This fixes an issue where, by default, links to private attachments are
reported to Matomo.
This is benign: attachments URLs can be filtered out server-side, and
expire after one hour anyway. But we don't want to ship an insecure
configuration by default.
2021-12-23 09:50:21 +01:00
Paul Chavard
f8d245d2f8
refactor(js): use dynamic import
2021-12-21 17:09:49 +00:00
Paul Chavard
26f65e250c
fix(a11y): better contrast on placeholders
2021-12-21 16:50:31 +00:00
Paul Chavard
1c6ff09c5b
fix(a11y): stop using th in presentation only tables
2021-12-21 16:50:31 +00:00
Paul Chavard
64104f9fc3
fix(a11y): criteria 11.1
2021-12-21 16:50:31 +00:00
Paul Chavard
fc90dca920
fix(a11y): criteria 10.5
2021-12-21 16:50:31 +00:00
Paul Chavard
e264472481
fix(procedures): fix check to enable procedure delete
2021-12-16 17:28:42 +00:00
Christophe Robillard
882f92268c
update zone to procedures
2021-12-16 17:20:06 +01:00
François Vantomme
14e0c68266
feat(api particulier): add MESRI field
2021-12-16 16:45:18 +01:00
François Vantomme
f08081abfe
fix(api particulier): remove $def key from pole emploi JSON schema
2021-12-16 16:45:18 +01:00
François Vantomme
115adbec70
style(api particulier): harmonize pole emploi resource name constant
2021-12-16 16:45:17 +01:00
François Vantomme
3d81d4b541
feat(api particulier): add MESRI adapter
2021-12-16 16:45:17 +01:00
François Vantomme
66a9109cd7
feat(api particulier): add MESRI support to sources service
2021-12-16 16:45:17 +01:00
Christophe Robillard
dec1f787a7
edit zone only if zonage feature enabled
2021-12-15 19:37:32 +01:00
Christophe Robillard
829d644c10
group related options in zone select box
2021-12-15 19:37:32 +01:00
simon lehericey
c7f7855f14
avoid phishing
2021-12-15 13:51:49 +01:00
Pierre de La Morinerie
be1ddb59ec
views: localize the stats partial
...
Also rename 'procédure' to 'démarches'.
2021-12-14 15:03:22 +01:00
maatinito
0a31c8bc79
refactor date_trunc queries using groupdate gem
2021-12-14 08:50:11 +01:00
maatinito
573b3d39e2
Fix date_trunc sql queries for timezoned forks
2021-12-14 08:50:09 +01:00
Martin
721d926c0d
wip(fix): chdir
2021-12-13 16:37:04 +01:00
mfo
148be50c86
Update app/services/procedure_archive_service.rb
...
Co-authored-by: LeSim <mail@simon.lehericey.net>
2021-12-13 16:37:04 +01:00
Martin
f7bc387e44
feat(flipper): use new way of generating archive only on some procedure flipped with new actor :zip_using_binary
2021-12-13 16:37:04 +01:00
simon lehericey
f0b0e7fd9a
Switch to usage of zip unix binary to create archive. Also use a dedicated queue for DelayedJob
...
use dedicated archives queue
As the used disk space will increase, we want a fined grain control
move zip logic in dedicated method
zip
wip
wip
fix(spec): pass spec in green
tech(improvements): avoid File.delete(folder), favor FileUtils.remove_entry_secure which is safer. Also wrap most of code that open file within blocks so it is cleaned when the block ends. Lastly use attachement.download to avoid big memory pressure [download in chunk, write in chunk] otherwise big file [124>1GO] are loaded in memory. what if we run multiple jobs/download in parallel ?
fix(spec): try to retry with grace
clean(procedure_archive_service_spec.rb): better retry [avoid to rewrite on open file]
lint(things): everything
2021-12-13 16:37:04 +01:00
Martin
4b2e858a1a
fix(mon_avis_embed_validator): enhance regexp
2021-12-13 14:49:40 +01:00
maatinito
9df0d98109
Fix csv download of stats
...
https://medium.com/@mitsun.chieh/activerecord-relation-with-raw-sql-argument-returns-a-warning-exception-raising-8999f1b9898a
2021-12-10 16:48:11 +01:00
Paul Chavard
c7b1dc7f87
fix(bulk_messages): destroy bulk messages with procedures
2021-12-09 16:16:40 +01:00
Pierre de La Morinerie
0e35bc609d
notifications: don't preload dossiers on instructeurs
...
This request currently times out almost every night in production.
It's because although Instructeurs are loaded in batches (default batch
size is 1000), loading all dossiers for 1000 instructeurs is slow.
Turns out the code executed after this query to compute notifications
doesn't even use these dossiers. Indeed it is faster not to preload
them: both the initial query and the total treatment time are shorter.
Here's a quick benchmark made locally (but using production data):
- Before this commit:
Benchmark.measure { pp Instructeur.includes(assign_to: { procedure: :dossiers }).where(assign_tos: { daily_email_notifications_enabled: true }).limit(100).m
ap(&:email_notification_data) }
Only the initial query : 35s
Total time : 97s
- Without preloading dossiers:
Benchmark.measure { pp Instructeur.includes(assign_to: :procedure).where(assign_tos: { daily_email_notifications_enabled: true }).limit(100).m
ap(&:email_notification_data) }
Only the initial query : 0.08s (400x faster)
Total time : 29s (3,3x faster)
Plus it doesn't timeout, of course.
2021-12-09 12:10:00 +01:00
Paul Chavard
b67818e425
feat(helpscout): add a tag to messages submited through contact form
2021-12-09 11:47:13 +01:00
Paul Chavard
efd8ddb99e
fix(graphql): do not crash if attestation is nil
2021-12-08 13:12:42 +01:00
simon lehericey
3bdf6b63d9
small wording fixes
2021-12-08 11:19:30 +01:00
François Vantomme
6ab8ac0662
feat (api particulier): add Pole emploi field
2021-12-08 10:36:25 +01:00
François Vantomme
4cfc9f7d86
feat(api particulier): add Pole Emploi adapter
2021-12-08 10:36:11 +01:00
François Vantomme
cfb8c184fe
perf(api particulier): use filter_map
instead of map.compact
...
https://docs.rubocop.org/rubocop-performance/cops_performance.html#performancemapcompact
2021-12-08 10:36:11 +01:00
François Vantomme
a24cf18c9d
feat (api particulier): add Pole Emploi support to sources service
2021-12-08 10:36:11 +01:00
Pierre de La Morinerie
c75dba701d
lib: replace URI.encode by CGI.escape
...
URI.encode was removed in Ruby 3.
Fix an error when adding a phone number to a Helpscout ticket.
2021-12-07 15:25:26 +01:00
Paul Chavard
5615baa985
Revert "Merge pull request #6724 from tchak/fix-approximative_expiration_date"
...
This reverts commit c95a67d970
, reversing
changes made to 032989a400
.
2021-12-07 13:32:39 +01:00
Paul Chavard
436569b08c
Revert "Merge pull request #6727 from tchak/fix-approximative_expiration_date-again"
...
This reverts commit 951f974478
, reversing
changes made to c95a67d970
.
2021-12-07 13:32:27 +01:00
Paul Chavard
48ee830586
fix(dossier): fix approximative_expiration_date again
2021-12-07 13:02:53 +01:00
Paul Chavard
60d4bcc4f7
fix(dossier): fix approximative_expiration_date
2021-12-07 12:47:27 +01:00
François Vantomme
2110ef072c
feat(api particulier): add DGFiP field
2021-12-07 11:03:05 +01:00
François Vantomme
f0913edebd
feat(api particulier): add DGFiP adapter
2021-12-07 11:03:05 +01:00
François Vantomme
97de7c197d
feat(api particulier): add DGFIP support to sources service
2021-12-07 11:03:05 +01:00
Paul Chavard
5e0f8a5816
task(type_de_champ): migrate type_de_champ parent_id
2021-12-06 21:45:54 +01:00
Paul Chavard
09c37435ad
feat(procedure_revision_types_de_champ): add parent_id
2021-12-06 21:45:54 +01:00
Paul Chavard
0036933425
feat(graphql): add commune and departement information to API
2021-12-06 21:01:28 +01:00
Paul Chavard
fcbe364ac8
feat(commune): display departement information on commune champ
2021-12-06 21:01:28 +01:00
Paul Chavard
ed2cbdc966
fix(champ): save departement name without code prefix
2021-12-06 20:58:08 +01:00
Paul Chavard
2ba05bfb4f
fix(dossier): use depose_at instead of en_construction_at
2021-12-06 15:49:17 +01:00
Martin
a9413f9b12
feat(manager): add procedure_expires_when_termine_enabled to administrate
2021-12-06 07:49:59 +01:00
Martin
2778b42f1a
feat(instructeurs/procedures#show): re-align tabs at the start of the container. re-align demander cell content verticaly
2021-12-06 07:20:01 +01:00
Martin
081d5094a9
feat(instructeurs/procedure/dossiers#extend_conservation): add extends duree conservation in action button list, also rewire this action for user [extend by procedure.duree_conservation_dans_ds by default] but force 1.month for instructeur. add new icon for standby based on https://en.wikipedia.org/wiki/Power_symbol
2021-12-06 07:20:01 +01:00
Martin
d8a8d1fdab
feat(instructeur/dossier/header/_expiration_banner): split trads and add dedicated expiration banner for instructeur. also enhance wording to include duree conservation + extension_conservation
...
feat(expiration_banner): enhance wording of expiration
feat(dossiers/expiration_banner): enhance wording regarding expiration to include duree_conservation_dossiers_dans_ds + extension_conservation, also add spec on expiration_banner for instructeur
2021-12-06 07:05:17 +01:00
Martin
22531560d8
feat(tabs.expirants): re-order so it comes before deleted dossiers
2021-12-06 07:05:17 +01:00
Martin
8e9b15aef4
clean(expiration_banner): dedicated to user not shared
2021-12-06 07:05:17 +01:00
Martin
1bb868714c
fix(spec/lint/review): lint and fix spec of previous commits, also fix based on tchak feedback
2021-12-06 07:05:17 +01:00
Martin
d87f8b57cc
feat(instructeurs/procedures#show): add dossier experiant in procedure#show
2021-12-06 07:05:17 +01:00
Martin
2dfbc70d41
feat(instructeur#dossiers_count_summary): add counter for expirants. ignore brouillon
2021-12-06 07:05:17 +01:00
Martin
ce87878ff0
refactor(traitement.process_expired): move process expired to procedure
2021-12-03 16:32:36 +01:00
Martin
f8a17b2cc4
feat(procedures#index): add dossiers-expirant to instructeur/procedure#index
2021-12-03 16:32:03 +01:00
Christophe Robillard
3265ac2d84
localize zone
2021-12-02 19:24:26 +01:00
Christophe Robillard
9341c787a1
administrateur can add zone to procedure
2021-12-02 19:24:26 +01:00
Christophe Robillard
561f6fb274
add belongs_to zone for procedure
2021-12-02 19:23:05 +01:00
Christophe Robillard
219eaf0d5e
add zone model
2021-12-02 19:16:11 +01:00
Pierre de La Morinerie
b7d17b0989
models: validate that no drop-downs are empty on publishing
...
Disallow publishing a procedure containing drop-downs with no selectable
values.
2021-12-02 09:00:37 +01:00
Pierre de La Morinerie
e219ec33d8
validators: rename no_empty_repetitions to no_empty_repetition
2021-12-02 09:00:37 +01:00
Pierre de La Morinerie
115ca5e24a
js: don't create invalid menus by default
...
When a new "Menu" type de champ is added, it comes pre-filled with a
menu title – and nothing else. Which is confusing, and invalid.
Instead pre-fill the type de champ with actual values (no titles).
2021-12-02 09:00:37 +01:00
Pierre de La Morinerie
d524beee4e
app: remove :instructeur_bypass_email_login_token
from Flipper
2021-12-02 08:51:52 +01:00
Pierre de La Morinerie
ac07f05771
app: use Instructeur.bypass_email_login_token
2021-12-02 08:51:52 +01:00
Paul Chavard
46e2e34b89
fix(stats): remove super admin stats
2021-12-01 18:10:05 +01:00
Martin
725521c3a1
fix(expiration_banner): only show expirations info when flip is enabled
...
fix(lint): lint haml
fix(spec): enable flipper and allow procedure to receive flipper check when checking banner presence
fix(doc): add missing documentation on readme regarding system testing with a visual feedback
fix(typo): add missing accent
clean(PR): feedback from Tchak, better to wrap feature check for expirability by procedure within dossier.expirable? helper
2021-11-30 16:05:32 +01:00
Kara Diaby
f1525a798f
Avis : display introduction file to experts
2021-11-30 14:27:58 +01:00
Pierre de La Morinerie
28dfc6a1ba
manager: save bypass_email_login_token to both column and feature
2021-11-30 13:41:25 +01:00
Pierre de La Morinerie
99c77046d2
models: improve error message for invalid champs
...
Avoid prepending the message with 'Draft revision '
2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
b86dec8251
views: prevent procedure publication on validation error
2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
9db62178d2
views: display revision errors on the procedure dashboard
2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
52b0fbf9b7
models: validate repetitions on publishing
2021-11-30 13:34:41 +01:00
Pierre de La Morinerie
48133c2595
models: don't save the procedure before the state transition
...
Otherwise a validation error occurs here instead of on save.
2021-11-30 13:34:41 +01:00
simon lehericey
c4cde500ce
fix acsv
2021-11-30 09:42:45 +01:00
simon lehericey
5a0fb6237f
😭 AASM does not support keyword arguments
...
https://github.com/aasm/aasm/issues/672
2021-11-30 09:42:45 +01:00
Pierre de La Morinerie
184a401182
app: rename new_administrateur
to administrateurs
2021-11-30 08:49:38 +01:00