Pierre de La Morinerie
5c921182ea
procedure: rename mean_instruction_time
to usual_instruction_time
...
Ref #2970
2018-11-08 17:20:06 +01:00
Paul Chavard
33c6ddc452
Remove dead code related to dossier state
2018-11-08 14:56:45 +01:00
Paul Chavard
6706b9004f
Fix includes on api queries
2018-11-08 14:45:09 +01:00
Paul Chavard
80189def98
Remove n+1 calls from API queries
2018-11-08 14:45:09 +01:00
simon lehericey
9d406770a8
[ fix #2956 ] YesNo: fixing to_s
2018-11-06 16:59:47 +01:00
Frederic Merizen
c7358a8f53
[ Fix #835 ] Enable asking for multiple avis at the same time
2018-11-06 15:44:43 +01:00
gregoirenovel
9833564863
[ #835 ] Add a missing validation to avis
2018-11-06 15:44:43 +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
e391fe6bec
Clarify procedure path availability code
2018-10-30 15:59:37 +01:00
Paul Chavard
b42095363e
Refactor procedure model
2018-10-30 12:01:45 +01:00
Paul Chavard
78dc582588
Remove ProcedurePath
2018-10-30 12:01:45 +01: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
3dad743d56
remove localtime as it uses server timezone
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
4b25d16f5a
Time.zone.parse(_, options) => Time.zone.strptime(_, options)
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
Frederic Merizen
64cb231b01
[ #2675 ] Fix notification sort order
2018-10-24 17:10:30 +02:00
Frederic Merizen
02f4ef215a
[ #2675 ] Make dossiers_id_with_notifications public
2018-10-24 17:10:30 +02:00
Frederic Merizen
dfdcfc62e2
[ #2675 ] Make dossiers_id_with_notifications self-contained
2018-10-24 17:10:30 +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
51954a6d85
[ #2604 ] Warn that we are destroying an invalid ProcedurePresentation
2018-10-23 16:41:51 +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
84cac7a5c2
[ #2604 ] Remove unneeded self in AssignTo
2018-10-23 16:34:35 +02:00
Paul Chavard
c8c75fc254
Better handle empty user selection layers
2018-10-23 09:35:25 +02:00
Paul Chavard
99e1a20d98
Add champ carte endpoint
2018-10-23 09:35:25 +02:00
Paul Chavard
a541f1fcee
Add type options on carte champ
2018-10-23 09:35:25 +02:00
Paul Chavard
df73e442e9
Explicit foreign_key on CarteChamp
2018-10-22 23:28:00 +02:00
Frederic Merizen
a2bd0582b9
[ Fix #2741 ] Filter / sort by en_construction_at
2018-10-17 12:16:51 +02:00
Paul Chavard
93ba94a9e6
Add carte champ and geo area models
2018-10-16 14:01:12 +03:00
gregoirenovel
22088b167d
Remove ApiAdresse::Geocodeur
2018-10-16 09:33:16 +02:00
gregoirenovel
76cf9ab746
ApiGeo::Driver → ApiGeo::API
2018-10-15 23:31:23 +02:00
gregoirenovel
5e9e913dce
Carto::Geocodeur → ApiAdresse::Geocodeur
2018-10-15 20:55:46 +02:00
gregoirenovel
4903a6b189
Carto::GeoAPI → ApiGeo
2018-10-15 20:55:46 +02:00
gregoirenovel
1f0af303f3
Remove the unused ModuleApiCarto#classes method
2018-10-15 16:16:16 +02:00
Paul Chavard
c63675461a
Add new carto init code
2018-10-14 12:34:43 +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
07b8838561
Remove dead code
...
Should have been removed as part of #2720 but was accidentally reintroduced
in #2770
2018-10-11 12:00:49 +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
fac6922b98
[ #2750 ] Set might be overkill here
2018-10-10 09:07:57 +02:00
Frederic Merizen
667deae5cc
[ #2750 ] Sanity check procedure
2018-10-10 09:07:57 +02:00
Frederic Merizen
30ef6e6d95
[ #2750 ] No need to validate table and column
...
Because they are pre-validated by rails on the model
2018-10-10 09:07:57 +02:00
Frederic Merizen
58c0ec1bbd
[ #2750 ] Validate order on model update rather than on usage
2018-10-10 09:07:57 +02:00
Frederic Merizen
026c322fce
[ #2750 ] Make ProcedurePresentation checks private
2018-10-10 09:07:57 +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
f59984ea70
[ #2750 ] Remove redundant references to procedure
2018-10-10 09:07:57 +02:00
Frederic Merizen
462c818025
[ #2750 ] Move fields from DossierFieldService to ProcedurePresentation
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
Frederic Merizen
c1f18a164d
Remove dead, buggy code
2018-10-10 05:51:17 +02:00
Paul Chavard
bcbfc370b2
Add button in manager to transition démarche in brouillon state
...
fix #2565
2018-10-09 16:14:18 +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
36ce94195b
Remove france_connect delegation on User
2018-10-04 13:54:07 +02:00
gregoirenovel
14c8e02aca
[ Fixes #2597 ] Remove given_name and family_name delegation
2018-10-04 13:54:07 +02:00
gregoirenovel
5107b33af8
Remove FC fields from search
2018-10-04 13:54:07 +02:00
Frederic Merizen
b36d153620
Fix missing sort columns
2018-10-03 17:09:49 +02:00
gregoirenovel
c91a1cf474
Enable Style/SymbolArray
2018-10-03 12:15:48 +02:00
gregoirenovel
a171186dd8
Enable Style/TrailingCommaInHashLiteral
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
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
gregoirenovel
b994fa4206
Do one thing per line
2018-10-01 16:15:46 +02:00
Pierre de La Morinerie
0526551e71
templates: update link to dossier
2018-09-27 17:22:59 +02:00
simon lehericey
4d4dba1550
Procedure: small renaming on mean_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
4a04f2e59f
ApiController: check token validity for a given admin
2018-09-27 10:24:56 +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
Paul Chavard
f94a24d7ce
Add path field to procedure information form
2018-09-26 10:53:45 +02:00
Paul Chavard
f6a6d8f457
Fix destroy dossiers on procedure reset
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
Frederic Merizen
695426316c
[ #2258 ] Make linked menus more robust in the face of bad configuration
2018-09-25 20:31:06 +02:00
Frederic Merizen
9beaa293cd
[ #1421 ] Use delegation rather than STI for TypeDeChamp
2018-09-25 08:26:56 +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
gregoirenovel
e4eb55a37f
Revert "[ Fix #2623 ] Ensure numbers are integers"
...
This reverts commit 68789ff43b
.
2018-09-21 15:15:11 +02:00
gregoirenovel
68789ff43b
[ Fix #2623 ] Ensure numbers are integers
2018-09-21 08:12:52 +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
gregoirenovel
0c9628c180
Fix some files according the the .editorconfig rules
2018-09-20 16:23:09 +02:00
gregoirenovel
8ea021fb69
Factorize code in a method
2018-09-19 12:31:59 +02:00
gregoirenovel
6b98c36dad
Add Dossier#mean_traitement_time for the upcoming page de garde
2018-09-19 12:31:59 +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
Paul Chavard
36812793d4
Do not clone procedure path
2018-09-18 14:40:02 +02:00
Frederic Merizen
63fc0b3bc3
[ Fix #2584 ] Move Field related code to a service
2018-09-18 13:49:34 +02:00
Paul Chavard
18922122b4
Fix SQL ambiguous name error
2018-09-18 13:21:29 +02:00
Paul Chavard
b042efdcba
Update procedure path attribute when procedure_path changes
2018-09-18 13:21:29 +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
2787f040af
Add path attribute to Procedure model
2018-09-18 13:21:18 +02:00
Paul Chavard
3f6cc668a7
Implement check_availability route
2018-09-12 12:37:15 +02:00
Paul Chavard
631df3197a
Add uniqueness validation to procedure path
2018-09-11 10:38:31 +02:00
Paul Chavard
2770f1db82
Archive only when path changes owner
2018-09-11 10:38:31 +02:00
Paul Chavard
be51802983
Add reopen aasm event
2018-09-11 10:38:31 +02:00
Paul Chavard
5a794cbb08
Use Procedure#publish_or_reopen!
2018-09-11 10:38:31 +02:00
Paul Chavard
ec3a0dc4cf
Use Procedure#publish_with_path!
2018-09-11 10:38:31 +02:00
Paul Chavard
b3f8b68b99
Add Procedure#publish_with_path!
2018-09-11 10:38:31 +02:00
Paul Chavard
e6485603c4
Add ProcedurePath#valid?
2018-09-11 10:38:31 +02:00
Paul Chavard
f2f3c54147
Procedure: update -> update!
2018-09-11 10:38:31 +02:00
Paul Chavard
7a322266fa
Make aasm related methods private
2018-09-11 10:38:31 +02:00
Paul Chavard
de908ef4be
Extract ProcedurePath#find_by_path
2018-09-11 10:38:31 +02:00
Paul Chavard
b63038faca
Allow administrateur to try dossier info on aperçu page
2018-09-07 19:41:34 +01:00
Paul Chavard
23170f54c0
Instructeur should see published drafts
2018-09-07 11:20:16 +01: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
gregoirenovel
2d3b553e4d
Use enum to the fullest with TypeDeChamp.type_champs
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
gregoirenovel
66c5f080cc
Add AR validation for Feedback rating
2018-08-28 10:36:36 +02:00
gregoirenovel
4103861f90
Add the rating column to feedbacks
2018-08-27 17:03:11 +02:00
Frederic Merizen
1134877d59
[ #2179 ] Remove newly dead code
2018-08-23 11:57:06 +02:00
Frederic Merizen
650a740642
[ #2179 ] Remove dead code
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
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
aec02a9b8a
Remove references to test_procedure
2018-08-14 16:30:43 +02:00
Paul Chavard
7237ff80cc
Drop procedure dossiers when updating brouillon
2018-08-14 11:21:05 +02:00
Paul Chavard
3be678dbe5
Add publish_draft feature flag
2018-08-13 19:27:28 +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
Paul Chavard
46e75ac8ef
Only notify on dossier supression if dossier is en_construction
2018-08-02 17:07:24 +02:00
Paul Chavard
e358e72867
Do not display gestionnaire emails in the messaging interface
...
fix #2302
2018-07-31 15:27:36 +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
gregoirenovel
eb95fce194
[ Fix #2272 ] Add a SIRET field to the Service form
2018-07-19 15:43:13 +02:00
gregoirenovel
4d41381155
Move the attestation route inside the member block
2018-07-17 17:26:42 +02:00
Mathieu Magnin
e748b6883f
Fix comportement chelou in LinkedDropDownListChamp
2018-07-12 12:31:54 +02:00
Pierre de La Morinerie
b0a9e49549
procedures: group new_from_existing list by organization
...
As procedures are not grouped by Service (which are unique to an
administrator) but by organization, this allows procedures with the same
organization name to be displayed together.
2018-07-03 23:43:42 +02:00