Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/pre assignation #101

Merged
merged 22 commits into from
Jun 3, 2024
Merged

Feat/pre assignation #101

merged 22 commits into from
Jun 3, 2024

Conversation

ajeanneney
Copy link
Collaborator

Issue description :

You can set a pre-assignation for a document, after its annotation, the document is automatically assigned to the specified user

Describe your changes :

  • add a new admin page for CRUD preAssignations
  • add backend part

How to test :

  • create a pre-assignation
  • import a document and annotate
  • check that the document is correctly assigned

Checklist before requesting a review

  • I have performed a self-review of my code.
  • The feature works locally.
  • If it's relevant I added tests.
  • Will this be part of a product update? If yes, please write one phrase about this update.

Les documents pourront être pré-assignés dans Label, une fois importés et annotés, il seront assignés directement a l'utilisateur désigné.

@ajeanneney ajeanneney marked this pull request as ready for review May 29, 2024 11:26
@ajeanneney ajeanneney marked this pull request as draft May 29, 2024 12:06
@ajeanneney ajeanneney removed the request for review from Bouba-cassation May 29, 2024 12:06
@ajeanneney ajeanneney marked this pull request as ready for review May 29, 2024 14:00
nextDocumentStatus,

// Check first pre-assignation by documentNumber and then by appelNumber
let preAssignationForDocument = await preAssignationService.fetchPreAssignationBySourceAndNumber(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je pense que faire : let preAssignationForDocument = await preAssignationService.fetchPreAssignationBySourceAndNumber( documentNumber.toString(), source, ) || await preAssignationService.fetchPreAssignationBySourceAndNumber( appealNumber, source, ); c'est pareil soit l'un est undiefined donc il passe à l'autre

extractor: (preAssignation) =>
preAssignation.preAssignation.creationDate
? timeOperator.convertTimestampToReadableDate(preAssignation.preAssignation.creationDate)
: '-',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

la preassignation est sensé avoir une date de création à sa création. Pourquoi une boolean et '-' ?

Copy link
Collaborator

@Bouba-cassation Bouba-cassation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est OK pour moi. j'ai testé en local, tout fonctionne bien.

@ajeanneney ajeanneney merged commit c6739f0 into dev Jun 3, 2024
1 check passed
@ajeanneney ajeanneney deleted the feat/pre_assignation branch June 3, 2024 11:53
ajeanneney added a commit that referenced this pull request Jun 3, 2024
* create model and repositories to preAssign decision

* add preAssignation service tests

* create pre assignation api endpoints

* fix import in controller

* create assignation when there is a preAssignation after nlp annotation

* add delete preassignation route on api

* first step for frontend

* create delete oprtion

* get userName instead of userId

* refetch on delete

* add pre-assignation creation button

* add pre assignation creation

* lint

* adapt clear db

* fix tests

* fix to run script without docker

* change behavior to accept appealNumbers

* fix docker start

* reset path to storage

* fix paths to execute scripts

* changes from review

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
ajeanneney added a commit that referenced this pull request Jun 3, 2024
* create model and repositories to preAssign decision

* add preAssignation service tests

* create pre assignation api endpoints

* fix import in controller

* create assignation when there is a preAssignation after nlp annotation

* add delete preassignation route on api

* first step for frontend

* create delete oprtion

* get userName instead of userId

* refetch on delete

* add pre-assignation creation button

* add pre assignation creation

* lint

* adapt clear db

* fix tests

* fix to run script without docker

* change behavior to accept appealNumbers

* fix docker start

* reset path to storage

* fix paths to execute scripts

* changes from review

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
s-diallo pushed a commit that referenced this pull request Oct 8, 2024
* create model and repositories to preAssign decision

* add preAssignation service tests

* create pre assignation api endpoints

* fix import in controller

* create assignation when there is a preAssignation after nlp annotation

* add delete preassignation route on api

* first step for frontend

* create delete oprtion

* get userName instead of userId

* refetch on delete

* add pre-assignation creation button

* add pre assignation creation

* lint

* adapt clear db

* fix tests

* fix to run script without docker

* change behavior to accept appealNumbers

* fix docker start

* reset path to storage

* fix paths to execute scripts

* changes from review

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants