Pierre de La Morinerie
e7c8a9fff5
app: move clone to NewAdministrateur::ProceduresController
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
56fa7e7cd6
app: move destroy to NewAdministrateur::ProceduresController
...
The code was already moved; only the route and tests were not.
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
3e83ad454f
app: move new_from_existing to NewAdministrateur::ProceduresController
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
7729385d89
controllers: remove dead code on Admin::ProceduresController
...
This code has been migrated to NewAdministrateur::ProceduresController.
2021-09-02 14:51:26 -05:00
Pierre de La Morinerie
0f9d7d6b8c
app: remove old Admin::InstructeursController
...
It was only hosting the deprecated "Instructeurs globally attached to
this admin", which wasn't used anywhere in the app anymore.
2021-09-02 14:40:36 -05:00
Paul Chavard
a3cc072bbd
feat(i18n): translate countries selector
2021-08-31 13:15:26 +02:00
Pierre de La Morinerie
b80f6a9f1b
spec: fix some manager tests not running
2021-08-26 11:44:47 -05:00
Paul Chavard
8e1bfb469f
fix(dossier): send expiration notifications 2 weeks prior to supression instead of a month
2021-08-26 11:28:57 +02:00
Paul Chavard
1399d9bba9
feat(graphql): expose demarche descriptor on dossier type
...
We don't want to expose full demarche type on dossiers because it would open the door for recursive queries that we want to avoid. DemarcheDescriptorType is a lightweight representation of demarche metadata.
2021-08-25 11:12:24 +02:00
Pierre de La Morinerie
47e1555dce
i18n: properly translate the locale dropdown title
2021-08-24 12:57:51 -05:00
Pierre de La Morinerie
9741108094
lib: remove the 'migrated' key on filters
...
In a9a4f6e2a8
, a task to migrate
ProcedurePresentation's filters was added.
This task added a "migrated: true" key to all migrated filters.
Now that this task has run, we can safely remove the extra key.
In a previous version of this commit, the migration would fail for
invalid ProcedurePresentation records. This is now fixed.
2021-08-24 08:42:22 -05:00
Christophe Robillard
83b6c5d7c7
replace deprecated axe-matchers by axe-core-spec
2021-08-24 08:09:17 -05:00
Paul Chavard
3b6528decf
feat(i18n): enable localization by query param
...
Providing a query param ("locale") will enable localization. A language picker will be shown once
localization is activated. Locale is stored in a cookie "locale".
2021-08-24 12:42:40 +02:00
Ismael MOUSSA S. (T0194673)
330333aac4
6407 - Fix flash message typo in new administrateur/groupe instructeurs controller and its related spec
2021-08-20 20:10:44 +02:00
Christophe Robillard
8f2e0660d3
add spec for dossier with commune
2021-08-19 08:04:47 +02:00
Christophe Robillard
e06f11f33f
add code insee libelle for commune export
2021-08-19 08:04:47 +02:00
Christophe Robillard
4a6c22d6a6
export code insee for commune champ
2021-08-19 08:04:47 +02:00
Paul Chavard
ffa8c0c80a
feat(dossiers): enable dossiers termine expiration behind feature flag
...
feature flag "procedure_process_expired_dossiers_termine" controls if a procedure has expiration
enabled on dossiers termine
re #3796
2021-08-18 16:11:35 +01:00
Christophe Robillard
031b74759f
archives: move bugreport
2021-08-05 09:24:20 +02:00
Christophe Robillard
38e3469e9a
add bug report to archive
2021-08-03 14:51:41 +02:00
simon lehericey
b29bae4707
a procedure has an encrypted api_particulier_token
...
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-07-30 11:18:44 +02:00
François Vantomme
17b659539f
Feat (API Particulier): new encryption service
2021-07-30 11:18:44 +02:00
kara Diaby
69393c2921
modify groupe instructeur controller
2021-07-27 19:38:22 +02:00
kara Diaby
9c976c6b71
fixup! tests
2021-07-27 19:38:21 +02:00
Paul Chavard
64cfb4d64e
Fix sort with revisions
2021-07-23 10:57:04 +02:00
Pierre de La Morinerie
6475cdff7a
Revert "Suppression de la clef "migrated": true
sur les filtres des ProcedurePresentation"
2021-07-23 09:26:13 +02:00
Pierre de La Morinerie
e1909ed29f
brouillon: redirect to sign-in when disconnected
...
There are two cases where the draft auto-save might fail because the
user is no longer authenticated:
- The user signed-out in another tab,
- The brower quit and re-opened, so the Session cookie expired.
In both cases, the auto-save will never succeed until the user
authenticates again, so displaying a "Retry" button is cruel.
Moreover, in plus of all auto-save requests failing with a small error,
the actual hard failure only occurs after filling all the form and
trying to submit it. Then the user is redirected to the sign-in page –
but all their changes are lost.
Instead, we now redirect to the sign-in page on the first 401 error
during the auto-save, let the user sign-in, and then redirect back to
the form.
2021-07-22 11:58:02 +02:00
Paul Chavard
388fb39eb5
Fix false positive blank champ warnings
2021-07-22 10:45:25 +02:00
Paul Chavard
ac0f50b488
Improuve champ blank check
2021-07-22 10:45:25 +02:00
Pierre de La Morinerie
fd74d9a062
lib: remove the 'migrated' key on filters
...
In a9a4f6e2a8
, a task to migrate
ProcedurePresentation's filters was added.
This task added a "migrated: true" key to all migrated filters.
Now that this task has run, we can safely remove the extra key.
2021-07-20 16:51:32 +02:00
Pierre de La Morinerie
fda59c9231
lib: remove outdated tasks
2021-07-20 15:34:31 +02:00
Pierre de La Morinerie
32ab2f0a80
instructeur: limit the maximum size of a filter value
...
This prevents the URL from exceeding the max size, and
causing '414: Request-URI too large' errors.
2021-07-20 14:49:48 +02:00
Pierre de La Morinerie
831672391e
app: use a long-lived cookie for CSRF token
...
See the ADR document for rationale.
2021-07-20 11:11:52 +02:00
Pierre de La Morinerie
446c57ed63
specs: add a feature test for forgery protection
2021-07-20 11:11:52 +02:00
Pierre de La Morinerie
71741c5f98
views: fix checkbox wrongly selected in multiple_drop_down_list
...
The check for whether the checkbox should be checked or not was made by
matching the whole string. Thus, given two options 'valid' and
'invalid', the check for the presence of 'valid' would succeed even when
only 'invalid' was present in the values (because
`'valid'.includes?('invalid')`.
The code now checks against the list of items in the selected_options.
2021-07-20 09:01:07 +02:00
kara Diaby
0b6c7dace7
tests
2021-07-15 16:32:07 +02:00
Pierre de La Morinerie
40b3ea8ad6
Revert "Instructeurs : limitation de la valeur d'un filtre à 100 caractères"
2021-07-13 18:19:46 +02:00
kara Diaby
d2d046a39d
fix encoding problems with cherlock Holmes gem
2021-07-13 10:58:41 +02:00
Pierre de La Morinerie
3c8a88a660
instructeur: limit the maximum size of a filter value
...
This prevents the URL from exceeding the max size, and
causing '414: Request-URI too large' errors.
2021-07-08 16:17:22 +02:00
Paul Chavard
527db7631e
Add a point on map from coordinates input
2021-07-07 13:33:28 +02:00
Paul Chavard
ab31087f23
Hide cadastres if there is none
2021-07-07 12:28:27 +02:00
Pierre de La Morinerie
37c62ac0a3
app: display standard error page when no cookies are present
...
This occurs mostly when Safari attempts to perform a POST request
again (without sending any of the cookies).
In that case, our custom `422.html` page is more helpful to the user
(because it has a link to the previous page) than a "No cookies" blank
text.
2021-07-06 16:29:22 +02:00
Christophe Robillard
bc07a875eb
integrate a mininum weight for the average dossier weight
...
before this commit, the average dossier weight took account only pieces
justificatives. With this commit, we add a minimum weight for other
files included in an archive like pdf_export, log operations,
attachments added to traitements. This minimum weight is set arbitrary,
from the observation of some random procedures in production
2021-07-06 15:58:45 +02:00
Pierre de La Morinerie
09933454ff
app: improve InvalidAuthenticityToken logging
...
- Log on all controllers
- Improve description of the controller action involved
- Ignore Safari bogus requests
2021-07-06 12:42:01 +02:00
Christophe Robillard
54d91335f2
remove the ability to download an 'everything' archive
...
there are sometimes an error that happen when building an everything
archive. The error explanation is not understood at the moment.
To deliver the archive feature quickly, we remove the 'everything' archive for
the moment
2021-07-05 11:05:07 +02:00
Paul Chavard
280e54b59d
Enable test revisions
2021-07-01 15:59:07 +02:00
Pierre de La Morinerie
1faf91bdbe
experts: protect password update as well as sign-up
2021-06-30 10:46:42 +02:00
Pierre de La Morinerie
6f7a2fde57
experts: fix saving password on sign-in
2021-06-30 10:46:42 +02:00
Pierre de La Morinerie
4f5c5e26ae
spec: cleanup spec for Experts::AvisController
2021-06-30 10:46:42 +02:00
Christophe Robillard
66cc0dd08d
Revert "Revert "Expose dossier PDF export as IO""
...
This reverts commit 362093eff0
.
2021-06-24 21:01:59 +02:00
krichtof
362093eff0
Revert "Expose dossier PDF export as IO"
2021-06-24 19:21:37 +02:00
Paul Chavard
b73d504f8d
Expose dossier PDF export as IO
...
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-24 17:49:24 +02:00
Paul Chavard
a4482233b8
[GraphQL] expose deleted dossiers
2021-06-24 11:51:37 +02:00
Paul Chavard
0ca5e1abe2
Preview should reflect revision changes
2021-06-24 11:39:49 +02:00
Paul Chavard
8b2c2c6466
Handle carte layers changes
2021-06-24 11:39:49 +02:00
Paul Chavard
35eccb5630
Show separate blocks for types de champ and annotation changes
2021-06-23 09:40:07 +02:00
Paul Chavard
19195008e8
Expose removed types_de_champ in exports
2021-06-23 09:40:07 +02:00
simon lehericey
eadae7af6b
show all available tdc for procedure presentation
2021-06-23 09:40:07 +02:00
Paul Chavard
8d49b5556a
test revision changes
2021-06-23 09:40:07 +02:00
Paul Chavard
f238710044
Add last_month export
2021-06-23 09:23:10 +02:00
kara Diaby
bcc23ae7a6
test file
2021-06-22 16:33:38 +02:00
kara Diaby
309b3414d6
tests
2021-06-22 16:33:38 +02:00
Pierre de La Morinerie
5908b8019a
specs: properly use xhr: true
in javascript requests
...
This avoids an unexpected `ActionController::InvalidCrossOriginRequest`
exception to be raised when the forgery protection is disabled.
2021-06-22 13:21:55 +02:00
Paul Chavard
1f7d86d5a5
Add delete dossier action to dossiers list
2021-06-18 11:35:00 +02:00
Christophe Robillard
fdec9b2fd5
archives: don't update dossiers
...
this fix avoid to touch dossier after attaching pdf_export_for_instructeur
2021-06-18 11:00:57 +02:00
Christophe Robillard
7851d6b1cc
archives: count archived dossiers
2021-06-18 08:59:13 +02:00
Pierre de La Morinerie
12d17bc245
spec: fix Timecop.freeze without Timecop.return
...
Time was frozen without being un-frozen at the end of the spec.
This caused a spec in `Procedure#publish_or_reopen!` to fail randomly.
Fixed by using the `Timecop.freeze do` form, which unfreezes after the
execution of the block.
2021-06-17 17:36:43 +02:00
Christophe Robillard
896190b91e
return nil when no traitement time
2021-06-17 16:31:53 +02:00
Christophe Robillard
887c5cb4a9
correct rubocop offenses
2021-06-17 16:31:53 +02:00
Christophe Robillard
a5ae5af56a
extract NB_DAYS_RECENT_DOSSIERS and PERCENTILE
2021-06-17 16:31:53 +02:00
Christophe Robillard
bdf2f47eb9
fix specs for procedure stats
2021-06-17 16:31:53 +02:00
Christophe Robillard
a8840faadb
move stats methods to appropriate concern class
2021-06-17 16:31:53 +02:00
Christophe Robillard
701b72494d
compute usual traitement time for specific month
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
cd030fd975
add csv fixture file
2021-06-15 19:36:47 +02:00
kara Diaby
6ebd57640c
tests
2021-06-15 19:36:46 +02:00
simon lehericey
6be0bbaa9c
Change bottom champs editor button from enregistrer to continuer
2021-06-15 09:54:32 +02:00
Paul Chavard
a2c53ce7ea
format phone numbers
2021-06-15 09:14:55 +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
aee8db99d0
add spec for dossier weight estimation
2021-06-09 10:52:38 +02:00
Christophe Robillard
4fd0ad71c3
add spec for archive weight estimation
2021-06-09 10:52:38 +02:00
Christophe Robillard
f0b2327ec6
add spec for count dossiers termines by month
2021-06-09 10:52:38 +02:00
Christophe Robillard
41569efe9d
extract estimate_weight
...
and rename nb_dossiers by nb_dossiers_termines
2021-06-09 10:52:38 +02:00
Paul Chavard
44ebd0e8a5
Fix api education wrong data type
2021-06-08 12:25:24 +02:00
kara Diaby
fab4a41c57
add tests regarding /users/statistiques view
2021-06-07 15:09:39 +02:00
Paul Chavard
1888f74b10
Prevent double processing of declarative dossiers
2021-06-04 17:55:40 +02:00
Paul Chavard
9819a5ff77
Update spec/models/procedure_spec.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-06-03 13:11:16 +02:00
Paul Chavard
a0d4c9d54c
Fix published revisions
2021-06-03 13:11:16 +02:00
Paul Chavard
990ae10399
GraphQL byte_size should be BigInt
2021-06-03 10:53:17 +02:00
Paul Chavard
f076fa803e
Handle GeoJSON validation errors
2021-06-02 12:43:24 +02:00
Paul Chavard
05380b9520
Fix destoying discarded procedures
2021-05-27 18:48:56 +02:00
Pierre de La Morinerie
929a556f9f
i18n: add feature spec for changing the language
2021-05-27 11:01:26 +02:00
François Vantomme
99086a63be
Fix (Instructeur): deal nicely with non-guaranteed elements order in arrays
...
Use of one-dimension arrays comparison & `contain_exactly` RSpec matcher
to avoid this behaviour:
Failures:
1) InstructeursImportService#import when an email is malformed ignores or corrects
Failure/Error:
expect(procedure_groupes).to match_array([
["Occitanie", ["paul@mccartney.uk", "ringo@starr.uk"]],
["défaut", []]
])
expected collection contained: [["Occitanie", ["paul@mccartney.uk", "ringo@starr.uk"]], ["défaut", []]]
actual collection contained: [["Occitanie", ["ringo@starr.uk", "paul@mccartney.uk"]], ["défaut", []]]
the missing elements were: [["Occitanie", ["paul@mccartney.uk", "ringo@starr.uk"]]]
the extra elements were: [["Occitanie", ["ringo@starr.uk", "paul@mccartney.uk"]]]
# ./spec/services/instructeurs_import_service_spec.rb:70:in `block (4 levels) in <main>'
2021-05-27 08:33:52 +02:00
Paul Chavard
9b0dae4cc2
Fix apostrophes ‘ -> ’
2021-05-26 18:05:14 +02:00
Paul Chavard
4922bc88d6
Do not crash when properties is nil
2021-05-26 12:40:07 +02:00
Paul Chavard
21ee79669d
Better labels in test
2021-05-25 11:43:38 +02:00
Paul Chavard
179bb5a9fe
Apply suggestions from code review
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-05-25 11:43:38 +02:00
Paul Chavard
acb277e650
Use stable_id when replacing tags
2021-05-25 11:43:38 +02:00
kara Diaby
4b6196e6f6
verify avis privacy
2021-05-25 11:24:15 +02:00
Paul Chavard
c5f2faa3d2
add tests for backward compatibility of geo_areas
2021-05-24 11:57:00 +02:00
Paul Chavard
3b85ade440
Add compatibility cadsatre layer with old API GEO
2021-05-24 11:57:00 +02:00
Paul Chavard
01c558953b
Remove API GEO legacy adapter
2021-05-24 11:50:16 +02:00
simon lehericey
b620888597
show only dossier avis
2021-05-20 16:18:04 +02:00
kara Diaby
aaf943569a
rename avis confidential test
2021-05-20 11:13:24 +02:00
simon lehericey
17617fba43
address champ needs the data column
2021-05-19 15:59:18 +02:00
simon lehericey
a46000dc1f
ensure to_s is used on specialized champ
2021-05-19 09:39:20 +02:00
Paul Chavard
e043645a88
cleanup tests
2021-05-18 11:42:10 +02:00
kara Diaby
468e9e849a
tests
2021-05-18 11:42:10 +02:00
Paul Chavard
5f419954b4
Fix dossier deleted user display
2021-05-13 10:43:55 +02:00
Paul Chavard
3f7a2bea9b
Dossier without user should be valid
2021-05-11 17:50:10 +02:00
Paul Chavard
8a74438dc1
Use conservation_extension instead of en_construction_conservation_extension
2021-05-11 17:33:53 +02:00
simon lehericey
c5f6c9ae1e
fix missing state translation
2021-05-10 11:17:34 +02:00
François Vantomme
99ce5195bc
Fix (API Entreprise): test fails randomly
...
Don't assume array order, just check that all values are present
2021-05-07 17:42:15 +02:00
Pierre de La Morinerie
77b65f3aa0
tasks: remove older after_party tasks
2021-05-06 15:19:37 +02:00
simon lehericey
55b80df29d
display count before text in tabs
2021-05-06 09:13:20 +02:00
simon lehericey
5124e08ccd
disable faulty manager spec
2021-05-05 21:34:57 +02:00
simon lehericey
ccce724976
refactor as created fci must have an user_id
2021-05-05 14:36:34 +02:00
simon lehericey
e18fb116c6
cannot create fci without user
2021-05-05 14:36:34 +02:00
simon lehericey
8d0082419c
do not know how it worked before
2021-05-05 14:36:34 +02:00
simon lehericey
9dc9e92c16
use the with_user trait in feature
2021-05-05 14:28:20 +02:00
simon lehericey
1cf59f722e
add :with_user trait to fci as user_id is mandatory
2021-05-05 14:28:20 +02:00
simon lehericey
ed404f129b
remove now falling spec of obsolete task
2021-05-05 14:28:20 +02:00
simon lehericey
9fd1c604a1
display follower instructeur emails in alphabetic order
2021-05-04 16:38:34 +02:00
simon lehericey
50f679746f
do not extract twice the same dossier_id if the dossier is followed twice
2021-05-04 16:38:34 +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
3d04221dab
generate pdf export for dossier only on demand
2021-04-29 17:30:38 +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
Pierre de La Morinerie
fbfe5c3817
jobs: also retry native ActiveStorage's jobs on transient errors
2021-04-29 14:08:12 +02:00
Pierre de La Morinerie
684af77e35
jobs: extract an RetryOnTranscientErrors
concern
2021-04-29 14:08:12 +02:00
simon lehericey
7b94c2de88
remove extra Dossier call in projection
2021-04-29 11:46:00 +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
Paul Chavard
f9fb6473b4
geo module is not really accessible :(
2021-04-28 15:34:53 +02:00
Paul Chavard
85b907807a
Improuve ComboMultipleDropdownList style
2021-04-28 12:54:45 +02:00
Christophe Robillard
09870c918d
prevent race conditions when creating archives
2021-04-28 11:40:58 +02:00
Christophe Robillard
dfbe004122
rename content_type to time_span_type for archives
2021-04-28 11:40:58 +02:00
Christophe Robillard
9134114c2e
fix rubocop offenses
2021-04-28 11:40:58 +02:00
Christophe Robillard
8bee53fe77
rend plus robuste la création de l'archive
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
07cc4fa97f
add service to create procedure archive
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
Christophe Robillard
c25f3c79d9
add archive model
2021-04-28 11:40:58 +02:00
Paul Chavard
2a068fb9b0
Remove user feedback buttons
2021-04-22 15:40:40 +01:00
Paul Chavard
c20ad5ca17
Remove the link between commentaire and user
2021-04-22 15:10:47 +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
5bfd4ecbbf
add DossierProjectionService
2021-04-22 10:46:04 +02:00
Pierre de La Morinerie
7ee29b2190
spec: fix flaky expert test
...
In this test, two Avis are created for each expert:
- one for the original dossier,
- one for the dossier linked to the original dossier.
When we check for a sign-up link, we should do so using the
Avis for the original dossier explicitely.
2021-04-20 12:06:12 +02:00
Pierre de La Morinerie
6b14420ffa
sign_in: improve "Forgot password?" appearance on mobile
2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
0749d981ab
password: make the "Reset password" button clearer
2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
fffb85987c
app: retain user email on sign-in error
2021-04-20 09:34:52 +02:00
kara Diaby
5982660c37
tests
2021-04-19 10:23:45 +02:00
François Vantomme
f747b0a46a
Chore(test): enable rspec only-failures support
2021-04-15 14:17:39 +02:00
kara Diaby
198e3ed3b8
expert mailer instead of avis mailer
2021-04-15 12:22:40 +02:00
kara Diaby
f4aa29a799
add expert mailer preview
2021-04-15 11:29:55 +02:00
Paul Chavard
6d37e1d133
Fix discarded procedures destruction
2021-04-14 12:24:16 +01:00
Paul Chavard
5b56ec425b
Fix discarded dossiers destruction
2021-04-14 12:24:16 +01:00
François Vantomme
a596df9a4a
Test: use APPLICATION_NAME to deal nicely with custom configuration
2021-04-13 22:46:33 +02:00
Pierre de La Morinerie
872f6b0153
lib: add migration helpers for making a column unique
2021-04-13 18:09:59 +02:00
simon lehericey
fde433a7cf
do not ask for avis if the dossier is absent
2021-04-13 12:04:45 +02:00
simon lehericey
c683fad3f3
[ #6084 ] add after_party task to fill missing data
2021-04-13 09:59:28 +02:00
simon lehericey
52c8b60419
This is why you need to add a COUNT(DISTINCT dossiers.id) to make it work
2021-04-13 09:32:48 +02:00
simon lehericey
594cda3ee3
Remove previous attempt but steal its spec
2021-04-13 09:32:48 +02:00
simon lehericey
6055fd1b0b
remove for_procedure
2021-04-13 09:32:48 +02:00
simon lehericey
7567e51a3f
add ui for integrity error
2021-04-06 18:11:26 +02:00
simon lehericey
d552e364fc
retry 5 times on integrity error and then block processing
2021-04-06 18:03:39 +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
9096a3885c
specs: fix creating dossiers :en_construction
2021-04-06 12:12:56 +02:00
Pierre de La Morinerie
02743365eb
specs: make build
and create
consistent in downloadable_file_spec
2021-04-06 12:12:56 +02:00
kara Diaby
a8b30c0cdc
add react component (expert view) and block it when the flag is activated
2021-04-06 10:39:24 +02:00
kara Diaby
8a1cdf31e3
tests
2021-04-06 10:38:46 +02:00
Pierre de La Morinerie
6eadcf614d
spec: improve the dossier_controller timestamp specs
...
Make the specs clearer, and better test the various timestamps.
2021-04-06 10:26:17 +02:00
Paul Chavard
fd48b86b7f
Simplify export unicity check and use create_or_find_by
2021-04-01 21:14:16 +01:00
simon lehericey
5b69e087c7
fix sentry test
2021-04-01 11:57:16 +02:00
Pierre de La Morinerie
f6f013e87f
specs: fix Avis query in specs
2021-03-25 13:24:53 +01:00
Pierre de La Morinerie
21356e42b8
specs: remove unused require
2021-03-25 13:24:53 +01:00
kara Diaby
18f89b0d83
adjust tests
2021-03-24 17:47:24 +01:00
maatinito
cc19453f68
views: fix warning message about incomplete fields for attestation
...
The labels for the champs and private champs were inverted.
2021-03-23 16:56:02 +01:00
Paul Chavard
0b22788d60
experts_procedure should not be optional
2021-03-23 13:46:33 +01:00
Paul Chavard
224c7ec6c3
Update spec/models/dossier_spec.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-03-23 10:51:55 +01:00
Paul Chavard
84214f4bd4
Do not export non exportable champs on draft procedures
2021-03-23 09:55:37 +01:00
Paul Chavard
1449fbbe67
Fix multiple_drop_down_list mandatory check
2021-03-18 15:22:28 +01:00
kara Diaby
bb47c88c5f
fix expert spec feature
2021-03-18 14:36:08 +01:00
kara Diaby
64b94100f4
fix dossier link helper
2021-03-18 14:36:08 +01:00
kara Diaby
81f5a5254b
tests
2021-03-18 11:38:52 +01:00
Paul Chavard
866ae256a3
Add revision dossiers filters
2021-03-17 11:53:48 +01:00
Christophe Robillard
dfed8f32ae
update link to download dossier and all pjs
2021-03-16 15:13:17 +01:00
Christophe Robillard
60cc4d3697
add pdf to pjs export
2021-03-16 15:13:17 +01:00
Paul Chavard
76aa7bdfe3
Add default nil value for numero_tva_intracommunautaire
2021-03-16 12:57:10 +01:00
Paul Chavard
4f03c231a3
Add tests for GeoJSON validation
2021-03-16 12:27:28 +01:00
Pierre de La Morinerie
be58d82016
specs: clear jobs queue before each test
...
This avoids `perform_enqueued_jobs` to execute jobs from the previous
tests.
2021-03-16 11:49:14 +01:00
Pierre de La Morinerie
75a1046315
active_storage: refactor concerns
...
Follow-up of #5953 .
Refactor the concerns with two goals:
- Getting closer from the way ActiveStorage adds its own hooks.
Usually ActiveStorage does this using an `Attachment#after_create`
hook, which then delegates to the blob to enqueue the job.
- Enqueuing each job only once. By hooking on `Attachment#after_create`,
we guarantee each job will be added only once.
We then let the jobs themselves check if they are relevant or not, and
retry or discard themselves if necessary.
We also need to update the tests a bit, because Rails'
`perform_enqueued_jobs(&block)` test helper doesn't honor the `retry_on`
clause of jobs. Instead it forwards the exception to the caller – which
makes the test fail.
Instead we use the inline version of `perform_enqueued_jobs()`, without
a block, which properly ignores errors catched by retry_on.
2021-03-16 11:49:14 +01:00
Paul Chavard
00d7c3186a
fix indentation
2021-03-09 14:47:23 +01:00
Paul Chavard
70500e3d56
Groupe instructeur selector default blank
2021-03-09 14:47:23 +01:00
Pierre de La Morinerie
f9401cfbad
spec: better split spec_helper and rails_helper
...
This fixes the
> DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.
error appearing when running specs.
It also gets us closer from a newly-generated rails config.
2021-03-04 22:59:39 +01:00
Pierre de La Morinerie
2f948f7e46
active_storage: fix blob update hooks
...
For some reason on Rails 6.1 the `after_update_commit` hook is properly
registered – but disappears from the record later, and in the end is
never run.
Fix it by using the general `after_commit` hook instead.
2021-03-04 14:30:38 +01:00
Paul Chavard
5d4f025be0
Rename for consistency with defaut_groupe_instructeur
2021-03-04 10:45:02 +01:00
Paul Chavard
89ec3923f2
Defaut groupe instructeur ordered by label
2021-03-04 10:35:44 +01:00
Paul Chavard
96a832bc19
Add SerializerService
2021-03-02 12:42:22 +01:00
Pierre de La Morinerie
1c77f59f6b
specs: fix test failing on March 1st
...
Because February only has 28 days.
2021-03-02 12:26:28 +01:00
Pierre de La Morinerie
473a86b861
gems: remove guard
...
- It doesn't seem used a lot these days
- It has some incompatibility with rspec 4
We need to explicitely add the 'listen' gem now though.
2021-02-25 10:45:42 +00:00
Paul Chavard
46a839e7f7
Remove a spec that was testing bug in libgeos
...
we don’t use libgeos anymore
2021-02-23 10:35:30 +01:00
Pierre de La Morinerie
d9ea415d44
specs: fix rspec warning about raise_error specificity
2021-02-23 08:25:31 +01:00
Paul Chavard
75392272fb
Add champ address model
2021-02-17 19:10:16 +01:00
Paul Chavard
228a83f8a5
Add api address external data fetch
2021-02-17 19:10:16 +01:00
Paul Chavard
7eee14feef
Add ChampFetchExternalDataJob
2021-02-17 19:10:16 +01:00
Christophe Robillard
d55f156aec
admin: durée de conservation des données hors ds n'est plus demandée
...
La colonne est tout de même gardée en base
2021-02-17 16:41:57 +01:00
Pierre de La Morinerie
98be7e2076
Fix new Rubocop warnings
2021-02-16 16:31:30 +00:00
Christophe Robillard
8b55f67964
accepte nouvelles valeurs pour ComboMultipleDropdownList
2021-02-16 16:47:15 +01:00
Christophe Robillard
7565a25b51
rend accessible l'affectation d'un instructeur
...
en remplaçant select2 par ComboMultipleDropdownList
2021-02-16 16:47:14 +01:00
Christophe Robillard
3fc7b57b8c
rend accessible la personnalisation des filtres instructeurs
...
en remplaçant select2 par ComboMultipleDropdownList
2021-02-16 16:47:14 +01:00
Christophe Robillard
c855d13994
rend accessible l'envoi de dossier par un instructeur
...
en remplaçant select2 par ComboMultipleDropdownList
2021-02-16 16:47:14 +01:00
Christophe Robillard
b8097e782a
rend accessible la selection multiple usager
...
en remplaçant select2 par ComboMultipleDropdownList
2021-02-16 16:47:14 +01:00
kara Diaby
8310dc48bf
tests
2021-02-16 09:46:18 +00:00
kara Diaby
7b4ec486ec
change active record request to get expert list
2021-02-16 09:46:18 +00:00
Paul Chavard
9ce07be1ee
[GraphQL] modifier annotation
2021-02-11 17:45:14 +01:00
Christophe Robillard
a288a13805
disable france connect authentication for admin and instructeurs
2021-02-10 18:13:47 +01:00
Paul Chavard
00e1d88a75
clean up download helper data before test run
2021-02-09 15:13:13 +01:00
Paul Chavard
c04077ca34
fix flaky test by imposing a stable sort order
2021-02-09 15:13:04 +01:00
Pierre de La Morinerie
150ddab660
zeitwerk: Api -> API
2021-02-09 13:07:30 +01:00
Pierre de La Morinerie
88ffa10a56
spec: fix rspec raise_error warning
...
Rspec warns that if there is for example a SyntaxError, the test will
pass (an error was raised, but it wasn't an ArgumentError, so this is
fine).
Instead check that no error occurs whatsoever.
2021-02-09 10:12:32 +01:00
Pierre de La Morinerie
0d94eacf32
spec: fix Ruby 2.7 arguments passing
2021-02-09 09:20:46 +01:00
Paul Chavard
a591d5528e
Add job exception log methods to champ and dossier
2021-02-05 18:56:27 +01:00
Pierre de La Morinerie
3b5617b123
mailers: remove dead AdministrationMailer code
2021-02-04 12:15:13 +01:00
Judith
6d89a83d14
unused locales clean-up
2021-02-04 12:15:13 +01:00
Pierre de La Morinerie
0d101f3f1a
views: remove old design's leftbars
2021-02-02 15:33:09 +01:00
Paul Chavard
a503417298
Remove old css and js
2021-02-02 15:26:11 +01:00
Paul Chavard
41c3a98d7d
Update Raven references to use Sentry
2021-01-28 19:46:36 +01:00
kara Diaby
9b8d2f6fd3
instead of call Avis table, we now call Experts Procedure table to see the experts list
2021-01-26 13:59:10 +01:00
Paul Chavard
4452b2cf45
fix order of types de champ on procedure
2021-01-26 10:45:34 +01:00
kara Diaby
2987139dd6
Link avis to an expert
2021-01-22 14:31:02 +01:00
kara Diaby
efbff0f2e0
add expert factory
2021-01-20 18:03:06 +01:00
kara Diaby
da067597ab
Add create expert method
2021-01-20 18:03:05 +01:00
kara Diaby
e0cb0eebab
Tests : add an expert to a procedure and put give him the access to see the dossier final decision
2021-01-20 18:03:05 +01:00
simon lehericey
d409a9a6c5
Procedure and expert link
2021-01-20 18:03:05 +01:00
Christophe Robillard
792b53beeb
import several instructeurs for a routee procedure
...
Co-authored-by: simon lehericey <mail@simon.lehericey.net>
2021-01-20 15:03:17 +01:00
simon lehericey
650a598698
ensure a buggy procedure does not block the others from being closed
2021-01-19 10:42:16 +01:00
simon lehericey
d72f0c6dd2
Add authorized content type for pj
2021-01-18 17:23:08 +01:00
Paul Chavard
54f2084aef
Add annuaire_education champ
2021-01-14 17:57:48 +01:00
Paul Chavard
5c9f2e8783
Add api education adapter and job
2021-01-14 17:57:48 +01:00
Paul Chavard
dc08993a89
Add DateTime champ to GraphQL
2021-01-14 14:08:42 +01:00
Paul Chavard
f33544f067
Fix type_de_champ repetition revision after clone
...
fix #5769
2021-01-12 10:57:34 +01:00
kara Diaby
8f6440f615
Admins can see the list of invited experts
2020-12-21 14:55:51 +01:00
kara Diaby
2b06ee95e1
Add a method to retrieve all invited experts for all procedure dossiers
2020-12-21 14:55:51 +01:00
Paul Chavard
d2bcbaa180
Fix stable filters migration
2020-12-17 17:10:56 +01:00
simon lehericey
4960eda5cb
use stable id
2020-12-17 10:51:09 +01:00
simon lehericey
cbccdea8e0
move displayed_fields for select to procedure_controller
2020-12-17 10:51:08 +01:00
simon lehericey
1159494d37
Add test to ensure no titre identite is exported
2020-12-16 17:31:38 +01:00
Paul Chavard
a2e87cbb56
Add attestation, justificatifs, operation_logs and bill_signatures to dossier export
2020-12-16 16:34:31 +01:00
simon lehericey
5bc4fab0c4
exhaustive test of discarded_dossier_deletion_job
2020-12-16 15:00:26 +01:00
kara Diaby
c7643154d1
final optims after sim review
2020-12-16 15:00:26 +01:00
kara Diaby
f3c4040d2d
add grace period to deleted dossiers
2020-12-16 15:00:26 +01:00
simon lehericey
d2f3bb18f9
instructeur can delete a dossier UI
2020-12-16 15:00:26 +01:00
kara Diaby
00b5ad7a10
EQT instructeur, je peux supprimer un dossier terminé
2020-12-16 15:00:26 +01:00
Christophe Robillard
15a395fbc7
superadmin: check complexity password server side
2020-12-15 16:26:09 +01:00
Christophe Robillard
94b3ec942b
super_admin: check password complexity client side
2020-12-15 16:26:09 +01:00
simon lehericey
bc4dc22aea
spec: use real signature to avoid mocking
2020-12-14 14:09:15 +01:00
simon lehericey
5a9cd71783
fix bill signature
2020-12-11 15:49:05 +01:00
Paul Chavard
fed300bfe1
Fix and test ActiveStorage::IntegrityError on upload
2020-12-11 10:30:17 +01:00
Paul Chavard
65d650eba6
Better graphql mutation error messages
2020-12-10 18:35:24 +01:00
kara Diaby
f748ccfc9e
Appelle l'API entreprise avec le token en Header
2020-12-10 17:49:49 +01:00
Paul Chavard
3c6e30a326
Show titre identite link only once watermark is added
2020-12-10 16:50:03 +01:00
Paul Chavard
48e7822e34
Remove titres identite after a dossier is processed
2020-12-10 15:21:25 +01:00
Christophe Robillard
23ae528c6b
affiche Madame ou Monsieur
...
mais continue à enregistrer en base Mme ou M.
2020-12-08 21:30:54 +01:00
Christophe Robillard
2066e3db87
rend plus compréhensible la civilité
2020-12-08 18:31:38 +01:00
clemkeirua
513d4f6ff1
move all the cron jobs in a dedicated directory
2020-12-08 13:22:43 +00:00
Christophe Robillard
12d1a5bece
implement ComboPaysSearch
2020-12-08 13:09:08 +00:00
simon lehericey
b187244a29
extract and refactor api errors
2020-12-04 17:07:30 +01:00
simon lehericey
05e9130634
refator test
2020-12-03 11:52:01 +01:00
simon lehericey
f56235c7ee
retry exponentially on api entreprise timeout
2020-12-03 11:52:01 +01:00
simon lehericey
9eab310565
[ #5675 ] for all api entreprise job, retry on 502, 503
2020-12-02 18:25:31 +01:00
Paul Chavard
cac981cf42
fix warning with ruby 2.7
2020-11-25 10:46:34 +01:00
Paul Chavard
b897e0cc1c
[GraphQL] add better errors when attachments are not properly used
2020-11-17 12:40:14 +01:00
Christophe Robillard
9347951cea
act as an saml identity provider
2020-11-16 12:19:54 +01:00
clemkeirua
64c964bf5e
fix broken nil values in france_connect_informatio
2020-11-11 15:40:44 +01:00
kara Diaby
bc0f77978f
add an api token verification for api entreprise
2020-11-09 16:58:24 +01:00
kara Diaby
c033ef0910
Ajoute a l'information de connexion France Connect dans les informations du dossier ainsi que sur la demande usager
2020-11-05 19:30:13 +01:00
kara Diaby
4b2e3b5be7
Revert "Merge pull request #5710 from betagouv/revert-5705-feat/5701"
...
This reverts commit aae77c77b0
, reversing
changes made to 4c2c5c630c
.
2020-11-05 19:30:13 +01:00
Christophe Robillard
5562e65bf3
refacto: rename administration to super_admin
2020-11-05 16:03:55 +01:00
Christophe Robillard
2a0ebd062a
enable 2FA for manager
...
when trying to access manager, if superadmin did'nt enable otp, he/she is redirected to a page to enable 2FA. When superadmin is enabling 2FA, he has to to scan a qrcode with the 2FA application client. And afterwards, the superadmin has to log in with email, password and OTP code.
2020-11-05 16:03:55 +01:00
Christophe Robillard
305ccdc0cd
add recoverable and two_factor stragegy for administration
2020-11-05 16:03:55 +01:00
Christophe Robillard
6c2eb22960
remove github authentication for manager
2020-11-05 16:03:55 +01:00
Kara Diaby
f78e0ced3a
Revert "feat 5701 - Ajoute l'information lorsqu'un usager s'authentifie via France Connect"
2020-10-30 18:28:08 +01:00
kara Diaby
e6c1a20329
Ajoute l'information lorsqu'un usager s'authentifie via France Connect
2020-10-30 17:28:54 +01:00
simon lehericey
c563956a9f
retry each day during 5 days to fetch attestation social
2020-10-28 15:53:58 +00:00
clemkeirua
89316c0689
fix counter for dossiers suivis/à suivre when unfollow
2020-10-28 13:51:35 +00:00
clemkeirua
b4910c557d
ajout de procedure.dossiers_count_for_instructeur
2020-10-28 13:51:35 +00:00
Kara Diaby
0bd48999bd
Revert "feat/5635 - Supprime la possibilité pour l'expert invité d'envoyer un message"
2020-10-12 09:24:34 +02:00
Paul Chavard
7c58f06c60
always validate geometries returned from api
2020-10-08 16:03:28 +02:00
Paul Chavard
653270d02f
Update specs
2020-10-08 15:26:15 +02:00
kara Diaby
6636b7f14c
Supprime la possibilité pour l'expert invité d'envoyer un message à l'usager
2020-10-08 11:14:09 +02:00
Paul Chavard
0aa06d0197
[GraphQL] expose dossier pdf, geojson and attestation
2020-10-06 21:54:43 +02:00
kara Diaby
9207cc5aa5
Ajoute un flag pour qu'un expert ne puisse pas inviter une autre personne à donner son avis sur un dossier
2020-10-02 18:57:29 +02:00
Paul Chavard
59086cc728
Fix geo length computations
2020-10-01 15:09:38 +02:00
Paul Chavard
4dfc1c719f
Fix geo areas computations
2020-10-01 15:09:38 +02:00
kara Diaby
57adb90c8f
add the possibility for administrator to refuse external review on a specific procedure
2020-10-01 10:55:19 +02:00
clemkeirua
67b8bf4754
smaller font-size for large footers in attestation
2020-09-30 14:05:12 +02:00
Paul Chavard
1bd59c72e5
Include in exports types_de_champ from all revisions
2020-09-30 13:42:38 +02:00
kara Diaby
e174079850
fix send a copy link
2020-09-30 10:03:08 +02:00
kara Diaby
2a69e2fbeb
fix services choice into a procedure
2020-09-29 19:53:28 +02:00
Keirua
3fa628235e
Nettoyage de I18n.transliterate pour les noms de feuilles d'exports
...
Co-authored-by: LeSim <mail@simon.lehericey.net>
2020-09-29 15:50:19 +00:00
clemkeirua
9714b607aa
ensure valid excel worksheet names
2020-09-29 15:50:19 +00:00
simon lehericey
1eb780b0c9
convert sheet_name to ascii before tuncate to 30 to ensure length < 31 bytes
2020-09-29 14:11:06 +02:00
clemkeirua
245e9e59c7
do not run ApiEntreprise jobs on missing etablissements
2020-09-28 17:36:38 +02:00
clemkeirua
f3e487bd9e
replace filter+first with find
2020-09-25 12:53:11 +00:00
clemkeirua
eb46cc6425
piecejusticative file validation focus on size
2020-09-25 09:35:16 +00:00
clemkeirua
c155de1d7e
ajout de la liste des extensions
2020-09-25 09:35:16 +00:00
clemkeirua
a465bad405
fix broken test in champ_serializer_spec
2020-09-25 09:35:16 +00:00
clemkeirua
31d48c2879
validation is enableed only for 'new' procedures
2020-09-25 09:35:16 +00:00
clemkeirua
8711e8f911
reenable validator on piece_justificative
2020-09-25 09:35:16 +00:00
clemkeirua
c19b653581
higher level length sanitization for worksheet length
2020-09-24 14:59:46 +02:00
Paul Chavard
26a6e18cb9
Do not crash when rgeo can’t calculate polygon area
...
example are “hourglass” shaped polygons
2020-09-23 16:52:08 +02:00
Paul Chavard
61c315b276
Fix geo area point coordinates display
2020-09-23 16:52:08 +02:00
kara Diaby
cb4e91c405
Add iban type de champ
2020-09-23 15:56:26 +02:00
Paul Chavard
973973ab6a
Do not enqueue web hooks for empty urls
2020-09-22 17:03:19 +02:00
Paul Chavard
a3f3b8a8e0
procedure.dossiers through revisions
2020-09-22 10:55:17 +02:00
Paul Chavard
061a743759
[GraphQL] Add archiver mutation
2020-09-22 08:34:38 +00:00
clemkeirua
005c244438
fixup! add fix for nil values on numeroVoie and typeVoie
2020-09-22 10:17:54 +02:00
clemkeirua
7ba8ab9e6a
maj du schema json
2020-09-22 10:14:55 +02:00
clemkeirua
412a87e532
add fix for nil values on numeroVoie and typeVoie
2020-09-22 09:43:44 +02:00
clemkeirua
1173f1e459
add default values when nil
2020-09-22 09:43:44 +02:00
clemkeirua
adb2a91640
add a broken test case
2020-09-22 09:43:44 +02:00
clemkeirua
4c17acf349
ajout du code effectif entreprise dans une spec graphql nominale
2020-09-22 09:43:44 +02:00
clemkeirua
482bfdb059
fix tests for autosave_brouillon
2020-09-21 08:46:01 +00:00
clemkeirua
f9c4e967d6
remove :autosave_dossier_draft
2020-09-21 08:46:01 +00:00
clemkeirua
f96377d878
refactor Dossier#with_notifications
2020-09-21 08:28:42 +00:00
clemkeirua
d01a53eb72
remove :cached_notifications gate
2020-09-21 08:28:42 +00:00
kara Diaby
5c68d75107
add titre_identite champ
2020-09-18 14:57:08 +02:00
clemkeirua
2b23eefee2
fix tests that now requir an admin user to have a strong password
2020-09-18 11:16:34 +02:00
clemkeirua
d8b4cc67be
add a test scenario for users
2020-09-18 11:16:34 +02:00
clemkeirua
1e32a3c11f
add complexity check to admin account creation
2020-09-18 11:16:34 +02:00
clemkeirua
5a8fbde0e7
remove dead code in admin model
2020-09-18 11:16:34 +02:00
clemkeirua
de3118bc7b
force password reset on admin promotion or creation
2020-09-17 16:39:13 +02:00
clemkeirua
0307beecd6
Revert "Merge pull request #5576 from tchak/soft-delete-users"
...
This reverts commit bf0d3914ce
, reversing
changes made to 503527459e
.
2020-09-17 15:39:16 +02:00
clemkeirua
08d0fa80fa
remove old route
2020-09-17 14:03:31 +02:00
Paul Chavard
a0dd3604a4
User discard_and_anonymize!
2020-09-17 11:16:56 +02:00
clemkeirua
6643b598c3
remove :administrateur_graphql
2020-09-17 09:24:50 +02:00
clemkeirua
01ac4d7e19
remove operation_log_serialize_subject
2020-09-17 09:24:50 +02:00
kara Diaby
13e4589905
Publications page to the new UI (admin)
2020-09-16 09:15:44 +02:00
simon lehericey
e4de522b48
only retrieve id of procedures with notifications
2020-09-11 09:43:04 +00:00
simon lehericey
86b04d4275
Add a missing test on job retry to the excon err
2020-09-09 09:08:48 +00:00
clemkeirua
a62907f33b
add more tests for phone numbers
2020-09-09 09:00:03 +02:00
clemkeirua
52d5a52ff9
test fonctionnel notifications avis
2020-09-08 15:40:42 +00:00
clemkeirua
bfd24e8aee
test fonctionnel notification annotations privees
2020-09-08 15:40:42 +00:00
clemkeirua
b7b61e79ab
test fonctionnel notification champ
2020-09-08 15:40:42 +00:00
clemkeirua
1fafcad401
test fonctionnel notifications commentaire
2020-09-08 15:40:42 +00:00
clemkeirua
c7b96d3d43
add feature-flip for instructeurs on cached notifications
2020-09-08 15:40:42 +00:00
clemkeirua
52ea5ef89a
make Dossier#with_notifications great again
...
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-09-08 15:40:42 +00:00
Paul Chavard
91bc2db594
Expose revisions on GraphQL API
2020-09-08 10:54:13 +02:00
clemkeirua
61cf33e3ca
remove duplicate private champ
2020-09-04 15:40:23 +02:00
kara Diaby
ae61c279af
migrate emails text editor to new interface
2020-09-03 14:42:22 +02:00
Paul Chavard
36668403b6
cleanup feature helper
2020-09-02 11:26:26 +02:00
Paul Chavard
0a70291b90
update services specs to use revisions
2020-09-02 11:26:26 +02:00
Paul Chavard
4c0f9a4d61
update serializers specs to use revisions
2020-09-02 11:26:26 +02:00
Paul Chavard
d1e0b65658
update jobs specs to use revisions
2020-09-02 11:26:26 +02:00
Paul Chavard
6a33a8e48b
update controllers specs to use revisions
2020-09-02 11:26:26 +02:00
Paul Chavard
dee12a2b0b
update features specs to use revisions
2020-09-02 11:26:26 +02:00
Paul Chavard
1488e0964b
update models specs to use revisions
2020-09-02 11:26:26 +02:00
Paul Chavard
d1fb6c559e
Update factories to use revisions
2020-09-02 11:26:26 +02:00
Judith
7eee9beed7
adapting the specs
2020-09-01 16:48:41 +02:00
Judith
25a24ba7c8
removal of translation keys already present in the gem rails-i18n
2020-09-01 16:33:58 +02:00
Pierre de La Morinerie
0800bf68d0
views: allow unselecting all values from a multiple dropdown
...
Currently, deselecting all values from a multiple dropdown rendered as
checkboxes doesn't have any effect when submitting the form (the
previous values are still there, instead of being deselected).
This is because unchecked checkboxes are not sent by the browser – so
the "empty selection" never gets sent.
Rails `form.check_box` usually works around this by inserting an empty
hidden checkbox element, that will be sent even if all others are
de-selected. But the documentation warns that this is not possible when
iterating over an array (rather than a model). Which is our case here.
To fix this, this commit uses `collection_check_boxes` instead. It will
insert the proper hidden checkboxes in all cases, and fix our use case.
See https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_check_boxes
2020-08-27 11:13:40 +02:00
Pierre de La Morinerie
4bba1f0660
views: add a "None" option to optional radio lists
...
After clicking on a radio button option, it is impossible to revert to
the "None of the values selected" state.
However on non-mandatory fields, reverting to the no-selection value
should be possible.
To fix this, add an explicit "N/A" option.
2020-08-25 11:42:30 +02:00
Christophe Robillard
090a247ba9
validates phone champ server side
2020-08-20 15:33:03 +02:00
Christophe Robillard
f77cc06a91
prend en compte le nom de l'enseigne pour l'établissement
2020-08-20 14:23:02 +02:00
Pierre de La Morinerie
a7361fdbd3
models: require belong_to associations on mail templates
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
29e8c43e5e
models: require belong_to associations on groupe_instructeur
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
5a7bd24fba
models: require belong_to associations on type_de_champ
...
- Make `type_de_champ.procedure` a requirement;
- Move the procedure_id assignation to `before_validation` (otherwise
the record is invalid, and never gets saved);
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
6328011f60
models: require belong_to associations on champ
...
- Make `champ.dossier` a requirement;
- Move the dossier_id assignation to `before_validation` (otherwise
the record is invalid, and never gets saved);
- Allow specs to only build the champ (instead of saving it to the
database), which bypasses the requirement to have a dossier.
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
71d9774d58
models: require belong_to associations on trusted_device_token
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
059c147ffc
models: require belong_to associations on service
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
ce53e219e0
models: require belong_to associations on procedure_presentation
...
Some tests are still failing
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
802d3804f5
models: require belong_to associations on invite
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
fe8804f208
models: require belong_to associations on individual
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
afb1c33154
models: require belong_to associations on geo_area
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
aff2713032
models: require belong_to associations on follow
2020-08-18 15:57:37 +02:00
Pierre de La Morinerie
91619b16e8
models: require belong_to associations on feedback
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
51d392a1dc
models: require belong_to associations on dossier
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
dd1bed9340
models: require belong_to associations on commentaire
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
32e55a6d37
models: require belong_to associations on avis
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
aefdd5d2a1
models: require belong_to associations on attestation_template
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
1ea4c2aa36
models: require belong_to associations on attestation
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
c1e2928ce7
models: require belong_to associations on assign_to
2020-08-18 15:57:36 +02:00
Pierre de La Morinerie
df2429d7ad
factories: build type_de_champ instead of creating them
...
This allows to minimize the number of actual creations when only a
build is requested.
2020-08-13 17:39:49 +02:00
Pierre de La Morinerie
c8ec5c8846
factories: remove the Rubocop workaround
2020-08-13 17:39:49 +02:00
Judith
bfabd3b6a5
Specs adapted
2020-08-13 13:41:45 +00:00
Christophe Robillard
0b35619322
skip verify authenticity token for helpscout
...
Co-authored-by: LeSim <mail@simon.lehericey.net>
2020-08-10 17:19:22 +02:00
kara Diaby
9b66c894b2
Adapt configuration email view to the new UI
2020-08-06 16:56:24 +02:00
Pierre de La Morinerie
65809f8ea0
config: flip action_dispatch_return_only_media_type_on_content_type
...
This makes `ActionDispatch::Controller#content_type` return not only
the MIME type, but also in some circumstances the charset.
Example:
```ruby
reponse.content_type == 'text/html; charset=utf-8'
```
The MIME type-only fragment can now be accessed using `#media_type`.
Changes to the tests are not stricly necessary (because no charset is
present in the actual value), but represent the intent better.
2020-08-05 16:48:36 +02:00
Pierre de La Morinerie
8962db38cc
models: render attestations in a simpler way
...
The older method of instanciating an entire new rendering stack can be
made simpler using Rails >= 5.0 methods.
See https://api.rubyonrails.org/classes/ActionController/Renderer.html#method-i-render
2020-08-04 16:53:46 +02:00
clemkeirua
21221a7c49
fix missing alt
2020-08-04 13:41:10 +00:00
clemkeirua
101acafb65
fix hidden label
2020-08-04 13:41:10 +00:00
clemkeirua
cc9341a83c
fix missing header for account creation
2020-08-04 13:41:10 +00:00
jpoulvel
bf94cc021b
Merge pull request #5424 from betagouv/new_design_edit_attestation
...
New design page admin/attestation_templates/edit
2020-07-31 11:18:22 +02:00
kara Diaby
db3e40ebf8
Fixe la non possibilité de cloner une démarche pour une procédure archivée (nouvelle interface administrateur)
2020-07-30 12:00:43 +02:00
clemkeirua
c772c3454c
update dossier after saving champ
...
update last_champ_updated_at without hook
update last_champ_private_updated_at without hook
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-07-30 10:18:44 +02:00
Christophe Robillard
b940d2e1b0
update dossier after saving avis
...
update last_avis_updated_at without hook
Co-authored-by: clemkeirua <clement@keiruaprod.fr>
2020-07-30 10:18:44 +02:00
clemkeirua
f3a675c3bc
update dossier after saving commentaire
...
update last_commentaire_updated_at without hook
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-07-30 10:18:44 +02:00
jpoulvel
62e04a6ca9
Merge branch 'dev' into new_design_edit_attestation
2020-07-30 09:53:09 +02:00
Kara Diaby
5894a86bd8
Merge pull request #5423 from betagouv/feat/5402
...
Feat/5402 - [Admin] new UI for procedures listing
2020-07-29 17:38:49 +02:00
clemkeirua
c404f92107
graphql: possibility to filter dossiers by archived
2020-07-29 16:59:34 +02:00
kara Diaby
d4c6e501c6
Ajoute la liste des démarches de l'interface administrateur sur la nouvelle UI
2020-07-29 15:35:52 +02:00
Judith
0075b508a3
adaptation of specs
2020-07-29 13:15:07 +02:00
Judith
b8a49e9012
creation of attachment_upload_helpers and integration in the code
2020-07-29 12:26:27 +02:00
Judith
5df3838173
- tranferred controllers from admin to mew_administrateur
...
- removed admin/attestation_templates views
- changed routes accordingly
2020-07-29 12:26:27 +02:00
Keirua
347dbe4c87
Merge pull request #5417 from betagouv/cleanup-incident-janvier
...
Suppression du message d'alerte suite aux problèmes d'upload
2020-07-29 11:00:12 +02:00
Paul Chavard
1fca481c6e
Cleanup after clone
2020-07-28 17:04:06 +02:00
clemkeirua
de1df85462
suppression du message d'alerte suite aux problèmes d'upload
2020-07-27 10:32:03 +02:00
LeSim
7f22cc86a9
Merge pull request #5405 from betagouv/set-app-name-as-parameter
...
Rendre le nom d'application paramètrable
2020-07-24 10:33:54 +02:00
clemkeirua
c91e231347
spec: replace reference to ds in password
2020-07-23 16:20:16 +02:00
Paul Chavard
bb5a90da76
fix active_revision_id -> active_revision.id
2020-07-23 15:07:25 +02:00
Paul Chavard
a08e318617
Add implicit_order_column on revisions
2020-07-22 12:25:06 +02:00
Paul Chavard
69ab2e44fb
Insert type_de_champ with correct initial position
2020-07-22 11:09:51 +02:00
Paul Chavard
58535c6a35
Add procedure revisions spec
2020-07-21 19:35:30 +02:00
Paul Chavard
0338080430
Remove unused procedure move type_de_champ code
2020-07-21 19:35:30 +02:00
Paul Chavard
d18a9c8162
Migrate procedures “on demand”
2020-07-21 19:35:30 +02:00
Paul Chavard
0a0912503b
Add type_de_champ mutation methods to revision
2020-07-21 19:35:30 +02:00
Keirua
f583b16f92
Merge pull request #5400 from betagouv/add-test-for-zip-download
...
Ajout d'un test pour le telechargement de zips de dossier
2020-07-21 17:39:39 +02:00
Keirua
b2aa90b729
Merge pull request #5392 from betagouv/fix-CI-accessibility-errors
...
Fix CI accessibility errors
2020-07-21 17:15:45 +02:00
Keirua
1a53bfed62
renommage des tests
...
Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
2020-07-21 17:13:28 +02:00
clemkeirua
d31b4b6848
ajout d'un test sur le telechargement de zips
2020-07-21 15:45:57 +02:00
krichtof
8c5308b9dc
Merge pull request #5396 from betagouv/5395-relancer-expert
...
5395 instructeur : relance un expert pour une demande d'avis
2020-07-21 15:02:53 +02:00
Christophe Robillard
169b8c9b3e
explicite revive meaning
2020-07-21 10:51:53 +02:00
Paul Chavard
86f562e7ea
Expose repetitions and options on champ_descriptors
2020-07-21 10:37:33 +02:00
Christophe Robillard
d9cb5c067f
relance un expert
2020-07-20 16:26:16 +02:00
clemkeirua
c0cf8b1341
fix display of labels for datetime on screenreaders
2020-07-20 11:37:01 +02:00
clemkeirua
bc34905742
fix heading order by removing useless h4
2020-07-20 11:36:55 +02:00
Christophe Robillard
52e8f32e19
expert can only revoke avis claimed by him/her
2020-07-16 21:07:20 +02:00
Christophe Robillard
3ea34834a7
revoke expert avis
2020-07-16 21:05:11 +02:00
Paul Chavard
b628169053
Remove unsused drop_down_list model
2020-07-16 15:29:01 +02:00
kara Diaby
9dc542af09
Revert "Revert "Feat/5287 - New design for admin procedure detail""
...
This reverts commit cf5eb3f251
.
2020-07-15 17:00:03 +02:00
krichtof
0c924be222
Merge pull request #5374 from betagouv/3451-revoquer-invite
...
usager: revoque un invité sur un dossier
2020-07-15 15:46:16 +02:00
clemkeirua
8a2aa13b74
remove pending tests
2020-07-15 09:27:23 +00:00
clemkeirua
299c86141c
added before_save to PieceJustificativeChamp in order to set skip_pj_validation
2020-07-15 09:00:12 +00:00
clemkeirua
c93d17bcaa
add rake task to update typedechamp
2020-07-15 09:00:12 +00:00
Christophe Robillard
8111babdd6
user: revoque un invité sur un dossier
2020-07-14 18:25:31 +02:00
Pierre de La Morinerie
e34f82a6fb
mailers: ignore more SMTP errors
...
Although we already ignore "invalid recipient" errors, a new type
of error recently popped: the mail service responds with
> Net::SMTPServerBusy '400 unexpected recipients: want atleast 1, got 0'
We want to also ignore this kind of errors.
2020-07-13 16:17:55 +02:00
Pierre de La Morinerie
7a67f1a802
jobs: ignore missing blob during virus scan
...
We currently have many failed VirusScannerJob enqueued, because the
underlying blob is missing.
This PR fixes the issue by discarding the job in those cases (because if
the blob is gone, the job is never going to succeed).
The implementation is based on a similar issue encoutered by the
ActiveStorage::AnalyzeJob. See 06f8baf73c
2020-07-13 14:35:41 +02:00
Pierre de La Morinerie
b82c269cef
specs: test de-serialization of job arguments
...
When the job is invoked directly, the serialization and de-serialization
of the job arguments is not actually tested.
Using `perform_later` inside a `perform_enqueued_jobs` allows to
exercise the serialization.
2020-07-13 14:31:28 +02:00
kara Diaby
ba6b89743c
put pending testsz
2020-07-13 12:24:48 +02:00
Kara Diaby
cf5eb3f251
Revert "Feat/5287 - New design for admin procedure detail"
2020-07-13 11:36:42 +02:00
Pierre de La Morinerie
c41afc425e
tasks: remove old after_party tasks
...
Fixes a task that since became invalid:
> NameError: uninitialized constant SeekAndDestroyExpiredDossiersJob
> /lib/tasks/deployment/20191203142402_enable_seek_and_destroy_job
2020-07-09 18:18:09 +02:00
kara Diaby
7f3b38cfee
Merge admin dashboard to new design for procedure details
2020-07-09 12:18:22 +02:00
Paul Chavard
cb8cac395b
fix spec name
2020-07-08 19:28:17 +02:00
Paul Chavard
3b9e6dba25
Update spec/models/type_de_champ_shared_example.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2020-07-08 19:28:17 +02:00
Paul Chavard
84ff75ed6b
Update spec/models/type_de_champ_shared_example.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2020-07-08 19:28:17 +02:00
Paul Chavard
a92320e246
Update spec/models/type_de_champ_shared_example.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2020-07-08 19:28:17 +02:00
Paul Chavard
d8e864a7d9
Update spec/models/type_de_champ_shared_example.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2020-07-08 19:28:17 +02:00
Paul Chavard
660c95356b
Update spec/models/type_de_champ_shared_example.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2020-07-08 19:28:17 +02:00
Paul Chavard
a74e52c828
Call remove_drop_down_list on before_save
2020-07-08 19:25:05 +02:00
Paul Chavard
3c9cc6c070
Remove repetition types_de_champ on type_champ change
2020-07-08 19:25:05 +02:00
Christophe Robillard
2c56511204
validate api_entreprise_token
2020-07-08 18:59:22 +02:00
Christophe Robillard
7fd4d46e8e
remove empty spec file
2020-07-08 18:15:15 +02:00
Christophe Robillard
1253bb5994
store instructeur_email in traitement
2020-07-08 18:15:15 +02:00
Christophe Robillard
8f9d6d2871
show which instructeur took decision and when
...
and also replace "sans suite" by "classé sans suite"
2020-07-08 18:15:15 +02:00
Christophe Robillard
cea170e4a6
update stats with traitement model
2020-07-08 18:15:15 +02:00
Christophe Robillard
0be4b50ade
update usual_traitement_time with traitement model
2020-07-08 18:15:15 +02:00
Christophe Robillard
a072d35211
use traitement model
...
when a dossier is terminated (accepte, refuse or classe_sans_suite),
we store now `processed_at` and `motivation` in a traitement instance
2020-07-08 18:15:15 +02:00
Christophe Robillard
f631acd118
update state date in aasm after callbacks
...
call aasm event methods, not state methods directly
2020-07-08 18:15:15 +02:00
Pierre de La Morinerie
2f7fbc8474
specs: fix shared/attachement/_update.html.haml
spec
...
Avoid purging a non-saved file.
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
04a6862fa6
spec: fix application_controller_spec
...
Rails controllers now looks for `media_type` rather than `content_type`.
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
0a3b4f7476
specs: fix some test helpers
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
2261c6c5d2
specs: refactor dossiers_controller_spec
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
b8706757e3
controllers: disable explicit purge of invalid file
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
719915e69f
attestations: fix test of the logo preview
...
Now that attaching the logo doesn't save it, we can safely display the
preview without saving the logo first.
2020-07-07 18:03:56 +02:00
Pierre de La Morinerie
35240e2219
lint: fix Rubocop warnings
...
The Rails/UniqueValidationWithoutIndex rule is disabled for now, but
we'll need to re-enable it (and fix the underlying issues) after the
migration to Rails 6.
2020-07-07 18:03:56 +02:00
Paul Chavard
6cc76cdf05
WIP
2020-07-07 18:03:56 +02:00
Paul Chavard
04feada77e
Use respond_to
2020-07-07 18:03:56 +02:00
Paul Chavard
c9ab80c880
WIP
2020-07-07 18:03:56 +02:00
Paul Chavard
13c21d89af
Fix attestation_template spec
2020-07-07 18:03:56 +02:00
Paul Chavard
6a24c3f812
Rails app:update
2020-07-07 18:03:56 +02:00
Judith
9793128f61
'Services' routes moved under 'new_administrateur' scope and '/admn' added in their url
2020-07-07 14:08:01 +00:00
Judith
782706537d
Changed the routes to pass all new design admin pages under
...
'new_administrateur' scope, except 'services'.
As a result, the url of these pages will all include '/admin'.
2020-07-07 14:08:01 +00:00
Pierre de La Morinerie
975d1648d5
dossier: fix PDF rendering of effectif_mensuel
...
The effectif_mensuel was a number, it needs to be converted explicitely
into a string.
As a bonus, `nil.to_s` is `""`, so we can remove the special case for
nil.
2020-07-06 11:41:25 +02:00
Pierre de La Morinerie
060bf1f9ca
factories: flesh out the default etablissement for a dossier
2020-07-06 11:41:25 +02:00
clemkeirua
ca74ae5a5e
ajout d'une bannière de dépréciation pour IE11
2020-07-06 10:01:02 +02:00
Myriam
0f542527fb
Instructeur : add overview table with counts for files
...
- changement du design
- tableau visible seulement si plus d'une procédure
2020-07-02 09:02:49 +00:00
Myriam
a486fe9a2e
Instructeur : add overview table with counts for files
...
nombre total de dossier :
- 'à suivre'
- 'suivi'
- 'traité'
- 'dossier'
- 'archivé'
2020-07-02 09:02:49 +00:00
bors[bot]
a37dd3c8cf
Merge #5318
...
5318: specs: use `fixture_file_upload` rather than `Rack::Test::UploadedFile` r=Keirua a=kemenaran
This is mostly for consistency (both styles were used before).
Note: we still have to use `Rack::Test::UploadedFile.new` in factories,
because of thoughtbot/factory_bot#385 .
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2020-07-01 11:54:51 +00:00
bors[bot]
b135b5cfb0
Merge #5316
...
5316: fix missing aria-labels in footer r=Keirua a=Keirua
début du cleanup des exclusions d'accessibilité
(et bon candidat pour tester si bors fonctionne comme prévu)
Co-authored-by: clemkeirua <clement@keiruaprod.fr>
2020-07-01 09:28:02 +00:00
Pierre de La Morinerie
43569f687e
specs: use fixture_file_upload
rather than Rack::Test::UploadedFile
...
This is mostly for consistency (both styles were used before).
Note: we still have to use `Rack::Test::UploadedFile.new` in factories,
because of https://github.com/thoughtbot/factory_bot/issues/385 .
2020-07-01 11:13:45 +02:00
Christophe Robillard
cce1435faf
remove precision for currency
2020-07-01 09:28:18 +02:00
Christophe Robillard
1d86f863d3
rename avis#all to avis#index
2020-06-30 09:17:27 +02:00
Christophe Robillard
bbec76d33b
rename avis#index to avis#procedure
2020-06-30 09:17:27 +02:00
Christophe Robillard
63dd71aed4
display all avis for an expert
2020-06-30 09:17:27 +02:00
Christophe Robillard
29e2d3d7eb
display all avis for a procedure for an expert
2020-06-30 09:17:27 +02:00
Christophe Robillard
c565c9c87b
refactor sign_up_instructeur_avis_url
2020-06-30 09:17:27 +02:00
Christophe Robillard
b0aa005769
remove dead code
2020-06-30 09:17:27 +02:00
Christophe Robillard
4839506374
refactor instructeur_avis_url
2020-06-30 09:17:27 +02:00
Christophe Robillard
b0cfb2c02a
refactor messagerie_instructeur_avis_url
2020-06-30 09:17:27 +02:00