Skip to content

Commit

Permalink
Hl 1024 ahjo (#2408)
Browse files Browse the repository at this point in the history
* feat: migration to remove redundant DIARY_NUMBER_RECEIVED ahjostatus

* feat: add_ahjo_case_id and ahjo_case_guid to application
  • Loading branch information
rikuke authored Nov 2, 2023
1 parent ca48b3d commit c3fa7ea
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by Django 3.2.18 on 2023-10-31 10:06

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("applications", "0044_ahjostatus"),
]

operations = [
migrations.AlterField(
model_name="ahjostatus",
name="status",
field=models.CharField(
choices=[
(
"submitted_but_not_sent_to_ahjo",
"Submitted but not sent to AHJO",
),
(
"request_to_open_case_sent",
"Request to open the case sent to AHJO",
),
("case_opened", "Case opened in AHJO"),
("update_request_sent", "Update request sent"),
("update_request_received", "Update request received"),
("decision_proposal_sent", "Decision proposal sent"),
("decision_proposal_accepted", "Decision proposal accepted"),
("decision_proposal_rejected", "Decision proposal rejected"),
("delete_request_sent", "Delete request sent"),
("delete_request_received", "Delete request received"),
],
default="submitted_but_not_sent_to_ahjo",
max_length=64,
verbose_name="status",
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.18 on 2023-10-31 10:08

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('applications', '0045_alter_ahjostatus_status'),
]

operations = [
migrations.AddField(
model_name='application',
name='ahjo_case_guid',
field=models.UUIDField(blank=True, null=True),
),
migrations.AddField(
model_name='application',
name='ahjo_case_id',
field=models.CharField(blank=True, max_length=64, null=True),
),
migrations.AddField(
model_name='historicalapplication',
name='ahjo_case_guid',
field=models.UUIDField(blank=True, null=True),
),
migrations.AddField(
model_name='historicalapplication',
name='ahjo_case_id',
field=models.CharField(blank=True, max_length=64, null=True),
),
]
3 changes: 3 additions & 0 deletions backend/benefit/applications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ def get_available_benefit_types(self):
history = HistoricalRecords(
table_name="bf_applications_application_history", cascade_delete_history=True
)
# This is the diary number in Ahjo
ahjo_case_id = models.CharField(max_length=64, null=True, blank=True)
ahjo_case_guid = models.UUIDField(null=True, blank=True)

@property
def calculated_benefit_amount(self):
Expand Down

0 comments on commit c3fa7ea

Please sign in to comment.