Commit graph

1833 commits

Author SHA1 Message Date
Martin
8b487c847b fix(instructeurs/avis#revive): ArgumentError on AvisMailer.avis_invitation 2022-06-14 08:41:09 +02:00
Kara Diaby
d58ecb3fcc Lors de la restauration d'une démarche supprimée, met sur les dossiers liés hidden_by_administration_at à nil 2022-06-10 12:33:47 +02:00
Martin
cb890343ff feat(targeted_user_link): add targeted user link to wrap expert invitation in order to avoid access issue when the expert is connected with another account
feat(user.merge): ensure to merge user.targeted_user_link

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

feat(db/create_targeted_user_links): ensure not null with fk
2022-05-31 14:50:31 +02:00
Paul Chavard
02675a104d fix(revision): fix tests to use new revison system 2022-05-31 08:58:53 +02:00
Martin
91f1fa4ffb bug(avis#instruction): fail when claimant had been destroyed during a merge 2022-05-30 15:42:36 +02:00
Kara Diaby
51b8d8f254 tests 2022-05-30 14:40:49 +02:00
Paul Chavard
8c6feb1e1f feat(graphql): expose repasser_en_construction and repasser_en_instruction 2022-05-23 18:12:33 +02:00
Paul Chavard
99a8786dd5 fix(expert): expert should be allowed to delete messages 2022-05-20 15:47:48 +02:00
Paul Chavard
e33022ffc7 refactor(dossier): export to use turbo-poll 2022-05-17 16:08:47 +02:00
Paul Chavard
e9b02642c5 refactor(attachment): attachments controller to use turbo 2022-05-17 16:08:47 +02:00
Paul Chavard
95bd13872b refactor(dossier): change state with turbo 2022-05-13 17:38:09 +02:00
Martin
da57a1dc9e fix(commencer#commencer): broken due to missing interpolated variable in i18n 2022-05-13 13:15:31 +02:00
Martin
0826baeba3 bug(commencer#commencer): raise when procedure does not have a service
fix(commencer#commencer): use alternate message when procedure does not have a service
2022-05-12 16:41:11 +02:00
Paul Chavard
c9b8d43acd feat(autosave): use new autosave controller 2022-05-10 18:10:20 +02:00
Kara Diaby
7b73cb239a tests 2022-05-10 17:13:08 +02:00
simon lehericey
0fc71afc29 spec: fix private type de champ repetition 2022-05-06 10:34:40 +02:00
Martin
3737311390 feat(procedure.procedure_expires_when_termine_enabled): enable by default, allow contributor to choose the default settings of this flag using an env var during migration. ie: DEFAULT_PROCEDURE_EXPIRES_WHEN_TERMINE_ENABLED=true|false
feat(administrateurs/procedures#show): warning/alert when procedure_expires_when_termine_enabled is not true on current procedure

feat(administrateur/procedure#update): after an update redirect to procedure show: suggested by: https://ux.stackexchange.com/questions/55291/after-updating-form-should-redirect-back-to-form-itself-or-to-the-show-page-or-b and confirmed by Olivier

clean(Flipper.archive_zip_globale): no more in use, so remove all occurences

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update spec/views/administrateurs/procedures/show.html.haml_spec.rb

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

fix(review): typo, why ena?, who knows

fix(env.example.optional): add missing DEFAULT_PROCEDURE_EXPIRES_WHEN_TERMINE_ENABLED
2022-05-05 13:07:11 +02:00
Pierre de La Morinerie
9bc5364ca2 app: add controller and view to generate a deposit receipt 2022-05-04 16:09:52 +02:00
Paul Chavard
f8e3397f82 refactor(turbo): password complexity check use turbo 2022-05-04 14:11:43 +02:00
Paul Chavard
2db892d876 refactor(turbo): champ siret and dossier_link use turbo 2022-05-04 14:11:43 +02:00
Paul Chavard
1c2bd5543f refactor(turbo): champ carte use turbo 2022-05-04 14:11:43 +02:00
Paul Chavard
39ecc669b1 refactor(champ): simplify dossier link champ 2022-05-03 16:14:54 +02:00
Paul Chavard
3384b535c5 refactor(champ): simplify siret champ 2022-05-03 16:14:54 +02:00
Martin
2529773515 bug(commencer/test): with procedure without service nor organisation, it crashes 2022-04-28 14:19:55 +02:00
Paul Chavard
68ca9efba0 feat(dossier): use persisted dossier for preview 2022-04-28 12:20:41 +02:00
Paul Chavard
91879b89ce fix(commentaire): unified destroy commentaire 2022-04-26 14:54:58 +02:00
Martin
418d4ede17 test(commencer): test dossier_vide_pdf and dossier_vide_pdf_test 2022-04-25 15:00:48 +02:00
Paul Chavard
cad63391db refactor(turbo): use turbo in procedure administrateurs controller 2022-04-21 19:41:27 +02:00
Paul Chavard
69d5713c19 fix(turbo): fix anonymous controller RSpec test
https://github.com/hotwired/hotwire-rails/issues/42
2022-04-21 19:41:27 +02:00
simon lehericey
29dacb4686 remove env dependence in spec 2022-04-11 14:40:02 +02:00
simon lehericey
1dcfb2509f check nonce 2022-04-11 14:40:02 +02:00
simon lehericey
9938586d96 check state 2022-04-11 13:56:27 +02:00
Martin
9bac5c65ba feat(instructeurs/dossier#create_avis): only followed dossier receive notifications, so when an instructeur ask for an avis, he follows the dossier
Update app/controllers/concerns/create_avis_concern.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>

Update spec/controllers/instructeurs/dossiers_controller_spec.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
2022-04-07 09:05:23 +02:00
Martin
a9769ae277 fix(instructeur/dossiers#create_avis): as an instructeur, when I ask an avis, i hope to be notified when the expert give his avis 2022-04-07 09:05:23 +02:00
Paul Chavard
ec3ed049ef refactor(procedure_presentation): expose filtered_sorted_ids method 2022-04-05 15:50:53 +02:00
Paul Chavard
0daae815d8 refactor(dossier): use by_statut 2022-04-05 09:42:23 +02:00
Paul Chavard
f71c89aa91 refactor(procedure): cleanup tests 2022-04-05 09:42:23 +02:00
Martin
1d99e21a27 tech(bug): identify 2022-04-04 16:28:25 +02:00
simon lehericey
7ecf20ce75 harden email validation 2022-03-24 13:00:54 +01:00
Paul Chavard
7aacb7565c fix(dossiers): mark as read dossier on update_annotations 2022-03-22 09:19:24 +01:00
Kara Diaby
4bfcf4f9d9 tests 2022-03-17 13:57:49 +01:00
simon lehericey
0a3eb4a909 reinforce preview testing 2022-03-15 11:15:28 +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
51d7fd6190 test(dossier): update spec to use visible_by_administration 2022-03-10 14:29:40 +01:00
Paul Chavard
91caef0bfe fix(dossier): ensure submitted dossiers always have groupe instructeur 2022-03-02 16:57:12 +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
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
Paul Chavard
08030bcdb7 fix(attestation_template): handle attestation changes on procedures without revisions 2022-02-11 11:12:10 +01:00
Kara Diaby
24ff41d2c0 tests 2022-02-09 14:43:36 +01:00
Paul Chavard
12151acb99 Revert "Revert "feat(attestation): revise attestations""
This reverts commit 4e7733e571.
2022-02-08 16:22:59 +01:00
Paul Chavard
dad17ec2f8
Merge pull request #6906 from adullact/fix/6864-franceconnect-application-name
[FranceConnect] les tests échouent quand la variable d'env APPLICATION_NAME a une autre valeur que celle par défaut
2022-02-08 11:53:16 +01:00
François Vantomme
dacc1dca68
fix(groupe instructeur): avoid false-negative tests due to array ordering 2022-02-04 17:43:08 +01:00
François Vantomme
27ccf6bbdd
fix(france connect): stub application name in tests 2022-02-04 17:42:02 +01:00
Kara Diaby
842cc11689 tests 2022-01-31 10:03:44 +01:00
Paul Chavard
4e7733e571 Revert "feat(attestation): revise attestations"
This reverts commit e413872530.
2022-01-25 18:26:34 +01:00
Kara Diaby
c9f402aa5b tests 2022-01-25 11:46:05 +01:00
Kara Diaby
7a49985e2c tests 2022-01-24 16:47:47 +01:00
Paul Chavard
e413872530 feat(attestation): revise attestations 2022-01-19 18:00:37 +01:00
Paul Chavard
403e71b41f feat(procedure): only purge procedures without dossiers 2022-01-18 11:22:04 +01:00
Kara Diaby
bdcb0ca0e9 tests 2022-01-12 15:49:38 +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
Pierre de La Morinerie
fb75a55b89 Add specs for Administrateurs::ProcedureAdministrateursController 2022-01-07 15:39:58 +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
Paul Chavard
28c1763701 a11y(champs): generalize describedby and update to use new Combo props 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
252eee272b feat(support#create): block with invisible captcha [avoid painful captcha] 2022-01-04 14:49:00 +01:00
Kara Diaby
1ca553e088 rename hidden_by_instructeur by hidden_by_administration 2022-01-03 11:51:25 +01:00
Kara Diaby
598cb09c6d tests 2021-12-29 17:37:58 +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
François Vantomme
14e0c68266 feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
Martin
b9d13df483 fix(spec): avoid flacky test. 15.days ago is not always on the previous month. eg: this spec failed on 16 of december, stats is still in december 2021-12-16 15:02:17 +01:00
simon lehericey
c7f7855f14 avoid phishing 2021-12-15 13:51:49 +01:00
maatinito
0a31c8bc79 refactor date_trunc queries using groupdate gem 2021-12-14 08:50:11 +01:00
François Vantomme
6ab8ac0662 feat (api particulier): add Pole emploi field 2021-12-08 10:36:25 +01:00
François Vantomme
2110ef072c feat(api particulier): add DGFiP field 2021-12-07 11:03:05 +01:00
Paul Chavard
2ba05bfb4f fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +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
Christophe Robillard
9341c787a1 administrateur can add zone to procedure 2021-12-02 19:24:26 +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
Pierre de La Morinerie
9db62178d2 views: display revision errors on the procedure dashboard 2021-11-30 13:34:41 +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
simon lehericey
a0c0520502 avoid redirection to a deleted user 2021-11-29 15:27:17 +01:00
Kara Diaby
c75a9b6271 tests 2021-11-29 14:30:17 +01:00
kara Diaby
06540c1b93 tests 2021-11-26 09:45:13 +01:00
Martin
fdf0f18fda fix(i18n): wrap text under i18n.t
i18n(france_connect/*): replace wording with i18n

fix(lint): i18n key issue

secu(views/france_connect/particulier/merge.html.haml): sanitize france_connect_email just in case

fix(brakeman): sanitize FCI.email_france_connect when used with html_safe via an I18n.t, also add exception to brakeman
2021-11-25 17:34:37 +01:00
Martin
21894d0a0a feat(france_connect/particulier#callback): in case the FC email exists as an DC account which is an instructor or and administrator, returns early to new_session_path so he can connect with this existing account 2021-11-25 17:34:36 +01:00
Martin
ff073f8884 Add confirmation by email when merging DC/FC accounts
feat(fci.confirmation_code): add confirmation code to france_connect_informations

feat(user_mailer.france_connect_confirmation_code): add confirmation by email mail method/preview/spec, pointing to merge_mail_with_existing_account (reuse existing method)

feat(mail_merge): mail merge

feat(merge.cannot_use_france_connect): same behaviour as callback

clean(fci.confirmation_code): use same token for mail validation as merge

feat(resend_france_connect/particulier/merge_confirmation): resend email with link. also enhance some trads, cleanup halfy finished refacto

clean(tech): finalize story by plugging merge_with_new_account to email validation

fix(deadspec): was removed

fix(spec): broken after last refactoring

lint(rubocop): space before parenthesis

lint(haml-lint): yoohoooo space before =

fix(lint): scss now :D

Update app/assets/stylesheets/buttons.scss

cleanup

feat(france_connect): re-add confirm by email, with an option for confirmation by email instead of only confirmation by email

fixup! Add confirmation by email when merging DC/FC accounts

fix(lint): haml_spec failure
2021-11-25 17:34:34 +01:00
mfo
e7d9d047fe
Merge branch 'main' into 6649-etq-usager-instructeur-rendre-la-suppression-plus-visible 2021-11-24 14:07:32 +01:00
Paul Chavard
758e7d68e6 fix(graphql): fix and improuve query parsing for logs 2021-11-24 13:23:05 +03:00
simon lehericey
4efd15377c spec 2021-11-23 14:17:59 +01:00
Pierre de La Morinerie
997c197980 specs: simplify the syntax of some factories 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
09ca70eef0 specs: improve search controller specs 2021-11-23 08:07:07 +01:00
Martin
3d1533dee9 feat(users/dossiers?statut=dossiers-expirant): add dossiers-expirant tab 2021-11-19 15:14:39 +01:00
mfo
82b23b92c0
Merge branch 'main' into 6624/etq-instructeur-je-souhaite-supprimer-des-messages-envoyes-par-erreur 2021-11-17 05:41:56 +01:00
Paul Chavard
e74d599042 feat(procedure): remove duree_conservation_dossiers_hors_ds 2021-11-16 19:55:56 +03:00
Martin
f0950b592b clean(CommentaireService): extract soft delete within controller. returning an instance with an error[:base] is not persisted with validation : avoid poluting stuff 2021-11-16 16:13:11 +01:00
Martin
4042d51d1a tech(lint): rubocopify 2021-11-15 14:17:57 +01:00
Martin
d4c74b5621 feat(rc.1): refine with better translations, better design 2021-11-15 14:15:05 +01:00
Martin
3b78a9d81a feat(rc): first stable 2021-11-15 13:53:32 +01:00
Martin
8b931a57d4 feat(CommentairesController#destroy): implement destroy endpoint using CommentaireService 2021-11-15 13:18:10 +01:00
Martin
b03dc6ad5d wip(dossiers/messages/_message): poc destroy button with expected ACL support 2021-11-15 11:30:41 +01:00
Paul Chavard
da47f491b3 fix(dossier): nullify close to expiration notice timestamps when changing state 2021-11-11 12:52:58 +01:00
simon lehericey
9041e201e8 one merge at a time 2021-11-04 16:10:09 +01:00
simon lehericey
b160086cc5 update update_email to allow merge 2021-11-04 16:10:09 +01:00
simon lehericey
652b8367be accept or refuse merge 2021-11-04 16:10:09 +01:00
Pierre de La Morinerie
0a541d678d graphql_controller_spec: create several dossiers only when required
Creating dossiers is faster than creating a procedure, but still slow.
We can create a single dossier in the default case, and only create
several others when the example requires it.

Speeds up this spec from 0m 57s to 0m 49s.
2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
f0e045ad25 graphql_controller_spec: create all types de champs only when required
Creating a procedure with all available types de champ is slow. We can
create a simpler procedure in the default case, and only create all
types de champs when the example requires it.

Speeds up this spec from 1m 55s to 0m 57s.
2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
e02251c0e5 graphql_controller_spec: populate all champs only when required
Creating a dossier with available champs populated is slow. We can
create simpler dossiers in the default case, and only populate all
champs when the example requires it.

Speeds up this spec from 2mn 20s to 1m 55s.
2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
bb1bc9140d graphql_controller_spec: remove unused line 2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
04159056af specs: clarify spec by replacing some context by describe 2021-11-03 19:38:01 +01:00
Pierre de La Morinerie
b06183d7bf specs: rename Dossier's with_all_champs to with_populated_champs
This better reflects what the trait is used for, and disambiguate it
from the similarly named trait in the Procedure factory.
2021-11-03 19:38:01 +01:00
Paul Chavard
c4b93f8d4a fix(groupe_instructeur): unfollow dossiers when removed from groupe instructeur 2021-10-28 14:45:52 +02:00
simon lehericey
c725999582 move merge method to user 2021-10-28 14:39:13 +02:00
Pierre de La Morinerie
a2b91c8ec6 factories: cleanup Administrateur, Instructeur and Expert factories
This changes:

- avoids relying on application code to create mock objects,
- allows to build Administrateur or Instructeurs without saving them.
2021-10-26 12:03:30 +02:00
simon lehericey
d19ad2840c rename preexisting to targeted, remove duplicated test 2021-10-19 16:12:42 +02:00
simon lehericey
52b7e85954 merge administrateur in user_controller 2021-10-19 16:12:42 +02:00
simon lehericey
44c880adc4 allow instructeur and administrateur to change their email to legit domain (#6550) 2021-10-19 15:54:57 +02:00
simon lehericey
f54dfe6ead Do not raise error if user is nil
I do not get when it happens
2021-10-19 11:21:24 +02:00
simon lehericey
933d7b8c8d merge with another preexisting account 2021-10-14 14:47:50 +02:00
simon lehericey
ce40e1127d merge with another new account 2021-10-14 14:47:50 +02:00
simon lehericey
19f81b594b merge with an existing account by using the password 2021-10-14 14:47:50 +02:00
simon lehericey
218e4633a9 securely retrieve fci 2021-10-14 14:47:50 +02:00
simon lehericey
f7299da1e7 launch merge process if an unlinked DS account with the same email exists 2021-10-14 14:47:50 +02:00
simon lehericey
6826bf03b0 Sign in with a user linked by france connect sub (openid)
instead of looking linked user by email because :

- follows FC recommendation to fetch ds account by openid
- the email is not a valid key as many user can share the same FCI email.

The following scenario is now working

A user A (email: 1@mail.com) uses FC to connect to DS
=> It is connected as 1@mail.com

Another user B (email: generic@mail.com) uses FC to connect
=> It is connected as generic@mail.com

The first user A change its FC email to generic@mail.com and connect to DS
=> It is still connected as 1@mail.com
2021-10-14 14:47:50 +02:00
simon lehericey
2f470b25aa spec cleaning 2021-10-14 14:47:50 +02:00
simon lehericey
77d14d4a60 forbid admin merge yet 2021-10-07 15:51:31 +02:00
simon lehericey
5009c583ea Add notice when merging account 2021-10-07 15:51:31 +02:00
simon lehericey
a480b31eb5 merge expert 2021-10-07 15:51:31 +02:00
simon lehericey
136f29524e merge instructeur 2021-10-07 15:51:31 +02:00
simon lehericey
9a6a53349f simple cases when the preexisting targeted account does not have instructeur or profile profile 2021-10-07 15:51:31 +02:00
simon lehericey
c56199e8f7 spec cleaning 2021-10-07 15:51:31 +02:00
simon lehericey
195583c0bd Enable manager specs 2021-10-07 15:51:31 +02:00
kara Diaby
919d708ec4 tests 2021-10-05 15:37:30 +02:00
simon lehericey
f662b28baf update identity_updated_at column when user identity change 2021-10-05 12:05:43 +02:00
Peng-Fei DONG
dee536fca1 app: localize CSV import for groupe instructeurs 2021-10-05 10:58:15 +02:00
simon lehericey
64351d0287 [Fix #6504] Fix exception raised when deleting a transfer 2021-10-01 12:11:03 +02:00
simon lehericey
0cd9bcb1ab fix #6495 2021-09-28 15:53:18 +02:00
Paul Chavard
5933194149 feat(log): stop logging user emails
fix #6485
2021-09-27 14:56:00 +02:00
simon lehericey
07962cc2c7 service: match remote keys 2021-09-22 12:08:24 +02:00
simon lehericey
1446660ca3 an api_particulier_token change erases previous api_particulier_sources 2021-09-21 11:21:10 -05:00
simon lehericey
c87f3f7fb6 faster jeton_particulier_controller_spec 2021-09-21 11:21:10 -05:00
simon lehericey
2e1bed8748 an admin can save its sources 2021-09-21 11:21:10 -05:00
Pierre de La Morinerie
eef90efd49 app: fix exception during password reset when the token has expired 2021-09-21 10:30:09 -05:00
simon lehericey
a7ec77f0a8 do not display the action for instructeur 2021-09-20 13:58:11 +02:00
simon lehericey
7239657a75 [Fix #6481] a user see its waiting transfers 2021-09-20 13:58:11 +02:00
simon lehericey
c34476a766 a user can transfer all its dossier 2021-09-20 13:58:11 +02:00
Paul Chavard
ad5279f4ab test(groupe_instructeur): fix groupe_instructeur controller spec 2021-09-18 11:22:35 +02:00
simon lehericey
5dbd81ebeb show api particulier sources 2021-09-17 13:50:23 +02:00
simon lehericey
1d06c15ac0 save api particulier scopes 2021-09-16 09:49:16 +02:00
simon lehericey
7ee360df30 add logic to detect empty scopes 2021-09-16 09:09:34 +02:00
simon lehericey
ee6d19e3ee an admin can save it's api particulier token
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-09-15 14:56:42 +02:00
simon lehericey
4c0dd43055 add jetons particulier index page
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-09-15 14:37:04 +02:00
Pierre de La Morinerie
5cbf939911 spec: fix syntax of get requests in archives_controller_spec
Those were generating Ruby warnings:

> warning: Using the last argument as keyword parameters is deprecated
2021-09-09 09:58:41 -05:00
Pierre de La Morinerie
80f9d4adc0 devise: use password_strength component in SuperAdmin::PasswordsController 2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
428ca8755f app: add a password_complexity component
This component will replace the previous `password_field` component.
2021-09-09 09:40:39 -05:00
Paul Chavard
74e277d0a2 feat(graphql): add an option to dossier state change mutations to disable notifications 2021-09-07 14:21:48 +02:00
Paul Chavard
9e30d5fc22 fix(virus scan): prevent virus scans in specs 2021-09-07 14:21:48 +02:00
Pierre de La Morinerie
8bb283d977 app: delete old Admin::ProceduresController 2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
a004ac59df app: move archive to NewAdministrateur::ProceduresController 2021-09-02 14:51:31 -05:00
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
Pierre de La Morinerie
b80f6a9f1b spec: fix some manager tests not running 2021-08-26 11:44:47 -05: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
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
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
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
kara Diaby
0b6c7dace7 tests 2021-07-15 16:32:07 +02:00
kara Diaby
d2d046a39d fix encoding problems with cherlock Holmes gem 2021-07-13 10:58:41 +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
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
Paul Chavard
a4482233b8 [GraphQL] expose deleted dossiers 2021-06-24 11:51:37 +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
kara Diaby
6ebd57640c tests 2021-06-15 19:36:46 +02:00
François Vantomme
c9b1095d1e Refactor (Rubocop): replace map{ … }.compact by filter_map
In Ruby 2.7, Enumerable#filter_map has been added.
This cop identifies places where map { … }.compact can be replaced by filter_map.

See: https://docs.rubocop.org/rubocop-performance/cops_performance.html#performancemapcompact
2021-06-11 15:38:09 +02:00
Christophe Robillard
41569efe9d extract estimate_weight
and rename nb_dossiers by nb_dossiers_termines
2021-06-09 10:52:38 +02:00
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
9b0dae4cc2 Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
Paul Chavard
3b85ade440 Add compatibility cadsatre layer with old API GEO 2021-05-24 11:57:00 +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
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
Paul Chavard
f6508899de Refactor NotificationMailer 2021-05-04 12:05:06 +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
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
fba0d78153 generate pdf export inside pieces_justificatives_service 2021-04-28 11:40:58 +02:00
Paul Chavard
2a068fb9b0 Remove user feedback buttons 2021-04-22 15:40:40 +01:00
Pierre de La Morinerie
d530b272a1 password: add specific page for reset instructions 2021-04-22 14:24:15 +02:00
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
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
Paul Chavard
0b22788d60 experts_procedure should not be optional 2021-03-23 13:46:33 +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
Paul Chavard
76aa7bdfe3 Add default nil value for numero_tva_intracommunautaire 2021-03-16 12:57:10 +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
Paul Chavard
96a832bc19 Add SerializerService 2021-03-02 12:42:22 +01:00
Pierre de La Morinerie
d9ea415d44 specs: fix rspec warning about raise_error specificity 2021-02-23 08:25:31 +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
c855d13994 rend accessible l'envoi de dossier par un instructeur
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
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
Pierre de La Morinerie
150ddab660 zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
Judith
6d89a83d14 unused locales clean-up 2021-02-04 12:15:13 +01:00
Paul Chavard
41c3a98d7d Update Raven references to use Sentry 2021-01-28 19:46:36 +01:00
Paul Chavard
dc08993a89 Add DateTime champ to GraphQL 2021-01-14 14:08:42 +01:00
Paul Chavard
a2e87cbb56 Add attestation, justificatifs, operation_logs and bill_signatures to dossier export 2020-12-16 16:34:31 +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
94b3ec942b super_admin: check password complexity client side 2020-12-15 16:26:09 +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
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
kara Diaby
bc0f77978f add an api token verification for api entreprise 2020-11-09 16:58:24 +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
6c2eb22960 remove github authentication for manager 2020-11-05 16:03:55 +01: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
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
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
kara Diaby
e174079850 fix send a copy link 2020-09-30 10:03:08 +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
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
clemkeirua
2b23eefee2 fix tests that now requir an admin user to have a strong password 2020-09-18 11:16:34 +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
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
Paul Chavard
91bc2db594 Expose revisions on GraphQL API 2020-09-08 10:54:13 +02:00
kara Diaby
ae61c279af migrate emails text editor to new interface 2020-09-03 14:42:22 +02:00
Paul Chavard
6a33a8e48b update controllers specs to use revisions 2020-09-02 11:26:26 +02:00
Judith
7eee9beed7 adapting the specs 2020-09-01 16:48:41 +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
c1e2928ce7 models: require belong_to associations on assign_to 2020-08-18 15:57:36 +02: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
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
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
5df3838173 - tranferred controllers from admin to mew_administrateur
- removed admin/attestation_templates views
- changed routes accordingly
2020-07-29 12:26:27 +02:00
clemkeirua
c91e231347 spec: replace reference to ds in password 2020-07-23 16:20:16 +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
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
Christophe Robillard
8111babdd6 user: revoque un invité sur un dossier 2020-07-14 18:25:31 +02:00
Christophe Robillard
2c56511204 validate api_entreprise_token 2020-07-08 18:59:22 +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
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
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
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
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
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
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
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
Christophe Robillard
83fba55b29 refactor instruction_instructeur_avis_url 2020-06-30 09:17:27 +02:00
Christophe Robillard
72d27ffdb2 replace instructeur_avis_index url by instructeur_all_avis url 2020-06-30 09:17:27 +02:00
Christophe Robillard
dcb9afaf25 refactor expert avis url : fix avis_controller_spec 2020-06-30 09:17:27 +02:00
Christophe Robillard
3e1afa8bf9 fix avis spec 2020-06-30 09:17:27 +02:00
kara Diaby
6b07cc0659 Move admin/assigns to the new UI like groupe_instructeurs 2020-06-29 14:44:28 +02:00
Paul Chavard
210389d0f8 Remove admin creation notification email 2020-06-25 16:29:06 +02:00
simon lehericey
fecad19b91 add maintenance mode 2020-06-22 11:17:22 +02:00
Paul Chavard
d099314e56 Add decription to geo_area 2020-06-09 18:45:45 +02:00
Paul Chavard
901b6e23a8 Remove legacy carto 2020-06-04 16:03:23 +02:00
Christophe Robillard
fb87a09c02 doesn't update dossier etablissement for siret controller 2020-05-26 18:13:20 +02:00
Christophe Robillard
637bde7326 update siret_controller when finding etablissement
now, `ApiEntrepriseService` does'nt return a hash anymore but an
etablissement which is already persisted.
2020-05-20 11:09:54 +02:00
Christophe Robillard
eebfb5ee5b update dossiers_controller when updating siret
now, `ApiEntrepriseService` does'nt return a hash anymore but an
etablissement which is already persisted.
2020-05-20 11:09:54 +02:00
Pierre de La Morinerie
51cb3a04a3 app: fix JS redirection with Turbolinks disabled
When Turbolinks is enabled, a `redirect_to` in a `format: :js` request
will emit code that instructs Turbolinks to navigate to the page.
Turbolinks will then load the redirection target as HTML, and display
it.

But with Turbolinks disabled, the same `redirect_to` will instead
respond with a standard `302: redirect`. `Rails.ajax` will interpret
this redirect as "Please perform the same call again to the redirected
URL, in the same format" – and request our redirection target, but
using `format: :js`.


This breaks the "Publish procedure" button. In that case, we really want
the page to be navigated to. Add an explicit JS redirect, so that the
redirection occurs in HTML.
2020-05-13 11:04:16 +02:00
Christophe Robillard
aab4bb81ee return bilan bdf csv for expert 2020-05-11 13:05:50 +02:00
kara Diaby
1cc04092f4 import GPX file in browser [Carto] 2020-05-11 11:36:36 +02:00
Paul Chavard
4f2e504cc2 Add carto import api
takes a FeatureCollection to import and returns an augmented champ FeatureCollection
2020-05-07 12:06:42 +02:00
Paul Chavard
05e408225b Implement atomic operations on MapEditor 2020-05-06 16:46:14 +02:00
Christophe Robillard
dbf04dd0d8 make api entreprise call only if token not expired 2020-05-06 10:57:45 +02:00
Christophe Robillard
b12226c667 fetch and store bilans bdf 2020-04-30 16:15:16 +02:00
Christophe Robillard
3ddb5a4cb4 store attestation fiscale and display 2020-04-30 11:39:54 +02:00
Christophe Robillard
158b4802ab store attestation sociale and display 2020-04-29 16:25:47 +02:00
Christophe Robillard
14ff18ca80 store specific api-entreprise token for a procedure 2020-04-28 15:17:11 +02:00
Christophe Robillard
339066778d send notif only to the right instructeurs
after a dossier creation, only the instructeurs that belong to the group
instructeur of the dossier, and who want notif will be notified by mail
2020-04-23 13:01:57 +02:00
Christophe Robillard
792e755af9 expose effectif_annuel dans api graphql 2020-04-23 09:53:27 +02:00
Christophe Robillard
453adf3c74 instructeurs: affiche l'effectif moyen annuel n-1 2020-04-23 09:53:27 +02:00
Pierre de La Morinerie
32ad152347 specs: ensure that discarded procedures are not shown 2020-04-22 19:01:26 +02:00
Pierre de La Morinerie
abe692ecc2 specs: refactor instructeur procedures controller specs 2020-04-22 19:01:16 +02:00
Pierre de La Morinerie
f29ec5c775 instucteurs: don't show discarded procedures in the list 2020-04-22 15:16:21 +02:00
Pierre de La Morinerie
15645e11e3 instructeur: improve InstructeurController#index test 2020-04-22 15:12:34 +02:00
Christophe Robillard
149b98007f add effectif mensuel to graphql api 2020-04-21 21:13:07 +02:00
Christophe Robillard
1165f8483d rename effectif columns 2020-04-21 21:13:07 +02:00
Christophe Robillard
db3ef195ad fetch and show effectif mensuel
- fetch and store effectif mensuel (at the creation of the dossier or
when updating a siret field

- show effectif mensuel only for instructeurs
2020-04-21 14:22:11 +02:00
Paul Chavard
bc8217e030 Carte Editor sends FeatureCollection to the server 2020-04-16 18:29:19 +02:00
Paul Chavard
22604013d0 Expose multiple user selections on champ carte 2020-04-15 18:07:09 +02:00
Paul Chavard
52d2ace823 Remove quartiers prioritaires 2020-04-14 10:29:59 +02:00
Christophe Robillard
f683b850c3 Notifie instructeurs le souhaitant lors depot dossier
Notifie par mail uniquement les instructeurs qui le souhaitent à chaque dépôt de dossier
2020-04-09 15:02:05 +02:00
Christophe Robillard
ae18ff6627 Notifie tous les instructeurs lors dépôt dossier
- envoie un mail à tous les instructeurs d'une procédure après le dépôt
d'un nouveau dossier
2020-04-09 14:33:56 +02:00
Christophe Robillard
969478b706 Envoie une notif aux followers_instructeurs le souhaitant
après chaque message déposé par l'usager
2020-04-09 14:17:07 +02:00
Christophe Robillard
415d5c765e envoie une notification à chaque follower_instructeur après un commentaire déposé 2020-04-09 14:17:07 +02:00
Pierre de La Morinerie
7ff381b6f0 attachments: remove the buggy fallback
The fallback would fail on non-champ attachments.
2020-04-09 10:40:08 +02:00
Pierre de La Morinerie
7e19dd2cda Revert "Revert "Fix middle-click on "Delete attachment" button""
This reverts commit 6e8bd6957f.
2020-04-09 10:40:08 +02:00
Paul Chavard
32f783142c [GraphQL] allow to query dossiers by groupe instructeur 2020-04-09 09:29:28 +02:00
Pierre de La Morinerie
6e8bd6957f
Revert "Fix middle-click on "Delete attachment" button" 2020-04-08 17:40:58 +02:00
Pierre de La Morinerie
b748e9773f attachments: fix opening the delete link directly
When cliking on the "Delete attachment" link, and opening the URL
in a new tab, the `DELETE /attachements/:id` will become
`GET /attachments/:id` – which will cause the `show` action to be
routed with an html format (instead of JS).

In that case, we don't want to throw an error at the user face.
Instead simply re-render the dossier page (if any).

Fix a long-standing error in Sentry.
2020-04-08 13:40:32 +02:00
Pierre de La Morinerie
0077ff4b75 attachments: refactor the controller specs 2020-04-08 12:05:55 +02:00
Paul Chavard
c0bbfa42b7 Reassign discarded dossiers on group_instructeur
fix #4851
2020-04-01 18:10:12 +02:00
Paul Chavard
e4ab2574ce Démarches discarded by administrateur can be reactivated in manager 2020-03-31 17:08:28 +02:00
Paul Chavard
da52ec30bd Undo discard dossiers and demarches from manager 2020-03-31 17:08:28 +02:00
Paul Chavard
876e05aed3 Discard demarches from manager 2020-03-31 17:08:28 +02:00
Paul Chavard
60cb9bcf09 Remove brouillons deleted dossiers 2020-03-31 16:54:33 +02:00
Pierre de La Morinerie
6417c0d2c0 dossiers: allow auto upload of attachments 2020-03-31 13:09:44 +02:00
Pierre de La Morinerie
4cb747fdb6 specs: always require rails_helper
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.

The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.

This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.

Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).

Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.

To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.

Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
Pierre de La Morinerie
ed5f2fa35f attestation: fix preview of logos
Turns out that assigning the params to the procedure calls `read` on the
images files. Calling `read` moves the seek offset to the end of the
file; which means that subsequent calls to `read` return an empty
string.

Fix the issue by calling `rewind` before attempting to `read` the file,
to ensure the seek offset is at the beginning of the file.

Fix #4958
2020-03-30 14:58:50 +02:00
Pierre de La Morinerie
b8c3d7c6bd attestation: ensure the PDF is rendered successfully 2020-03-30 14:58:50 +02:00
Paul Chavard
c763679b54 Remove non-existant columns from manager dashboards 2020-03-26 16:17:07 +01:00
Paul Chavard
c707a21f97 Rename delete_and_keep_track -> discard_and_keep_track 2020-03-26 14:23:23 +01:00
Christophe Robillard
b4b92accf1 instructeur: show deleted dossiers for a procedure 2020-03-25 10:19:07 +01:00
Christophe Robillard
884de51b94 Revert "Revert "go to procedure after cliking link""
This reverts commit 952bae32fe.
2020-03-20 10:41:36 +01:00
Christophe Robillard
952bae32fe Revert "go to procedure after cliking link"
This reverts commit 795eabb1ea.
2020-03-18 14:45:39 +01:00
Christophe Robillard
795eabb1ea go to procedure after cliking link
even for an instructeur which is not signed in and unstrusted
2020-03-18 11:16:19 +01:00
Paul Chavard
c281347da1 Remove restclient 2020-03-17 11:12:14 +01:00
Paul Chavard
e540dea929 Fix administrate pagination by pinning to an old version of kaminari 2020-03-05 14:01:09 +01:00
pedong
62f82cc83c add dossierChangerGroupeInstructeur mutation 2020-03-05 12:28:16 +01:00
kara Diaby
b32ed88f9b add attachment when instructor asking for a review 2020-03-04 13:35:29 +00:00
Paul Chavard
1ed1aa75cd [GraphQL] add groupeInstructeur on dossier 2020-03-03 10:23:18 +01:00
kara Diaby
4a70a7fcc8 remove email_notifications_enabled column because of the new daily_email_notifications_enabled 2020-02-27 11:09:19 +01:00
kara Diaby
6102ba6039 Do not permit to upload a GIF file via javascript 2020-02-25 23:33:15 +01:00
Christophe Robillard
bb61500f9b recherche un administrateur par email dans manager 2020-02-19 15:17:36 +01:00
Christophe Robillard
ba3d2f1b9f refactor 2020-02-19 15:17:36 +01:00
Christophe Robillard
32d1ebe565 add administrateur from manager 2020-02-19 15:17:36 +01:00
Paul Chavard
7afeae1408 remove dossier.linked_dossiers 2020-02-11 17:49:22 +01:00
Pierre de La Morinerie
5d0a8b567f specs: improve description of Avis creation test cases 2020-02-11 17:38:58 +01:00
Paul Chavard
f0ea96772d Only invite experts to dossiers instructeur have access to 2020-02-11 17:38:57 +01:00
simon lehericey
4f317e84d1 Iterate over type_de_champ in repetition type_de_champ 2020-02-11 13:35:55 +00:00
Christophe Robillard
967e5e910f test pending demandes 2020-02-10 14:59:03 +01:00