Commit graph

3943 commits

Author SHA1 Message Date
Christophe Robillard
81fa1d0e89 utilise un ordre plus logique pour identite entreprise
homogenise l'affichage des valeurs monétaires
elargit la colonne libellé
2020-06-09 16:59:57 +02:00
Paul Chavard
901b6e23a8 Remove legacy carto 2020-06-04 16:03:23 +02:00
Christophe Robillard
cf9d6ccf34 export bilans in ods and xlsx 2020-06-04 15:31:16 +02:00
Christophe Robillard
75a268aed6 show some info from bilans 2020-06-04 12:33:33 +02:00
Christophe Robillard
d06867822b reorder bilans bdf csv 2020-06-03 15:45:11 +02:00
Judith
d930124839 change procedure_auto_archive helper name and added a helper for 23 h 59 2020-05-28 13:22:02 +00:00
Judith
6b65ee8d15 mailers: display auto-archive date in notifications 2020-05-28 13:22:02 +00:00
Judith
38eb60f2ac views: display auto-archive date on procedure description 2020-05-28 13:22:02 +00:00
Judith
59346ee868 mailers: mention the auto_archive in notify_new_draft 2020-05-28 13:22:02 +00:00
Paul Chavard
20705d6e30 Do not send draft norifications to users on inactive démarches 2020-05-27 16:36:46 +02:00
Christophe Robillard
fb87a09c02 doesn't update dossier etablissement for siret controller 2020-05-26 18:13:20 +02:00
Pierre de La Morinerie
2f509c2536 specs: remove unused test case
Actual code was removed in 0ff6c793ae

The spec was never executed, because it lacked the `_spec.rb` suffix.
2020-05-20 17:45:06 +02:00
Christophe Robillard
d92a0ba8f3 raise BadFormatRequest error
L'intention est de distinguer ce type d'erreur avec les erreurs serveur
5xx.
Lorsque l'api est appelé par un Job, les erreurs serveur seront retry, car éphémères.
Alors que les erreurs de type BadFormatRequest ou ResourceNotFound n'ont
pas être retried.
2020-05-20 11:09:54 +02:00
Christophe Robillard
f40123fee1 display only etablissement infos
all the other infos are not yet available because the jobs which
retrieve it are performed later
2020-05-20 11:09:54 +02:00
Christophe Robillard
013e78ce4e fix creating dossier feature sprec 2020-05-20 11:09:54 +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
Christophe Robillard
ba5fa9aa4b update ApiEntrepriseService
There is now the `create_etablissement` method which
create etablissement with EtablissementAdapter
and enqueue api_entreprise jobs to retrieve
all informations we can get based on SIRET
2020-05-20 11:09:54 +02:00
Christophe Robillard
f4ebb5d107 create api_entreprise jobs 2020-05-20 11:09:54 +02:00
Christophe Robillard
e3ee423197 call api_entreprise adapters with siret 2020-05-20 11:09:54 +02:00
Pierre de La Morinerie
9f1407b6d7 expiration: fix the mailer arguments
The mailers expect serializable arguments, but were given
ActiveRecord::Relation objects instead. This made the mailers throw an
exception.

But how was that possible ? This code is tested, and the tests were
green.

Well, the specs spy on the mailer implementation, in order to check that
the mailers methods were properly called. Fair enough.

But if the specs mock the mailer code (instead of calling the original
implementation), we may not notice that the original implementation
rejects our method parameters.

Here this is the case: once we actually call the original implementation
the tests start to fail, because some arguments are not converted from
an ActiveRecord::Relation to a serializable array.

This is fixed by ensuring that the mailer code is executed (and doesn't
throw an exception).
2020-05-18 16:24:08 +02:00
Pierre de La Morinerie
b63fa0e6b8 dossier: remove "Birthdate" column from export 2020-05-18 13:14:28 +00:00
Pierre de La Morinerie
00adb006b4 specs: improve ProcedureExportService spec 2020-05-18 13:14:28 +00:00
clemkeirua
77101208a4 Anonymisation de l'instructeur dans la messagerie 2020-05-18 12:56:30 +00:00
Pierre de La Morinerie
93bb5283ff app: remove the feature flag for pieces justificatives auto-upload
The feature works as intended: we can remove the feature flag.
2020-05-14 17:39:07 +02:00
Pierre de La Morinerie
190548844a dossiers: add piece justificative filename to spreadsheet export 2020-05-14 10:18:10 +00:00
Paul Chavard
f0148184ca Remove legacy carto code 2020-05-13 12:17:04 +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
Pierre de La Morinerie
b5f1d97629 app: disable Turbolinks
Fix #5039
2020-05-13 11:04:16 +02:00
Paul Chavard
dfc004d7bb Unarchive dossier when repasser_en_instruction 2020-05-12 19:05:18 +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
clemkeirua
36f381a743 fix flacky test 2020-05-07 10:23:28 +02:00
Paul Chavard
05e408225b Implement atomic operations on MapEditor 2020-05-06 16:46:14 +02:00
Christophe Robillard
dba77ec0b8 fix spec with not expired token
and use of `ApiEntrepriseToken#roles`
2020-05-06 10:57:45 +02:00
Christophe Robillard
dbf04dd0d8 make api entreprise call only if token not expired 2020-05-06 10:57:45 +02:00
Christophe Robillard
f587e6600a extract class ApiEntrepriseToken
and check if token is expired
2020-05-06 10:57:45 +02:00
Paul Chavard
6556df2a85 Fix a crash in case of invalid geometry 2020-05-05 15:56:05 +02:00
Paul Chavard
4299c9dbea Use a “safe” reference date in expiration tests 2020-05-05 12:41:45 +02:00
Christophe Robillard
9de2c7c85a improve csv generation for bilans bdf 2020-04-30 16:15:16 +02:00
Christophe Robillard
b12226c667 fetch and store bilans bdf 2020-04-30 16:15:16 +02:00
Christophe Robillard
85b2e9ef44 create bilans_bdf_adapter 2020-04-30 16:15:16 +02:00
Paul Chavard
843e033c38 Allow instructeurs to download a GeoJSON document for a given dossier 2020-04-30 15:49:43 +02:00
Christophe Robillard
3ddb5a4cb4 store attestation fiscale and display 2020-04-30 11:39:54 +02:00
Christophe Robillard
38c68b16e3 create attestation_fiscale_adapter 2020-04-30 11:39:54 +02:00
Paul Chavard
b516cbc179 Enable republish on démarches dépubliée 2020-04-29 18:04:35 +02:00
Christophe Robillard
ddd3e6bb02 don't copy api_entreprise_token when cloning
except for an admin who owns the parent procedure
2020-04-29 17:17:20 +02:00
Christophe Robillard
158b4802ab store attestation sociale and display 2020-04-29 16:25:47 +02:00
Christophe Robillard
d74b14c205 fetch attestation sociale url 2020-04-29 14:25:55 +02:00
Christophe Robillard
b147956a92 create attestation_sociale_adapter 2020-04-29 14:01:48 +02:00
Christophe Robillard
4bd4524f67 fix api_entreprise specs 2020-04-28 15:17:11 +02:00
Christophe Robillard
e29af48420 call api_entreprise with specific token if exist 2020-04-28 15:17:11 +02:00
Christophe Robillard
14ff18ca80 store specific api-entreprise token for a procedure 2020-04-28 15:17:11 +02:00
clemkeirua
1ac7ec2dca precision dans mail suppression dossier en construction 2020-04-28 12:42:00 +00: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
Paul Chavard
9cb612bb3d Show area and length on champ carto selections utilisateur 2020-04-23 10:21:18 +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
Paul Chavard
31943f7d9c Add handeling of expired processed dossiers to deletion service 2020-04-22 15:39:10 +02:00
Paul Chavard
f1b531911b Handle processed dossiers in deletion mailers 2020-04-22 15:39:10 +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
Pierre de La Morinerie
1cb18e51ac champ: return the parent dossier even when discarded
Dossier has a `default_scope { kept }`.

Because of that, when the parent dossier is discarded, `champ.dossier`
will return nil.

We should kill the default scope. But meanwhile, ensure that
`champ.dossier` returns even a discarded dossier.
2020-04-22 11:46:42 +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
Christophe Robillard
599d8e33e8 create ApiEntreprise::EffectifsAdapter 2020-04-21 14:22:11 +02:00
clemkeirua
2d68d7dc59 fix to_tsquery disallowed chars 2020-04-20 15:15:22 +02:00
Paul Chavard
e512870fd2 Cleanup procedure duree_conservation_dossiers_dans_ds validations 2020-04-16 19:40:19 +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
clemkeirua
8c2f589cbf fix admin deletion of empty service with archived procedures 2020-04-10 20:01:40 +02:00
clemkeirua
7335500be4 tests for dossier_helper#demandeur_dossier 2020-04-10 13:14:39 +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
Paul Chavard
61eaca928f remove WarnExpiringDossiersJob 2020-04-09 11:11:51 +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
clemkeirua
590cee050f add tests for dossier_search_service 2020-04-09 09:42:31 +02:00
clemkeirua
46e14f4033 add test for users/list_dossiers_spec 2020-04-09 09:42:31 +02:00
clemkeirua
8ff3d9ea47 update existing tests 2020-04-09 09:42:31 +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
clemkeirua
ed45c88bdf do not clone groups instructeurs for admin outside the procedure 2020-04-07 09:25:40 +02:00
pedong
7806a26e2c copy groupe_instructeurs when clone 2020-04-07 09:22:33 +02:00
Christophe Robillard
dc31f41c26 fix tests for procedure_presentation 2020-04-06 17:39:51 +02:00
Christophe Robillard
5b6044803b forbid to create champ with same type_de_champ and same row 2020-04-06 17:39:51 +02:00
Paul Chavard
ca6c97bf0f Refactor expired dossiers deletion service 2020-04-02 15:24:02 +02:00
Pierre de La Morinerie
059e11601b policies: fix champ policy for guest users 2020-04-02 11:27:14 +02:00
Pierre de La Morinerie
ac922c456e policies: refactor champ_policy_spec
Creating champs without attaching them to a procedure works only by
chance.
2020-04-02 11:27:13 +02:00
Paul Chavard
c0bbfa42b7 Reassign discarded dossiers on group_instructeur
fix #4851
2020-04-01 18:10:12 +02:00
Paul Chavard
7ba4c513e6 Refactor notify near deletion mailers 2020-04-01 17:40:52 +02:00
Paul Chavard
288ace2f34 Dossier on discarded procedure should have access to discarded procedure 2020-03-31 17:08:29 +02:00
Paul Chavard
bd81970f67 DeletedDossier should have access to discarded demarche 2020-03-31 17:08:29 +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
58c126308c Add DiscardedProceduresDeletionJob job 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
7a27e78452 specs: remove unused wait-for-ajax helper
This helper is:
- no longer used;
- buggy (not all requests increment it);
- discouraged (we should instead match an UI change that signals the end
of an ajax request).

Good riddance.
2020-03-31 12:54:49 +02:00
Pierre de La Morinerie
cae256fd28 rspec: allow Rails to auto-migrate the test schema
rails_helper already has `ActiveRecord::Migration.maintain_test_schema!`
which automatically updates the test database if needed.

However, if we raise **before** `maintain_test_schema` had the chance
to do its job, the test database is never-automigrated.

Thus by removing the check, we ensure the test database will be migrated
as needed (and still an error will be raised if the schema cannot be
applied).
2020-03-31 12:48:32 +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
Paul Chavard
742cc15209 Use base CronJob 2020-03-31 12:25:46 +02:00
Paul Chavard
33bf2fe109 remove deprecated AutoReceiveDossiersForProcedureJob 2020-03-31 12:25:46 +02:00
Paul Chavard
c40d689edf Use bigger deltas to allow for month length variations 2020-03-31 11:50:59 +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
Pierre de La Morinerie
fe13043efd dossier: prepare validations to piece_justificative champs
We can't yet enable the validations, because of an issue that will
(hopefully) be solved with Rails 6.

See https://github.com/betagouv/demarches-simplifiees.fr/issues/4926
2020-03-30 11:12:25 +02:00
Pierre de La Morinerie
245ef2befd specs: fix an Rspec warning 2020-03-30 11:12:25 +02:00
Paul Chavard
a60b6b6776 Use ’ consistently instead of ' 2020-03-26 17:27:48 +01: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
Paul Chavard
c086f6d580 Add a job to remove discarded dossiers 2020-03-25 17:28:25 +01:00
Paul Chavard
5b5ae5a7a5 Do not send notifications or create operation logs on brouillon demarches 2020-03-25 15:04:52 +01:00
Pierre de La Morinerie
f895570b00 dossier: make the upload label a real label 2020-03-25 14:43:09 +01:00
clemkeirua
a34b45e4f4 make the 'male' field selected by default during identity creation 2020-03-25 09:50:41 +00:00
Christophe Robillard
b4b92accf1 instructeur: show deleted dossiers for a procedure 2020-03-25 10:19:07 +01:00
maatinito
1af32b29fd #4807 Use now() instead of Date.time.today (better code homogeneity) 2020-03-24 17:09:14 -10:00
maatinito
f5c2dc03c5 #4807 better method/variable naming 2020-03-24 16:46:23 -10:00
Christian Lautier
e61c53f267 Fix #4807 48h before closing a procedure, notify users their draft is not submitted 2020-03-24 16:46:23 -10:00
clemkeirua
e76870844e update test for dossier#en_construction_close_to_expiration
It now takes into account en_construction_conservation_extension
2020-03-24 18:10:51 +01:00
clemkeirua
d49f6e703e fix tests for datetime 2020-03-24 16:54:35 +00:00
Paul Chavard
5c2eba1dd1 Always add a reason to dossier deletion 2020-03-24 09:30:11 +01:00
Paul Chavard
903cf0cef5 Keep operation logs after dossier removal 2020-03-24 09:18:45 +01:00
kara Diaby
1f27652cd3 add files validations to models 2020-03-23 11:28:13 +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
Pierre de La Morinerie
1b4a218b0e specs: remove useless chrome argument
The `options.add_argument('--headless')` above is sufficient.
2020-03-19 17:47:33 +01:00
Paul Chavard
cd0acb1344 Cleanup dossier mailers 2020-03-19 16:52:18 +01:00
simon lehericey
3e7cef63c6 add mailer preview 2020-03-18 15:25:02 +01:00
simon lehericey
3dd4ea26c7 add similar tests for send_brouillon_expiration_notices and delete_expired_brouillon_and_notify 2020-03-18 15:25:02 +01:00
simon lehericey
3f6012bff5 Delete complicated test 2020-03-18 15:25:02 +01:00
simon lehericey
74db7ab146 test for #send_en_construction_expiration_notices 2020-03-18 15:25:02 +01:00
simon lehericey
f35c0518b7 test for #delete_expired_en_construction_and_notify 2020-03-18 15:25:02 +01:00
simon lehericey
043847ae6e change notify_automatic_deletion_to_administration signature 2020-03-18 15:25:02 +01:00
Paul Chavard
fe1cd2a47b Delete and notify en_construction dossiers 2020-03-18 15:25:02 +01:00
Paul Chavard
77018b9e2b Add expiration scopes to dossier 2020-03-18 15:25:02 +01:00
Paul Chavard
f35ccc9d92 Move process_expired_dossiers_brouillon to a service 2020-03-18 15:25:02 +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
Christophe Robillard
8e7f210216 affiche infos entreprise uniquement si diffusable
le champ de type siret affiche les infos d'une entreprise dont les infos sont diffusables uniquement aux instructeurs
2020-03-17 15:57:02 +00:00
Christophe Robillard
c21dd3b830 affiche infos d'un usager entreprise uniquement si diffusable
pour un usager de type entreprise qui a choisi de ne pas diffuser publiquement ses infos,
elles sont affichées uniquement aux instructeurs
2020-03-17 15:57:02 +00:00
Christophe Robillard
91abcd7792 récupère les infos d'établissement avec infos non diffusables 2020-03-17 15:57:02 +00:00
kara Diaby
395af2fbb0 instructors : receive daily emails for declarative folders 2020-03-17 15:54:50 +01:00
Paul Chavard
3cd4597006 Update rubocop roules 2020-03-17 11:25:21 +01:00
Paul Chavard
c281347da1 Remove restclient 2020-03-17 11:12:14 +01:00
Christophe Robillard
d8d9b0922d remove orphan services when destroying admin 2020-03-16 21:40:05 +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
Christophe Robillard
b5030b8972 highlight demandes when groupe instructeur updated on procedure list 2020-03-04 14:56:59 +01:00
Christophe Robillard
50007b2aac highlight demande tab when groupe instructeur updated 2020-03-04 14:56:59 +01:00
Christophe Robillard
924702699f highlight routing criteria label when updated 2020-03-04 14:56:59 +01:00
kara Diaby
b32ed88f9b add attachment when instructor asking for a review 2020-03-04 13:35:29 +00:00
Christophe Robillard
e8bef76772 fix test for procedure presentation 2020-03-03 18:07:50 +01:00
Paul Chavard
c46e012c10 Use dossier.assign_to_groupe_instructeur 2020-03-03 10:30:49 +01: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
Christophe Robillard
2bd6f01009 log changer_groupe_instructeur 2020-02-26 11:25:07 +01:00
Christophe Robillard
e0f4957dfd notify instructeur after groupe_instructeur changed 2020-02-26 11:25:07 +01:00
Christophe Robillard
fb3d7e45ba unfollow stale instructeurs
when the group instructeur of a dossier is changed, unfollow the
instructeurs who don't belong to the new groupe instructeur
2020-02-26 11:25:07 +01:00
kara Diaby
6102ba6039 Do not permit to upload a GIF file via javascript 2020-02-25 23:33:15 +01:00
Paul Chavard
24d237de9e A cloned procedure should not have canonical relationship 2020-02-25 15:26:43 +01:00
Pierre de La Morinerie
6664965961 mailers: add procedure context to the confirmation link
This allows to redirect the user to the procedure they signed up for
even when the browser session is not available (like if they changed
of browser).

Fix #4738
2020-02-25 11:45:36 +00:00
Pierre de La Morinerie
10c940c188 specs: small cosmetic cleanups in sign-up specs 2020-02-25 11:45:36 +00:00
Pierre de La Morinerie
dcc81d42dd specs: ensure the procedure-less sign-up is tested 2020-02-25 11:45:36 +00:00
Paul Chavard
be66a8986c Activate champ integer number on all the new procedures 2020-02-25 11:26:37 +01:00
clemkeirua
4343bb3918 Revert "openly fail when not delivering mail"
This reverts commit 415cc2c2f1.
2020-02-20 15:31:43 +00:00
clemkeirua
48d2093577 tag 'groupe instructeur' uniquement si la procedure est routee 2020-02-20 14:48:14 +00:00
clemkeirua
059d80ea34 #4785 ajout d'une balise 'groupe instructeur' 2020-02-20 14:48:14 +00:00
Paul Chavard
b7051da278 Remove old export code 2020-02-19 18:19:17 +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
e931c0800d Remove notify_unhide_to_user and notify_undelete_to_user mailers 2020-02-18 17:56:52 +01:00
Paul Chavard
318baf316e Add notify_en_construction_near_deletion mailer 2020-02-18 17:18:14 +01:00
Paul Chavard
8c77d91e9f Add notify_automatic_deletion_to_administration mailer 2020-02-18 17:18:06 +01:00
Paul Chavard
4e116f06a6 Add notify_automatic_deletion_to_user mailer 2020-02-18 17:15:32 +01:00
Pierre de La Morinerie
6afddd8647 spec: fix a flaky experts feature spec
When "invite linked dossiers" is checked, the invitation will generate
one avis per dossier (including the linked ones).

So when we retrieve the email send to the expert, and try to match it
with the avis record, we need to specify wich avis (the one for the main
dossier, or for the linked dossier).

Otherwise the test is flaky, and sometimes doesn't match the right avis
with the sent email.
2020-02-18 10:44:44 +00:00
Pierre de La Morinerie
d6a9318d05 champ: fix siblings for repetition champs
Fix a crash when requesting the `section_index` of a section header
in a repetition champ.
2020-02-17 17:11:17 +01:00
Paul Chavard
1ce1c1e6d0 use discard 2020-02-13 12:31:59 +01:00
Paul Chavard
a3cf7fce3a Remove old (< 2019) migration tasks 2020-02-13 11:42:11 +01:00
Pierre de La Morinerie
f8ed7ec051 form: display index of section in header 2020-02-13 11:18:46 +01:00
Pierre de La Morinerie
a8444927ab specs: fix the sign-up with unconfirmed account test
It was testing the sign-in instead of the sign-up.
2020-02-12 13:24:52 +00:00
Pierre de La Morinerie
e746d90016 mailers: add a link to the procedure when the account already exists 2020-02-12 13:24:52 +00:00
kara Diaby
0b8a59d5e9 Add the possibility to disable weekly email notifications (instructeur) && rename the column email_notifications_enabled to daily_email_notification_enabled 2020-02-12 13:02:31 +00:00
Pierre de La Morinerie
e3ba2ed96c Revert "form: add number to section headers"
This reverts commit f42977e40a.
2020-02-12 13:54:44 +01:00
Pierre de La Morinerie
3e1ba4eebc specs: fix test failing because of unspecified types_de_champ order 2020-02-12 13:26:54 +01:00
Pierre de La Morinerie
d4574bade1 dossier: add a custom message for the dossier owner 2020-02-12 11:49:33 +01:00
Pierre de La Morinerie
7ba76c6658 dossier: add a notice when some attachments of the dossier were lost
On the 22/01/2020, a technical error on the demarches-simplifees.fr
instance made us delete some files attached to some dossiers.

This PR adds a warning when browsing a dossier containing attachments
that were deleted.
2020-02-12 11:49:33 +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
Pierre de La Morinerie
f42977e40a form: add number to section headers 2020-02-11 17:36:50 +01:00
Pierre de La Morinerie
2532091302 form: improve wording of repetition blocks controls 2020-02-11 17:36:50 +01:00
simon lehericey
4f317e84d1 Iterate over type_de_champ in repetition type_de_champ 2020-02-11 13:35:55 +00:00
Pierre de La Morinerie
52ea019ba9 app: replace remaining references of DINSIC by DINUM
Fix #4488
2020-02-10 17:46:20 +00:00
Christophe Robillard
967e5e910f test pending demandes 2020-02-10 14:59:03 +01:00
clemkeirua
415cc2c2f1 openly fail when not delivering mail 2020-02-05 10:46:01 +01:00
Christophe Robillard
cef776ff9e admin: fix add administrateur to a procedure 2020-02-04 16:21:42 +01:00
Christophe Robillard
ed970d3f3c admin: create without providing email 2020-02-04 16:21:42 +01:00
Christophe Robillard
055918aabc admin: replace calls to Administrateur.find_by(email: ...) 2020-02-04 16:21:42 +01:00
Christophe Robillard
c137917396 fix typo 2020-02-04 16:07:01 +01:00
Christophe Robillard
5a46effcbc remove useless condition to admin that can be deleted
administrateur can be deleted only if he/she has a procedure where
he/she is the only admin
2020-02-04 16:07:01 +01:00
Christophe Robillard
4bf020cb96 rend le test plus élégant 2020-02-04 16:07:01 +01:00
Christophe Robillard
6fc8a27bd7 destroys not all dossiers
but only dossiers for a specific user
2020-02-04 16:07:01 +01:00
Christophe Robillard
cee4c5b8fb Revert "Revert "4127 fix superadmin supprime compte usager""
This reverts commit 751f24f7bb.
2020-02-04 16:07:01 +01:00
clemkeirua
57a0973c99 added a test to show #4658 does not exist 2020-02-03 15:43:53 +01:00
Paul Chavard
08400cdd4c Poll for export readiness updates 2020-01-29 22:52:03 +01:00
clemkeirua
1c3573c7db fix DoubleRender error for brouillon pdf 2020-01-29 14:24:23 +01:00
clemkeirua
fcea7c4f85 remove invalid excel worksheet characters 2020-01-29 11:45:56 +01:00
Paul Chavard
6030409b2f [GraphQL] Use GraphQL::Types::BigInt instead of Int 2020-01-28 21:48:00 +01:00
Pierre de La Morinerie
96932faa3f models: add a Dossier#with_hidden scope, and remove unscoped usages 2020-01-28 17:32:38 +01:00
Pierre de La Morinerie
1448d5b098 models: add a Procedure#with_hidden scope, and remove unscoped usages
This avoids the broad use of `unscoped` to remove the `hidden_at`
clause.
2020-01-28 17:32:38 +01:00
Pierre de La Morinerie
4efea77280 specs: regroup dossier scope specs together 2020-01-28 17:32:38 +01:00
clemkeirua
5f65665b07 added a method for modifying a user email 2020-01-28 16:15:46 +01:00
Paul Chavard
f7c59cffc0 Fix tests for skylight 2020-01-28 15:39:37 +01:00
Pierre de La Morinerie
2c795a5ff4
Revert "app: hide IE11 deprecation banner during the strike" (#4713)
Le bandeau indiquant qu'Internet Explorer 11 est très ancien est à nouveau affiché
2020-01-28 15:19:01 +01:00
Pierre de La Morinerie
745b00366f Revert "app: hide IE11 deprecation banner during the strike"
This reverts commit c2882b6cc3.
2020-01-28 15:18:18 +01:00
Paul Chavard
eec38bad73 Ajouter les informations de l’instructeur et de l’expert dans l’export des avis
fix #4667
2020-01-28 15:09:41 +01:00
clemkeirua
65b4bcf3a1 Permet de déposer un dossier lorsqu'un menu déroulant lié obligatoire n'a pas de valeur (car la liste est légitimement vide) dans le second champ. 2020-01-28 14:30:26 +01:00
Paul Chavard
67dea1ee50 Update spec/models/procedure_spec.rb
Co-Authored-By: Pierre de La Morinerie <kemenaran@gmail.com>
2020-01-28 12:49:53 +01:00
Paul Chavard
517ab25783 Register canonical procedure when demarche republished under existing path 2020-01-28 12:49:53 +01:00
Pierre de La Morinerie
aaaf6f393b specs: add an actual test case to the Exercice spec
This fixes the "No timing found for 'spec/models/exercice_spec.rb'"
warning message during specs.
2020-01-28 12:00:34 +01:00
Pierre de La Morinerie
751f24f7bb
Revert "4127 fix superadmin supprime compte usager" 2020-01-21 18:57:54 +01:00
Pierre de La Morinerie
792ba73643 factories: ensure that dossiers with_entreprise are consistent 2020-01-21 17:24:56 +01:00
Pierre de La Morinerie
0efb62f03a factories: ensure that dossiers with_individual are consistent 2020-01-21 17:24:56 +01:00
Pierre de La Morinerie
724ff50363 factories: rename dossier for_individual to with_individual
This clarifies the distinction between

```
create :procedure, :for_individual
```

and

```
create :dossier, :with_individual
```
2020-01-21 17:24:56 +01:00
Pierre de La Morinerie
00e5b736fb factories: mark the parent procedure as for_individual
This ensures that we don't get an inconsistency, where a dossier is
`for_individual` while its procedure is not `for_individual`.
2020-01-21 17:24:56 +01:00
Pierre de La Morinerie
6a47458112 specs: use order-insentitive matching for arrays
The specs sometime failes locally, because the order of the returned
objects is undefined.

This is an acceptable behavior – but it means we should test for
collection membership, rather than for a specific array order.

Replace `match` by `match_array` to have unordered matching.
2020-01-21 17:24:56 +01:00
Christophe Robillard
675bbdad15 transfere les services lors de suppression admin
Lorsqu'un administrateur est supprimé, ses services sont transférés à un
autre administrateur pour chacune de ses procédures
2020-01-21 15:05:33 +01:00
Christophe Robillard
d9570eedc6 empêche suppression d'un user qui est instructeur 2020-01-21 15:05:33 +01:00
Christophe Robillard
a6d007dbd3 supprime un instructeur 2020-01-21 15:05:33 +01:00
Christophe Robillard
d4de5769ee empêche la suppression d'un user qui est admin 2020-01-21 15:05:33 +01:00
Christophe Robillard
d8a51f986f supprime un utilisateur qui a des dossiers cachés 2020-01-21 15:05:33 +01:00
clemkeirua
fb87a87f47 code review changes 2020-01-20 16:15:02 +01:00
clemkeirua
499f93aed3 ajout d'un test pour l'ecran de reaffectation des dossiers 2020-01-20 16:15:02 +01:00
clemkeirua
4e8ecb048c ajout d'un test pour la suppression des groupes 2020-01-20 16:15:02 +01:00
clemkeirua
d6e7799370 removed routing condition in weekly summary 2020-01-20 14:23:19 +01:00
clemkeirua
7e15c6a4a4 add filtering by group in procedure_overview
The weekly overview do not work for instructeurs in procedures with multiples groups ;
they see dossiers that they do not have access to. Now the correct filter is added
2020-01-20 14:23:19 +01:00
Paul Chavard
4edc7b00cf Use geocoder 2020-01-15 15:04:04 +01:00
Paul Chavard
14295db9ad Revert "Revert "Merge pull request #4552 from tchak/champ-communes""
This reverts commit 4373cb22cb.
2020-01-14 18:46:07 +01:00
clemkeirua
0c2ccb4ae0 added automated tests for PDF rendering
- as a user, it should not display the administration info
 - as an instructeur, it should display the administration info
 - it should render the proper view with no crash
2020-01-14 09:29:29 +01:00
clemkeirua
4373cb22cb Revert "Merge pull request #4552 from tchak/champ-communes"
This reverts commit 4cec26f73a, reversing
changes made to 0ef25ef36c.
2020-01-13 16:26:27 +01:00
Christophe Robillard
d289c21a8b speak english for test descriptions 2020-01-13 10:06:43 +01:00
Christophe Robillard
0f881f942b raise if trying to del a user who can't be deleted 2020-01-13 10:06:43 +01:00
Christophe Robillard
696a058280 delete adminis with procs managed by other admins 2020-01-13 10:06:43 +01:00
Christophe Robillard
a0b4d97d08 fix rubocop offenses 2020-01-13 10:06:43 +01:00
Christophe Robillard
9a62d3fe0c delete a user 2020-01-13 10:06:43 +01:00
Christophe Robillard
58ef36ff57 tells if a user can be deleted 2020-01-13 10:06:43 +01:00
Paul Chavard
c6326bfa77 Fix tests involving attachment urls 2020-01-08 14:46:18 +01:00
Pierre de La Morinerie
b3558c497d dossiers: make build_default_individual explicit
It avoid the use of callbacks, and may avoid situations where an empty
individual is implicitely created.
2020-01-08 10:48:22 +01:00
Pierre de La Morinerie
5e05556ee8 dossiers: add a validation on dossier individual
Validate that a dossier on a `for_individual?` procedure always has
an `individual` associated record.

For this, the individual needs to be built before the record is
validated (i.e. even before the `before_create` callback is run).

This should help with #4596: now if a dossier is created without an
`individual`, or if the `invividual` record is later removed, the
validation will fail.
2020-01-08 10:48:22 +01:00
Pierre de La Morinerie
7f5b0d8bf3 specs: don't create an implicit brouillon in all test cases 2020-01-07 17:59:11 +01:00
Pierre de La Morinerie
630c6de967 specs: move the query for individual to the individual context 2020-01-07 17:59:11 +01:00
Paul Chavard
e61e39d345 Remove unused code and tests 2020-01-07 11:52:51 +01:00
Paul Chavard
ff46ee366e Fix user brouillon spec 2020-01-07 11:52:51 +01:00
Paul Chavard
4bbd16576b Add champ communes 2020-01-07 11:52:51 +01:00
Pierre de La Morinerie
8eb295d67e dossiers: avoid exceptions on invalid AASM transitions
When attempting an invalid transition on a dossier, provide a meaningful
error message (instead of letting an `AASM::InvalidTransition` exception
propagate).

This handles not only the case where the same state is applied twice
(which was already handled manually), but all cases where the transition
is invalid.
2019-12-19 13:25:32 +01:00
Pierre de La Morinerie
c7a307553c helpers: allow dossier_display_state to take a state as input
This allow to use either:

- `dossier_display_state(dossier)`
- `dossier_display_state(:en_construction)`
2019-12-19 13:22:40 +01:00
simon lehericey
60538c9c28 Controller use new export model 2019-12-18 13:13:15 +01:00
simon lehericey
745086cbb5 Simplify view 2019-12-18 13:13:15 +01:00
simon lehericey
d0939ae1a4 Add Export Model 2019-12-18 13:13:15 +01:00
simon lehericey
d0f0533a32 Remove unused code 2019-12-18 13:13:15 +01:00
simon lehericey
c02e8b9553 Routing: send emails to the right group 2019-12-16 17:47:08 +01:00
maatinito
a02a5edce3 Bug with time zone when testing sending of brouillon expiration notices 2019-12-11 17:34:10 +01:00
maatinito
9672d892e9 Bug with time zone: Time.zone.today looses time_zone and may breaks database comparisons 2019-12-11 17:34:10 +01:00
simon lehericey
058442c84e [link to #4557] An instructeur cannot change its email on its own 2019-12-11 17:18:21 +01:00
simon lehericey
e06733d01b Clean spec 2019-12-11 17:18:21 +01:00
Paul Chavard
6b5793f0b9 [GraphQL] fix a crash in mutations with an attachment 2019-12-11 13:22:32 +01:00
Paul Chavard
422b7f37ec [GraphQL] expose file information 2019-12-11 12:34:49 +01:00
Pierre de La Morinerie
c2882b6cc3 app: hide IE11 deprecation banner during the strike
Having two banners appearing in a few days may be overwhelming for
users.
2019-12-04 17:32:04 +01:00
Paul Chavard
2f060fc30a Add depubliee state to procedures 2019-12-04 16:52:41 +01:00
Paul Chavard
b5eafdab56 [GraphQL]: informations du service 2019-12-04 14:21:40 +01:00
Paul Chavard
fd42fafcb4 [GraphQL]: informations du demandeur du dossier 2019-12-04 12:39:29 +01:00
Christophe Robillard
4e7c779116 refuse les numéros de tel invalides
rend facultatif les numéros de téléphone
2019-12-04 05:34:43 +01:00
simon lehericey
006e426a11 Work on deletion mail 2019-12-03 17:18:53 +01:00
simon lehericey
79bfb8b143 Delete expired dossiers 2019-12-03 17:18:53 +01:00
simon lehericey
6391f7ff9c Work on notify_near_deletion mailer 2019-12-03 17:18:53 +01:00
simon lehericey
03b7e81ca4 Send deletion notice for near expired brouillon 2019-12-03 17:18:53 +01:00
Pierre de La Morinerie
3212dfddca app: allow hiding the browser banner for one week 2019-12-03 16:09:18 +01:00
Pierre de La Morinerie
fb3f82074d Hide the suggestions when the user corrects the address 2019-12-03 14:06:11 +01:00
Pierre de La Morinerie
1d1260060e Fix the tests by using event delegation 2019-12-03 14:06:11 +01:00
clemkeirua
849008231c ajout de test capybara 2019-12-03 14:06:11 +01:00
Paul Chavard
7b947feae4 Rename demarche archivée to demarche close 2019-11-28 15:07:16 +01:00
Paul Chavard
3e334a3306 Drop test_started_at
# Conflicts:
#	spec/models/procedure_spec.rb
2019-11-28 14:17:47 +01:00
Pierre de La Morinerie
e7dd9e36d6 specs: fix Capybara warning
Capybara logs several warnings during tests:

> Locator Integer:243 for selector :link must be an instance of String
> or Symbol. This will raise an error in a future version of Capybara.

This is because we use selectors like `have_link(dossier.id)`, where the
locator is a Number (instead of a String or Symbol).
2019-11-28 12:09:12 +01:00
simon lehericey
6657459f9c Fix add instructeur with empty mail
As select2 does not handle required attribute, we can only add server side logic
2019-11-27 14:39:16 +01:00
Paul Chavard
e9f993fe0c [GraphQL]: normalize date names in French 2019-11-27 12:23:00 +01:00
Pierre de La Morinerie
a328e8d94a features: refactor the editor specs
- Add an `add_champ` helper
- Stop relying on a default champ being created
- Wait for all champs to be created by watching the "Add champ" button 

This should fix the flakiness of these tests.

Refs #4417
2019-11-27 11:58:46 +01:00
Pierre de La Morinerie
d0cd875e91 features: add a leave_browser_open helper 2019-11-27 11:58:45 +01:00
Pierre de La Morinerie
0ef4a5253c features: move feature matchers to their own file
This allows to have the same syntax than native Capybara matchers.
2019-11-27 11:58:45 +01:00
maatinito
9de9a1fd71 Use time.zone functions instead of server time functions
(Time.zone.today vs Date.today)
2019-11-26 14:26:36 +01:00
maatinito
14bc2b99b9 auto-archive badly occurs in UTC time and not in local time (1 hour too late in France, 10 hours before in Tahiti ;-) 2019-11-25 14:39:42 +01:00
clemkeirua
789fcf72ca ajout d'un test automatisé 2019-11-25 10:37:10 +01:00
Pierre de La Morinerie
1de4ef8a9a specs: fix error in routing feature test by waiting for Turbolinks 2019-11-21 18:37:51 +01:00
Pierre de La Morinerie
b78134c691 specs: make the routing feature test more robust
- Use human-readable form labels
- Always wait for the result of the previous action to be loaded before
  starting another action
2019-11-21 18:29:45 +01:00
Pierre de La Morinerie
68f5aae99d autosave: add feature test 2019-11-21 14:00:06 +01:00
Paul Chavard
0c6705f7fd Drop old export service 2019-11-21 10:25:40 +01:00
Christophe Robillard
b42f21264e permet le suivi auto après envoi instructeur
Close #4163
2019-11-20 16:41:30 +01:00
Pierre de La Morinerie
8b8a96abda dossiers: save draft by default (instead of submitting)
Make the default behavior of `update_brouillon` be to update the draft,
instead of submitting the dossier.

This makes all requests made to `update_brouillon` without specifying
an extra `submit_draft` parameter to just save the draft. It will make
autosaving the draft easier and safer.
2019-11-20 11:24:31 +01:00
simon lehericey
dae7a3bfd0 [fix #4529] Log user email in manager space 2019-11-19 12:15:03 +01:00
Paul Chavard
e600aceccc [GraphQL]: add dossier state change mutations 2019-11-19 11:51:34 +01:00
simon lehericey
4b62c9267a fix flaky test 2019-11-18 17:26:28 +01:00
simon lehericey
361e57355a Spec: full_scenario use js 2019-11-18 17:08:51 +01:00
simon lehericey
8a42b9f97a Add groupe instructeur mailer preview 2019-11-18 17:08:51 +01:00
simon lehericey
9ca026a630 Use a select2 box for looking to instructeurs 2019-11-18 17:08:51 +01:00
Paul Chavard
ba03dbf8dd [GraphQL] Add dossierEnvoyerMessage mutation 2019-11-13 19:54:27 +01:00
Paul Chavard
f0ac01bf19 [GraphQL]: test unauthorized mutation 2019-11-13 19:54:27 +01:00
Paul Chavard
ea6667ff9f [GraphQL]: démarche and dossier number should be a number 2019-11-13 15:53:56 +01:00
Paul Chavard
fa741c9bae [GraphQL]: do not return dossiers brouillons 2019-11-07 22:07:42 +01:00
Paul Chavard
990c867c2e [GraphQL] Add more filters to dossiers 2019-11-07 22:07:42 +01:00
Paul Chavard
f22b39b7c5 Handle non unique champ repetable labels
fix #4466
2019-11-07 14:27:52 +01:00
Paul Chavard
2a61ed5b1c Export etablissement information in csv
fix #4440
2019-11-07 14:27:52 +01:00
Paul Chavard
4231b81727 [GraphQL] Add create direct upload mutation 2019-11-07 12:48:51 +01:00
simon lehericey
9469734f29 Follow flipper name convention to appears on manager admin page 2019-11-07 11:09:05 +01:00
clemkeirua
7f76ab6671 disable retry sending a mail with an invalid email adress 2019-11-07 10:11:48 +01:00
Paul Chavard
0562e2728f Fix type_de_champ validation error 2019-11-06 12:54:07 +01:00
Pierre de La Morinerie
8df91df9fa assigns: strip and lowercase the search filter 2019-11-06 12:16:30 +01:00
Pierre de La Morinerie
0eeac59ecd assigns: fix search among the unassigned instructeurs
This was broken since moving the email out of the Instructeur column.
2019-11-06 12:16:30 +01:00
Paul Chavard
efd03f0169 Use webdrivers gem to keep webdrivers updated 2019-11-06 11:20:40 +01:00
simon lehericey
395aba8bbc Remove administrateur active notion 2019-11-05 14:10:39 +01:00
simon lehericey
5643e671a0 Code use user.active? 2019-11-05 14:10:39 +01:00
simon lehericey
b193dd1465 User get the active notion 2019-11-05 14:10:39 +01:00
simon lehericey
aeb44dd2aa Cleaning spec 2019-11-05 10:29:39 +01:00
simon lehericey
e3d7688e66 [fix #4473] Invite_administrateur!: do not reset password if the user is active 2019-11-05 10:29:39 +01:00
simon lehericey
53c7997081 Invite_administrateur!: characterization test 2019-11-05 10:29:39 +01:00
Pierre de La Morinerie
f63cd86811 webhook: fix a crash when the Helpscout customer is unknown 2019-11-04 18:36:52 +01:00
Pierre de La Morinerie
a458693a19 specs: fix #usual_traitement_time tests when near the DST date 2019-11-04 10:56:15 +01:00
Pierre de La Morinerie
f8358b3ae9 instructeurs: create without providing the email 2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
f131dbb80d instructeurs: make the create form not using email directly
Before the form attempted to read an email value from the Instructeur
model, and failed (because the empty Instructeur had no user yet).

We could let `Instructeur#email` return `nil` if there is no User –
but as a created Instructeur is always supposed to have a User, this
seems like a nice safeguard to keep.

So instead this commit rewrites the create form, which now doesn’t
depend on an Instructeur model. Seems easy enough for now.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
d78d206544 instructeurs: fix expert creation not to use Instructeur.email
It kind of worked until now, because the email field is disabled, and
thus never accessed.

But better make it clean, by accessing an object (User) where the email
field actually exists.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
38f994a151 instructeurs: fix mailer previews not to use Instructeur.email
Mailers previews now create mock Instructeurs without directly accessing
the email.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
8e6930d257 instructeurs: fix ProcedurePresentation to use instructeur.user.email
The `joins` are declared explicitely in order to associate a predictable
name to the joined table.

Otherwise, when the query is joined with `:users`, ActiveRecord will
alias the join automatically  to solve the conflict. Unfortunately, the
automatic resolution means that the table name becomes unpredictable,
and thus unsuitable to perform queries on.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
a462edb9bc instructeurs: alias instructeur.email
This also means we need to replace instances of `pluck` on the email
column.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
cd478b489e instructeurs: replace calls to Instructeur.find_by(email: …) 2019-11-04 10:44:23 +01:00
Paul Chavard
839b0d7e6d Add Entreprise raison sociale to dossier export
fix #4422
2019-10-31 17:11:46 +01:00
Pierre de La Morinerie
1c61f2de58 views: refactor the attachment/edit view
Make it more reusable, by:

- Renaming `attachment/update` to `attachment/edit`
- Refactoring the CSS styles into their own stylesheet
- Allow to specify the 'accept' option
2019-10-31 10:27:19 +01:00
Pierre de La Morinerie
5be83bd01e procedure: make the layout more similar to the mockup 2019-10-31 10:27:19 +01:00
Nicolas Bouilleaud
72b7ff221c move procedure to new design 2019-10-31 10:27:19 +01:00
simon lehericey
477f7c9837 Remove instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
79b808470c Add instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
94081a3997 Show Groupe Instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
4491dca19a Index Groupe Instructeur 2019-10-30 14:27:51 +01:00
simon lehericey
07aefdd40b Fix test in new_admin/groupe_instructeur_controller 2019-10-30 14:27:51 +01:00
simon lehericey
cba9ffb753 full_scenario extended with notifications controle 2019-10-25 09:42:17 +02:00
simon lehericey
4febf1851f notifications_for_procedure is now based on instructeur.groupe_instructeurs 2019-10-25 09:42:17 +02:00
simon lehericey
e290fc3674 No need to update column as the sign_up process activates the user 2019-10-24 18:32:48 +02:00
simon lehericey
8ae592fe25 [fix #4361] administrateur active 2019-10-24 18:32:48 +02:00
Pierre de La Morinerie
5fc88eb6a2 specs: fix a flaky repetitions test
The test would sometime fail when the two fields are created in a
different order than expected.
2019-10-24 16:52:29 +02:00
simon lehericey
e97c705628 Add end to end spec 2019-10-23 21:47:20 +02:00
simon lehericey
90ae4181bf fix dossier_linked_path in routed procedure 2019-10-23 21:47:20 +02:00
simon lehericey
35bba62297 Update routing critéria name 2019-10-23 21:47:20 +02:00
simon lehericey
a5ffe9f54b Remove instructeur from the group 2019-10-23 21:47:20 +02:00
simon lehericey
a6deafd885 Add instructeurs to groupe 2019-10-23 21:47:20 +02:00
simon lehericey
3dd3af8482 Groupe instructeur update 2019-10-23 21:47:20 +02:00
simon lehericey
9a6336f508 Groupe instructeur create 2019-10-23 21:47:20 +02:00
simon lehericey
733e83cc54 Groupe instructeur show 2019-10-23 21:47:20 +02:00
simon lehericey
2749c00ce3 Groupe instructeur index 2019-10-23 21:47:20 +02:00
simon lehericey
1fa149575c Add constraints to GroupeInstructeur 2019-10-23 21:47:20 +02:00
Paul Chavard
86b271997b Invite experts to linked dossiers
closes #3669
2019-10-23 13:10:09 +02:00
clemkeirua
ad785278af add mailer test 2019-10-22 09:51:14 +02:00
clemkeirua
43424e4f4e merge with the work of paul, using 3 links 2019-10-22 09:51:14 +02:00
Pierre de La Morinerie
f0c2599d18 specs: improve feature spec for experts
- Move the avis feature spec to a separate file
- Add more test cases
2019-10-21 12:57:10 +02:00
Pierre de La Morinerie
ec6ec6f4aa specs: improve avis factory
The instructeur, dossier and claimant where created regardless of
wether they already existed or not.

With this commit:

- Associations are declarated in a more idiomatic way
- They are correctly not created if they are provided when creating the
object.
2019-10-21 12:57:10 +02:00
Pierre de La Morinerie
a56dc0f653 specs: re-order method in feature helpers 2019-10-21 11:45:03 +02:00
Pierre de La Morinerie
0807fed258 specs: rename instructeur_spec.rb to instruction_spec.rb
This clarifies the difference between this spec and the other
instructeur specs in the same directory.
2019-10-21 11:27:35 +02:00
simon lehericey
18de25fac7 Display the dossier.groupe_instructeur.label on various screens 2019-10-17 15:48:14 +02:00
Pierre de La Morinerie
db0fede521 views: improve the state button
- Turn the "accepted" infos into standard dropdown sections
- Display the justificatif even if there is no motivation
2019-10-15 12:48:14 +02:00
Pierre de La Morinerie
dd57953b76 views: refactor the state button
Now that all states have a dropdown, we can simplify the code.

This also brings the "Repasser en instruction" action for all states
(including when no attestation or motivation is present).
2019-10-15 12:48:14 +02:00
Pierre de La Morinerie
07f75ff20e views: fix missing attestation link
- Fix the missing link to see attestations (see #4400)
- Fix the "Repasser en instruction" wording being confusing for
  accepted state
- Add lot of tests
2019-10-15 12:48:14 +02:00
Pierre de La Morinerie
0e5f66c5ba views: make the "Voir l'attestation" UI simpler
Instead of adding a button, just turn the "attestation" text into a link
2019-10-15 12:41:37 +02:00
Pierre de La Morinerie
0064c2c610 views: tell an attestation will be sent only if it is true
Previously the message stating "an attestation will be sent" was
displayed even when the attestation was disabled.
2019-10-15 12:41:37 +02:00
Pierre de La Morinerie
c2e82e4145 champ_policy: allow instructeurs to access private annotations
Fix #4388
2019-10-08 14:34:12 +02:00
simon lehericey
725798da6a [fix #4361] Update user table sign_in 2019-10-08 10:09:16 +02:00
Paul Chavard
e7ed408e08 Auto-link valeur des champs
closes #2865
2019-10-07 21:20:24 +02:00
Paul Chavard
2c486b8fe2 Bump some javascript dependencies 2019-10-07 15:40:27 +02:00
clemkeirua
053cc5cfc5 [fix #4058] instructeur peut passer accepte → instruction 2019-10-07 15:17:33 +02:00
Paul Chavard
3f36153807 [GraphQL] Add groupe_instructeurs to demarche 2019-09-26 11:25:14 +02:00
Nicolas Bouilleaud
03c950ea97 Move followed_dossiers_with_notifications to a Dossier scope
Instead of instructeur.followed_dossiers_with_notifications, we can now write instructeur.followed_dossiers.with_notifications.

Yay composition!
2019-09-25 14:10:00 +02:00
Nicolas Bouilleaud
a4166d3c57 Refactor Instructeur.notifications_* methods
- rename `dossiers_id_with_notifications` to `followed_dossiers_with_notifications`,
- rename `notifications_per_procedure` to `procedures_with_notifications`,
- return an ActiveRecord::Relation instead of the result of the query, so that the call place can compose it,
- `merge` with the wanted Dossier scope in the call places, don’t bother passing it as a parameter,
- use the “state” (now “scope”) parameter as a scope method that can be just applied on `Dossier`.
2019-09-25 14:10:00 +02:00
Paul Chavard
4b885f7a12 Add basic graphql test 2019-09-24 10:47:21 +02:00
Paul Chavard
5a7eb734ff Dump graphql schema for reference 2019-09-24 10:47:21 +02:00
Nicolas Bouilleaud
f74fde3f80 Avoid sending notification emails about archived dossiers 2019-09-20 11:06:33 +02:00
Nicolas Bouilleaud
a2131d0fcc Don’t unfollow when archiving
It was slightly broken in two ways:
- it doesn’t make other instructeurs unfollow the dossier
- if the dossier is unarchived, instructeurs don’t refollow automatically.
2019-09-20 11:06:33 +02:00
Nicolas Bouilleaud
769621de46 Explicitly pass the “state” param in notifications_*_procedure methods 2019-09-20 11:06:33 +02:00
simon lehericey
a2f82ab8be Add groupe_instructeur_label to export v2 2019-09-19 12:30:12 +02:00
simon lehericey
f577484aa2 Add groupe_instructeur_label to export v1 2019-09-19 12:30:12 +02:00
simon lehericey
8660d4af30 Instructeur: only export its dossiers 2019-09-19 12:24:40 +02:00
simon lehericey
e2acb0a946 ProcedurePresentation: can use groupe instructeur 2019-09-18 15:51:02 +02:00
simon lehericey
f5bbc9e2f9 InstructeurProcedureShow: show dossier for all the gi involved 2019-09-18 15:51:02 +02:00
simon lehericey
9b16bd2037 Dossier: retrieve all dossiers for a procedure 2019-09-18 15:51:02 +02:00
simon lehericey
21577a0f0b Instructeur: dedup procedures with multiple gi 2019-09-18 15:51:02 +02:00
Paul Chavard
8fcf1353f3 Remove duplicated attachments 2019-09-17 18:12:53 +02:00
simon lehericey
dec42e4886 Instructeur procedure index: show stats by procedure
Also sum the count from differents groupe_instructeur from the same procedure
2019-09-17 17:19:14 +02:00
simon lehericey
d338f9b9f3 Factory: can create a dossier with a defined gi 2019-09-17 17:19:14 +02:00
Paul Chavard
11b4698ef3 Fix test 2019-09-17 16:58:11 +02:00
pedong
d2a78abc3a [fix #3975] set buttons floating in dossier page 2019-09-17 16:58:11 +02:00
Nicolas Bouilleaud
78da268ded Improve feature tests for procedure cloning and creation 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
543f9894c1 Make sure the “commencer” link uses the proper test path 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
c26a701a17 Refactor and redesign publish modal
* remove the autocomplete menu
* use ujs to pre-validate the procedure
* tweak the UI
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
bd1e0aba38 Add Procedure path suggestion 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
00c37eccb3 Simplify procedure.path and publish event
* Get rid of the “reopen” event, merge it with “publish” (it’s the same code)
* Remove the “availability” states; “available with brouillon” makes no sense since the brouillons path are always uuids
* Instead of checking if publish can happen, just try it and handle the errors
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
92e6032115 Remove path availability dead code when creating/editing a procedure
There’s no “path” field anymore in the Procedure form, it can only be set when publishing.
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
8fa630d2bb Remove Gestionnaire.visible_procedures
It is actually the same thing as Gestionnaire.procedures. It already included the procedures with paths as well as the archived procedures, and in production, there were no Gestionnaire for who procedures was returning a different result than visible_procedures (expect for two baddata brouillon procedures with a nil path).

In addition, Procedure.path is now nonnull, which means the Procedure.avec_lien scope is pointless.

Finally, the current spec showed that the only procedure not visible to the gestion was the one he was not assigned to.
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
e9c6ed80e4 Migration: Index and make Procedure.path nonnull 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
fc416ee2ec Fix procedure_locked_spec
`login_as administrateur, scope: :administrateur` doesn’t seem to actually do anything, but testing for the _absence_ of content can’t break.

- Make the test fail if login fails,
- Fix the login,
- Write the opposite test,
- Update the searched content to the actual text used in the partial
2019-09-17 14:50:37 +02:00
clemkeirua
949a0c21e6 gestion des 2 formats de bouton monavis 2019-09-17 13:39:45 +02:00
Paul Chavard
ff2b6ca3ea Fix service controller 2019-09-17 12:37:37 +02:00
Paul Chavard
8a691d534a Fix AdministrateurUsageStatisticsService 2019-09-17 12:37:37 +02:00
Paul Chavard
adfa80142a Cleanup application_controller and current_user 2019-09-17 12:37:37 +02:00
Paul Chavard
b97cbd3402 Serialize champ repetition for tags
closes #4272
2019-09-12 17:23:18 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00
Pierre de La Morinerie
503c393a87 helpscout: use replies_sent to compute contact rate
The `conversations_count` we previously used counts replies, but also
all conversations that were tagged or re-tagged during the month – with
made counting the actual work spent on user support brittle.

Counting the replies is a better estimation of what we get.

Unfortunately this also removes the filtering-by-tag feature. To
mitigate this, the reports are now scoped to a specific mailbox. This
allows to create extra mailboxes for conversations that should't be
counted in the stats.
2019-09-11 17:26:10 +02:00
Paul Chavard
c370c2f475 Cleanup FlipFlop 2019-09-10 23:52:44 +02:00
Pierre de La Morinerie
d94a5cee8e spec: during js specs, cleanup database using deletion
This attempts to solve the database deadlock on cleanup by fiddling
with the settings.

Ref #4293
2019-09-10 16:40:02 +02:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
clemkeirua
feb9c32537 search attachments inside bloc repetables 2019-09-10 15:30:44 +02:00
Paul Chavard
347f03d2a9 Redirect to pdf attachement old name if not attached 2019-09-10 15:06:47 +02:00
Paul Chavard
3eb3ae001e Rename “Passé en construction le” to 'Déposé le' for clarity 2019-09-10 14:59:10 +02:00
Chaïb Martinez
dd6c6bfe7a mailers: add a NO_REPLY address to transactional emails 2019-09-10 13:37:28 +02:00
Pierre de La Morinerie
aa1cf6788b mailers: turn revert_to_instruction into a notification email 2019-09-10 13:29:06 +02:00
pedong
25596ca2f2 [fix #4181] add service to procedure API 2019-09-10 11:06:28 +02:00
Paul Chavard
7ffb98e616 Remove carrierwave uploaders 2019-09-10 10:49:12 +02:00
Pierre de La Morinerie
2724f4667b groupe_instructeur: unsassign instructeurs on group destroy
Fix #4282
2019-09-09 17:29:29 +02:00
simon lehericey
b9f35a9763 ensure that the task is idempotent 2019-09-09 14:08:09 +02:00
simon lehericey
875313e01e add defaut groupe instructeur to hidden procedure 2019-09-09 13:41:08 +02:00
simon lehericey
3ead6bde9d AfterParty: link dossier and groupe_instructeur 2019-09-03 06:51:38 +02:00
simon lehericey
ad7ef6c739 Link assign_to and procedure by groupe_instructeur 2019-09-03 06:47:02 +02:00
simon lehericey
d582af0962 Fix Instructeur Procedure Index 2019-09-03 06:47:02 +02:00
simon lehericey
d0bfb62fec Procedure Factory: use procedure.new_dossier 2019-09-03 06:47:02 +02:00
simon lehericey
6cbdba2665 Dossier Factory: link procedure by defaut_groupe_instructeur
Oblige to create procedure or dossier to access groupe_instructeur
2019-09-03 06:47:02 +02:00
simon lehericey
74096b6b3a Assign Factory: automatically link to procedure.defaut_groupe_factory 2019-09-03 06:47:02 +02:00
simon lehericey
a0555bc820 Remove obsolete tasks 2019-09-03 06:47:02 +02:00
simon lehericey
3cc8f0c792 Link Dossier and GroupeInstructeur 2019-09-03 06:47:02 +02:00
simon lehericey
eb75a563b8 Fix old after_party spec 2019-09-02 11:41:12 +02:00
simon lehericey
a2061fba79 wording 2019-09-02 11:41:12 +02:00
simon lehericey
caf1fbca44 Use assign_to 2019-09-02 11:41:12 +02:00
simon lehericey
31cb056351 Procedure: remove direct instructeurs access
Add shortcut for the spec to assign instructeurs directly to the defaut groupe
2019-09-02 11:41:12 +02:00
simon lehericey
b541ef0b41 Procedure has many instructeurs with defaut_groupe_instructeur 2019-09-02 11:41:12 +02:00
simon lehericey
ba24958035 Procedure add missing_instructeurs? 2019-09-02 11:41:12 +02:00
simon lehericey
85499365a0 Instructeur has_many procedures through groupe_instructeur 2019-09-02 11:41:12 +02:00
simon lehericey
25991c2892 Assign a procedure assign a group as well 2019-09-02 11:41:12 +02:00
simon lehericey
115d91387c A procedure has a default groupe instructeur 2019-09-02 11:41:12 +02:00
clemkeirua
4032fc61e3 move to only one pipedrive account 2019-08-28 12:16:25 +02:00
Paul Chavard
15148a4fe1 Fix invalid characters in repetition champs sheet_name for xls export 2019-08-28 10:47:58 +02:00
Paul Chavard
079ffadfce Attestation files migration task 2019-08-27 17:43:06 +02:00
Paul Chavard
a19b10b118 Migrate attestation files to active_storage 2019-08-27 17:42:52 +02:00
clemkeirua
188e0fd6b2 removed ask_birthday for new procedures & dossiers 2019-08-27 15:32:17 +02:00
simon lehericey
7b9b90a3e0 [fix #4238] When the token does not exist, redirect to home page without sending a new link 2019-08-27 15:01:46 +02:00
simon lehericey
7ffad1e6ae Spec: factorize 2019-08-27 15:01:46 +02:00
simon lehericey
e9cabafcc5 Spec: resend token if it's invalid 2019-08-27 15:01:46 +02:00
Chaïb Martinez
8ad79d3235 New signup test
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-08-27 10:45:26 +02:00
Paul Chavard
d02e0fc556 Fix and test migrate_procedure_logo task 2019-08-22 11:28:03 +02:00
simon lehericey
fc7ce3fe61 Fix capybara on linux ubuntu
Otherwise, it appears fullscreen
2019-08-21 17:38:54 +02:00
Paul Chavard
cc35a04e26 Migrate procedure logo to active_storage 2019-08-21 11:15:00 +02:00
simon lehericey
eb2ebee16e fix flaky spec in ip_service_spec 2019-08-20 16:41:32 +02:00
simon lehericey
86d968bb8e Use rack_attack_enabled?
We cannot enable rack attack during the tests as it interferes with features spec.
So we add a flag to enable it during the runtime.
2019-08-20 13:29:29 +02:00
simon lehericey
0f0fecdb25 RackAttack: use remote ip and test it ! 2019-08-20 13:29:29 +02:00
simon lehericey
b7f8bb2fea Simplify ip_service 2019-08-20 13:29:29 +02:00
simon lehericey
e0e29d741f Simplify instructeur and administrateur factory 2019-08-20 12:20:12 +02:00
simon lehericey
97d0855d47 add User.create_or_promote_to_instructeur 2019-08-20 12:20:12 +02:00
simon lehericey
ebe871819d Fix admin deletion by an administration 2019-08-20 12:01:36 +02:00
simon lehericey
77c11d8b79 fix_procedure_presentation 2019-08-20 11:28:18 +02:00
Paul Chavard
e9ba7700d4 Remove commentaire file uploader 2019-08-20 10:24:13 +02:00
simon lehericey
80cb8b87fe Keep only the FC logic and use devise for the rest 2019-08-16 16:48:22 +02:00
simon lehericey
54d7effe28 Spec: specify france_connect logic 2019-08-16 16:48:22 +02:00
simon lehericey
4be9c79e03 Spec : specify remember me 2019-08-16 16:48:22 +02:00
simon lehericey
08bb393ced Spec: specify locked logic 2019-08-16 16:48:22 +02:00
simon lehericey
1b14d85c77 Rerender if wrong credentials 2019-08-16 16:48:22 +02:00
simon lehericey
9a6b3c3757 Spec: specify the redirections when logged in 2019-08-16 16:48:22 +02:00
simon lehericey
56d34173e6 Spec: remove multi devise account tests 2019-08-16 12:04:54 +02:00
simon lehericey
95cd301d0d Spec: remove superfluous code 2019-08-16 11:47:53 +02:00
simon lehericey
f87e316a5d Spec: remove outdated trusted_device logic
This is tested on the application controller
2019-08-16 11:45:40 +02:00
simon lehericey
58ecf18390 ActivateController: add tests and clean a bit 2019-08-16 11:22:36 +02:00
simon lehericey
972b6793f7 Remove useless sessions_controller 2019-08-14 18:04:26 +02:00
simon lehericey
7fbedb78fb Add feature spec about managing passwords (with the courtesy of kemenaran) 2019-08-14 17:27:10 +02:00
simon lehericey
149b0b5797 Fix Sign out 2019-08-14 16:58:50 +02:00
simon lehericey
e3e6bc7689 ! NEED JOB REBOOT Move remind activation logic to user 2019-08-14 16:34:50 +02:00
simon lehericey
dc816472e9 Stub administrateur devise methods in spec 2019-08-14 16:34:50 +02:00
simon lehericey
d0ac1c3301 Fix manager invite administrateur 2019-08-14 16:34:50 +02:00
simon lehericey
c08e356367 Remove or fix nonsense code 2019-08-14 15:08:14 +02:00
simon lehericey
c380d807ab Spec: sign_in with administrateur.user 2019-08-14 15:08:14 +02:00
simon lehericey
1b38d4071d temporary remove password complexity check 2019-08-14 15:06:16 +02:00
simon lehericey
27c81c1992 Update administrateur factory 2019-08-14 15:06:16 +02:00
Paul Chavard
e68d2cf5e2 Enable champ repetition for all 2019-08-14 12:53:51 +01:00
Paul Chavard
0969b1f85f Enable email_login_token for all gestionnaires 2019-08-14 12:53:51 +01:00
simon lehericey
a9128895a2 Something wrong with stored location which prevent instructeur to be redirected to user procedure path 2019-08-13 15:15:16 +02:00
simon lehericey
640e3668a8 Strange session ... 2019-08-13 15:15:16 +02:00
simon lehericey
8fa3c9e4f7 Fix expert invitation 2019-08-13 15:15:16 +02:00
simon lehericey
fdbfd3bb42 Add feature spec on instructeur invitation 2019-08-13 15:15:16 +02:00
simon lehericey
5fdac38cb2 Fix instructeur invitation 2019-08-13 15:15:16 +02:00
simon lehericey
ad31822a68 Spec: sign_in with instructeur.user 2019-08-13 15:15:16 +02:00
simon lehericey
65a53909e1 Update instructeur factory 2019-08-13 15:15:16 +02:00
simon lehericey
47b7dc368b Remove or fix now nonsense code 2019-08-13 15:15:16 +02:00
simon lehericey
0d71a820a8 Stub instructeur devise methods in spec 2019-08-13 15:15:16 +02:00
simon lehericey
e3fd1cc33a Remove weird switch_devise_profile_service 2019-08-13 15:15:16 +02:00
Pierre de La Morinerie
79784089a4 dossiers: refresh the whole header actions bar on status change
This ensure the other state-dependant buttons get updated to–like the
"Follow" or "Archive" button.

Fix #4186
2019-08-13 15:07:22 +02:00
simon lehericey
5bda753735 Remove all devise route and controller for instructeur and administrateur 2019-08-13 14:13:48 +02:00
simon lehericey
a4b9eecded Remove unused devise session controller 2019-08-13 14:13:48 +02:00
simon lehericey
3fde2a6f70 Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
simon lehericey
6902f84b85 Brutally rename gestionnaire filename to instructeur 2019-08-12 13:47:01 +02:00
simon lehericey
bb8d65c6b4 Subtly rename admin/instructeurs to admin/assigns 2019-08-12 13:47:01 +02:00
simon lehericey
f7528f70ac add admin creation spec 2019-08-12 13:43:03 +02:00
clemkeirua
6c56fc73d7 used new constant for genders 2019-08-01 20:46:58 +02:00
clemkeirua
d7105cb6f8 added spec for dossier#update_with_france_connect 2019-08-01 17:42:32 +02:00
clemkeirua
6c52c71eee add redirection spec for dossier_controller#new 2019-08-01 17:42:32 +02:00
maatinito
44efa5a1b1 #3928 administrator tests handle password constants 2019-08-01 17:12:14 +02:00
maatinito
8d3e3baabc #3928 administrator new & edit pwd pages 2019-08-01 17:12:14 +02:00
Paul Chavard
02904f55b1 Fix champ policy 2019-08-01 16:41:53 +02:00
Paul Chavard
b8d3e4c41b Fix attestation url for dossiers with no attestation 2019-08-01 15:53:50 +02:00
Pierre de La Morinerie
6459e9cf37 tasks: fix the commentaires migration task to work with hidden dossiers
By default `commentaire.dossier` doesn't return the dossier if it is
hidden.
2019-08-01 15:43:09 +02:00
Paul Chavard
c75e39884e Save selection utilisateur as geo area 2019-08-01 11:38:09 +02:00
clemkeirua
f5d3818e3c remove unnecessary retransition methods 2019-08-01 10:40:08 +02:00
Keirua
2f82dd9a3d improve typography and texts
Co-Authored-By: Nicolas Bouilleaud <nico@bou.io>
2019-08-01 10:29:51 +02:00
clemkeirua
38b48f4217 transition from accepte to instruction as superadmin 2019-08-01 10:29:51 +02:00
Paul Chavard
b266915892 Add repetitions to api 2019-08-01 10:04:35 +02:00
Paul Chavard
fba195c0b5 Add attestation url to dossier on api 2019-07-31 18:30:40 +02:00
Paul Chavard
6cfad01d12 Stop using Flipflop as switch for weekly_overview 2019-07-31 15:15:09 +02:00
Paul Chavard
25db21467d Stop using Flipflop as switch for Fog 2019-07-31 15:15:09 +02:00
Paul Chavard
6f3fde21f2
Merge pull request #4139 from Keirua/fix/confirm-on-delete-champ
#4137 - Ajout d'un confirm à la suppression d'un champ
2019-07-31 12:31:44 +02:00
Paul Chavard
fc75580a3c Start using pundit 2019-07-30 18:09:28 +02:00
Paul Chavard
8c72470a6c Add default etablissement champ name 2019-07-30 17:17:36 +02:00
Paul Chavard
5a9468aa95 Fix repetition data export 2019-07-30 17:17:36 +02:00
Pierre de La Morinerie
02a5234bde lib: remove FileSizeValidator
It was only used by the PieceJustificative model.
2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
65e7489b4f uploaders: remove PieceJustificativeUploader 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
95e24392f9 models: remove old pieces justificatives 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
0da0a2b446 model: remove support for cloning procedures with old pj 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
ffe081c1f2 specs: remove old pieces_justificative from specs and factories 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
f69f325236 api: remove export of old pieces justificatives 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
e975fe4ade tasks: remove task to migrate old pieces justificatives 2019-07-30 16:11:17 +02:00
Pierre de La Morinerie
0018f36b44 gestionnaire: remove UI for filtering pieces justificatives 2019-07-30 16:11:16 +02:00
Pierre de La Morinerie
f825f62ce5 dossier: remove UI for viewing old pieces justificatives 2019-07-30 16:11:16 +02:00
Pierre de La Morinerie
5502f2e42e dossier: remove UI for uploading old pieces justificatives 2019-07-30 16:11:16 +02:00
Pierre de La Morinerie
0c4cb3b498 admin: remove UI for managing old pj 2019-07-30 16:11:16 +02:00
Nicolas Bouilleaud
b066ccbc89 Make sure Procedure.path is not null in our data 2019-07-29 13:53:33 +02:00
clemkeirua
314b0f5dc0 fix tests 2019-07-25 17:15:19 +02:00
clemkeirua
6f47655301 rendu lien_site_web obligatoire au moment de la publication 2019-07-25 15:46:04 +02:00
clemkeirua
6b19432d47 deplacement de l'URL qui envoie vers la procédure 2019-07-25 15:46:04 +02:00
Pierre de La Morinerie
2174172e34 admin: display CTA buttons in emails preview 2019-07-25 12:25:50 +02:00
Pierre de La Morinerie
1c837eb901 mailers: improve wording of transactional emails and default templates 2019-07-25 12:25:50 +02:00
Pierre de La Morinerie
8313752663 mailers: add CTA to templated emails 2019-07-25 12:25:50 +02:00
clemkeirua
12f1a29b68 update tests 2019-07-25 11:13:30 +02:00
clemkeirua
0818331319 changement du endpoint dans les tests 2019-07-23 16:21:15 +02:00
Pierre de La Morinerie
858b093314 mailers: use the standard view mechanism to render notifications
Instead of rendering a view as a template, consider the view as a normal
view.
2019-07-23 14:53:50 +02:00
Pierre de La Morinerie
f32357f527 specs: avoid weird hacks to test NotificationMailer private method
- testing private methods is a code smell
- this setup is especially brittle
- we test the equivalent public method right below
2019-07-22 16:22:20 +02:00
clemkeirua
6d43465ee5 renammed into monavis_embed 2019-07-17 18:04:32 +02:00
clemkeirua
c8f9e3b5f8 automated test 2019-07-17 18:04:32 +02:00
clemkeirua
d8b63cd4c9 added 'monavis' inside the procedure and for users 2019-07-17 18:04:32 +02:00
Pierre de La Morinerie
71dfb38787 emails: improve typography of titles 2019-07-17 15:01:19 +02:00
Pierre de La Morinerie
44574b2b93 mailer_preview: improve data used for generating previews 2019-07-17 14:55:55 +02:00
Pierre de La Morinerie
5bafda6619 factories: fix unmatching MIME type in fixtures 2019-07-17 14:43:41 +02:00
clemkeirua
7eeddc0b79 using a shared example + scoped to state TERMINE 2019-07-17 11:53:16 +02:00
clemkeirua
b8fa567c81 ajout du tag 'lien document justificatif' 2019-07-17 11:53:16 +02:00
Pierre de La Morinerie
92dd91a31b messagerie: add a reply button next to the latest message 2019-07-17 11:43:21 +02:00
Pierre de La Morinerie
80efe27ff2 pj migration: retry when changing the content type fails 2019-07-16 17:51:29 +02:00
Pierre de La Morinerie
a8354bd103 dossiers: unify deletion of dossiers between manager and user
The code paths for deleting a dossier were different, depending on
whether the dossier was deleted by the user, or from the Manager.

This commit unifies the two code paths into one.

This has the effect of:

- An operation log is now recorded when an user deletes its own dossier;
- Gestionnaires are now notified even when the dossier is deleted from
  the Manager;
- The `support:delete_user_account` task now requires the email address
  of the author.
2019-07-16 16:22:20 +02:00
clemkeirua
25f81f1d3c download a dossier as zip with all attachments 2019-07-16 09:11:25 +02:00
Pierre de La Morinerie
36eca3d059 dossier: rename the "Submit" action 2019-07-15 17:18:28 +02:00
Pierre de La Morinerie
35c3795f56 dossier: make messagerie available on archived procedures
An Admin may archive a procedure to make it unavailable to
the general public, but before all dossiers are handled. In this case,
the messagerie needs to be available.

Fix #4089
2019-07-11 15:37:04 +02:00
Pierre de La Morinerie
10065df8ce champs: put champ label in numeric fields validation messages
Replaces

> La valeur du champ doit être un nombre entier (sans chiffres après
> la virgule)

by

> La valeur du champ « Nombre de parents » doit être un nombre entier
> (sans chiffres après la virgule)
2019-07-11 15:12:48 +02:00
simon lehericey
768a298c2d Same for go back in instruction 2019-07-11 12:50:15 +02:00
simon lehericey
5f39d3eac8 Fix bug when instruction repasse en construction twice 2019-07-11 12:50:15 +02:00
simon lehericey
6de1e2ec58 Fix bug when an instructeur closes a dossier already closed 2019-07-11 12:50:15 +02:00
Pierre de La Morinerie
c2c9b19b3b procedure: remove individual_with_siret
It isn't used anymore (see #3077)
2019-07-11 11:58:21 +02:00
Pierre de La Morinerie
7ca3d5fce2 procedure: select for_individual by default 2019-07-10 18:47:34 +02:00
simon lehericey
7b63ddfabb Better champs factories 2019-07-10 16:41:34 +02:00
Paul Chavard
be3283a9a8 Add commentaire pj migration task 2019-07-10 15:35:29 +02:00
Paul Chavard
3cb39c2840 Refactor message attachements to use active_storage 2019-07-10 15:35:29 +02:00
Pierre de La Morinerie
03fc555edf profile: send an email when the account is already taken 2019-07-10 11:31:09 +02:00
Pierre de La Morinerie
2b2493b0e6 profile: improve spec 2019-07-10 11:31:09 +02:00
Pierre de La Morinerie
58a8d017f2 spec: cleanup dossier spec 2019-07-10 11:31:09 +02:00
Pierre de La Morinerie
56bc06cfbf dossier: fix flaky spec for nearing_end_of_retention
If the spec takes longer than 1s to run, the test would fail.
2019-07-10 11:00:49 +02:00
Pierre de La Morinerie
6b27ac8514 france_connect: make existing user lookup case-insensitive
Fix #4053
2019-07-09 15:50:28 +02:00
Pierre de La Morinerie
d05bab3df3 france_connect: refactor specs 2019-07-09 15:50:28 +02:00
Pierre de La Morinerie
b5ed74c09d dossiers: always allow to create a new dossier
Turns out this is confusing for users (some UI elements are present for
some procedures, but not for others).

Better enable it for everyone.
2019-07-09 14:44:30 +02:00
simon lehericey
d36f6ebcd7 [fix #1709] A user can change its email 2019-07-09 11:55:17 +02:00
simon lehericey
0f9fdf3f75 Activate device email change confirmation 2019-07-09 11:55:17 +02:00
simon lehericey
d68d2be798 Profil: accessible to all roles 2019-07-09 11:55:17 +02:00
Paul Chavard
ad0a74ea7c Fix dates in dossiers export 2019-07-09 10:02:08 +02:00
Pierre de La Morinerie
422f4b9cdb dossiers_controller: warn properly when instructing a dossier twice
Fix #4055
2019-07-08 17:58:45 +02:00
Nicolas Bouilleaud
fac20ed190 Fix Commentaire factory so that the default case creates a valid object 2019-07-08 16:13:43 +02:00
Nicolas Bouilleaud
930fd345de Validate messagerie_available? when creating a new Commentaire
Commentaires bu Users and Gestionnaire need the messagerie to be available; Automatic system Commentaires can be created anytime.

This reintroduces Commentaire validation that was introduced in #3979 and disabled in #4018
2019-07-08 16:13:43 +02:00
Nicolas Bouilleaud
3f439ac07a Add Commentaire.is_sent_by_system? and .is_sent_by(someone)
And use it in CommentaireHelper and in the _message_icon and _message_issuer partials
2019-07-08 16:06:44 +02:00
Nicolas Bouilleaud
2abd93d360 Display the full User email in Commentaires
* Only redact gestionnaires’ emails
* Also, rename Commentaire.sender to Commentaire.redacted_email
2019-07-08 16:06:44 +02:00
Chaïb Martinez
39a2eb77e8 test fix
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-08 14:58:32 +02:00
Paul Chavard
e582ff729c Add aasm to dossiers state 2019-07-03 13:37:27 +02:00
Mathieu Magnin
10d3ba10f2 Before save copy body in rich_body 2019-07-03 13:15:49 +02:00
Mathieu Magnin
d13b7f953f Migrate mail body to ActionText 2019-07-03 13:15:49 +02:00
simon lehericey
b2c987ff0d [fix #3683] Dossier: add repasser_en_instruction! 2019-07-02 18:40:20 +02:00
Paul Chavard
fb0ef15e3c Export dossiers v2 2019-07-02 14:20:29 +02:00
Paul Chavard
46c1bbbc6f Official support for declarative demarches 2019-07-02 14:12:26 +02:00
simon lehericey
92bd382c64 [fix #4008] secured login for all gestionnaires 2019-07-01 15:06:39 +02:00
Chaïb Martinez
36114c07a9 Add some test to admin roi calculation
[fix #3986]

Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-07-01 11:13:36 +02:00
Nicolas Bouilleaud
bd47bf2691 Disable Messagerie in archived Dossiers and procedures
* Use the existing Dossier#messagerie_available? method
* Raise when attempting to build a Commentaire if not messagerie_available?
* Disable the Messagerie form if not messagerie_available?
* Add tests :)
* Tweak the Horaires formatting while we’re here.
2019-07-01 09:39:39 +02:00
Paul Chavard
0d80c48b7e Add avis to api 2019-06-27 14:40:17 +02:00
Paul Chavard
c5704fa22f Remove unused code from Commentaire 2019-06-25 17:04:29 +02:00
Pierre de La Morinerie
50cf6059e6 tasks: ensure creating an empty champ doesn’t display a notification 2019-06-24 15:49:02 +02:00
Paul Chavard
1781a49932 Add order param to API 2019-06-20 15:28:16 +02:00
Pierre de La Morinerie
9ce92d5c3b champs: show attachment actions only when the atachment is persisted
Fix #3961
2019-06-20 11:03:08 +02:00
Pierre de La Morinerie
d561936863 task: ensure that hidden dossiers are rolled back 2019-06-20 10:48:56 +02:00
Pierre de La Morinerie
f8dda3ae45 tasks: don't abort rollback when a dossier fails
Instead print a warning, and continue rolling back the other dossiers.
2019-06-20 10:31:23 +02:00
Christian Lautier
2393fa86be Mailer preview correction: procedure has now multiple administrators 2019-06-20 10:17:55 +02:00
Nicolas Bouilleaud
c606644902 Tweak codestyle in specs, following review 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
ad3553f0be Add BillSignature Service 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
f355f849a6 Add BillSignature Model 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
dace9a53d3 Add Universign timestamp API query 2019-06-17 16:16:28 +02:00
Nicolas Bouilleaud
e16cb731c5 Add poor man’s ASN1 parsing 2019-06-17 16:16:28 +02:00
Pierre de La Morinerie
51aacabf13 models: fix touch not propagating when using nested attributes
Sometimes, when using nested attributes, touch doesn’t propagate to
parent relationships. (see https://github.com/rails/rails/issues/26726)

Specifically, this happens in our app when updating a dossier with
only new attachements (but without changing the value of any fields).

To work around this, we need to define the parent relationship
explicitely. This is good practice anyway.

Fix #3906
2019-06-17 13:44:07 +02:00
Pierre de La Morinerie
f12668fbfb tasks: prevent the PJ migrations task updating from touching dossiers 2019-06-12 19:07:45 +02:00
pedong
7ef1a558f4 change date format for all, use try_format_date of helper 2019-06-12 17:48:12 +02:00
simon lehericey
ee296f2b44 Use default format for date and datetime champ 2019-06-12 17:48:12 +02:00
pedong
abcd58c35d [fix #3710] date with letter
Co-Authored-By: simon lehericey <mail@simon.lehericey.net>
2019-06-12 17:48:12 +02:00
Nicolas Bouilleaud
6b90bc1ea1 Add “previously followed” dossiers and gestionnaires
Using an “inactive” Follow scope, similar to the “active” scope.

(I was tempted to use a default_scope, but this breaks when trying to `unscope` it in associations.)
2019-06-12 17:33:53 +02:00
Pierre de La Morinerie
55c9dfc001 api_entreprise: display better error message when SIRET is private
Previously we blamed the network.

Now we say that the entreprise infos cannot be retrieved. Which is not
ideal, but better.
2019-06-12 11:58:04 +02:00
Pierre de La Morinerie
0b49e61ec0 tasks: repair updated_at of dossiers wrongly touched by PJ migration
When running the PJ migration task, migrated dossiers have their
updated_at attribute modified.

This means a yellow notification badge pops up on the Instructeurs
pages.

This PR repairs the affected dossiers, by restoring an approximative
updated_at from the latest workflow value (or the timestamp of the
migrated champ).
2019-06-06 11:11:29 +02:00
Paul Chavard
6d312e1716 spec: refactor wait_for_ajax to work with out new ajax utils
`wait_for_ajax` is not used anymore, but it may be in the future.
2019-06-04 16:30:36 +02:00
Paul Chavard
f621bd63e5 spec: fix flaky test by using new wait_until helper
Fix #3911
2019-06-04 16:30:36 +02:00
Paul Chavard
cc80939a42 spec: remove tests for old pj (probably) dead code 2019-06-04 16:30:36 +02:00
Pierre de La Morinerie
c2fcc6057e spec: add a wait_until helper 2019-06-04 16:30:36 +02:00
Paul Chavard
e870ba186f spec: add a pause helper 2019-06-04 16:16:53 +02:00
Pierre de La Morinerie
b829d105d9 brouillon_spec: fix the slow use of have_select(locator, selected: …)
Capybara's `have_select` can be very slow for elemtns with many options
(see https://github.com/teamcapybara/capybara/issues/1527)

This is because Capybara asserts that no other elements than the
required ones are selected.

This faster version is not as complete, but helps when checking the
countries list or the years in a date picker.
2019-06-04 11:03:09 +02:00
Pierre de La Morinerie
5419c130f4 brouillon_spec: make the login sequence faster
Log the user with `login_as` (rather than the browser).
2019-06-04 11:03:09 +02:00
Pierre de La Morinerie
2bd749a325 specs: clear the React champ before adding a new value
This prevents the value from being
`Nouveau champ TexteLibellé de champ carte`.
2019-06-03 12:47:03 +02:00
Pierre de La Morinerie
c05dc38b95 specs: remove 'disable-gpu' from chromedriver options
This option as only ever needed on Windows [1] (which we don't use),
and it shouldn't be required anymore, as the underlying bug has been
fixed [2].

- [1] https://developers.google.com/web/updates/2017/04/headless-chrome
- [2] https://bugs.chromium.org/p/chromium/issues/detail?id=737678
2019-06-03 12:46:12 +02:00
Paul Chavard
ff44b7a600 Refactor purge pj to be more generic 2019-05-29 15:54:51 +02:00
Pierre de La Morinerie
6cb02f2927 pj migration: handle signal interrupts 2019-05-29 14:46:49 +02:00
Pierre de La Morinerie
60121a1be6 task_helper: ensure that incrementing above 100% doesn’t raise an error 2019-05-29 12:06:32 +02:00
Pierre de La Morinerie
10df7b70ee carrierwave: when migrating, create an empty blob if file is missing 2019-05-28 18:19:33 +02:00
Pierre de La Morinerie
44c410d40d piece_justificative_service: fix for missing order_place
In production some pieces justificatives don't have an order place.

In this case, insert the champs after the ones that have an order place.
2019-05-28 17:20:07 +02:00
Pierre de La Morinerie
52b7a82932 services: mark attachments migrated from CarrierWave as safe
This avoids to enqueue thousands of scans when migrating the PJs of
a whole procedure.
2019-05-28 11:39:22 +02:00
Pierre de La Morinerie
4cf54e0d28 tasks: add progress report to the pjs migration task
Progress is indicated per migrated champ.
2019-05-28 10:42:18 +02:00
Pierre de La Morinerie
21ac60ad04 tasks: add a task to migrate pjs of procedures in batches 2019-05-28 10:42:18 +02:00
clemkeirua
f06ae1631f no crash when q is missing on RechercheController::index 2019-05-22 15:02:57 +02:00
Paul Chavard
cc4eba2b36 Less mokey patching 2019-05-21 14:21:42 +02:00
Paul Chavard
f6421e081a Refactor attachment view 2019-05-21 14:21:13 +02:00
Paul Chavard
42235e81b1 Use active storage load hook to extend blob 2019-05-16 20:43:01 +02:00
Paul Chavard
9725f2a418 Enable new champs editor for all 2019-05-14 16:18:29 +02:00
Paul Chavard
3446782cd0 Remove deprecated editor 2019-05-14 16:18:29 +02:00
Paul Chavard
dba8d65137 Track dossier operations with author and subject 2019-05-14 14:31:03 +02:00
Pierre de La Morinerie
f5f7dfba40 france_connect: fix for params entirely missing from the callback
Fix a Sentry exception encountered in production.
2019-05-13 15:45:12 +02:00
pedong
b1f11c0b0a add explanation to spec login 2019-05-13 15:28:25 +02:00
pedong
a226999382 redirect to same path after use signup 2019-05-13 15:28:25 +02:00
Pierre de La Morinerie
e66e78b4db helpscout: remove integration of custom fields
Our new HelpScout plan doesn't allow custom fields
anymore.
2019-05-13 12:33:29 +02:00
clemkeirua
d0794f42d1 fix tag_substitution_concern links for lien attestation 2019-05-07 08:54:29 +02:00
clemkeirua
c98655be52 ellipsis on file input overflow 2019-05-07 08:54:29 +02:00
clemkeirua
0e26bda186 cleanup the tag substitution concern & uniformization 2019-05-07 08:54:29 +02:00
clemkeirua
e4259466b4 nettoyage du tag_substitution_concern 2019-05-07 08:54:29 +02:00
clemkeirua
f8a2598647 ajout du lien vers le justificatif dans la balise --lien attestation-- 2019-05-07 08:54:29 +02:00
clemkeirua
747dc505cc ajout d'un test 2019-05-07 08:54:29 +02:00
clemkeirua
4aab72be68 implementation du systeme de PJ de motivation 2019-05-07 08:54:29 +02:00
Nicolas Bouilleaud
df865e71dc Make sure that there always is at least one administrator per Procedure 2019-05-06 16:19:08 +02:00
Paul Chavard
96b3547788 Exercices and RNA information are optional and should not block the request 2019-05-03 18:23:21 +02:00
Paul Chavard
91f2d7d706 Remove deprecated virus_scan model 2019-05-03 11:07:19 +02:00
Paul Chavard
6e8b9cf668 Refactor piece_jointe template to avoid repetition 2019-05-02 15:58:09 +02:00
Paul Chavard
f113d108c9 Save virus scan status to blob metadata 2019-05-02 15:58:09 +02:00
Paul Chavard
2f633b5d23 Load leaflet from a separate chunk 2019-05-02 14:10:48 +02:00
Pierre de La Morinerie
e06e32238c api_entreprise: display a specific error message on network errors 2019-05-02 11:24:38 +02:00
Pierre de La Morinerie
ad4a89f0f6 api_entreprise: raise on network error 2019-05-02 11:24:22 +02:00
Pierre de La Morinerie
7c1c61248e spec: cleanup siret_controller_spec.rb 2019-05-02 11:24:22 +02:00
Pierre de La Morinerie
fd95ea2871 spec: cleanup exercices_adapter_spec 2019-05-02 11:24:22 +02:00
Pierre de La Morinerie
d855468cb6 dossiers: display the estimate of the entire processing time
Displaying separate estimations for en_construction and en_instruction
doesn't really make sense for the users: they want to know how
long it is going to take overall, not the petty details of our workflow.
2019-04-30 15:56:27 +02:00
Nicolas Bouilleaud
1c2e93ed41 Fix “nearing_end_of_retention” test
The `nearing_end_of_retention` test creates a `just_expired_dossier` “six months ago”, which is 29 Oct 2018. The autumn DST change was on October 28; this is the first time this test runs under these conditions. We workaround the time offset by creating the dossier one hour earlier.

This is technically a workaround, not a fix: the date arithmetics in `nearing_end_of_retention` are probably wrong. It looks like it’s comparing intervals, which seems error-prone, while it should be comparing dates. For now, I’m just making the tests pass.
2019-04-29 15:41:52 +02:00
Paul Chavard
8d093bd9ba Fix missing dossier_id on champs inside repetition 2019-04-18 16:55:35 +02:00
simon lehericey
e65e21a72f Email notification: use the right method for procedures 2019-04-18 15:07:01 +02:00
Paul Chavard
9beff5ee9a Always create menu deroulant champs with a value 2019-04-11 14:38:21 +02:00
Mathieu Magnin
1a97cd42de Fix missing helper in notification mailer 2019-04-11 12:25:55 +02:00
Mathieu Magnin
22034730b0 Fix factory to avoid crash because of procedure is nil 2019-04-11 12:25:55 +02:00
Mathieu Magnin
c550d40e3a [Fix #3064] Add preview test 2019-04-11 11:03:13 +02:00
Mathieu Magnin
28f9208ce8 When mail template is updated, stay on edit page to easily preview it 2019-04-11 11:03:13 +02:00
Mathieu Magnin
14c3fb7224 [Fix #3064] Add a preview button for state notifications emails 2019-04-11 11:03:13 +02:00
Mathieu Magnin
e91b412254 [Fix #3064] Use a different layout for state notifications emails 2019-04-11 11:03:12 +02:00
Nicolas Bouilleaud
c5122ee7f5 Allow filtering ProcedurePresentation by followers_gestionnaires
fixes #3464
2019-04-10 14:32:51 +02:00
Pierre de La Morinerie
e34c556f29 procedure: fix specs
When the time computations are done accross a Daylight Saving Time
change, they may be off by one hour.

It doesn't matter, as the estimated delay is counted in days, not
hours.
2019-04-08 15:24:44 +02:00
Pierre de La Morinerie
8ca683c515 mailers: fix last_week_overview crash when the overview is missing
This is because procedures may be unpublished between the time where
the job is enqueued and the time the mailer is run

Fix #3745
2019-04-04 17:32:12 +02:00
Paul Chavard
4fb889f10a Send browser support information and format user id 2019-04-04 14:21:32 +02:00
Pierre de La Morinerie
41ad89d8ac commencer: fix redirection with invalid path 2019-04-04 14:03:40 +02:00
Pierre de La Morinerie
158d6e1ae6 avis: format newlines in avis
Fix #3738
2019-04-04 10:20:57 +02:00
Paul Chavard
8157fd0127 Fix type de champ menu déroulant 2019-04-03 21:53:57 +02:00
Paul Chavard
b9be186d2c Sentry should send environment information 2019-04-03 18:19:16 +02:00
Pierre de La Morinerie
22f2ca105e commencer: display a FranceConnect button
Fix #3640
2019-04-03 16:08:09 +02:00
Pierre de La Morinerie
28dcbcb85b auth: move the FranceConnect button to a partial 2019-04-03 16:08:09 +02:00
simon lehericey
65370b20a9 Use IPService to remove secure connexion from trusted networks 2019-04-03 15:21:19 +02:00
simon lehericey
52e6632175 Add IPService 2019-04-03 15:21:19 +02:00
Paul Chavard
e2fc9e10b0 Update tests for new editor 2019-04-03 14:38:57 +02:00
Paul Chavard
639facaf2a Add new types_de_champ#move api 2019-04-03 14:38:07 +02:00
Pierre de La Morinerie
031c40aa55 stats: display 12 weeks of feedbacks 2019-04-02 17:22:38 +02:00
Mathieu Magnin
8525761332 Revert english dates 2019-04-02 14:38:47 +02:00
simon lehericey
f945b9ec63 Champ Siret: Fix siret-champ save
When a user enter a siret, it calls siret_controller in ajax. The champ value is stil nil, so champ.present? is false because champ.blank is redefined to focus on value. Thus the champ is not updated.
2019-04-02 14:17:21 +02:00
Mathieu Magnin
71e0969bc0 [Fix #3692] Ensure SIRET is correct on server 2019-03-28 18:03:53 +01:00
Mathieu Magnin
27c8e9dcb8 Use the same clone_attachment method for all attributes on procedure.clone 2019-03-28 17:17:29 +01:00
clemkeirua
0d71120f98 [fix #306] Possibilité de joindre un document à un avis 2019-03-28 15:45:14 +01:00
Pierre de La Morinerie
abeb58caa5 dossiers: displays an "Start an other dossier" item in action dropdown 2019-03-28 15:26:15 +01:00
Pierre de La Morinerie
d03e340345 dossiers: add an actions menu 2019-03-28 15:26:15 +01:00
Pierre de La Morinerie
06e7355d5b commencer: fix invalid URL on test procedures
Fix #3693
2019-03-28 14:15:46 +01:00
Pierre de La Morinerie
d267d782b8 help: add administration contact on /commencer pages 2019-03-28 11:36:24 +01:00
Frederic Merizen
9aebb76e77 [#2180] Avoid sending spurious notifications to instructeurs 2019-03-27 17:36:13 +01:00
Frederic Merizen
7d316b8369 [#2180] High-level PJ to champ PJ migration service 2019-03-27 17:36:13 +01:00
Frederic Merizen
e24242e4b2 [#2180] Low-level Carrierwave to ActiveStorage migration 2019-03-27 17:36:13 +01:00
Frederic Merizen
21dbe44e07 [#2180] Fix ordering of piece jointe champs 2019-03-27 17:36:13 +01:00
pedong
fb29d30826 [fix #3342] show date with format letter 2019-03-27 15:27:20 +01:00
Mathieu Magnin
4e27872a25 [Fix #3650] when cloning a procedure, do not forget pj_templates 2019-03-26 15:31:09 +01:00
Pierre de La Morinerie
30d11e0dac app: rename new_gestionnaire to gestionnaires 2019-03-26 10:48:59 +01:00
pedong
0d7c30c9dd [fix #3476] add notify email for the dossier change state to instruction 2019-03-25 16:04:33 +01:00
simon lehericey
39b710fdde Annotation: can use repetable 2019-03-25 11:08:53 +01:00
Pierre de La Morinerie
ded5b70444 app: rename new_user to users 2019-03-25 10:56:39 +01:00
Pierre de La Morinerie
b1a7018d30 procedure: ignore bad data when computing usual_instruction_time
Fix #3655
2019-03-20 17:48:54 +01:00
Mathieu Magnin
6570bed09c [Fix #3641] Do not change PJ value in API if PJ is safe 2019-03-20 11:37:31 +01:00
Pierre de La Morinerie
69580288a4 help: add a custom help dropdown in gestionnaire context 2019-03-20 11:06:54 +01:00
Pierre de La Morinerie
549b17f75e help: add a custom help dropdown in dossier context 2019-03-20 11:06:54 +01:00
Paul Chavard
69a51e3296 Save SIRET data on search 2019-03-19 16:22:42 +01:00
Pierre de La Morinerie
ed1f6ec38d procedure: fix verification delay
The verification delay was ignoring all dossiers not closed yet.
2019-03-19 15:51:51 +01:00
Mathieu Magnin
2c1e1db37d [Fix #3617] 404 when filter[value] contains a "." 2019-03-19 14:25:57 +01:00
simon lehericey
6607de4827 Notification: add service to send notifications 2019-03-18 16:37:51 +01:00
simon lehericey
ed6828c66c Notification: UI 2019-03-18 16:37:51 +01:00
Mathieu Magnin
6b9dbb22af Remove unused stats 2019-03-13 11:00:14 +01:00
Mathieu Magnin
ff0356e698 Fix Sentry 165 : api crash when siret is unknown 2019-03-12 17:53:11 +01:00
Paul Chavard
549eca44cb Enable flipflop on api requests 2019-03-12 14:02:55 +01:00
Paul Chavard
48701e80bd Enable flipflop for instructeurs 2019-03-12 12:14:34 +01:00
Paul Chavard
bb8ba75d22 Explicitly pass current_administrateur on publish 2019-03-12 11:59:01 +01:00
Paul Chavard
0e4b6e1ba2 Remove “Nombre d'administrations ayant dématérialisé N démarches” graph 2019-03-12 11:59:01 +01:00
Paul Chavard
c37f649453 Update specs to use multiple administrateurs 2019-03-12 11:59:01 +01:00
Paul Chavard
23d8f0d803 Remove old tasks depending on single administrateur 2019-03-12 11:57:51 +01:00
Mathieu Magnin
b690b89b34 Clean old support task 2019-03-12 11:26:07 +01:00
Mathieu Magnin
f96d1b1823 Create default path for brouillons procedures 2019-03-12 11:26:07 +01:00
Mathieu Magnin
44f28ec565 Remove feature flag for publish draft 2019-03-12 11:26:07 +01:00
Frederic Merizen
af37005b33 Fix test intermittent introduit par #3479 2019-03-11 20:27:24 +01:00
Frederic Merizen
8d8376947d [Fix #3477] Individually remove values from multi-value filter 2019-03-11 17:14:17 +01:00
Frederic Merizen
efa71284fc [#3477] Test eager_load_displayed_fields 2019-03-11 17:14:17 +01:00
Frederic Merizen
70bf6aecf6 [#3477] Filter by mutliple values 2019-03-11 17:14:17 +01:00
Frederic Merizen
5d01e37d70 [#3477] Make filters stand out a little more in spec 2019-03-11 17:14:17 +01:00
Frederic Merizen
b428406fc7 [Fix #3578] No tags for champs that cannot have user input anyway 2019-03-11 10:26:27 +01:00
Frederic Merizen
1d0156f9c6 [#3572] Add tests 2019-03-08 18:32:35 +01:00
Frederic Merizen
6b0832047b Service that computes administrator statistics and sends them to SendinBlue 2019-03-08 16:33:28 +01:00
Frederic Merizen
a8ce11a4d2 Add rel=noopener to links with target=_blank
http://support.detectify.com/customer/portal/articles/2792257-external-links-using-target-_blank-
2019-03-05 18:25:26 +01:00
Frederic Merizen
d053a9bb8d Fix test for the 2 months following February
The problem was caused by the variable lenght of 2.months.ago, used
in the test.
During the period from March 1st to April 29th, because February
is so short, the message would change from 'delai de 2 mois'
to 'delai de environ 2 mois', causing the test to fail.
2019-03-01 18:25:15 +01:00
Paul Chavard
f7af01e0dc Create new procedures with administrateurs 2019-02-26 16:38:58 +01:00
Pierre de La Morinerie
066672803b pj_link: fix an exception when the scan is not associated yet 2019-02-21 16:00:33 +01:00
clemkeirua
71bff0812c ajout d'un test pour caractériser le cas service = null 2019-02-21 12:34:53 +01:00
clemkeirua
236f73f838 ajout d'une balise pour le nom du service 2019-02-21 12:18:44 +01:00
Paul Chavard
84383fc3c1 Assigne admins to procedure.administrateurs 2019-02-20 17:10:57 +01:00
Paul Chavard
a7ba01a02a Fix champ spec
fix #3257
2019-02-20 16:26:12 +01:00
Mathieu Magnin
f7650135f4 [Fix #3375] on the API display safe files only 2019-02-19 18:10:35 +01:00
Pierre de La Morinerie
ffda67c1d8 spec: add specs for attachments 2019-02-19 18:02:27 +01:00
Pierre de La Morinerie
a3c0f3ccd6 spec: wait for the page to be rendered before checking values 2019-02-19 18:02:27 +01:00
Pierre de La Morinerie
d51cc8bfa2 spec: fix ActiveRecord queue not being set 2019-02-19 18:02:27 +01:00
Mathieu Magnin
11078b7f71 Add rake task to activate publish draft 2019-02-19 17:50:11 +01:00
Paul Chavard
aad685bb79 Show preview with correct type de champ options
fix #3439
2019-02-19 16:37:42 +01:00
clemkeirua
4ff9adde27 ajout d'un test auto pour l'affichage de la date de dépot coté instructeur 2019-02-19 12:00:36 +01:00
Mathieu Magnin
cf610bbd91
Merge branch 'dev' into enforce-rubocop-timezone 2019-02-18 17:41:41 +01:00
simon lehericey
0b8619be77 Gestionnaire: login_token! -> create_trusted_device_token 2019-02-18 17:21:46 +01:00
simon lehericey
c16e30442a save path before redirect to link_sent_path 2019-02-18 17:20:49 +01:00
simon lehericey
7de3a18fd1 valid period depend on trusted_device_token.created_at 2019-02-18 17:20:49 +01:00
simon lehericey
d664f130fd trustedDeviceToken: move token youth 2019-02-18 17:20:49 +01:00
simon lehericey
23db8a160c move token validity to trusted_device_token 2019-02-18 17:20:49 +01:00
simon lehericey
bee9a108c5 split login and trusted_device logic 2019-02-18 17:20:00 +01:00
simon lehericey
9d92e43d8d [fix #3315] Migrate service organisme 2019-02-18 16:50:44 +01:00
Mathieu Magnin
dd27167c5d Enforce Timezone rule in Rubocop 2019-02-18 16:19:42 +01:00
simon lehericey
a7e068003a [fix #3427] Administration can soft delete a dossier 2019-02-14 18:09:08 +01:00
Pierre de La Morinerie
7413df81e0 Revert "file upload: proxy direct upload through the APP_HOST"
This reverts commit 2365efbdaa.
2019-02-14 16:23:11 +01:00
Mathieu Magnin
2365efbdaa file upload: proxy direct upload through the APP_HOST
Ref #3409
2019-02-14 14:28:03 +01:00
Frederic Merizen
eb7cd28504 Fix undefined method for nil:NilClass 2019-02-13 19:22:38 +01:00
Frederic Merizen
41ab7246cf [#3424] Improve formatting of addresses with missing components 2019-02-13 09:57:33 +01:00
Paul Chavard
b7058947e1 Fix buttons on screen bottom 2019-02-12 16:22:12 +01:00
Paul Chavard
5da5f75c5f [Types de Champ Editeur] Save on change and only edited model 2019-02-07 17:05:55 +01:00
Pierre de La Morinerie
4bfc258cbd dossiers: refactor dossiers specs
- Use login_as instead of signing up in the browser
- Better name factory objects
- Group specs by use-case
2019-02-07 11:08:02 +01:00
Pierre de La Morinerie
a6704c4cd6 dossiers: allow users to delete "en construction" dossiers 2019-02-07 11:07:07 +01:00
Paul Chavard
6b39128be3 Clone nested types_de_champ 2019-02-06 10:05:27 +01:00
Mathieu Magnin
f6714cd9a3 If ClamavService fails then raise an error 2019-02-05 17:58:41 +01:00
simon lehericey
5715cdaa4c [fix #3363] use organisation_name in dossier summary 2019-02-05 17:41:51 +01:00
Frederic Merizen
a255e61556 [#3356] Improve formatting for menus that only have a primary value 2019-02-05 17:35:30 +01:00
Frederic Merizen
a3d7c8de55 [Fix #3356] Add tags for primary menu only / secondary menu only 2019-02-05 17:35:30 +01:00
Paul Chavard
a9a853b669 Fix and simplify linked-drop-down-list js 2019-02-05 16:48:26 +01:00
Paul Chavard
1d75a32cac Add a default text type de champ to editor 2019-02-05 16:48:26 +01:00
Paul Chavard
071448e1d9 Champ Repetition dossier editor 2019-02-04 16:19:07 +01:00
Paul Chavard
a4a421a91a Champ Repetition dossier display 2019-02-04 15:46:39 +01:00
Paul Chavard
9b7b59f67e Champs editor should handle repetition type 2019-02-04 11:58:26 +01:00
Paul Chavard
7678d8eb0b Revert for_api value on yes_no champs 2019-01-29 15:23:09 +01:00
Pierre de La Morinerie
803364490d carto: present API InternalServerError to the user, instead of failing 2019-01-28 18:22:55 +01:00
Pierre de La Morinerie
f1f7f0ef9f specs: cleanup "Delete draft from dossiers list" spec 2019-01-28 18:17:38 +01:00
Pierre de La Morinerie
934368616c form: remove the "Delete draft" button
Draft can now be deleted from the dossiers list. This is the best place
to delete it (as it allow to clean the list) – and it is better than
asking the user if they want to delete a draft *precisely while they
are filling the form*.
2019-01-28 18:17:38 +01:00
Pierre de La Morinerie
bb1cc1eef8 tasks: delete dossiers without procedures
Fix #3279
2019-01-23 17:19:36 +01:00
Pierre de La Morinerie
fb75461c78 procedure: delete dossiers on destroy 2019-01-23 17:19:36 +01:00
Pierre de La Morinerie
3f0f22d849 procedure: clarify controller spec 2019-01-23 17:14:14 +01:00
Pierre de La Morinerie
23276cb9f9 commencer: add temporal context about the dossier
Ref #2225
2019-01-23 16:14:25 +01:00
Pierre de La Morinerie
437f73b4ce search: exclude more special characters 2019-01-22 17:16:49 +01:00
Pierre de La Morinerie
151e5744e6 contact: rewrite specs to use finer-grained mocks
Before the specs mocked entire controller methods–which caused them
not to be tested.

Now we use finer mocks (or no mocks at all), to actually run more code.
2019-01-22 16:12:13 +01:00
pedong
6103176a78 [fix #1238] add previsualization attestation for gestionnaire 2019-01-22 14:54:24 +01:00
Pierre de La Morinerie
bb753ce23e commencer: redirect to the procedure page after sign-in and sign-up 2019-01-21 14:45:38 +01:00
Pierre de La Morinerie
016e5f2e6f commencer: add an independant page 2019-01-21 14:45:38 +01:00
simon lehericey
45db2d8e5a [#3268] Rake task to correct bad follows and logs 2019-01-21 14:17:17 +01:00
Frederic Merizen
d01270eff2 [#2180] Do not double-expose migrated type PJ as type champ PJ 2019-01-17 17:47:08 +01:00
Frederic Merizen
63519f04c8 [#2180] Expose migrated types PJ as legacy type PJ in dossier API 2019-01-17 17:47:08 +01:00
Frederic Merizen
bf23abdfe3 [#2180] Expose migrated PJs as legacy PJs in dossier API 2019-01-17 17:47:08 +01:00
Frederic Merizen
5f74ae1545 [#2180] Do not double-expose migrated type PJs as champs in procedure API 2019-01-17 17:47:08 +01:00
Frederic Merizen
082255b489 [#2180] Expose migrated types PJ as legacy types PJ in procedure API 2019-01-17 17:46:56 +01:00
Frederic Merizen
5e37400834 [#2180] Only retain old PJ API when cloning for same admin 2019-01-17 17:40:40 +01:00
Frederic Merizen
530079e464 [#2180] Make sure that old_pj is kept through successive clones 2019-01-17 17:40:40 +01:00
Frederic Merizen
8cb509d192 [#2180] Keep information that this type de champ was cloned from a PJ 2019-01-17 17:40:40 +01:00
Frederic Merizen
651fd6149b [#2180] When cloning a procedure, convert types de PJ to types de champ PJ 2019-01-17 17:40:40 +01:00
Mathieu Magnin
b1efe57403 [Fix #2423] Allow Usager to delete brouillon from dossiers#index 2019-01-17 17:30:37 +01:00
Paul Chavard
9136c9dfa0 Enable support_form for all 2019-01-17 15:17:48 +01:00
Mathieu Magnin
0e6b5678ad Fix tests 2019-01-17 14:04:59 +01:00
Paul Chavard
f0cda2ca13 Test new champs editor 2019-01-17 11:20:31 +01:00
Paul Chavard
41c9b21509 Use new editor 2019-01-17 11:20:31 +01:00
Pierre de La Morinerie
ae763d93f3 sign_up: display procedure context if available 2019-01-17 11:07:09 +01:00
Pierre de La Morinerie
4fd9fa6610 sign_in: extract the procedure context to a ProcedureContextConcern 2019-01-17 11:07:09 +01:00
Pierre de La Morinerie
e580d336e4 sessions: add a helper to clear the stored return path 2019-01-17 10:48:54 +01:00
simon lehericey
99bfd19b41 [fix #3268] Jobs: use automatic_operation 2019-01-16 17:20:12 +01:00
simon lehericey
6ab2d124f9 Dossier: #accepter_automatiquement! 2019-01-16 17:20:12 +01:00
simon lehericey
0f3dedb0b6 Dossier: #passer_automatiquement_en_instruction! 2019-01-16 17:12:32 +01:00
Pierre de La Morinerie
c944135c74 specs: move sign_up specs from common tests to new_user
Because sign_up is specific to each type of user
2019-01-16 14:25:12 +01:00
Pierre de La Morinerie
62ee710382 sign_in: remove hack for displaying the procedure context
Before there was no way to display the informations about a procedure
without having a dossier. Thus an empty dossier was created.

Now we can display the informations of a procedure using a @procedure
instance variable, so we can move this hack away.
2019-01-16 14:25:12 +01:00
Pierre de La Morinerie
5d6005dbe9 views: make dossier optional on procedure_footer
This allow displaying the procedure footer even when
there is no dossier yet
2019-01-16 14:25:12 +01:00
Pierre de La Morinerie
d36696442b layouts: migrate sign_in to the shared layout 2019-01-16 14:25:12 +01:00
Pierre de La Morinerie
13f1d4c7d9 views: rename dossier_footer to procedure_footer 2019-01-16 14:25:12 +01:00
Frederic Merizen
0846860748 Proxy for active storage service provider 2019-01-16 11:34:57 +01:00
Pierre de La Morinerie
908771e172 stats: use group_by_week to compute the week range
Fix #3242
2019-01-10 16:17:00 +01:00
simon lehericey
29fff9ee68 [fix #3269] bufferize login token email 2019-01-10 12:06:35 +01:00
Pierre de La Morinerie
6a0996c5f3 specs: refactor a view spec to be clearer and faster 2019-01-10 11:26:43 +01:00
Pierre de La Morinerie
5719107cbc views: fix misnamed textarea template 2019-01-10 11:26:43 +01:00
simon lehericey
e7d5f30192 Admin: small reword in admin procedure ui 2019-01-09 16:25:00 +01:00
simon lehericey
a197285742 [fix #2612] Admin: add missing steps to admin UI 2019-01-09 16:25:00 +01:00
simon lehericey
8ca7eb1c54 Procedure: cloning set the current admin gestionnaire of the procedure 2019-01-09 16:25:00 +01:00
simon lehericey
ac43038566 SessionControllerSpec: refactor #create tests 2019-01-09 13:49:47 +01:00
simon lehericey
b38fbc78ef SessionControllerSpec: remove specific attribut test
change user.update(log_in_with_france_connect: nil) as log_in_france_connect is an enum
2019-01-09 13:49:47 +01:00
simon lehericey
9e26b5f4d8 SessionControllerSpec: small cleaning 2019-01-09 13:49:47 +01:00
simon lehericey
f5fa0499ca SessionControllerSpec: remove duplicated tests 2019-01-09 13:49:47 +01:00
simon lehericey
9c335698f1 SessionControllerSpec: remove password syncing relating test 2019-01-09 13:49:47 +01:00
simon lehericey
f0139c5962 Spec Factory: an administrateur always has a gestionnaire 2019-01-09 13:49:47 +01:00
Paul Chavard
1beefe4469 Fix champ repetition belongs_to associations 2019-01-08 11:56:33 +00:00
gregoirenovel
b4781f7440 Make dossier link clickable for users in the Demande tab 2019-01-08 12:32:27 +01:00
gregoirenovel
f5a31be36a Remove the now useless #formatted_value method 2019-01-08 12:32:26 +01:00
gregoirenovel
c00aac2f80 We can now replace processing in #formatted_value by #to_s calls 2019-01-08 12:32:26 +01:00
gregoirenovel
9e42190148 Remove the proxy value_for_export method
Overload for_export instead
2019-01-08 12:32:26 +01:00
gregoirenovel
9a2341c56c Remove the useless #for_display proxy method 2019-01-08 12:32:26 +01:00
Pierre de La Morinerie
be1567ecbd messages: improve wording of the "Send" button 2019-01-07 16:20:23 +01:00
Pierre de La Morinerie
e25bd7139f layouts: use a common procedure_context layout for the demarche overview 2019-01-07 15:39:58 +01:00
simon lehericey
7b935a6486 login_token: lets constantize 2019-01-07 08:18:29 +01:00
simon lehericey
5daa565a80 login_token: add missing tests 2019-01-07 08:18:29 +01:00
gregoirenovel
5fa5f2aa37 Bump development gems
- rubocop (0.61.1 → 0.62.0)
2019-01-05 11:47:55 +01:00
Pierre de La Morinerie
98127b6778 signature: refactor specs 2019-01-03 17:48:53 +01:00
Pierre de La Morinerie
2c0108190c spec: fix specs failing randomly
This is because creating a procedure attempts to create an admin from
scratch, and fails to do so.

Broken by 802f2086d6
2019-01-03 17:42:43 +01:00
Pierre de La Morinerie
86b9e2d092 stats: fix exception when HelpScout env vars are missing
This fixes the stats page, which used to raise an exception when
HelpScout env vars are not present.
2019-01-03 17:27:56 +01:00
Pierre de La Morinerie
d77530c461 Make Procedure state consistent after switching types de champ order
Fixes an issue where, after clicking the "move champ up" button,
the new form is rendered with an incoherent order.
2019-01-03 15:13:14 +01:00
gregoirenovel
9466442aff Remove the TypeDeChamp decorators 2019-01-03 12:08:25 +01:00
gregoirenovel
9c130c41da Remove ProcedureDecorator 2019-01-03 12:08:25 +01:00
gregoirenovel
b41764ec03 Remove ChampDecorator 2019-01-03 12:08:25 +01:00
gregoirenovel
b8f57415cd Remove the unused decorator DossierDecorator 2019-01-03 12:08:25 +01:00
gregoirenovel
559df6b82a Remove the unused decorator ProceduresDecorator 2019-01-03 12:08:24 +01:00
gregoirenovel
4f30e30a08 Remove the unused decorator FranceConnectInformationDecorator 2019-01-03 12:08:24 +01:00
gregoirenovel
0336ecf639 Remove useless arguments from some methods 2019-01-03 10:53:50 +01:00
gregoirenovel
0596d53ac2 Enable the Lint/UnusedBlockArgument cop 2019-01-03 10:53:50 +01:00
gregoirenovel
ddc71cbacf Enable the Lint/UnderscorePrefixedVariableName cop 2019-01-03 10:53:50 +01:00
gregoirenovel
baf7977786 Enable the Lint/StringConversionInInterpolation cop 2019-01-03 10:53:50 +01:00
gregoirenovel
186e362701 Enable the Layout/SpaceInsideArrayLiteralBrackets 2019-01-03 10:53:50 +01:00
gregoirenovel
386fbce776 Enable the Layout/SpaceBeforeBlockBraces cop 2019-01-03 10:53:50 +01:00
gregoirenovel
8b0b8162f0 Enable the Layout/SpaceAfterComma cop 2019-01-03 10:53:50 +01:00
Chaïb Martinez
802f2086d6 Redirect admins with no démarches to the new demarche page 2018-12-28 18:57:51 +01:00
maatinito
4ad3a60e25 [Fix #2575] Créer automatiquement un compte instructeur aux administrateurs 2018-12-26 09:44:20 -10:00
gregoirenovel
03eb47016c Fix a gestionnaire sign in bug 2018-12-26 18:14:04 +01:00
maatinito
8304ce12e1 Make some email previews database-independent 2018-12-20 17:07:03 +01:00
maatinito
e1b97b3303 Make more emails previewable 2018-12-20 17:06:57 +01:00
maatinito
e37372d261 Fix a typo 2018-12-20 16:21:27 +01:00
maatinito
9842142a9a Add InviteMailerPreview 2018-12-20 16:21:27 +01:00
maatinito
a1a11adb83 [#325] Make the notification layout inherit from the general layout 2018-12-20 16:21:27 +01:00
Mathieu Magnin
904d8d208b [Fix #3192] Fix data 2018-12-20 15:45:48 +01:00
Mathieu Magnin
b40c706d98 [Fix #3192] Clone service if procedure is transferred 2018-12-20 15:45:48 +01:00
Paul Chavard
eb9edc1cee Order types de champ in scope 2018-12-20 14:14:15 +01:00
Paul Chavard
5d1c24f3d8 Add type de champ repetition models (with row) 2018-12-19 15:31:11 +01:00
gregoirenovel
df7e0a9881 Remove dead code 2018-12-19 14:59:15 +01:00
Frederic Merizen
d1cfe4468d Encourager la création de champs PJ plutôt que de vieilles PJS 2018-12-19 11:57:23 +01:00
Frederic Merizen
832b4a61bc Drop CleverCloud Service for ActiveStorage 2018-12-19 10:36:02 +01:00
Frederic Merizen
57a136c861 Make champ PJ generally available 2018-12-18 11:11:23 +01:00
Pierre de La Morinerie
d614ea6bd5 stats: display contact rate 2018-12-18 10:38:59 +01:00
maatinito
af8eee25ad [Fix #249] added test for too short passwords 2018-12-17 11:14:35 -10:00
Mathieu Magnin
edf3eefa87 Fix Sentry 114, Instructeur can delete pj in private champs 2018-12-13 17:27:05 +01:00
simon lehericey
5a87fad02e [fix #3154] order export 2018-12-10 16:41:37 +01:00
Pierre de La Morinerie
a0ae1afb45 typhoeus: add a cache store for successful requests 2018-12-10 11:41:07 +01:00
Frederic Merizen
270c7568fa [#2180] Avoid fetching old PJ modification times separately
Speeds up transfer
2018-12-08 15:55:40 +01:00
Frederic Merizen
907e87809b [#2180] Iterate over storage keys rather than blobs
To create less confusion on dev
2018-12-07 15:30:10 +01:00
pedong
f70f276ae9 [fix #2813] set lien_notice nil when clone a procedure 2018-12-06 21:28:08 +01:00
simon lehericey
db6c86b242 DossierController: user can destroy pjs 2018-12-06 10:45:10 +01:00
Frederic Merizen
4699e515ed [Fix #2999] Send gestionnaire back to what they were doing after email verification 2018-12-06 10:03:21 +01:00
Paul Chavard
ee93b4e33d Revert legacy carte API to parsed json 2018-12-05 18:19:15 +01:00
Paul Chavard
35494df78e Procedure export dossiers with champs siret 2018-12-05 17:09:39 +01:00
Pierre de La Morinerie
e206f3d4d4 gestionnaire: display draft procedures in the list
Fix #3088
2018-12-05 15:38:20 +01:00
Pierre de La Morinerie
421f125c45 gestionnaire_spec: factorize a assign helper 2018-12-05 15:38:20 +01:00
Paul Chavard
a08f170dbd Assign users and gestionnaires to commentaires
fix #2052
2018-12-05 13:40:57 +01:00
gregoirenovel
121086eedd Bump rails 2018-12-04 11:16:42 +01:00
gregoirenovel
873bf2fc0f Tell puma to STFU 2018-12-04 10:35:13 +01:00
gregoirenovel
478fb88618 Bump capybara (2.18.0 → 3.11.0) 2018-12-04 10:35:13 +01:00
gregoirenovel
94b6783a65 Slightly change some tests to comply with puma 2018-12-03 16:28:18 +01:00
gregoirenovel
b3d0a113eb Use non-breaking spaces in tests 2018-12-03 16:28:18 +01:00
Paul Chavard
e873b6a9c4 Expose selection utilisateur size on champ carte 2018-12-03 12:49:03 +01:00
Paul Chavard
d77a5c9f15 More tests and fixes on carte champ 2018-11-30 13:28:30 +01:00
Paul Chavard
097a15d624 Test and fix all possible cases of champ carte serialization 2018-11-30 12:02:27 +01:00
Paul Chavard
35d2bc36fc cleanup selection_utilisateur geo_json 2018-11-29 17:10:14 +01:00
Paul Chavard
ca147969ab Fix number champs validation 2018-11-29 15:12:31 +01:00
Paul Chavard
1883c57c87 Add stable ids to types_de_champ after every update 2018-11-29 11:41:13 +01:00
Paul Chavard
b9af07b845 Add admin support contact form 2018-11-28 16:50:37 +01:00
Paul Chavard
575a437f97 Remove carto from admin/procedure controller 2018-11-27 16:11:25 +01:00
Paul Chavard
1897b2775c Remove old migration task 2018-11-27 16:11:25 +01:00
Paul Chavard
c6ef30f3e1 Remove unused carto from instructeur interface 2018-11-27 16:11:25 +01:00
Paul Chavard
9ff65efea8 Remove deprecated carto from dossiers controller 2018-11-27 16:11:25 +01:00
Paul Chavard
d988638c58 Simplify API carte serializer 2018-11-27 16:11:25 +01:00
Paul Chavard
36f6f54337 Remove unused carto models 2018-11-27 16:11:25 +01:00
Paul Chavard
5632929d3d Remove old caro editor 2018-11-27 16:11:25 +01:00
Paul Chavard
37a7e26fc3 Remove unused users/carte_controller 2018-11-27 16:11:25 +01:00
Pierre de La Morinerie
ea8bc0c961 mailers: improve notification layout 2018-11-27 15:51:26 +01:00
Pierre de La Morinerie
4e801b188c tasks: remove outdated footers in mail templates
Fix #1863
2018-11-27 15:32:02 +01:00
Paul Chavard
98d388b64d Use state change methods on dossier in dossier auto archive job 2018-11-27 12:49:40 +01:00
Paul Chavard
b5b6832be8 Use state change methods on dossier in dossier auto recieve job 2018-11-27 12:49:40 +01:00
Paul Chavard
febf625dd9 Make difference between error and empty geo json 2018-11-27 12:36:10 +01:00
Paul Chavard
f2e7feec1d Do not send error json to backend - it doesn’t need it and it creates bad data 2018-11-27 11:45:24 +01:00
Mathieu Magnin
718a30639f [Fix #2929] Improve readability of invitation for avis 2018-11-23 13:18:36 +01:00
pedong
0d02f5896e [Fix #1339] properly display avis confidentiality to experts 2018-11-22 18:38:31 +01:00
Chaïb Martinez
0e8d235800 Add some params to track forms submissions 2018-11-21 18:25:47 +01:00
Mathieu Magnin
7c1768e5bb [Fix #3016] Do not crash if PJ has no extension 2018-11-21 14:15:45 +01:00
Paul Chavard
c99ef811b6 Do not save error json in database 2018-11-21 13:03:01 +01:00
Pierre de La Morinerie
f983bc68e2 mailers: fix dossier mailer spec 2018-11-20 17:45:50 +01:00
Pierre de La Morinerie
a5f9be00e0 mailers: add preview URL to all previewable mailers 2018-11-20 14:46:31 +01:00
Pierre de La Morinerie
f2eaf66a9a mailers: add missing previews for notification emails 2018-11-20 14:46:31 +01:00
Pierre de La Morinerie
e5303fd986 mailers: streamline the NotificationMailer
Notifications are now only for demarche-templated emails.
2018-11-20 14:46:31 +01:00
Paul Chavard
d43068ace5 Disable carto for new procedures 2018-11-20 12:14:10 +01:00
Paul Chavard
864d1df413 Test carto migration task 2018-11-20 10:58:22 +01:00
Paul Chavard
e374a5c726 Refactor ChampSerializer 2018-11-20 10:53:14 +01:00
Paul Chavard
0b017580c5 Expose migrated legacy carto champs on api 2018-11-20 10:53:14 +01:00
Paul Chavard
fe630847e9 Refactor legacy carto serializer 2018-11-20 10:53:14 +01:00
Paul Chavard
2462e42b53 Stop using legacy api carto after migration 2018-11-20 10:53:14 +01:00
Frederic Merizen
101e8e2588 [#2999] Rediriger vers la bonne page apres login
(ne corrige pas le cas ou l'utilisateur est passe par le mail de confirmation)
2018-11-16 15:44:20 +01:00
Paul Chavard
2eb61bd6ed Move dossier invites handler to invites controller 2018-11-14 15:16:49 +01:00
Pierre de La Morinerie
b6521625e4 procedure_spec: add missing Timecop.return statement
Fix order-dependant test.
2018-11-14 14:49:41 +01:00
Pierre de La Morinerie
35613992fe rspec: by default use the safer bisect runner for bisecting 2018-11-14 14:49:41 +01:00
Pierre de La Morinerie
acc6df2662 spec: fix Mina enabling Rails traces during tests
When requiring mina files, it automatically enables Rails traces. But
we don't want Rails traces during tests.

Fix this by disabling Rails traces before running tests.

Fix #2989
2018-11-14 11:55:21 +01:00
Pierre de La Morinerie
83031b5cdd procedure: compute the usual instruction time only for the last month 2018-11-13 17:23:31 +01:00
Pierre de La Morinerie
b693e055b7 procedure: make usual_instruction_time spec more robust 2018-11-13 17:23:31 +01:00
Pierre de La Morinerie
b1296df4c3 procedure: refactor usual_instruction_time spec 2018-11-13 17:23:31 +01:00
simon lehericey
fb76197404 SessionController: flipflop trusted device 2018-11-13 10:41:45 +01:00
simon lehericey
0d8d2de5a6 Session: add trusted_device cookie 2018-11-13 10:41:45 +01:00
simon lehericey
5690599289 Session: send a mail to confirm gestionnaire login 2018-11-13 10:41:45 +01:00
simon lehericey
2613d05a4f An admin has always a gestionnaire role 2018-11-13 10:41:45 +01:00
Pierre de La Morinerie
7635aede98 dossier: improve wording of estimated time
Ref #2970
2018-11-12 10:21:57 +01:00
Pierre de La Morinerie
e59bec51ef procedure: use 90th percentile to estimate the completion delay 2018-11-08 18:29:17 +01:00
Pierre de La Morinerie
5c921182ea procedure: rename mean_instruction_time to usual_instruction_time
Ref #2970
2018-11-08 17:20:06 +01:00
Pierre de La Morinerie
c7ac43cfe7 confirmation: add a dedicated page with confirmation instructions
Fix #2586
2018-11-08 16:20:05 +01:00
Paul Chavard
33c6ddc452 Remove dead code related to dossier state 2018-11-08 14:56:45 +01:00
Paul Chavard
0fe59a7c65 Add dossier_legacy_state helper 2018-11-08 14:56:45 +01:00
Paul Chavard
f09a7a01c8 Add dossier_display_state helper 2018-11-08 14:56:45 +01:00
Paul Chavard
80189def98 Remove n+1 calls from API queries 2018-11-08 14:45:09 +01:00
Paul Chavard
a7de2e68ed Refactor types_de_champ views to use service instead of facade 2018-11-07 11:36:10 +01:00
Paul Chavard
1c87eda6e1 Move types_de_champ helper to service 2018-11-07 11:36:10 +01:00
Paul Chavard
2d647f9fa7 Move types_de_champ facade to service 2018-11-07 11:36:10 +01:00
Pierre de La Morinerie
8355b690f0 users: add integration tests for sign-up 2018-11-06 18:24:34 +01:00
Pierre de La Morinerie
b0541fba79 users: sign-in after confirming an account within a short time 2018-11-06 18:24:34 +01:00
Pierre de La Morinerie
0fb9c123c9 invite: mutualize feature helper for signing in 2018-11-06 17:26:20 +01:00
Pierre de La Morinerie
d4b2b04875 spec: clear deliveries before every example 2018-11-06 17:26:20 +01:00
simon lehericey
9d406770a8 [fix #2956] YesNo: fixing to_s 2018-11-06 16:59:47 +01:00
Frederic Merizen
d564eb1225 [#835] Report failed and successful invitations 2018-11-06 16:40:42 +01:00
Frederic Merizen
8cf235f2fd [#835] Enable html5 validation of multiple mails 2018-11-06 15:44:43 +01:00
Frederic Merizen
c7358a8f53 [Fix #835] Enable asking for multiple avis at the same time 2018-11-06 15:44:43 +01:00
Paul Chavard
9ac85295c6 Do not serialize properties on carte champs 2018-11-06 14:26:32 +01:00
Paul Chavard
074050a91a Add IntegerNumberChamp 2018-11-06 11:28:44 +01:00
Paul Chavard
45bfb2fd47 Add DecimalNumberChamp 2018-11-06 11:28:44 +01:00
Paul Chavard
cfd1950e17 Migrate commencer to new_user 2018-11-01 13:10:41 +01:00
Paul Chavard
8ff45c7978 Fix commentaire file_url generator 2018-10-31 12:53:14 +01:00
simon lehericey
2f2f1e1321 Let the API return times in UTC for now 2018-10-31 11:43:48 +01:00
Paul Chavard
e391fe6bec Clarify procedure path availability code 2018-10-30 15:59:37 +01:00
Mathieu Magnin
c656e36ec2 [Fix #2276] Test to ensure form is not cleared if service creation failed 2018-10-30 15:49:18 +01:00
Paul Chavard
fcdc0114fd Add id to geo areas 2018-10-30 12:16:09 +01:00
Paul Chavard
725e88a89a Rename :procedure_path -> :path 2018-10-30 12:01:45 +01:00
Paul Chavard
f1fd1b38ec Refactor procedures_controller 2018-10-30 12:01:45 +01:00
Paul Chavard
78dc582588 Remove ProcedurePath 2018-10-30 12:01:45 +01:00
Frederic Merizen
cf9024d36f Fix test that doesn't work just after daylight saving time changes
If I submit a request on Friday at 8am, and get a response on
Monday at 8am, the response time is 72h...

except if there was a daylight saving time change on Sunday, in
which case the response time is either 71h or 73h, making the test
fail
2018-10-30 10:58:20 +01:00
Frederic Merizen
aff93ecd6a Simplify test syntax 2018-10-26 17:53:36 +02:00
Frederic Merizen
f6207bee26 Do not take time of day into account when searching dates 2018-10-26 17:53:26 +02:00
simon lehericey
a06f872a4b ProcedurePresentation: rescue big int as a datetime value 2018-10-26 14:39:17 +02:00
simon lehericey
63db387984 ProcedurePresentation: display dossier date in d/m/Y 2018-10-26 10:10:20 +00:00
simon lehericey
3685c65fb7 [fix #2905] fix DATE_TRUNC usage
DATE_TRUNC is played on the db where the timestamp are stored in utc.
So if a user search for 12/12/2012 in Paris timezone and that we truncate it should do something similar to :

SELECT DATE_TRUNC('day', foo.timezone) from (SELECT timestamp '2012-12-12 00:00:00' AT TIME ZONE 'Europe/Paris') as foo;
=> 2012-12-11

To avoid such pb, I suggest avoiding DATE_TRUNC when exact results are needed
2018-10-26 10:10:20 +00:00
simon lehericey
9475795143 fix spec 2018-10-26 10:10:20 +00:00
simon lehericey
26ae29ea52 Time.local => Time.zone.local 2018-10-26 10:10:20 +00:00
simon lehericey
3078b377c7 Time.new => Time.zone.local 2018-10-26 10:10:20 +00:00
simon lehericey
e684cec516 DateTime.new => Time.zone.local 2018-10-26 10:10:20 +00:00
simon lehericey
f620e4aee2 DateTime.parse => Time.zone.parse 2018-10-26 10:10:20 +00:00
simon lehericey
2238e5bd9f Time.now => Time.zone.now 2018-10-26 10:10:20 +00:00
simon lehericey
13ffa61435 DateTime.now => Time.zone.now 2018-10-26 10:10:20 +00:00
simon lehericey
b00dec4bf6 Conf: storage.apientreprise.fr -> static.demarches-simplifiees.fr 2018-10-25 17:05:22 +02:00
Frederic Merizen
64cb231b01 [#2675] Fix notification sort order 2018-10-24 17:10:30 +02:00
Paul Chavard
c0344fc30e Fix procedures with multiple dossier link champs 2018-10-24 10:44:28 +02:00
Paul Chavard
4abcffe278 Test ApiGeo RPGAdapter 2018-10-23 18:13:45 +02:00
Paul Chavard
fd490efb59 GeoArea on API expose fields per source type 2018-10-23 18:13:44 +02:00
Paul Chavard
5a8a4b393f Add RPG carte source 2018-10-23 18:13:44 +02:00
Paul Chavard
ed46e2c3be Use Typhoeus in ApiGeo adapter 2018-10-23 18:13:44 +02:00
Frederic Merizen
14fd60bee7 [Fix #2604] Handle ProcedurePresentations that have gone invalid 2018-10-23 16:41:51 +02:00
Frederic Merizen
7baa239095 [#2604] Introduce errors when retrieving ProcedurePresentation 2018-10-23 16:34:38 +02:00
Frederic Merizen
85f698bc71 [#2604] Clean up GestionnaireSpec 2018-10-23 16:34:31 +02:00
Frederic Merizen
eab8da43fc [#2604] Introduce explicit context in GestionnaireSpec 2018-10-23 16:34:28 +02:00
Frederic Merizen
91cfa69220 [#2604] Clean up AssignTo spec 2018-10-23 16:34:25 +02:00
Frederic Merizen
86f01a9120 [#2604] Factor AssignTo spec 2018-10-23 16:34:22 +02:00
Paul Chavard
c4d790b4d0 Test champs carte controller 2018-10-23 09:35:25 +02:00
Paul Chavard
c8c75fc254 Better handle empty user selection layers 2018-10-23 09:35:25 +02:00
Paul Chavard
93ef0a02b7 Remove unused lien_demarche from procedure 2018-10-23 09:25:29 +02:00
Paul Chavard
53a261f424 Don’t rely on a decorator for ProcedureSerializer#geographic_information 2018-10-22 23:28:16 +02:00
Paul Chavard
2e7a4a4098 Add state to ProcedureSerializer 2018-10-22 23:28:16 +02:00
Paul Chavard
4ebc0b7f4c Refactor link attribute generation on ProcedureSerializer 2018-10-22 23:28:16 +02:00
Paul Chavard
7cf225d443 Add Carte champs support to the API 2018-10-22 23:28:00 +02:00
Paul Chavard
17418edb54 Add SIRET champs support to the API 2018-10-22 23:28:00 +02:00
gregoirenovel
0ae8c1d719 [Fix #2880] Do not show our phone number to instructeurs 2018-10-18 18:38:04 +02:00
Frederic Merizen
447e54fe45 [Fix #2874] Allow archived dossiers to appear in search results 2018-10-18 16:05:19 +02:00
Pierre de La Morinerie
65bdfacd8c dossier: remove old SIRET code, controllers and views 2018-10-18 15:46:00 +02:00
gregoirenovel
3a973999a3 [Ref #2738] Hide exercices if not gestionnaire 2018-10-17 15:07:29 +02:00
Frederic Merizen
0dea9f9ece [#2741] Additional test to filtered_ids to be sure 2018-10-17 12:16:51 +02:00
Frederic Merizen
c652cf3ae5 [#2741] Expand unit tests for sorted_ids just to be sure 2018-10-17 12:16:51 +02:00
Frederic Merizen
37fb358bd5 [#2741] Expand unit tests for #get_value just to be sure 2018-10-17 12:16:51 +02:00
Frederic Merizen
a2bd0582b9 [Fix #2741] Filter / sort by en_construction_at 2018-10-17 12:16:51 +02:00
Pierre de La Morinerie
c178e9226b spec: add integration tests for the new SIRET flow 2018-10-17 10:37:06 +02:00
Pierre de La Morinerie
015b74ae56 spec: refactor dossier creation spec 2018-10-17 10:37:06 +02:00
Pierre de La Morinerie
879dfa0fcc spec: move dossier_creation_spec to from user to new_user 2018-10-17 10:37:06 +02:00
Pierre de La Morinerie
93f1a53dfc dossier: add page for etablissement 2018-10-17 10:37:06 +02:00
Pierre de La Morinerie
310f4b92d1 dossier: add action to save SIRET number 2018-10-17 10:37:06 +02:00
Pierre de La Morinerie
54ba0f8e50 dossier: add new page for SIRET identification 2018-10-17 10:37:06 +02:00
Paul Chavard
93ba94a9e6 Add carte champ and geo area models 2018-10-16 14:01:12 +03:00
gregoirenovel
baf69acbcb [Fix #2833] Move /support files to /fixtures 2018-10-16 10:47:41 +02:00
gregoirenovel
99894961a5 AddressController#get → #suggestions 2018-10-16 09:38:53 +02:00
gregoirenovel
43f9fc93de AddressController#get_address_point → #geocode 2018-10-16 09:38:53 +02:00
gregoirenovel
79ebdc3443 Ban::SearchController → AddressController 2018-10-16 09:38:53 +02:00
gregoirenovel
0018326451 Add some spacing to specs 2018-10-16 09:33:16 +02:00
gregoirenovel
22088b167d Remove ApiAdresse::Geocodeur 2018-10-16 09:33:16 +02:00
gregoirenovel
145880555e ApiAdresse::PointAdapter#point → #geocode 2018-10-16 09:33:16 +02:00
gregoirenovel
af716fa3c6 ApiAdresse::PointRetriever → ApiAdresse::PointAdapter 2018-10-16 09:33:16 +02:00
gregoirenovel
7af41b35a2 ApiAdresse::AddressAdapter#list → #get_suggestions 2018-10-16 09:33:16 +02:00
gregoirenovel
517c0ad3fc ApiAdresse::AddressRetriever → ApiAdresse::AddressAdapter 2018-10-16 09:33:16 +02:00
gregoirenovel
76cf9ab746 ApiGeo::Driver → ApiGeo::API 2018-10-15 23:31:23 +02:00
gregoirenovel
8b4ba42f15 Simplify ApiAdresse 2018-10-15 23:31:23 +02:00
gregoirenovel
a841a517df ApiAdresse::Driver → ApiAdresse::API 2018-10-15 23:31:23 +02:00
gregoirenovel
5db4de6c53 QuartiersPrioritaires::Adapter → QuartiersPrioritairesAdapter 2018-10-15 23:31:23 +02:00
gregoirenovel
918a91a985 ApiCarto::Cadastre::Adapter → ApiCarto::CadastreAdapter 2018-10-15 23:31:23 +02:00
gregoirenovel
dc28e79ab4 Group API Entreprise mock responses in a folder 2018-10-15 23:31:23 +02:00
gregoirenovel
7ae5e8ce52 Group API Adresse mock responses in a folder 2018-10-15 23:31:23 +02:00
gregoirenovel
bfa2d5748d Properly name a support files folder 2018-10-15 23:31:23 +02:00
gregoirenovel
2a57c093c0 Remove a duplicated cassette 2018-10-15 20:55:46 +02:00
gregoirenovel
5e9e913dce Carto::Geocodeur → ApiAdresse::Geocodeur 2018-10-15 20:55:46 +02:00
gregoirenovel
d726fbf698 CARTO::SGMAP → ApiCarto 2018-10-15 20:55:46 +02:00
gregoirenovel
bf63e7d6ab Use HTTPS for the API Adresse URL 2018-10-15 20:55:46 +02:00
gregoirenovel
dac2019675 Carto::Bano → ApiAdresse 2018-10-15 20:55:46 +02:00
gregoirenovel
4903a6b189 Carto::GeoAPI → ApiGeo 2018-10-15 20:55:46 +02:00
gregoirenovel
2c76b9386e Remove unused cassettes 2018-10-15 19:57:50 +02:00
gregoirenovel
34ac68b27f 2018-10-15 17:12:34 +02:00
gregoirenovel
b162c68844 Use Hash#slice 2018-10-15 17:12:34 +02:00
gregoirenovel
22beb41240 Unify #generate_qp with #generate_cadastre 2018-10-15 16:45:30 +02:00
gregoirenovel
2ed4c1da1c Use round brackets 2018-10-15 16:45:30 +02:00
gregoirenovel
1f0af303f3 Remove the unused ModuleApiCarto#classes method 2018-10-15 16:16:16 +02:00
Pierre de La Morinerie
47af56cf8b spec: move /spec/lib/rake to /spec/lib/tasks
This reflects the structure of the `/lib/tasks` directory.
2018-10-15 11:51:49 +02:00
Paul Chavard
38091963c1 Update carto tests 2018-10-14 12:34:44 +02:00
Paul Chavard
b5a3fc76fb Remove legacy carto routes 2018-10-14 12:34:43 +02:00
simon lehericey
888bbee097 [fix #2818] DossierController: ensure save_draft is authorized 2018-10-12 12:14:49 +02:00
Frederic Merizen
3dca3c7dee [Fix #1961] Check that sorted_ids works for individual 2018-10-11 12:13:03 +02:00
Frederic Merizen
abd066c6f4 [#1961] filtered_ids for individual 2018-10-11 12:13:03 +02:00
Frederic Merizen
34da620b0f [#1961] get_value for individual 2018-10-11 12:13:03 +02:00
Frederic Merizen
5d862ae92b [#1961] Add individual fields 2018-10-11 12:13:03 +02:00
Frederic Merizen
577475f26e [Fix #2580] Filter by created_at / updated_at 2018-10-10 18:18:28 +02:00
gregoirenovel
c8f872c566 InviteUser → Invite 2018-10-10 12:07:10 +02:00
gregoirenovel
ed11852300 Delete the InviteGestionnaire model 2018-10-10 12:07:10 +02:00
Frederic Merizen
40a5ff0266 [#2750] do parsing of displayed_fields inside ProcedurePresentation
rather than in the view
2018-10-10 09:07:57 +02:00
Frederic Merizen
9fa7a6fd0e [#2750] Move get_value to ProcedurePresentation 2018-10-10 09:07:57 +02:00
Frederic Merizen
fc157c3e4c [#2750] Move sorted_ids to ProcedurePresentation 2018-10-10 09:07:57 +02:00
Frederic Merizen
2e9dafb4c3 [#2750] Move filtered_ids to ProcedurePresentation 2018-10-10 09:07:57 +02:00
Frederic Merizen
0e9b40ccf6 [#2750] Move fields from Procedure to ProcedurePresentation 2018-10-10 09:07:57 +02:00
Frederic Merizen
efcac5192a [#2750] Move fields_for_select to ProcedurePresentation 2018-10-10 09:07:57 +02:00
gregoirenovel
f3caa8ef7f Remove apipie (and maruku) 2018-10-09 17:23:07 +02:00
gregoirenovel
98d348aab1 Remove the delete demarche feature for admins 2018-10-09 16:42:32 +02:00
simon lehericey
2288303de9 [fix #2777] DossiersSerializer: add state 2018-10-08 18:36:49 +02:00
simon lehericey
87e731bc75 Dossier: move state translation to model dossier 2018-10-08 17:55:20 +02:00
Frederic Merizen
33f29f35ab Avoid recreating service too often 2018-10-04 18:09:39 +02:00
Frederic Merizen
eafd0e8348 Evite de cacher la whitelist trop longtemps 2018-10-04 18:09:39 +02:00
gregoirenovel
12f0c99b5a Remove FC fields from instructeur table customisation 2018-10-04 13:54:07 +02:00
gregoirenovel
5107b33af8 Remove FC fields from search 2018-10-04 13:54:07 +02:00
Paul Chavard
44511acfed Do not reload page when instructeur change dossier state
fix #2425
2018-10-04 11:12:43 +02:00
Frederic Merizen
b36d153620 Fix missing sort columns 2018-10-03 17:09:49 +02:00
gregoirenovel
7e4268db67 Enable Style/TrailingCommaInArguments 2018-10-03 12:03:21 +02:00
gregoirenovel
a171186dd8 Enable Style/TrailingCommaInHashLiteral 2018-10-03 12:03:21 +02:00
gregoirenovel
ed240cb4d3 Enable Style/UnneededInterpolation 2018-10-03 12:03:21 +02:00
gregoirenovel
6eeba14885 Enable Style/WordArray 2018-10-03 12:03:21 +02:00
Frederic Merizen
8bb08a1b8b [#2579] Validate columns on ProcedurePresentation model 2018-10-03 10:17:46 +02:00
Frederic Merizen
6fa0c8d2d6 [#2579] Add unit tests for get_value 2018-10-03 10:17:46 +02:00
Frederic Merizen
d2362c29ed [#2579] Add unit tests for DossierFieldService.sorted_ids 2018-10-03 10:17:46 +02:00
Frederic Merizen
b8f88ece5c [#2579] Fix injection SQL dans le filtrage instructeur 2018-10-03 10:17:46 +02:00
Paul Chavard
941c529b2c Remove CGU checkbox
fix #2725
2018-10-03 08:59:02 +02:00
Pierre de La Morinerie
36c1aa118d dossier: remove RecapitulatifController
And add a redirection to the new URLs.
2018-10-02 15:42:29 +02:00
Pierre de La Morinerie
bf9f427299 dossier: remove DescriptionController 2018-10-02 14:40:47 +02:00
Pierre de La Morinerie
3392df0029 dossier: remove CommentairesController 2018-10-02 14:40:38 +02:00
Pierre de La Morinerie
758ccff984 dossier: remove feature flag 2018-10-02 12:25:44 +02:00
Pierre de La Morinerie
f007eaa2ee dossier: enable new UI by default 2018-10-02 12:23:53 +02:00
gregoirenovel
cf69c28979 Fix scope for logo/notice/deliberation deletion 2018-10-02 11:03:48 +02:00
Pierre de La Morinerie
cd938b4c36 dropdown: refactor to make the button an actual button 2018-09-27 17:43:08 +02:00
Pierre de La Morinerie
c79c1a2636 carto: update link to dossier 2018-09-27 17:22:59 +02:00
Pierre de La Morinerie
0526551e71 templates: update link to dossier 2018-09-27 17:22:59 +02:00
Pierre de La Morinerie
40cf7ebdcb mailers: update links to messagerie 2018-09-27 17:22:59 +02:00
Pierre de La Morinerie
08dfe7d13a support: update link to messagerie 2018-09-27 17:22:59 +02:00
Pierre de La Morinerie
421a4107da dossier: rename dossier_spec to brouillon_spec 2018-09-27 17:22:59 +02:00
simon lehericey
6725c5e34c Procedure: add test on mean_instruction_time 2018-09-27 15:02:38 +02:00
simon lehericey
88f7e888c3 Administrateur: do not save api_token in clear text anymore 2018-09-27 10:24:56 +02:00
simon lehericey
912371fbd6 DossierController: use new token validation 2018-09-27 10:24:56 +02:00
simon lehericey
3c95273d6f ProcedureController: use new token validation 2018-09-27 10:24:56 +02:00
simon lehericey
4a04f2e59f ApiController: check token validity for a given admin 2018-09-27 10:24:56 +02:00
simon lehericey
6837c79dd1 Spec: use have_http_status matcher 2018-09-27 10:24:56 +02:00
simon lehericey
2b46a56259 Spec: simplify 2018-09-27 10:24:56 +02:00
simon lehericey
d14944fba3 Spec: mutualize subject 2018-09-27 10:24:56 +02:00
simon lehericey
7b27f00a23 Spec: do not use the deprecated api_token 2018-09-27 10:24:56 +02:00
simon lehericey
9a6e985bac Spec: remove useless require 2018-09-27 10:24:56 +02:00
simon lehericey
674d231194 Spec: add spaces for readability 2018-09-27 10:24:56 +02:00
simon lehericey
1af789b9a8 Profile: add breadcrumb 2018-09-27 10:14:32 +02:00
simon lehericey
8c4f8347ca Api Token: store token in an encrypted form 2018-09-27 10:14:32 +02:00
simon lehericey
1997f45d7e Api Token: do not generate one token by default 2018-09-27 10:14:32 +02:00
simon lehericey
17285b0368 Profil: display token only once 2018-09-27 10:14:32 +02:00
simon lehericey
bd04972f65 Profile: move to new design 2018-09-27 10:14:32 +02:00
Paul Chavard
f94a24d7ce Add path field to procedure information form 2018-09-26 10:53:45 +02:00
Mathieu Magnin
499021588d [Fix #1285] Password strength is ensured when saving an administrateur 2018-09-26 09:03:03 +02:00
Frederic Merizen
998754ab73 [Fix #2258] Validate options for linked dropdown menus 2018-09-25 20:32:19 +02:00
Frederic Merizen
3fea14c07d [#2258] Let dynamic type validate the type de champ 2018-09-25 20:31:34 +02:00
Pierre de La Morinerie
aae1a22b3b dossier spec: add tests to demande view 2018-09-25 16:47:16 +02:00
Pierre de La Morinerie
613900a053 dossier spec: mutualize demande view specs 2018-09-25 16:47:16 +02:00
Frederic Merizen
7631bde16a [#2550] Generate attestation on auto-accepted dossier 2018-09-25 15:53:57 +02:00
Pierre de La Morinerie
8a3f455aa3 dossier spec: test invitation behavior with the new dossier UI 2018-09-25 11:39:31 +02:00
Pierre de La Morinerie
12ee9ba3ce dossier spec: add navigate_to_invited_dossier helper 2018-09-25 11:39:31 +02:00
Pierre de La Morinerie
1c7ad4d37b dossier spec: rename user to owner
This makes the distinction between the invited user and the owner 
clearer.
2018-09-25 11:39:31 +02:00
Pierre de La Morinerie
fe4921bf8e dossier spec: deprecate the old UI tests 2018-09-25 11:39:31 +02:00
Pierre de La Morinerie
c534a9a792 dossier spec: extract the dossier edition behaviors to a shared spec
This will allow to test behavior for invited users.
2018-09-25 11:39:31 +02:00
Pierre de La Morinerie
df2bbba201 dossier spec: create a simple_procedure factory 2018-09-25 11:39:30 +02:00
Pierre de La Morinerie
2b2dbcb112 dossier spec: move visit_dossier to a before block 2018-09-25 11:38:30 +02:00
Frederic Merizen
9beaa293cd [#1421] Use delegation rather than STI for TypeDeChamp 2018-09-25 08:26:56 +02:00
Frederic Merizen
112fdb71fb [#2613] Remove dead code 2018-09-24 20:19:26 +02:00
Frederic Merizen
26ece1d144 [Fix #2613] Filter by date creation entreprise 2018-09-24 20:19:26 +02:00
Frederic Merizen
7d382837d9 [Fix #2622] Change filters to proper JSONB 2018-09-24 19:39:01 +02:00
Frederic Merizen
1419e9b73f [#2622] Change sort to proper JSONB 2018-09-24 19:39:01 +02:00
Frederic Merizen
68608307ad [#2622] Change displayed_fields to proper JSONB 2018-09-24 19:39:01 +02:00
Pierre de La Morinerie
23820988be fixup! dossier: allow inviting users on the dossier page 2018-09-24 17:12:15 +02:00
Pierre de La Morinerie
01599ac1e1 dossier: allow inviting users on the dossier page 2018-09-24 17:05:26 +02:00
gregoirenovel
5db408efdb [Fix #1511] Remove the now obsolete DS logo 2018-09-24 12:16:58 +02:00
gregoirenovel
227006d87b [Fix #329] Properly translate the “password is too short” error 2018-09-23 22:39:01 +02:00
Frederic Merizen
ac82a72dcc [#1946] Monthly expiring dossiers summary mail 2018-09-20 17:44:31 +02:00
Frederic Merizen
43d8db88d9 [#1946] Check if a dossier’s retention period has expired 2018-09-20 17:44:31 +02:00
Frederic Merizen
b672377f5b [#1946] Query dossiers by remaining retention time 2018-09-20 17:44:31 +02:00
Frederic Merizen
5e16b5d80e [#1946] Set en_instruction_at for factorybot-created dossiers 2018-09-20 17:44:31 +02:00
Frederic Merizen
e00aa4a250 [#1946] Make assertions independent 2018-09-20 17:43:06 +02:00
gregoirenovel
0c9628c180 Fix some files according the the .editorconfig rules 2018-09-20 16:23:09 +02:00
gregoirenovel
a87e79ac1f Update a test to comply with Rubocop rules 2018-09-20 16:23:09 +02:00
Paul Chavard
f2139552c2 Reset Flipflop before each test 2018-09-20 16:13:34 +02:00
gregoirenovel
b317b49b3d Confirmation → activation 2018-09-20 10:43:07 +02:00
Pierre de La Morinerie
e5f4056fe2 invite: fix prefilling the invited user email 2018-09-19 12:41:09 +02:00
Pierre de La Morinerie
bfa2a4b89d invite: refactor the syntax of the submit_login_form helper 2018-09-19 12:41:09 +02:00
Pierre de La Morinerie
a63e035daf spec: fix Flipflop state not being reseted after test
This would cause the Support specs to fail randomly with an unexpected
redirection.
2018-09-19 12:41:09 +02:00
gregoirenovel
f3a257d81d Show the mean verification time in the Résumé tab 2018-09-19 12:31:59 +02:00
gregoirenovel
d55c9dff4d Show the mean instruction time in the Résumé tab 2018-09-19 12:31:59 +02:00
Pierre de La Morinerie
082ef92a99 invite: move invites link to the after_confirmation callback
Refactored from 6a69d958da

The `after_confirmation_path_for` isn't really made to be a callbback.
For instance, it is not executed during tests.

Moving the invitations linking to a proper documented callback allows
the linking to work in a testing environment, when invoking `user.confirm`.
2018-09-19 12:08:28 +02:00
gregoirenovel
4e4b7c617f [Fix #2618] Do not enforce Luhn for La Poste SIRET numbers 2018-09-19 10:29:43 +02:00
gregoirenovel
471f6799c8 Refactor Siret tests 2018-09-19 10:15:42 +02:00
Paul Chavard
db1a93ab35 fix procédure -> démarche 2018-09-18 11:22:06 +02:00
Pierre de La Morinerie
ea3267c0d7 dossier: don't display 'brouillon' in the timeline if not required
Unless the user is actually editing a brouillon, we don't need to show
this state.
2018-09-18 10:33:11 +02:00
Pierre de La Morinerie
27727eabf3 dossier: add link to attestation when accepted 2018-09-17 16:29:48 +02:00
Pierre de La Morinerie
fd7f07a244 dossier: add link to messagerie when rejected 2018-09-17 16:29:48 +02:00
gregoirenovel
cedf1ba427 footer → dossier_footer 2018-09-13 10:46:32 +02:00
Paul Chavard
55a9b31b93 Cleanup SIRET champ 2018-09-12 15:53:02 +02:00
Paul Chavard
3f6cc668a7 Implement check_availability route 2018-09-12 12:37:15 +02:00
Pierre de La Morinerie
926dc3e107 dossier: display latest message on summary page 2018-09-12 10:09:16 +02:00
Pierre de La Morinerie
968952ff46 Reorder a test to prepare for a future one 2018-09-12 10:09:16 +02:00
gregoirenovel
c1bec7cf0b Pass the connected_user object instead of its email 2018-09-11 18:17:40 +02:00
gregoirenovel
f8a6765367 [Fix #2540] Allow an instructeur to send a dossier to several instructeurs 2018-09-11 18:00:24 +02:00
Paul Chavard
f3333595a0 Drop text_summary endpoint 2018-09-07 19:41:34 +01:00
Paul Chavard
c49db4b5a4 Add a champs/dossier_link endpoint and use it to fetch dossier info 2018-09-07 19:41:33 +01:00
Pierre de La Morinerie
353ab812fc messagerie: fix 'Invité' label in message sender 2018-09-07 12:02:26 +02:00
Pierre de La Morinerie
211674435e messagerie: better format message dates 2018-09-07 12:02:26 +02:00
gregoirenovel
095166e38f Add original states restoration after some tests
To avoid failing tests
2018-09-07 10:31:39 +02:00
gregoirenovel
87e59e2bfb Streamline DossierController#update_brouillon and #update 2018-09-07 10:19:10 +02:00
gregoirenovel
1341074325 Add DossierController#update 2018-09-07 10:19:10 +02:00
gregoirenovel
cd46ee06e1 Add DossierController#modifier 2018-09-07 10:19:10 +02:00
gregoirenovel
338ffb8b50 DossierController#update → #update_brouillon 2018-09-07 10:19:10 +02:00
gregoirenovel
5ac8117c69 DossierController#modifier → #brouillon 2018-09-07 10:19:10 +02:00
Pierre de La Morinerie
19908ede25 gestionnaire: fix dossier printing page
Fix the invalid template, and add tests.
2018-09-05 16:17:26 +02:00
gregoirenovel
00ecae5f93 Procédure → Démarche 2018-09-05 15:46:24 +02:00
lucien mollard
b2f2e75f43 mailer: add layout for notifications emails 2018-09-05 15:31:08 +02:00
Pierre de La Morinerie
2a5a8cf621 mailer: fix typo in spec 2018-09-05 15:25:46 +02:00
Pierre de La Morinerie
d7dd027cb8 mailer: improve naming in specs 2018-09-05 15:25:46 +02:00
Pierre de La Morinerie
af5df2d661 dossier: add "Messagerie" tab 2018-09-05 14:02:12 +02:00
Pierre de La Morinerie
63472f00e6 messagerie: generalize the current user email 2018-09-05 13:56:12 +02:00
Pierre de La Morinerie
4e2a5f0b9b messagerie: move templates to a shared location 2018-09-05 13:56:12 +02:00
Pierre de La Morinerie
d77e0e938f dossier: fix status overview test 2018-09-05 13:55:52 +02:00
Pierre de La Morinerie
d99e606206 dossier: rename status_progress to status_overview 2018-09-05 11:52:04 +02:00
gregoirenovel
6b88968889 Formulaire → demande, when not editable 2018-09-05 11:07:11 +02:00
Pierre de La Morinerie
750e1e0c83 gestionnaire: move commentaire creation into a service 2018-09-04 18:52:43 +02:00
gregoirenovel
f66d8451b1 Fix FactoryBot warnings 2018-09-04 16:46:48 +02:00
gregoirenovel
b2dc502ed5 Use an env var for Carrierwave's cache_dir 2018-09-04 16:07:59 +02:00
gregoirenovel
75ee41b7fa [Fix #2494] Improve deletion warning text 2018-08-31 15:41:51 +02:00
Frederic Merizen
559d080ca6 [#1946] Show data retention time in footer 2018-08-30 18:03:01 +02:00
Paul Chavard
4866f9724a Add support controller send_form tests 2018-08-30 15:16:35 +01:00
Paul Chavard
8e88f2c27f Cleanup support controller tests 2018-08-30 15:12:50 +01:00
Paul Chavard
ea5248dde1 Flatten tags list, cast to array and remove blank elements 2018-08-30 15:12:50 +01:00
Frederic Merizen
37c45f0d29 [#2486] Always order champs
to help activerecord cache the champs collection
2018-08-30 14:13:32 +02:00
gregoirenovel
e60aa0c37b Use scopes when possible 2018-08-30 13:16:14 +02:00
gregoirenovel
3662b82039 accompagnateur → instructeur 2018-08-29 23:09:08 +02:00
Frederic Merizen
580c6145d0 Migrate nutriscore dossiers from old procedure to new procedure 2018-08-29 19:40:02 +02:00
gregoirenovel
4b071ecf06 Use enum to the fullest with Dossier.states 2018-08-29 17:31:08 +02:00
gregoirenovel
ee25bba38c Use enum to the fullest with Service.type_organismes 2018-08-29 17:31:08 +02:00
gregoirenovel
2d3b553e4d Use enum to the fullest with TypeDeChamp.type_champs 2018-08-29 17:31:08 +02:00
gregoirenovel
16a719922b Use enum to the fullest with User.loged_in_with_france_connects 2018-08-29 17:31:08 +02:00
gregoirenovel
606b56033a Use enum to the fullest with VirusScan.statuses 2018-08-29 17:31:08 +02:00
Paul Chavard
509613afe6 Use contact_link helper instead of mailto 2018-08-29 16:08:01 +01:00
gregoirenovel
0ac160c824 Remove the now useless stats API 2018-08-29 14:54:49 +02:00
Paul Chavard
bad107ffae Add contact form 2018-08-29 10:44:12 +01:00
Paul Chavard
6453b53a41 Add helpscout API adapter 2018-08-29 10:43:00 +01:00
gregoirenovel
6b1ab9b552 Remove a now useless facade 2018-08-28 15:38:39 +02:00
gregoirenovel
cccad7dbdf Remove a now useless method 2018-08-28 15:19:54 +02:00
gregoirenovel
19789b6848 Remove the stats part of the procedure info page for admins
- the numbers are wrong (:termine state does not
  exist)
- the chart does not work
2018-08-28 15:19:31 +02:00
gregoirenovel
9f3650b12f Remove 2 months old call for suggestions 2018-08-28 10:11:09 +02:00
gregoirenovel
d6748bde20 Update a factory so that it uses rating instead of mark 2018-08-27 17:12:01 +02:00
gregoirenovel
3d7b239f2b Improve the feedback form question 2018-08-27 14:16:20 +02:00
Paul Chavard
9abb3c7a5a [ENV] Pipedrive key config 2018-08-23 15:55:32 +02:00
Mathieu Magnin
db8e750f1a [ENV] Configure Api Entreprise token 2018-08-23 15:55:32 +02:00
Frederic Merizen
cef0eafb1a [#2179] Tolerate spurious spaces around search terms 2018-08-23 11:57:06 +02:00
Frederic Merizen
7643459a55 [#2179] Reuse search spec for search service 2018-08-23 11:57:06 +02:00
Frederic Merizen
3b2919a326 [#2179] Use new updated value for search terms
Rather than old in-database value
2018-08-23 10:34:25 +02:00
Paul Chavard
097b06e314 Fix test dossier page 2018-08-14 16:47:31 +02:00
Paul Chavard
b57c22cafe Refactor publish dialog 2018-08-14 16:39:11 +02:00
Pierre de La Morinerie
af95e56b50 dossier: add a page with the form 2018-08-14 15:25:27 +02:00
Pierre de La Morinerie
86539413ee gestionnaire: move dossier partials to a shared location 2018-08-14 15:06:44 +02:00
Pierre de La Morinerie
c286e5fa41 specs: improve dossier details tests 2018-08-14 15:06:44 +02:00
Pierre de La Morinerie
242f9d0af7 specs: fix order-dependant tests in spec/models/gestionnaire_spec.rb
Test run that would fail randomly before:

```
bin/rspec --seed 10002 spec/models/dossier_spec.rb spec/models/gestionnaire_spec.rb
```
2018-08-14 11:48:54 +02:00
Paul Chavard
7237ff80cc Drop procedure dossiers when updating brouillon 2018-08-14 11:21:05 +02:00
Paul Chavard
9de3e6e74b Make info extraction method more safe 2018-08-13 18:32:00 +02:00
Paul Chavard
a6a4790a35 Replace logstasher with lograge 2018-08-13 12:44:00 +02:00
Pierre de La Morinerie
1b7950058d dossier: add details résumé 2018-08-13 11:32:27 +02:00
Pierre de La Morinerie
18d13d76d8 dossier: add details header 2018-08-13 11:32:27 +02:00
simon lehericey
b33f11115c [fix #2358] Checkbox: serialize in attestation by oui or no 2018-08-10 16:25:34 +02:00
lucien mollard
9ecc5f7928 add a user satisfaction form' 2018-08-09 11:41:26 +02:00
Pierre de La Morinerie
5e01be0f15 mailer: add direct link to dossier in creation email
Fix #2341
2018-08-08 15:24:17 +02:00
simon lehericey
9c023095da [fix #2359] Fix link in avis mail for gestionnaire 2018-08-08 13:19:54 +02:00
Pierre de La Morinerie
77eb89cb0f dossier: add a stub page for the new dossier details 2018-08-08 11:49:15 +02:00
Pierre de La Morinerie
0ac28da207 dossier: make Dossiers#show a stub redirecting to the correct location 2018-08-08 11:49:15 +02:00
Paul Chavard
8b79c32a55 Do not rely on javascript for form submits without direct upload 2018-08-07 16:58:49 +02:00
Paul Chavard
a0979b1d57 Fix logstasher custom fields 2018-08-07 16:26:44 +02:00
Pierre de La Morinerie
93ba063612 specs: improve reliability of procedure creation features
The 'etape_suivante' button is sometimes not activated, and it could
be because the event handler on the checkbox sometimes doesn't run.
2018-08-07 14:28:52 +02:00
Pierre de La Morinerie
cc15b0bb28 specs: make checkbox click cleaner 2018-08-07 14:28:52 +02:00
Pierre de La Morinerie
9ec5befa09 specs: increase Capybara default timeout
Because CircleCI machines are slow, and tests sometimes timeout.
2018-08-07 14:28:52 +02:00