Skip to content

Contrôle a posteriori : Accepter automatiquement les critères administratifs certifiés - #6252

Merged
francoisfreitag merged 5 commits into
masterfrom
ff/cap
Jul 22, 2025
Merged

francoisfreitag merged 5 commits into
masterfrom
ff/cap

Conversation

@francoisfreitag

@francoisfreitag francoisfreitag commented Jun 3, 2025

Copy link
Copy Markdown
Member

🤔 Pourquoi ?

Éviter du travail en double pour les SIAE et les DDETS.

🍰 Comment ?

Noter sur chaque critère s’il est certifié à la création de la campagne, et le passer au statut accepté le cas échéant.

🏝️ Comment tester ?

 itou/siae_evaluations/fixtures.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/itou/siae_evaluations/fixtures.py b/itou/siae_evaluations/fixtures.py
index 3ac3f6039..1cf7de8dd 100755
--- a/itou/siae_evaluations/fixtures.py
+++ b/itou/siae_evaluations/fixtures.py
@@ -18,7 +18,7 @@ import itou.users.enums as users_enums
 from itou.approvals.models import Approval
 from itou.companies.enums import CompanyKind
 from itou.eligibility.enums import AdministrativeCriteriaLevel
-from itou.eligibility.models import AdministrativeCriteria
+from itou.eligibility.models import AdministrativeCriteria, SelectedAdministrativeCriteria
 from itou.eligibility.models.iae import EligibilityDiagnosis
 from itou.institutions.models import Institution
 from itou.job_applications.enums import JobApplicationState
@@ -109,6 +109,12 @@ def load_data():
             )
             for criterion_pk in pks_list:
                 eligibility_diagnosis.administrative_criteria.add(criterion_pk)
+            if 1 not in pks_list:
+                SelectedAdministrativeCriteria.objects.create(
+                    administrative_criteria_id=1,
+                    eligibility_diagnosis=eligibility_diagnosis,
+                    certified=True,
+                )
             approval = Approval.objects.create(
                 user=job_seeker,
                 number=generate_approval_number(),

💻 Captures d'écran

Screenshot 2025-06-03 at 14-39-41 Liste de mes auto-prescriptions à justifier - Les emplois de l'inclusion

@francoisfreitag francoisfreitag added the modifié Modifié dans le changelog. label Jun 3, 2025
@francoisfreitag francoisfreitag self-assigned this Jun 3, 2025
@francoisfreitag francoisfreitag added 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC and removed 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC labels Jun 10, 2025
@francoisfreitag francoisfreitag added 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC and removed 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC labels Jun 10, 2025
@github-actions

Copy link
Copy Markdown

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

Comment thread itou/siae_evaluations/models.py
Comment thread itou/siae_evaluations/models.py
Comment thread itou/templates/siae_evaluations/evaluated_job_application.html Outdated
@francoisfreitag francoisfreitag removed the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Jun 11, 2025
@francoisfreitag
francoisfreitag force-pushed the ff/cap branch 3 times, most recently from e80bbef to 1a77697 Compare July 17, 2025 11:45
criteria_certified=True,
)
)
# TODO: For the 2026 campaign on auto-prescriptions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🙈

Comment thread itou/siae_evaluations/models.py Outdated
Comment thread itou/siae_evaluations/models.py
@notion-workspace

Copy link
Copy Markdown

Facilitate reusing the badge in multiple places.
When a criterion is certified, it does not need verification by the
DDETS. When the evaluation campaign starts, all certified criteria are
added as an accepted evaluated administrative criteria. If these
criteria are enough for all selected job applications to be accepted,
the evaluated SIAE is immediately set to accepted, and the SIAE isn’t
even notified of the control: they have nothing to do.
There’s no need to load the full object by PK from the DB if we’re only
interested in its PK.
That form can only be displayed to labor inspectors, during the
campaign. The page becomes accessible to both employers and labor
inspectors after the evaluation campaign is final.
Otherwise, the SIAE does not even know it has been evaluated.
@francoisfreitag
francoisfreitag added this pull request to the merge queue Jul 22, 2025
Merged via the queue into master with commit 928cefe Jul 22, 2025
@francoisfreitag
francoisfreitag deleted the ff/cap branch July 22, 2025 13:22
@notion-workspace

Copy link
Copy Markdown

1 similar comment
@notion-workspace

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modifié Modifié dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants