Commit graph

380 commits

Author SHA1 Message Date
François Vantomme
2110ef072c feat(api particulier): add DGFiP field 2021-12-07 11:03:05 +01:00
Paul Chavard
2ba05bfb4f fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
Martin
1bb868714c fix(spec/lint/review): lint and fix spec of previous commits, also fix based on tchak feedback 2021-12-06 07:05:17 +01:00
Christophe Robillard
9341c787a1 administrateur can add zone to procedure 2021-12-02 19:24:26 +01:00
Christophe Robillard
561f6fb274 add belongs_to zone for procedure 2021-12-02 19:23:05 +01:00
Pierre de La Morinerie
b7d17b0989 models: validate that no drop-downs are empty on publishing
Disallow publishing a procedure containing drop-downs with no selectable
values.
2021-12-02 09:00:37 +01:00
Pierre de La Morinerie
8b3d31980a specs: use Instructeur.bypass_email_login_token in the tests 2021-12-02 08:51:52 +01:00
mfo
e7d9d047fe
Merge branch 'main' into 6649-etq-usager-instructeur-rendre-la-suppression-plus-visible 2021-11-24 14:07:32 +01:00
Pierre de La Morinerie
997c197980 specs: simplify the syntax of some factories 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
2203a7762f specs: create dossier revision and individual declaratively 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
f2233300b6 specs: assign the default groupe instructeur declaratively 2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
0e809ac1a2 specs: build the default groupe instructeur before the create callback
This allows for better ergonomics, by having the default groupe
instructeur available even before the procedure is saved.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
032e3e2cb1 specs: create the procedure administrateur declaratively
It seems better to create associations in an declarative fashion, rather
than using imperative code. This also makes the attribute compatible
with build_stubbed.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
970c3e4b2b specs: avoid executing business logic in Procedure factory
Calling business logic in a factory is a code-smell, because it
usually requires the object to be saved into database, and may have
unintended consequences when the business logic is changed.

Also, this allows to just build a published procedure, without saving it
to the database.
2021-11-23 08:07:07 +01:00
Pierre de La Morinerie
ef2d9a3e86 specs: fix :champ_siret factory not using the procedure
Unlike all other champs factories, :champ_siret would attempt to build
a champ with a `nil` procedure (instead of using the dossier's one).
2021-11-23 08:07:07 +01:00
Martin
eecc0c38b6 lint(rubocop): come on, maybe i will find the inspiration to setup it up in my ide 2021-11-19 14:36:21 +01:00
Martin
608a85148f feat(Dossier.close_to_expiration): add method to find any kind of dossier close to expiration [reuse previous scopes], add missing spec to termine_close_to_expiration, complement spec for each kind of expiration scope with general close_to_expiration spec 2021-11-19 14:28:54 +01:00
Pierre de La Morinerie
b06183d7bf specs: rename Dossier's with_all_champs to with_populated_champs
This better reflects what the trait is used for, and disambiguate it
from the similarly named trait in the Procedure factory.
2021-11-03 19:38:01 +01:00
simon lehericey
3d524e9488 Change factory user password to be compatible with admin pass constraint 2021-10-28 14:39:13 +02:00
Pierre de La Morinerie
cedbd31d39 specs: only build an admin when building a procedure
This should slighly be faster than doing a create in the middle of the
build.
2021-10-26 12:03:30 +02:00
Pierre de La Morinerie
a2b91c8ec6 factories: cleanup Administrateur, Instructeur and Expert factories
This changes:

- avoids relying on application code to create mock objects,
- allows to build Administrateur or Instructeurs without saving them.
2021-10-26 12:03:30 +02:00
simon lehericey
ecc26897e2 add end to end spec 2021-10-12 14:27:20 +02:00
simon lehericey
c76d1043fa add cnaf champ 2021-10-12 14:27:20 +02:00
simon lehericey
d68129b34d add cnaf type de champ 2021-10-12 14:26:40 +02:00
Paul Chavard
9d5c5447c2 fix(dossier): do not attempt to destroy transfers when a dossier is destroyed
we had a dependent option on both sides of a relationship which created race conditions
2021-10-06 17:51:09 +02:00
Paul Chavard
9e30d5fc22 fix(virus scan): prevent virus scans in specs 2021-09-07 14:21:48 +02:00
Christophe Robillard
8f2e0660d3 add spec for dossier with commune 2021-08-19 08:04:47 +02:00
Paul Chavard
ffa8c0c80a feat(dossiers): enable dossiers termine expiration behind feature flag
feature flag "procedure_process_expired_dossiers_termine" controls if a procedure has expiration
enabled on dossiers termine

re #3796
2021-08-18 16:11:35 +01:00
Paul Chavard
ac0f50b488 Improuve champ blank check 2021-07-22 10:45:25 +02:00
Christophe Robillard
66cc0dd08d Revert "Revert "Expose dossier PDF export as IO""
This reverts commit 362093eff0.
2021-06-24 21:01:59 +02:00
krichtof
362093eff0
Revert "Expose dossier PDF export as IO" 2021-06-24 19:21:37 +02:00
Paul Chavard
b73d504f8d Expose dossier PDF export as IO
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-24 17:49:24 +02:00
Paul Chavard
f238710044 Add last_month export 2021-06-23 09:23:10 +02:00
Christophe Robillard
aee8db99d0 add spec for dossier weight estimation 2021-06-09 10:52:38 +02:00
Paul Chavard
c5f2faa3d2 add tests for backward compatibility of geo_areas 2021-05-24 11:57:00 +02:00
Paul Chavard
3b85ade440 Add compatibility cadsatre layer with old API GEO 2021-05-24 11:57:00 +02:00
simon lehericey
17617fba43 address champ needs the data column 2021-05-19 15:59:18 +02:00
simon lehericey
1cf59f722e add :with_user trait to fci as user_id is mandatory 2021-05-05 14:28:20 +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
simon lehericey
8b73d8804c fetch all exports at once by groupe_instructeurs_ids 2021-04-29 11:23:41 +02:00
Christophe Robillard
09870c918d prevent race conditions when creating archives 2021-04-28 11:40:58 +02:00
Christophe Robillard
dfbe004122 rename content_type to time_span_type for archives 2021-04-28 11:40:58 +02:00
Christophe Robillard
c25f3c79d9 add archive model 2021-04-28 11:40:58 +02:00
Paul Chavard
2a068fb9b0 Remove user feedback buttons 2021-04-22 15:40:40 +01:00
Paul Chavard
fd48b86b7f Simplify export unicity check and use create_or_find_by 2021-04-01 21:14:16 +01:00
Paul Chavard
0b22788d60 experts_procedure should not be optional 2021-03-23 13:46:33 +01:00
Paul Chavard
84214f4bd4 Do not export non exportable champs on draft procedures 2021-03-23 09:55:37 +01:00
Christophe Robillard
60cc4d3697 add pdf to pjs export 2021-03-16 15:13:17 +01:00
Paul Chavard
4f03c231a3 Add tests for GeoJSON validation 2021-03-16 12:27:28 +01:00