Skip to content

Commit

Permalink
Add a kind to Eligibility Diagnosis
Browse files Browse the repository at this point in the history
  • Loading branch information
celine-m-s committed Sep 6, 2024
1 parent 6f303c9 commit 2266e5b
Show file tree
Hide file tree
Showing 10 changed files with 229 additions and 68 deletions.
18 changes: 11 additions & 7 deletions itou/eligibility/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
class AbstractAdministrativeCriteriaInline(ItouTabularInline):
extra = 0
raw_id_fields = ("administrative_criteria",)
readonly_fields = ("created_at", "certifiable")

@admin.display(boolean=True, description="vérifiable par l'API Particuliers")
def certifiable(self, obj):
return obj.administrative_criteria.certifiable
readonly_fields = ("created_at",)


class AdministrativeCriteriaInline(AbstractAdministrativeCriteriaInline):
Expand Down Expand Up @@ -225,10 +221,14 @@ class AdministrativeCriteriaAdmin(AbstractAdministrativeCriteriaAdmin):
"name",
"level",
"ui_rank",
"certifiable",
"is_certifiable",
"created_at",
)

@admin.display(boolean=True, description="vérifiable par l'API Particuliers")
def is_certifiable(self, obj):
return obj.is_certifiable


@admin.register(models.GEIQAdministrativeCriteria)
class GEIQAdministrativeCriteriaAdmin(AbstractAdministrativeCriteriaAdmin):
Expand All @@ -237,7 +237,7 @@ class GEIQAdministrativeCriteriaAdmin(AbstractAdministrativeCriteriaAdmin):
"name",
"annex",
"level",
"certifiable",
"is_certifiable",
"created_at",
)
raw_id_fields = AbstractAdministrativeCriteriaAdmin.raw_id_fields + ("parent",)
Expand All @@ -248,3 +248,7 @@ class GEIQAdministrativeCriteriaAdmin(AbstractAdministrativeCriteriaAdmin):
"ui_rank",
"pk",
)

@admin.display(boolean=True, description="vérifiable par l'API Particuliers")
def is_certifiable(self, obj):
return obj.is_certifiable
36 changes: 18 additions & 18 deletions itou/eligibility/data/administrative_criteria.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"written_proof_validity": "Datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 1,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": true
"kind": "RSA"
}
},
{
Expand All @@ -26,7 +26,7 @@
"written_proof_validity": "Datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 2,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "ASS"
}
},
{
Expand All @@ -41,7 +41,7 @@
"written_proof_validity": "Datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 3,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": true
"kind": "AAH"
}
},
{
Expand All @@ -56,7 +56,7 @@
"written_proof_validity": "Datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 4,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "DETLD"
}
},
{
Expand All @@ -71,7 +71,7 @@
"written_proof_validity": "Attestation sur l'honneur datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 1,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "CAP_BEP"
}
},
{
Expand All @@ -86,7 +86,7 @@
"written_proof_validity": "",
"ui_rank": 2,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "SENIOR"
}
},
{
Expand All @@ -101,7 +101,7 @@
"written_proof_validity": "",
"ui_rank": 3,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "JEUNE"
}
},
{
Expand All @@ -116,7 +116,7 @@
"written_proof_validity": "Datant de moins de 12 mois avant la date de délivrance du PASS IAE",
"ui_rank": 4,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "ASE"
}
},
{
Expand All @@ -131,7 +131,7 @@
"written_proof_validity": "Datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 5,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "DELD"
}
},
{
Expand All @@ -146,7 +146,7 @@
"written_proof_validity": "Décision valide au moment du recrutement",
"ui_rank": 6,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "TH"
}
},
{
Expand All @@ -161,7 +161,7 @@
"written_proof_validity": "Datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 7,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": true
"kind": "PI"
}
},
{
Expand All @@ -176,7 +176,7 @@
"written_proof_validity": "Datant de moins de 3 mois avant la date de délivrance du PASS IAE",
"ui_rank": 8,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "PSH_PR"
}
},
{
Expand All @@ -191,7 +191,7 @@
"written_proof_validity": "Titre valide au moment de la délivrance du PASS IAE",
"ui_rank": 9,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "REF_DA"
}
},
{
Expand All @@ -206,7 +206,7 @@
"written_proof_validity": "Datant de moins de 6 mois avant la date de délivrance du PASS IAE",
"ui_rank": 10,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "ZRR"
}
},
{
Expand All @@ -221,7 +221,7 @@
"written_proof_validity": "Datant de moins de 6 mois avant la date de délivrance du PASS IAE",
"ui_rank": 11,
"created_at": "2020-03-23T20:00:00.000Z",
"certifiable": false
"kind": "QPV"
}
},
{
Expand All @@ -236,7 +236,7 @@
"written_proof_validity": "Datant de moins de 6 mois avant la date de délivrance du PASS IAE",
"ui_rank": 12,
"created_at": "2021-09-03T20:00:00.000Z",
"certifiable": false
"kind": "DETENTION_MJ"
}
},
{
Expand All @@ -251,7 +251,7 @@
"written_proof_validity": "Datant de moins de 6 mois avant la date de délivrance du PASS IAE",
"ui_rank": 13,
"created_at": "2021-09-03T20:00:00.000Z",
"certifiable": false
"kind": "FLE"
}
},
{
Expand All @@ -266,7 +266,7 @@
"written_proof_validity": "Datant de moins de 6 mois avant la date de délivrance du PASS IAE",
"ui_rank": 14,
"created_at": "2021-09-03T20:00:00.000Z",
"certifiable": false
"kind": "PM"
}
}
]
Loading

0 comments on commit 2266e5b

Please sign in to comment.