Commit graph

315 commits

Author SHA1 Message Date
Martin
b6adf5fc72 feat(dossiers/show): enhance header with expirations message/banner. also ensure consistent design between dossier states
fix(spec): broken due to last refactoring

spec(dossier.extend_conservation): add system spec

lint(ruby): still not yet ready for auto lint in IDE...
2021-11-23 05:50:25 +01:00
mfo
82b23b92c0
Merge branch 'main' into 6624/etq-instructeur-je-souhaite-supprimer-des-messages-envoyes-par-erreur 2021-11-17 05:41:56 +01:00
Paul Chavard
e74d599042 feat(procedure): remove duree_conservation_dossiers_hors_ds 2021-11-16 19:55:56 +03:00
Martin
0aecc301c9 refactor(Commentarie.soft_delete): use discard 2021-11-16 14:28:38 +01:00
Pierre de La Morinerie
9be16a1208 views: rename the procedure_publish_label helper
The new text makes more sense.
2021-10-12 16:25:11 +02:00
Paul Chavard
c288739f13 Update app/helpers/procedure_helper.rb
Co-authored-by: LeSim <mail@simon.lehericey.net>
2021-09-27 15:06:17 +02:00
Paul Chavard
7deedf8245 feat(refactor): unify dossiers header 2021-09-27 15:06:17 +02:00
Paul Chavard
357c684688 feat(routage): self managing instructeurs 2021-09-27 15:06:17 +02:00
lydiasan
7de10731a6 i18n: localize dossiers edition 2021-07-20 14:18:20 +02:00
Paul Chavard
280e54b59d Enable test revisions 2021-07-01 15:59:07 +02:00
Paul Chavard
f238710044 Add last_month export 2021-06-23 09:23:10 +02:00
simon lehericey
6be0bbaa9c Change bottom champs editor button from enregistrer to continuer 2021-06-15 09:54:32 +02:00
Christophe Robillard
41569efe9d extract estimate_weight
and rename nb_dossiers by nb_dossiers_termines
2021-06-09 10:52:38 +02:00
Paul Chavard
9b0dae4cc2 Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
Paul Chavard
3b85ade440 Add compatibility cadsatre layer with old API GEO 2021-05-24 11:57:00 +02:00
Pierre de La Morinerie
b8f71bd52c i18n: fix enum values for Dossier.state
According to Rails i18n guide, enum values should be localized
as `<model>/<enum>`, not as sub-values to the attribute.

This fixes an exception in administrate when displaying a Dossier
in the Manager.

Note: we need to change the way GraphQL attributes are generated, because
`AASM::Core::State#display_name` doesn’t honor the `model/attribute.value`
convention (and instead tries to localize as `model.attribute/value`).
So instead we lookup the localized name using ActiveRecord.
2021-05-06 14:38:25 +02:00
Christophe Robillard
6086f05524 corrige le lien annuaire lorsque le siren n'est pas connu 2021-05-06 09:59:27 +02:00
Christophe Robillard
f40d96fbd2 Revert "Revert "Export de tous les dossier d'une démarche""
This reverts commit d9a588b52e.
2021-04-29 17:29:47 +02:00
krichtof
d9a588b52e
Revert "Export de tous les dossier d'une démarche" 2021-04-29 16:07:18 +02:00
Christophe Robillard
8b2849408c instructeurs can create and download archives 2021-04-28 11:40:58 +02:00
Pierre de La Morinerie
76e74003ad manager: fix SendInBlue emails 2021-04-13 10:57:26 +02:00
Christophe Robillard
83cf0fa903 detect staging env 2021-03-24 15:30:12 +01:00
kara Diaby
64b94100f4 fix dossier link helper 2021-03-18 14:36:08 +01:00
kara Diaby
81f5a5254b tests 2021-03-18 11:38:52 +01:00
Christophe Robillard
df3bd3a1d2 handle focus during and after upload 2021-03-17 11:31:51 +01:00
Paul Chavard
1c811083c0 Cleanup feature flags usage 2021-03-04 11:06:04 +01:00
Pierre de La Morinerie
7d1c79bf4b zeitwerk: Url -> URL 2021-02-09 13:07:30 +01:00
Judith
6d89a83d14 unused locales clean-up 2021-02-04 12:15:13 +01:00
Paul Chavard
cad8ee31d8 Remove legacy geo sources 2020-12-10 11:26:16 +01:00
clemkeirua
f298d2c2ba dedicated screen for inspecting user emails 2020-10-13 17:36:43 +02:00
clemkeirua
560e1fc4fe tag.span instead of content_tag 2020-09-25 12:53:11 +00:00
Paul Chavard
50c0955465 Avoid an error if area can’t be computed 2020-09-22 09:12:55 +02:00
clemkeirua
f9c4e967d6 remove :autosave_dossier_draft 2020-09-21 08:46:01 +00:00
kara Diaby
13e4589905 Publications page to the new UI (admin) 2020-09-16 09:15:44 +02:00
Judith
25a24ba7c8 removal of translation keys already present in the gem rails-i18n 2020-09-01 16:33:58 +02:00
Pierre de La Morinerie
3fdecf0924 helpers: remove element immediately when no timeout is specified
This fixes an issue where clicking quickly on several "Remove row"
buttons on a repetition field results in autosave errors.

This is because the N+1 autosave request is correctly sent after the
Nth response from the server, but _before_ the row element is actually
removed from the DOM. So the N+1 request actually sends the fields for
the deleted row, which makes the server raise an error.

With this fix, the row gets properly removed when the server responds,
and before the next request is started.
2020-08-25 15:45:49 +02:00
Christophe Robillard
f77cc06a91 prend en compte le nom de l'enseigne pour l'établissement 2020-08-20 14:23:02 +02:00
Judith
c27b2da90b datetime type de champ: changed the years range from [1950;2100] to [to current year - 1;
current year + 50] (or [entered_date; current_year + 50] if old date already entered) because:
The type_de_champ Datetime is used for close future dates and very close past dates (for accident declaration for ex.)
The select currently has a range from 1950 to 2100, so 70+ years not supposed to be used, leading to:
- many bad data entered (0000 or 1950 to not scroll)
- making it difficult for users to give the proper date (current date is lost in the middle of 149 others) so risk to be lazy and select a random one or genuinely make a mistake
2020-08-13 13:41:45 +00:00
Christophe Robillard
eea5fd66ad corrige mise en forme commentaire 2020-08-10 17:36:23 +02:00
jpoulvel
62e04a6ca9
Merge branch 'dev' into new_design_edit_attestation 2020-07-30 09:53:09 +02:00
Judith
b8a49e9012 creation of attachment_upload_helpers and integration in the code 2020-07-29 12:26:27 +02:00
Keirua
347dbe4c87
Merge pull request #5417 from betagouv/cleanup-incident-janvier
Suppression du message d'alerte suite aux problèmes d'upload
2020-07-29 11:00:12 +02:00
Paul Chavard
a6eef6fb19 Expose draft_revision types_de_champ to editor 2020-07-28 17:04:06 +02:00
clemkeirua
de1df85462 suppression du message d'alerte suite aux problèmes d'upload 2020-07-27 10:32:03 +02:00
clemkeirua
7e085c657d specific deactivation of rubocop DS/ApplicationName rule 2020-07-23 16:20:16 +02:00
clemkeirua
52548d7646 ajout du nom d'application dans les mailers 2020-07-23 16:17:52 +02:00
Judith
782706537d Changed the routes to pass all new design admin pages under
'new_administrateur' scope, except 'services'.
As a result, the url of these pages will all include '/admin'.
2020-07-07 14:08:01 +00:00
Christophe Robillard
cce1435faf remove precision for currency 2020-07-01 09:28:18 +02:00
Christophe Robillard
4839506374 refactor instructeur_avis_url 2020-06-30 09:17:27 +02:00
Pierre de La Morinerie
af5b36ea6a helpers: prevent some texts to be incorrectly detected as links
Users were having issues with texts like:

> Pour info: penser à faire cette action.

where `info:` was detected as being an URI.
2020-06-22 14:42:41 +02:00
Christophe Robillard
2fd88e3a17 affiche uniquement l'année pour les bilans 2020-06-09 17:06:08 +02:00
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
clemkeirua
abe0e321ac include the libelle with the redirection link 2020-06-04 13:02:35 +00:00
Christophe Robillard
75a268aed6 show some info from bilans 2020-06-04 12:33:33 +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
38eb60f2ac views: display auto-archive date on procedure description 2020-05-28 13:22:02 +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
Paul Chavard
9cb612bb3d Show area and length on champ carto selections utilisateur 2020-04-23 10:21:18 +02:00
Christophe Robillard
1165f8483d rename effectif columns 2020-04-21 21:13:07 +02:00
Christophe Robillard
db3ef195ad fetch and show effectif mensuel
- fetch and store effectif mensuel (at the creation of the dossier or
when updating a siret field

- show effectif mensuel only for instructeurs
2020-04-21 14:22:11 +02:00
Paul Chavard
22604013d0 Expose multiple user selections on champ carte 2020-04-15 18:07:09 +02:00
clemkeirua
6df927a46f nom du demandeur dans user::dossiers#index si >=2 dossiers 2020-04-10 13:14:39 +02:00
Pierre de La Morinerie
ded65cfdb9 dossier: fix rendering of piece_justificative in repetition
In repetitions we can't render the piece_justificative champ in the way
we do for normal champs (which was already a bit hackish).

Instead we render the whole form partial – and then extract the champ
from the form. In this way, we're sure to render the champ as it
appears in the form, without any hacks to reproduce the form structure.
2020-04-06 11:50:31 +02:00
Pierre de La Morinerie
91260e2867 dossier: fix upload route of piece_justificative in repetitions
In repetitions, `form.index` doesn't make much sense. Turns out we
don't really need the index of the champ: we can just use the champ id.
2020-04-06 11:50:31 +02:00
Pierre de La Morinerie
6417c0d2c0 dossiers: allow auto upload of attachments 2020-03-31 13:09:44 +02:00
Paul Chavard
ec1cd989ab Show the reason on deleted dossiers 2020-03-25 16:57:03 +01:00
Christophe Robillard
78fcdd42a6 refactor 2020-03-25 10:19:07 +01:00
Christophe Robillard
b4b92accf1 instructeur: show deleted dossiers for a procedure 2020-03-25 10:19:07 +01:00
clemkeirua
ca7f81b6ed add a feature-flip for procedure PDF export 2020-03-17 15:00:03 +01:00
Paul Chavard
ae2cfdd44e Update browser gem
`modern?` method was removed in version 4
2020-03-17 11:25:20 +01:00
Christophe Robillard
924702699f highlight routing criteria label when updated 2020-03-04 14:56:59 +01:00
Paul Chavard
be66a8986c Activate champ integer number on all the new procedures 2020-02-25 11:26:37 +01:00
kara Diaby
9287188904 Fix the thousand separator in order to copy/paste without space 2020-02-17 11:31:12 +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
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
Pierre de La Morinerie
3212dfddca app: allow hiding the browser banner for one week 2019-12-03 16:09:18 +01:00
Paul Chavard
7b947feae4 Rename demarche archivée to demarche close 2019-11-28 15:07:16 +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
simon lehericey
bc85e9b7ec Use aria-describedby to link notice and input again
https://www.w3.org/WAI/tutorials/forms/instructions/#using-aria-describedby
2019-11-21 15:34:59 +01:00
Pierre de La Morinerie
bff7892ba8 dossiers: autosave drafts 2019-11-21 14:00:06 +01:00
Paul Chavard
0c6705f7fd Drop old export service 2019-11-21 10:25:40 +01:00
simon lehericey
16814af474 Make (part of) the html valid again
simple_format always wraps its content so the better idea I have got was to use a span to avoid p in p.
2019-11-06 17:01:07 +01:00
simon lehericey
90ae4181bf fix dossier_linked_path in routed procedure 2019-10-23 21:47:20 +02:00
Paul Chavard
e7ed408e08 Auto-link valeur des champs
closes #2865
2019-10-07 21:20:24 +02:00
Nicolas Bouilleaud
b9968b76b0 Remove “avec_lien” helpers now that Procedure.path cannot be nil 2019-09-17 16:30:48 +02:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
simon lehericey
b541ef0b41 Procedure has many instructeurs with defaut_groupe_instructeur 2019-09-02 11:41:12 +02:00
Paul Chavard
cc35a04e26 Migrate procedure logo to active_storage 2019-08-21 11:15:00 +02:00
Paul Chavard
e68d2cf5e2 Enable champ repetition for all 2019-08-14 12:53:51 +01:00
simon lehericey
3fde2a6f70 Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
Paul Chavard
25db21467d Stop using Flipflop as switch for Fog 2019-07-31 15:15:09 +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
0c4cb3b498 admin: remove UI for managing old pj 2019-07-30 16:11:16 +02:00
Pierre de La Morinerie
45c62cefb2 helpers: add vertical_margin helper for mailers 2019-07-25 12:25:50 +02:00
Pierre de La Morinerie
2c612f6448 helpers: add variants to mailer_round_button 2019-07-25 12:25:50 +02:00
Pierre de La Morinerie
f88d7c28fa emails: add a "Read message" button to the new answer email 2019-07-18 12:38:13 +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
simon lehericey
d68d2be798 Profil: accessible to all roles 2019-07-09 11:55:17 +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
simon lehericey
522d7684ea dossier state button in red when refused 2019-07-02 18:40:20 +02:00
Paul Chavard
fb0ef15e3c Export dossiers v2 2019-07-02 14:20:29 +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
Paul Chavard
adb6255d5d Do not crash if element to remove is not found 2019-04-09 17:15:45 +02:00
Paul Chavard
1cbd348569 Fix scope error 2019-04-04 10:31:24 +02:00
Paul Chavard
25c4391118 Update type de champ serialization for editor 2019-04-03 14:38:07 +02:00
Paul Chavard
e71cdcd12c Move all the trackers to a separate js pack 2019-04-02 17:33:53 +02:00
Mathieu Magnin
8525761332 Revert english dates 2019-04-02 14:38:47 +02:00
pedong
f82fdef45f [fix #3342] format letter for date SIRET 2019-03-27 16:10:54 +01:00
pedong
fb29d30826 [fix #3342] show date with format letter 2019-03-27 15:27:20 +01:00
Pierre de La Morinerie
ad57c6ef99 helpers: add ServiceHelper#formatted_horaires 2019-03-20 10:42:57 +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
Paul Chavard
aad685bb79 Show preview with correct type de champ options
fix #3439
2019-02-19 16:37:42 +01:00
Paul Chavard
5da5f75c5f [Types de Champ Editeur] Save on change and only edited model 2019-02-07 17:05:55 +01:00
Paul Chavard
2754dc9c9e Avoid n+1 when loading types de champ in to the 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
9b7b59f67e Champs editor should handle repetition type 2019-02-04 11:58:26 +01:00
Pierre de La Morinerie
016e5f2e6f commencer: add an independant page 2019-01-21 14:45:38 +01:00
Paul Chavard
6036d7906f Enable champ_siret for all 2019-01-17 15:17:48 +01:00
Paul Chavard
9136c9dfa0 Enable support_form for all 2019-01-17 15:17:48 +01:00
Mathieu Magnin
a4ddec6dff Wording : Démarche en brouillon => Démarche en test 2019-01-17 14:04:58 +01:00
Paul Chavard
41c9b21509 Use new editor 2019-01-17 11:20:31 +01: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
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
df7e0a9881 Remove dead code 2018-12-19 14:59:15 +01:00
Paul Chavard
d77a5c9f15 More tests and fixes on carte champ 2018-11-30 13:28:30 +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
1c87eda6e1 Move types_de_champ helper to service 2018-11-07 11:36:10 +01:00
Paul Chavard
7a60f1b549 Enable champ carte for everyone 2018-11-06 14:26:32 +01:00
Paul Chavard
9ac85295c6 Do not serialize properties on carte champs 2018-11-06 14:26:32 +01:00
Paul Chavard
ca09aa52a3 Put IntegerNumberChamp behind a flag 2018-11-06 11:28:44 +01:00
Paul Chavard
725e88a89a Rename :procedure_path -> :path 2018-10-30 12:01:45 +01:00
simon lehericey
3dad743d56 remove localtime as it uses server timezone 2018-10-26 10:10:20 +00:00
Paul Chavard
5a8a4b393f Add RPG carte source 2018-10-23 18:13:44 +02:00
Paul Chavard
383a14ff06 Add geo data helper 2018-10-23 09:35:25 +02:00
Paul Chavard
e5d8d351ba Fix sentry errors in old carto module 2018-10-22 15:40:19 +02:00
Paul Chavard
93ba94a9e6 Add carte champ and geo area models 2018-10-16 14:01:12 +03:00
gregoirenovel
98d348aab1 Remove the delete demarche feature for admins 2018-10-09 16:42:32 +02:00
gregoirenovel
6eeba14885 Enable Style/WordArray 2018-10-03 12:03:21 +02:00
Pierre de La Morinerie
758ccff984 dossier: remove feature flag 2018-10-02 12:25:44 +02:00
gregoirenovel
66fcdda59b Extract some code in a helper
It makes the code clearer and will avoid some
linting issues
2018-09-20 16:23:09 +02:00
Paul Chavard
9a338ec140 Change how we format brouillon démarche label 2018-09-19 11:27:55 +02:00
Pierre de La Morinerie
38f6d11c57 dossier: finish feature-switch for enabled new dossier details 2018-09-18 16:48:27 +02:00
Paul Chavard
b772256a97 Read from path attribute instead of procedure_path when possible 2018-09-18 13:21:18 +02:00
Paul Chavard
14bf543976 Add enable and disable element helpers 2018-09-12 11:00:01 +02:00