Commit graph

9575 commits

Author SHA1 Message Date
Christophe Robillard
453adf3c74 instructeurs: affiche l'effectif moyen annuel n-1 2020-04-23 09:53:27 +02:00
Christophe Robillard
85d119fa4d n'affiche plus le code effectif 2020-04-23 09:53:27 +02:00
Christophe Robillard
a507359f5c précise source pour effectifs mensuels 2020-04-23 09:53:27 +02:00
Paul Chavard
76d95e092d
Merge pull request #5077 from tchak/deleted_dossiers_safer_notifications
Mark as sent or destroy right after each notification
2020-04-23 09:48:42 +02:00
Paul Chavard
b849fc6fc3 Mark as sent or destroy right after each notification is sent to enable a better recovery in case of mid loop failures 2020-04-23 09:36:09 +02:00
Paul Chavard
91a1c129eb
Merge pull request #5075 from betagouv/cleanup-instructeur-show-specs
Specs : nettoyage de instructeurs/procedures_controller_spec.rb #show
2020-04-23 09:35:51 +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
93516c3101
Merge pull request #4974 from tchak/deletion-dossiers-termine
Implement dossiers termine deletion
2020-04-22 16:46:45 +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
Paul Chavard
bdbee38ff1 Add expired termine scopes to dossier 2020-04-22 15:39:10 +02:00
Paul Chavard
50524fa640 Add termine_close_to_expiration_notice_sent_at to dossiers 2020-04-22 15:39:10 +02:00
Paul Chavard
48cb5bf305
Merge pull request #5073 from betagouv/fix-instructeur-procedures-list
Instructeur : corrige la présence de démarches supprimées dans la liste des démarches
2020-04-22 15:33:09 +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
Paul Chavard
30b2e11ffb
Merge pull request #5071 from betagouv/champ-always-find-parent-dossier
champ: return the parent dossier even when discarded
2020-04-22 14:58:59 +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
Pierre de La Morinerie
76ce622ebf
Merge pull request #5051 from betagouv/report-filereader-errors-to-sentry
javascript: report upload FileReader errors to Sentry
2020-04-22 11:45:12 +02:00
Pierre de La Morinerie
ef009f73e2 javascript: report upload FileReader errors to Sentry
We have quite a lot of `Error reading file` errors when uploading files.
These errors are generated by ActiveStorage `file_checksum.js` component
but it eats the actual reason of errors.

(See https://github.com/rails/rails/blob/5-2-stable/activestorage/app/javascript/activestorage/file_checksum.js#L38)

We can't really override the class to generate better errors, as they
are deeply nested in ActiveStorage class hierarchy, and not exported to
external code.

Instead, we hook into the FileReader event handler, to insert a logger
when this error occur. The original event handler will also still be
called as usual.

This is intended to be temporary. The debug code will be removed once
we get a better idea of what is going on.
2020-04-22 11:26:16 +02:00
krichtof
24a14262e7
Merge pull request #5063 from betagouv/5062-effectifs-api
5062 : add effectif mensuel to graphql api
2020-04-22 10:32:58 +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
krichtof
ea37d8ee0a
Merge pull request #5038 from betagouv/4999-afficher-effectifs
4999 affiche pour les instructeurs les effectifs mensuels de l'entreprise
2020-04-21 14:30:33 +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
Paul Chavard
589217b9ed
Merge pull request #4973 from tchak/enable-dossiers-en-construction-deletion
Enable deletion of expired dossiers en_construction
2020-04-21 10:48:21 +02:00
Paul Chavard
fcd136c566 Enable deletion of expired dossiers en_construction
fix #4977
2020-04-21 10:41:54 +02:00
Keirua
b70b7eab91
Merge pull request #5059 from betagouv/fix-local-csp
config: fix (again) the CSP when running a LiveReload server locally
2020-04-21 10:27:20 +02:00
Pierre de La Morinerie
37645d3df2 config: fix (again) the CSP when running a LiveReload server locally
When running the app using `bin/webpack-dev-server` (the external
(and fast) assets server), LiveReload is used. We need to explicitely
allow the LiveReload connections in the CSP policy.

Turns out we now need to specify the protocol explicitely.
2020-04-20 17:24:16 +02:00
LeSim
780df9944e
Merge pull request #5058 from betagouv/fix-search-sql
fix to_tsquery disallowed chars
2020-04-20 15:23:59 +02:00
clemkeirua
2d68d7dc59 fix to_tsquery disallowed chars 2020-04-20 15:15:22 +02:00
Pierre de La Morinerie
8320c66414
Merge pull request #5057 from betagouv/improve-tab-description
Instructeur : la description de l'onglet "Tous" est plus claire
2020-04-20 13:18:00 +02:00
Pierre de La Morinerie
52a491bde3 instructeur: improve description of unfiltered tab
The previous text was misleading: filters can be applied to this tab.
What it really does is present all dossiers regardless of their status.

Fix #5056
2020-04-20 11:34:57 +02:00
Paul Chavard
10bc3c5551
Merge pull request #5054 from tchak/fix-old-carto-api
fix legacy api carte serializer
2020-04-17 13:22:24 +02:00
Paul Chavard
8f01eebf1f fix legacy api carte serializer 2020-04-17 12:48:42 +02:00
Paul Chavard
25e031f8bb
Merge pull request #5041 from tchak/cleanup-procedure-expiration-validations
Cleanup procedure duree_conservation_dossiers_dans_ds validations
2020-04-17 12:48:26 +02:00
Paul Chavard
e512870fd2 Cleanup procedure duree_conservation_dossiers_dans_ds validations 2020-04-16 19:40:19 +02:00
Paul Chavard
fcfb3cb835
Merge pull request #5048 from tchak/cart-editor-write
Carte Editor sends FeatureCollection to the server
2020-04-16 19:39:50 +02:00
Paul Chavard
bc8217e030 Carte Editor sends FeatureCollection to the server 2020-04-16 18:29:19 +02:00
Pierre de La Morinerie
99c8300c10
Merge pull request #5050 from betagouv/improve-file-upload-errors
Javascript : amélioration du formattage des erreurs d'upload
2020-04-16 17:15:56 +02:00
Pierre de La Morinerie
769e98f63e javascript: fix the progress bar removal on success
When using auto-attach, the response HTML fragment replaces the progress
bar – so it doesn't need to be removed twice.
2020-04-16 17:02:23 +02:00
Pierre de La Morinerie
647ad3ba10 javascript: consider unknown upload errors as client errors 2020-04-16 12:59:14 +02:00
Pierre de La Morinerie
b006c33ebe javascript: parse the upload status code correctly
Previously the status was "Status: 422" instead of just 422.
2020-04-16 12:54:18 +02:00
Pierre de La Morinerie
ef5e5977fc
Merge pull request #5046 from betagouv/signal-network-errors
Usager : amélioration des erreurs de l'envoi automatique des pièces jointes
2020-04-16 11:27:54 +02:00
Pierre de La Morinerie
b2231e98d5 javascript: don't report connectivity issues to Sentry 2020-04-16 11:20:45 +02:00
Pierre de La Morinerie
55788990da javascript: add a helpful message on connectivity error 2020-04-16 11:20:45 +02:00
Pierre de La Morinerie
432967bd76 javascript: make Uploader always throw the same kind of errors
A DirectUpload may fail for several reasons, and return many types of
errors (string, xhr response, Error objects, etc).

For convenience, wrap all these errors in a FileUploadError object.

- It makes easier for clients of the Uploader class to handle errors;
- It allows to propagate the error code and failure responsability.
2020-04-16 11:20:45 +02:00
Pierre de La Morinerie
d8f3b86b0e javascript: move auto-upload attachment to the Uploader class
Rationale:

- It makes more sense to handle the progress bar updates in a single class;
- This will allow us to unify the error handling.
2020-04-16 11:20:45 +02:00
Paul Chavard
256362efd3
Merge pull request #5033 from tchak/carto-selection-selections
Expose multiple user selections on champ carte
2020-04-16 10:33:53 +02:00