Skip to content

Commit

Permalink
Add disregard_selection to eligibility check
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMillar-MOJ committed Oct 30, 2024
1 parent 6abd828 commit 43151d1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cla_backend/apps/legalaid/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from extended_choices import Choices

DISREGARD_SELECTION = Choices(
# This populates the "Have you had a big payment that you do not normally get?" radio button group on cla_frontend
# constant, db_id, friendly string
("YES", "yes", "Yes"),
("NO", "no", "No"),
("NOT_SURE", "not_sure", "Not sure"),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [("legalaid", "0036_auto_20241002_1407")]

operations = [
migrations.AddField(
model_name="eligibilitycheck",
name="disregard_selection",
field=models.CharField(
default=None,
max_length=10,
null=True,
blank=True,
choices=[(b"yes", b"Yes"), (b"no", b"No"), (b"not_sure", b"Not sure")],
),
)
]
4 changes: 4 additions & 0 deletions cla_backend/apps/legalaid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
CALLBACK_WINDOW_TYPES,
CALLBACK_TYPES,
)
from legalaid.constants import DISREGARD_SELECTION

from legalaid.fields import MoneyField

Expand Down Expand Up @@ -442,6 +443,9 @@ class Analytics:
under_18_has_valuables = models.NullBooleanField(default=None)
specific_benefits = JSONField(null=True, blank=True)
disregards = JSONField(null=True, blank=True)
disregard_selection = models.CharField(
max_length=10, default=None, choices=DISREGARD_SELECTION, blank=True, null=True
)

# need to be moved into graph/questions format soon
is_you_or_your_partner_over_60 = models.NullBooleanField(default=None)
Expand Down

0 comments on commit 43151d1

Please sign in to comment.