Commit graph

675 commits

Author SHA1 Message Date
Nicolas Bouilleaud
7e80b8a4dc Enable the Rails/InverseOf cop and add missing inverse_of 2019-06-17 13:44:07 +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
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
Nicolas Bouilleaud
be4c575622 Add Follow.unfollowed_at
The active scopes is used indirectly in the dossier<->gestionnaire associations: the existing tests in dossier and gestionnaire just work™.
2019-06-12 17:33:53 +02:00
Paul Chavard
d5911071f8 Return dossiers on api with stable order 2019-06-04 15:34:49 +02:00
Paul Chavard
b8bf662c6d Track dossier demander un avis 2019-05-14 14:31:03 +02:00
Paul Chavard
9c472e6524 Track dossier private annotations modifications 2019-05-14 14:31:03 +02:00
Paul Chavard
dba8d65137 Track dossier operations with author and subject 2019-05-14 14:31:03 +02:00
clemkeirua
afa6711564 refacto suite à simplification virusscan 2019-05-07 08:54:29 +02:00
clemkeirua
b3956bc072 introduce virus scans 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
Pierre de La Morinerie
ce9c5da6e1 dossier: add a messagerie_available? method 2019-03-20 10:42:57 +01:00
Paul Chavard
01b966ff66 Check demarche ownership on multiple administrateurs 2019-03-12 11:59:01 +01:00
Frederic Merizen
a87e3ac697 [#3477] Make filtering by datetimes a proper scope 2019-03-11 17:14:17 +01:00
simon lehericey
a7e068003a [fix #3427] Administration can soft delete a dossier 2019-02-14 18:09:08 +01:00
Paul Chavard
a0a1ce11c8 Add repetition to apercu 2019-02-07 12:29:27 +01:00
Pierre de La Morinerie
a6704c4cd6 dossiers: allow users to delete "en construction" dossiers 2019-02-07 11:07:07 +01:00
Pierre de La Morinerie
d251ebc2f4 dossiers: shorten method name 2019-02-06 18:20:35 +01:00
simon lehericey
5715cdaa4c [fix #3363] use organisation_name in dossier summary 2019-02-05 17:41:51 +01:00
Paul Chavard
071448e1d9 Champ Repetition dossier editor 2019-02-04 16:19:07 +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
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
Paul Chavard
35494df78e Procedure export dossiers with champs siret 2018-12-05 17:09:39 +01:00
Paul Chavard
9b39934e8b Destroy dossier_operation_logs when dossier is destroyed 2018-11-28 17:06:54 +01:00
Mathieu Magnin
b51bf759b1 [Fix #3081] If a dossier is destroyed, then destroy the attestation 2018-11-28 16:33:12 +01:00
Paul Chavard
36f6f54337 Remove unused carto models 2018-11-27 16:11:25 +01:00
Paul Chavard
0f0ca2ec65 Lod dossier operations 2018-11-27 12:49:40 +01:00
Paul Chavard
85e3eb04f4 Add DossierOperationLog model 2018-11-27 12:49:40 +01:00
Paul Chavard
9843666bdc Implement state change methods on dossier 2018-11-27 12:49:40 +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
971a08c92a Add expose legacy carto api flag 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
Paul Chavard
33c6ddc452 Remove dead code related to dossier state 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
simon lehericey
3dad743d56 remove localtime as it uses server timezone 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
gregoirenovel
22088b167d Remove ApiAdresse::Geocodeur 2018-10-16 09:33:16 +02:00
gregoirenovel
5e9e913dce Carto::Geocodeur → ApiAdresse::Geocodeur 2018-10-15 20:55:46 +02:00
Paul Chavard
c63675461a Add new carto init code 2018-10-14 12:34:43 +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
c1f18a164d Remove dead, buggy code 2018-10-10 05:51:17 +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
5107b33af8 Remove FC fields from search 2018-10-04 13:54:07 +02:00
Frederic Merizen
3bb6fd2d47 [#2579] Remove no-op
(sanitize_sql_for_order does not do anything when its argument is a string)
2018-10-03 10:17:46 +02:00
Paul Chavard
941c529b2c Remove CGU checkbox
fix #2725
2018-10-03 08:59:02 +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
63fc0b3bc3 [Fix #2584] Move Field related code to a service 2018-09-18 13:49:34 +02:00
gregoirenovel
00ecae5f93 Procédure → Démarche 2018-09-05 15:46:24 +02:00
Frederic Merizen
7326065590 [fix #2486] Include all needed attributes on downloadable_sorted
to avoid N+1 select
2018-08-30 14:13:32 +02:00
Frederic Merizen
9403d4c042 [#2486] followers_gestionnaires should not be a method
To help activerecord caching
2018-08-30 14:13:32 +02:00
Frederic Merizen
37c45f0d29 [#2486] Always order champs
to help activerecord cache the champs collection
2018-08-30 14:13:32 +02:00
gregoirenovel
4b071ecf06 Use enum to the fullest with Dossier.states 2018-08-29 17:31:08 +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
Frederic Merizen
333f4e8824 [#2179] update champ and individual association with default
That way, they are safe to read in update_search_terms, and no
reload is needed later
2018-08-23 10:34:25 +02:00
Paul Chavard
46e75ac8ef Only notify on dossier supression if dossier is en_construction 2018-08-02 17:07:24 +02:00
Frederic Merizen
0e639030f9 [#2179] Generate denormalized search terms value for Dossier 2018-07-27 11:11:52 +02:00
Pierre de La Morinerie
13182ad291 dossier: send deletion email also to the following gestionnaires 2018-07-25 13:49:55 +02:00
Mathieu Magnin
9afbd16bbf [Fix #2145] When procedure is archived, usager should not be able to submit a dossier 2018-07-02 11:10:33 +02:00
Paul Chavard
d0a6957862 Remove old cerfa code 2018-06-28 15:16:20 +02:00
Frederic Merizen
7fdb523b1a We can use the shorter syntax fort ordered_champs(_private)
now that the old preview is gone
2018-06-28 10:27:07 +02:00
Mathieu Magnin
ae6e3e345e Task to unhide dossiers with instruction commencee 2018-06-19 10:05:00 +02:00
Mathieu Magnin
89f82ba92e Move email sending in delete method 2018-06-19 10:05:00 +02:00
Mathieu Magnin
e05fb2d0ae Allow dossier deletion if instruction has not started 2018-06-19 10:05:00 +02:00
simon lehericey
e11392981d [fix #2072] DossierController: check the user can update the dossier 2018-06-08 16:24:29 +02:00
gregoirenovel
0329b1db68 Use User#owns_or_invite? instead of Dossier#owner_or_invite? 2018-05-31 14:39:43 +02:00
gregoirenovel
a57e2388f6 Unify NotificationMailer methods’ signatures 2018-05-31 12:10:06 +02:00
Mathieu Magnin
eb1fbb7dbc Delete button, notify user and admin then delete dossier 2018-05-30 18:01:36 +02:00
Frederic Merizen
07b1c147d9 [Fix #1972] Always send mails asynchronously 2018-05-28 12:02:13 +02:00
Paul Chavard
ad24fd5991 Remove entreprise and rna_information models 2018-05-24 17:54:51 +02:00
gregoirenovel
8848abc536 #to_sorted_values -> #sorted_values 2018-05-03 23:35:51 +02:00
gregoirenovel
886431b120 Make some methods private 2018-05-03 23:35:51 +02:00
gregoirenovel
f020fa9e2b Remove some useless self mentions 2018-05-03 23:35:51 +02:00
Paul Chavard
0b7cf3ae75 #full_data_strings_array -> #export_values 2018-05-03 23:35:51 +02:00
gregoirenovel
031522cf42 Checking on entreprise has no sense, check etablissement 2018-05-03 23:35:51 +02:00
gregoirenovel
12cda1739b #export_entreprise_data -> #export_etablissement_data 2018-05-03 23:35:51 +02:00
Paul Chavard
27592ae072 Add simple web hooks to procedures 2018-04-09 11:02:24 +02:00
gregoirenovel
c60c58ff8b Fix issues spotted by @fredZen in #1802 2018-04-06 16:39:54 +02:00
kemar
b42e410da0 [Fix #1494] Display a warning when accepting a dossier if needed
Show the accompagnateur the unspecified demande
champs and attestations privées needed for the
attestation
2018-04-06 16:15:09 +02:00
Frederic Merizen
13d7149b5c [#1677] Extract Dossier#invite_for_user 2018-03-29 16:59:16 +02:00
Frederic Merizen
884c430619 [#1677] No need to use emails when we have users 2018-03-29 16:59:16 +02:00
simon lehericey
66a113c7db Dossier: remove uncessary query on order_champ_v2 2018-03-27 16:48:38 +02:00
Frederic Merizen
2fa88a432b Add missing brackets around parameters in method definitions 2018-03-20 17:54:51 +01:00
gregoirenovel
d0a59058e8 Remove the mandataire_social guess
Rationale:
- is true for only 0.06% of Dossiers
- is not displayed anymore anyways
- will be a rare case for now
  * FC adoption is not insane
  * FC used more for personal than professional
    matters
  * not always the mandataires sociaux that fill
    dossiers for their companies, so not that
    relevant
- we can add it back later
2018-03-20 16:09:00 +01:00
Paul Chavard
19b58a298c Clarify dependent relationships between etablissement and entreprise 2018-03-07 17:42:31 +01:00
gregoirenovel
0a9f442260 Enable some Rails cops 2018-03-06 17:18:44 +01:00
Paul Chavard
896518f3d5 add SIRETService 2018-02-27 16:22:53 +01:00
simon lehericey
d702a0c083 [fix #1411] user: new form ui 2018-02-27 15:24:50 +01:00
Mathieu Magnin
9627ba43c0 [Fix #1409] Identite can be updated 2018-02-20 11:01:47 +01:00
Paul Chavard
52749713ab Remove ChampPublic/ChampPrivate STI 2018-02-13 12:07:13 +01:00
gregoirenovel
29d9b03672 Bump rails to 5.2.0.rc1 2018-02-07 16:18:42 +01:00
gregoirenovel
142241dd16 Remove notifications 2018-02-06 14:07:20 +01:00
gregoirenovel
5b62bc4f12 Use transform_keys when possible 2018-01-30 15:45:32 +01:00
gregoirenovel
db8c3030e3 Use transform_values when possible 2018-01-30 15:45:32 +01:00
Frederic Merizen
db5bf39e32 [#1203] No implicit available_for_states, make it explicit 2018-01-18 18:26:14 +01:00
Frederic Merizen
eebab14954 [Fix #1203] No début d’instruction tag in accusé de réception mails
Doesn’t make sense functionnally
2018-01-18 18:26:14 +01:00
gregoirenovel
897a30da0c Enable the Layout/SpaceInsideBlockBraces cop 2018-01-18 10:53:34 +01:00
gregoirenovel
3e93bd3615 Enable the Layout/SpaceBeforeComma cop 2018-01-18 10:53:34 +01:00
gregoirenovel
7c34807f46 Don’t use unless 2018-01-12 11:32:43 +01:00
Simon Lehericey
40b9a77395 Dossier: replace nouveau scope by en_construction 2017-12-15 17:37:30 +01:00
Simon Lehericey
4be6cb9126 Dossier: delete state_nouveaux which is similar to en_construction 2017-12-15 17:37:30 +01:00
LeSim
7cc69de543 Dossier: remove useless state methods and const 2017-12-15 17:37:30 +01:00
Simon Lehericey
9c354e18eb [fix 363] Dossier: remove next_step! 2017-12-15 15:43:30 +01:00
Simon Lehericey
e78f5b3a2d [fix 363] Dossier: remove next_step! role var 2017-12-15 15:43:30 +01:00
Simon Lehericey
201862d450 [fix 363] Dossier: remove next_step! action = initiate, role = user 2017-12-15 15:43:30 +01:00
Simon Lehericey
907db89371 [fix 363] Dossier: remove next_step! action = follow 2017-12-15 15:43:30 +01:00
Simon Lehericey
11c010859c [fix 363] Dossier: remove next_step! action = update 2017-12-15 15:43:30 +01:00
Simon Lehericey
629cccbf27 [fix 363] Dossier: remove next_step! action = comment 2017-12-15 15:43:30 +01:00
Simon Lehericey
c83552f423 [fix #504] Dossier: without_continuation -> sans_suite 2017-12-15 12:10:54 +01:00
Simon Lehericey
2be9b8d2ba [fix #504] Dossier: refused -> refuse 2017-12-15 12:10:54 +01:00
Simon Lehericey
a13256f73d [fix #504] Dossier: closed -> accepte 2017-12-15 12:10:54 +01:00
LeSim
3dda27b281 [fix #504] Dossier: received -> en_instruction 2017-12-15 12:10:54 +01:00
Simon Lehericey
72bae2c374 [fix #504] Dossier: draft -> brouillon 2017-12-15 11:52:09 +01:00
LeSim
56545933a9 [fix #504] Dossier: initiated -> en_construction
The change must not impact the api
2017-12-15 11:52:09 +01:00
Simon Lehericey
e2bbd2a37a [fix #992] export: dossiers are order by initiated_at 2017-12-01 13:45:53 +01:00
Simon Lehericey
28a047a64b [Fix #508]Api GeoJson: export dossier.json_latlngs to geojson 2017-11-28 14:41:08 +01:00
Simon Lehericey
e28b18d978 Dossier: add statut method 2017-11-23 09:34:18 +01:00
Simon Lehericey
a71574b8dd [fix #445]: add title to pages 2017-11-21 17:47:27 +01:00
Simon Lehericey
155a5f7826 Notification: add methods to retrieve notifications 2017-11-10 16:29:44 +01:00
Simon Lehericey
338911d1a8 [fix #905] Champ: add for_export method which strips tag for textarea champ 2017-10-30 17:14:31 +01:00
Simon Lehericey
3f2419a2a3 Dossier: rename data_with_champs to to_sorted_values 2017-10-30 17:14:31 +01:00
Simon Lehericey
f0373f6bc2 Dossier: remove useless return 2017-10-30 17:14:31 +01:00
Mathieu Magnin
a8ec374252 [Fix #813] When a brouillon is created, send an email to user 2017-10-20 12:13:55 +02:00
gregoirenovel
9ea396cc8b Avoid loading the association for the without_followers scope
As seen in https://stackoverflow.com/questions/5319400/want-to-find-records-with-no-associated-records-in-rails-3
2017-10-17 14:10:34 +02:00
Mathieu Magnin
0f945e2fea Simplify mailer parameters to be serializable (even if mail_template.id is nil) 2017-10-13 21:27:17 +02:00
Mathieu Magnin
3ba5de88b6 [Fix #839] Send notification email in async to avoid sending same email to different users 2017-10-13 17:41:02 +02:00
gregoirenovel
fd08bb8c57 Eager-load data for downloadable dossiers
So that the export is faster
2017-10-11 12:38:00 +02:00
gregoirenovel
3df9356021 Add field sort to the dossiers table 2017-10-02 17:45:22 +02:00
gregoirenovel
88ad986143 Remove the ordering from the dossier scopes 2017-10-02 17:45:22 +02:00
gregoirenovel
e1bdbec815 Allow the customization of the dossiers table 2017-10-02 17:45:22 +02:00
Simon Lehericey
2b760c85c4 [Fix #763] Add annotations_privees to buggy annotation system 2017-09-27 15:08:34 +02:00
Simon Lehericey
04d1e0f0e8 Notification: instruction -> avis 2017-09-27 12:16:33 +02:00
Simon Lehericey
fb5472d3f6 Dossier: remove a_instruire scope
As it s a duplication of en_instruction
2017-09-26 14:42:54 +02:00
Simon Lehericey
1cfeb10ce9 [Fix #503] Dossier: remove updated 2017-09-26 14:42:54 +02:00
Simon Lehericey
633b55aca0 [Fix #503] Dossier: remove replied 2017-09-26 14:42:54 +02:00
Simon Lehericey
030a11d98c [Fix #503] Dossier: remove unused ouvert state 2017-09-26 14:42:54 +02:00
Simon Lehericey
73357c5144 [Fix #503] Dossier: Remove waiting for gestionnaire scope 2017-09-26 14:42:54 +02:00
Simon Lehericey
460cd3e237 [Fix #503] Dossier: Remove waiting for user scope 2017-09-26 14:42:54 +02:00
Simon Lehericey
fdbf34f04b Avis instruction: only authorized avis 2017-09-20 15:42:26 +02:00
Simon Lehericey
a298c48e8f Dossier: add notification icon 2017-09-06 11:13:50 +02:00
Simon Lehericey
fbd16b8c75 Procedure show: add notification icon 2017-09-06 11:11:47 +02:00
Simon Lehericey
3e5d0dce6a NewDesign: can add annotations 2017-09-06 11:11:37 +02:00
Simon Lehericey
74c71a3776 Form: use rails form helper 2017-09-06 11:11:34 +02:00
Simon Lehericey
0d3c145ef3 NewDesign: procedure show add dossier actions 2017-09-06 11:11:12 +02:00
Simon Lehericey
013f2463d1 NewDesign: procedure show add dossier status 2017-09-06 11:11:12 +02:00
Simon Lehericey
b48af51ee9 NewDesign: procedure show only header 2017-09-06 11:11:11 +02:00
Simon Lehericey
5737ebd090 Dossier: workaround preview bug linked to champs with dossier.id == 0 2017-08-29 16:30:34 +02:00
gregoirenovel
79eccb2de0 Add a method to speed up a conditional statement 2017-08-29 14:57:23 +02:00
gregoirenovel
0a8ac645d8 Shave some requests in build_default_champs 2017-08-29 14:22:14 +02:00
Simon Lehericey
d40eef284d Dossier: fixup n+1 champ query 2017-08-03 13:02:13 +02:00
Simon Lehericey
1363999621 Dossier: fixup n+1 private champ query 2017-08-03 13:01:55 +02:00
Simon Lehericey
5ec0e2ed18 Dossier: remove unused ordered_commentaires
as commentaires are sorted on the view _messagerie.haml.html
dossier_facade.commentaires.object.sort
2017-07-20 11:03:10 +02:00
Mathieu Magnin
b0c0477622 [Fix #315] Order champs by procedure order in export 2017-07-19 16:31:30 +02:00
gregoirenovel
cfec05506a Rename Procedure#archived? -> #archivee? 2017-07-13 15:32:13 +02:00
gregoirenovel
bb10e13e2f [Ref #145] Don't use Procedure.archived anymore 2017-07-11 15:03:35 +02:00
Mathieu Magnin
be3304f71e Add a scope to Dossier to check if procedure is not hidden 2017-07-04 14:34:16 +02:00
gregoirenovel
556359cd05 [Fix #318] Add annotations privées to exported files 2017-06-27 14:27:02 +02:00
Simon Lehericey
602527a09d [Fix #196] Attestation: building logic from template 2017-06-16 12:11:09 +02:00
Simon Lehericey
b443b5cefd [Fix #196] Dossier: add Attestation 2017-06-16 12:11:09 +02:00
gregoirenovel
b58c02180c [Fix #197] Allow a gestionnaire to add a motivation 2017-06-13 15:14:50 +02:00
gregoirenovel
107c322062 [Fix #323] Refactor received dossier notification: use a callback 2017-06-08 15:06:01 +02:00
gregoirenovel
d5023a3d38 Use the same order for constants and scopes in Dossier 2017-06-01 11:08:26 +02:00
gregoirenovel
0971ede57e Add a termine scope to Dossier 2017-06-01 11:08:00 +02:00
gregoirenovel
68da2ecbae Use symbols instead of strings in for the order arg in scopes 2017-06-01 11:07:30 +02:00
gregoirenovel
8fb6a41386 Remove an unused argument in some Dossier scopes 2017-06-01 11:07:04 +02:00
gregoirenovel
e0a3a48f76 Improve the formatting of Dossier scopes 2017-06-01 11:05:51 +02:00
gregoirenovel
ddac4bbfdb Change the order in the all_state scope for consistency 2017-06-01 10:58:09 +02:00
gregoirenovel
7055aec634 Add some more state scopes and use them 2017-06-01 10:58:09 +02:00
gregoirenovel
9c2c0346b6 [Fix #125] Transform some Dossier class methods into scopes 2017-06-01 10:58:08 +02:00
gregoirenovel
ab1c19c09b Rename some Dossier scopes 2017-06-01 10:58:08 +02:00
gregoirenovel
51dd6df1c0 Improve the formatting of the Dossier state enum 2017-06-01 10:58:08 +02:00
gregoirenovel
1816aef7d0 Group the Dossier scopes and move them at the top 2017-06-01 10:58:07 +02:00
gregoirenovel
6731f28e23 Move the state constants below the state enum 2017-06-01 10:58:07 +02:00
gregoirenovel
4655707eb5 [Fix #319] Include archived dossiers in the export 2017-05-30 15:41:35 +02:00
gregoirenovel
5253f07b69 Use the order_by_updated_at scope in Dossier 2017-05-30 15:41:35 +02:00
gregoirenovel
7eed44d430 Use the not_archived scope in Dossier 2017-05-30 15:41:35 +02:00
gregoirenovel
f2fe06e86f Add the not_brouillon scope on Dossier 2017-05-30 15:41:35 +02:00
Mathieu Magnin
72494de76f Create new model Avis 2017-05-29 11:44:28 +02:00
Simon Lehericey
cebb197994 Fix #171 : add localtime to a bunch of date 2017-05-11 15:10:49 +02:00
gregoirenovel
d3a84eb20a Démarche -> Procédure 2017-05-04 11:33:26 +02:00
gregoirenovel
988947696e [Fix #161] Remove incorrect commas from Dossier#text_summary 2017-05-04 11:25:33 +02:00
gregoirenovel
f5c5ad532d Add Dossier#text_summary 2017-04-26 15:59:17 +02:00
Mathieu Magnin
757af12d42 Add invites to API 2017-04-21 14:51:35 +02:00
Mathieu Magnin
40d897f538 Add accompagnateurs emails in API 2017-04-21 14:51:35 +02:00
Mathieu Magnin
822c7cdd96 Add human version translation for state 2017-04-21 14:51:35 +02:00
Mathieu Magnin
762a11fc6f Define .termine as a scope and remove archived=false filter 2017-04-21 14:36:50 +02:00
Mathieu Magnin
320ff4839f Define .en_instruction as a scope and remove archived=false filter 2017-04-21 14:36:50 +02:00
Mathieu Magnin
7a9fd77af0 Remove archived=false filter from en_construction scope (Fix : archived dossier is not shown to user) 2017-04-21 14:36:50 +02:00
Mathieu Magnin
688a3d8f31 Define .brouillon as a scope and remove archived=false filter 2017-04-21 14:36:50 +02:00
Mathieu Magnin
21a2a5402b Remove unused service 2017-04-21 14:36:50 +02:00
gregoirenovel
b00eb914da Use case statements instead of if statements where appropriated 2017-04-19 11:57:49 +02:00
Mathieu Magnin
1612b60126 Remove useless code 2017-04-13 16:54:00 +02:00
Mathieu Magnin
320d5da40f Add individual infos to flat table export serializer 2017-04-13 16:54:00 +02:00
gregoirenovel
1db37894c2 Factorize some code in Dossier#serialize_value_for_export 2017-04-11 11:43:42 +02:00
gregoirenovel
ae5b4f6249 Refactor Dossier#full_data_strings_array 2017-04-11 11:39:34 +02:00
gregoirenovel
df878b9ef4 Change Dossier#convert_specific_array_values_to_string’s signature and name
- It is always called with the data_with_champs
  argument

- Changing the signature requires a change of name
  in this case
2017-04-11 10:29:07 +02:00
Mathieu Magnin
bf0d466f4b Move export_full_generation method from Dossier to Procedure 2017-04-05 12:26:38 +02:00
Mathieu Magnin
b18c09e9fd Download dossiers button exports all dossiers except draft 2017-04-05 11:04:53 +02:00
Mathieu Magnin
24d17dc0f3 Sidekiq worker to archive procedures automatically + tests 2017-03-15 12:40:59 +01:00
Simon Lehericey
a5bb6ea0d7 Dossier: fix merge 2017-03-06 18:17:28 +01:00
LeSim
caf1f1b74f Merge branch 'develop' into add_dossier_workflow_dates 2017-03-06 17:54:45 +01:00
Mathieu Magnin
7e4f473027 When procedure is archived user can update dossier if not in brouillon 2017-03-06 15:03:51 +01:00
Mathieu Magnin
87865fcf1b Merge branch 'develop' into list_dossiers_archived 2017-03-01 10:35:20 +01:00
Mathieu Magnin
d9f5603f05 Add state dates to dossier 2017-03-01 09:51:55 +01:00
Mathieu Magnin
6774dd008f List dossiers archived 2017-02-27 17:44:08 +01:00
Mathieu Magnin
10add61bd1 Clean some tests after removing :validated & :submitted states 2017-02-23 17:54:11 +01:00
Mathieu Magnin
cae5b37e38 First step to remove :validated and :submitted states 2017-02-21 18:05:48 +01:00
Mathieu Magnin
99248a75a0 Add accompagnateurs emails in export 2017-01-26 17:54:04 +01:00
JC
45042d0200 Catching case for empty dossiers, cannot download them while locked on procedure, third fix making good condition about empty dossiers 2017-01-03 15:50:44 +01:00
JC
ac85392454 Css for index dossier count, using method in dossier model to get unreaded notification count 2017-01-02 16:45:03 +01:00
Xavier J
33362d1a52 Add notification for submitted state 2016-12-26 11:57:08 +01:00
Xavier J
a681564b39 Add notification table and model 2016-12-21 17:26:31 +01:00
Xavier J
78bba67995 Fix bug who does not saved Individual information 2016-12-21 15:39:41 +01:00
Xavier J
80c9165f08 Delete death code Model/Dossier 2016-12-19 16:02:35 +01:00
Xavier J
907ac0f56c Delete death code 2016-12-19 15:55:11 +01:00
Xavier J
d1bb453d0d Remove state :draft in all state list 2016-12-01 19:18:15 +01:00
JC
0ac3c5fc86 Merging develop branch updated 2016-11-15 10:46:33 +01:00
JC
a549f95da1 Continue test for data_with_champs 2016-11-14 17:43:34 +01:00
JC
2f96895bb8 Continue tests for data_with_champs method, and add a convert_specific_values_to_string for array 2016-11-14 17:25:17 +01:00
JC
5aa9c75669 Ordering champs through export method, not through serializer 2016-11-14 16:37:58 +01:00
JC
5c3049d6bd Manualy sort type_de_champ by order_place 2016-11-14 14:39:59 +01:00
JC
e49e0b02ef Split methods for export, need to write 2 tests for headers and raw data (export_headers, data_with_champs) 2016-11-14 10:41:56 +01:00
Xavier J
ec4b634f8a Change onglet presentation for gestionnaire. 2016-11-10 15:57:14 +01:00
JC
a89a40df34 Prevent call for headers writting (export with procedures), get filtered dossiers by using the 'yoloServiceRegexCraftedByHandMetaForAllProject' -> extra :), adding tests for generic methods, still need to test export_columns_and_procedure 2016-11-09 17:20:55 +01:00
JC
c01e3987f6 Using serializer to get procedure.dossier from controller 2016-11-09 15:36:18 +01:00
JC
2056605135 Working with procedure types_de_champ ordered by id ASC -> building bunch of 'extra' data to default data values... when value is set (obvious) 2016-11-09 10:49:37 +01:00
JC
973570332f Implemented custom method to catch procedure_id while rendering data on each request format 2016-11-09 09:19:57 +01:00
JC
8dda0d3fb1 Okay... Add some conversion method to catch .ods write of number and boolean values -> as strings, passing on initial test for as_csv method 2016-11-08 11:48:36 +01:00
JC
fa767ad56f Config using default Serializers to generate both CSV and XLSX files from Dossier records, problem with ODS in gem -> github issue openned 2016-11-07 17:23:58 +01:00
Julien Portalier
f9a5e5c5ff Drop textacular (to enable prefix matching) + disable materialized view (for the time being) + specs 2016-11-04 15:38:34 +01:00
Xavier J
740b3650aa Restore select procedure for gestionnaire (opensimplif) 2016-10-24 16:00:03 +02:00
Xavier J
a7166d306f Delete tab Nouveau A traiter and En cours d'étude for User and replace this only one call En construction 2016-10-19 17:25:24 +02:00
Xavier J
177295f6e4 Fix bug download CSV 2016-10-07 15:34:10 +02:00
Xavier J
8409b660cf Ordered piece justificative 2016-10-07 15:16:03 +02:00
Xavier J
ac971a805e Adapt search function at the PreferenceListDossier table 2016-10-07 14:58:45 +02:00
Xavier J
71de64e3ec User can save a draft dossier who does not see by the accompagnateur 2016-10-05 16:45:51 +02:00
Xavier J
d78b64982b Fix tests 2016-10-05 15:01:31 +02:00
Xavier J
8160d4d0df User can be add siret when is procedure at the attribut individual and individual_with_siret 2016-10-05 14:28:10 +02:00
Xavier J
0c9fea1c14 User can invite other user to edit his dossier 2016-09-14 16:36:01 +02:00
Xavier J
0ac23f6d96 User can invite other User 2016-09-13 12:17:56 +02:00
Xavier J
c5035ca81e When gestionnaire follow an initiated dossier, this paste his state at 'updated' 2016-09-09 15:55:03 +02:00
Xavier J
a69433e8de User can be begin without SIRET 2016-08-30 11:18:43 +02:00
Guillaume Lazzara
09236f32aa Add 'refuser' and 'classer sans suite' buttons 2016-08-25 17:46:26 +02:00
Guillaume Lazzara
0120ce2a32 Add an action to set a dossier as 'recu'. 2016-08-25 15:22:08 +02:00
Xavier J
5b0e01f117 delete filter procedure for gestionnaire 2016-08-22 16:36:25 +02:00
Xavier J
b661a2eb38 Updated test for new user status UI 2016-08-22 16:10:48 +02:00
Xavier J
6adfcac5bf Add new state on User UI.
/!/ WARNING : No tests fix
2016-08-12 13:56:10 +02:00
Xavier J
1a92382259 - Add new status for a dossier : received, refused and without_continuation
- Add new and rename tabs on gestionnaire all dossiers view
/!\ WARNING : One test does not pasted. He will be corrected in the next commit
2016-08-11 15:27:35 +02:00
Xavier J
9487d47ef8 Add deposit date time on dossier table 2016-08-08 14:12:16 +02:00
Xavier J
480431ea01 Add on gestionnaire dossier view the private form 2016-08-08 12:52:30 +02:00
Xavier J
a37320bae9 Add lateral panel to configure dossier list in back office 2016-08-01 18:10:32 +02:00
Xavier J
21a18a536f Add total_commentaire in API Dossier and total_dossier on API Procedure 2016-07-22 15:06:30 +02:00
Xavier J
127c9bb138 Add total followers on dossier list and followers list on dossier page for gestionnaire 2016-07-19 16:44:26 +02:00
Xavier J
7d0bcfc35f Delete utilisation of "nom_projet" attribut (no delete in database) 2016-07-19 16:10:50 +02:00
Xavier J
d26ae9539d An accompagnateur can be mark a dossier follow by us 2016-07-18 18:24:29 +02:00
Xavier J
2fa10a43e5 Fix bug prévisualisation 2016-06-21 12:41:28 +02:00
Xavier J
cc8d2ef4ee New UI and UX for the dossier initialization 2016-06-20 13:57:57 +02:00
Xavier J
866565495d Delete default description in dossier 2016-06-13 12:03:05 +02:00
Guillaume Lazzara
f62c9ebec9 Remove carriage returns in address in CSV format only 2016-05-24 15:58:21 +02:00
Xavier J
6d5a3e6256 User and Guest can be upload new documents on our recapitulative dossier page. 2016-03-22 17:36:36 +01:00
Xavier J
bb79aca58a Add historic for piece justificative 2016-03-17 14:50:10 +01:00
Xavier J
4b7e6426b3 Gestionnaire can have the history of cerfa updated on dossier show page 2016-03-16 15:34:35 +01:00
Xavier J
abfb6367d6 Active filter procedure on dossiers list backoffice 2016-03-14 16:49:12 +01:00
Guillaume Lazzara
bd5a39ff17 Add CSV output for Dossier API 2016-02-19 16:59:39 +01:00
Xavier J
e2a896d0b0 Gestionnaire can invite an email contact to participate at a dossier 2016-02-08 18:16:18 +01:00
Xavier J
d7dbd28507 fix test cerfa flag 2016-02-04 14:08:35 +01:00
Guillaume Lazzara
b7ea7c9fcf Restore previous behavior in Dossier 2016-02-04 10:39:07 +01:00
Guillaume Lazzara
e20de3dba9 First attempt 2016-02-02 18:37:38 +01:00
Xavier J
1551ae82cd Add dependent destroy on has_xxx models 2016-01-18 16:20:51 +01:00
Xavier J
6a3525c7e2 Save Cadastre 2016-01-18 12:03:18 +01:00
Xavier J
afaa6a5ac9 - delete route '/users/siret'
- delete route 'users/procedure'
- create route 'users/dossiers/new?procedure_id=:procedure_id'
- delete a part of unused code
- adapt demo page with new procedure URL
2015-12-03 12:00:22 +01:00
Xavier J
58f840ac92 - Redirect User dossier index to User dossier a traiter
- Fix tests
- Order file list by last updated for User
2015-11-30 15:56:06 +01:00
Xavier J
da49c633dc Add tabs on view list file for users 2015-11-30 14:48:37 +01:00
Xavier J
1e1a6b3693 Gestionnaire can see archived file 2015-11-27 15:04:24 +01:00
Xavier J
e928284c15 Add QuartierPrioritaire model and reference at Dossier 2015-11-24 10:02:55 +01:00
Xavier J
b40b0e59b1 color state on search result 2015-11-19 18:04:09 +01:00
Xavier J
9f34d20475 Add search feature for gestionnaire backoffice 2015-11-17 18:21:03 +01:00
Xavier J
de356ae0ab Add search method on dossier model 2015-11-16 15:58:35 +01:00
Xavier J
fd9061abdf - Administrateur can't show only his procedures
- Gestionnaire can't show only files of his Administrateur's procedures
2015-11-10 11:58:56 +01:00
Xavier J
f3d8645426 Rename TypeDeChamps to TypeDeChamp 2015-11-05 11:21:44 +01:00
Xavier J
591f52f654 Dynamic display for champs on description and recapitulative page 2015-11-04 11:14:07 +01:00
Xavier J
27dbd3a878 Add auto champs objects at a dossier (same as PJ)
Add dynamic of Champs on the description page
Rename model 'Champs' to 'Champ'
2015-11-03 15:27:49 +01:00
Xavier J
56eccf55df add table Champs 2015-11-03 10:48:40 +01:00
Xavier J
2050465a75 REFACTOR : remove column 'montant_projet', 'montant_aide_demande', 'date_previsionnelle', 'position_lat', 'position_lon' et 'ref_dossier_cart' of dossier table 2015-11-02 18:56:41 +01:00
Xavier J
c454ea28ed REFACTOR: Change dossier state 'SubmitValidated' To 'Submitted' 2015-11-02 15:46:43 +01:00
Xavier J
285cee939a REFACTOR: Change dossier state 'Submitted' To 'Initiated' 2015-11-02 15:31:15 +01:00
Xavier J
c09fe8e7f6 REFACTOR: Change dossier state 'Processed' To 'Closed' 2015-11-02 15:00:28 +01:00
Xavier J
76d87c7f79 REFACTOR : Change dossier state 'Deposited' To 'SubmitValidated' 2015-11-02 11:52:39 +01:00
Xavier J
da8c166331 REFACTOR: Change dossier state 'Confirmed' To 'Validated' 2015-11-02 11:45:52 +01:00
Xavier J
4a05af89fc REFACTOR: Change dossier state 'Reply' To 'Replied' 2015-11-02 11:33:00 +01:00
Xavier J
c0733849d5 REFACTOR : Change dossier state 'Proposed' To 'Submitted' 2015-11-02 11:23:55 +01:00
Tanguy PATTE
40d5802d4a start france connect 2015-10-05 16:42:29 +02:00
Xavier J
be5a7f2fd2 Ajout des tableaux séparés et des états de chaque dossier dans le backoffice 2015-09-24 18:12:08 +02:00
Tanguy PATTE
a30eac41fc add dependent destroy on dossier 2015-09-24 11:45:00 +02:00
Tanguy PATTE
40310da378 Merge branch 'develop' of ssh://37.187.249.111:2200/opt/git/tps into develop 2015-09-24 11:17:29 +02:00
Tanguy PATTE
23d11976a2 add validation presence user for dossier 2015-09-24 11:17:17 +02:00
Xavier J
8693f4194c Merge branch 'develop' of ssh://37.187.249.111:2200/opt/git/tps into develop
Conflicts:
	app/views/users/recapitulatif/show.html.haml
	spec/features/recapitulatif_page/_commentaires_flux_spec.rb
	spec/features/recapitulatif_page/show_page_spec.rb
2015-09-24 10:56:12 +02:00
Xavier J
ded5a6a28f add function "next_step" into dossier 2015-09-24 10:27:14 +02:00
Tanguy PATTE
ede01b024b [#888] link user to dossier 2015-09-23 12:16:21 +02:00
Xavier J
888ac8b336 initialisation state for dossier with enum 2015-09-22 18:30:20 +02:00
Xavier J
810395c428 Rename and remove attribut into Dossier 2015-09-22 13:58:32 +02:00
Xavier J
b3383bec9f - Correction des tests suite à la modification du schéma de la base de données. 2015-09-21 17:59:03 +02:00
Tanguy PATTE
fe3f235860 include philippe notes 2015-09-02 17:34:13 +02:00
Tanguy PATTE
54b4679d19 add mailto 2015-08-25 16:33:55 +02:00
Tanguy PATTE
e5e2fef8ae move validation in model for dossier 2015-08-25 10:19:39 +02:00
Tanguy PATTE
cee8136ecf create piece jointe when formulaire is linked to dossier 2015-08-24 15:23:07 +02:00
Tanguy PATTE
88b663a514 move check email params in validator 2015-08-21 11:37:13 +02:00
Tanguy PATTE
752c40657d style check 2015-08-20 16:45:20 +02:00
Tanguy PATTE
a265f2e48a refactor description controller 2015-08-20 15:15:20 +02:00
Tanguy PATTE
516cafc72a build default pieces jointes when user choose formulaire 2015-08-18 15:15:34 +02:00
Tanguy PATTE
892484b494 build cerfa on create new dossier 2015-08-18 14:22:16 +02:00
Tanguy PATTE
8273438910 add cerfa model 2015-08-18 13:52:00 +02:00
Tanguy PATTE
b9a08f6422 add test for model dossier 2015-08-17 11:13:21 +02:00
Tanguy PATTE
107b11d510 rename ref_demarche into demarche_id
fix association between formulaire and type_piece_jointe
fix association between formulaire and evenement_vie
2015-08-14 15:02:11 +02:00
Tanguy PATTE
c78a4f655b rename ref_formulaire into formulaire 2015-08-14 14:05:09 +02:00
Tanguy PATTE
a807ba5ae9 rename ref piece jointe into type piece jointe 2015-08-14 12:06:26 +02:00
Tanguy PATTE
3c57643f76 add database cleaner
add factory girl
fix tests
rename dossier_pdf into piece_jointe
rename ref_piece_jointe into content
2015-08-13 15:56:58 +02:00
Xavier J
5dc8ae822f Affichage des pièces jointes disponibles dans la console admin 2015-08-12 10:09:52 +02:00
Xavier J
b5b83e939a First Commit 2015-08-10 11:05:06 +02:00