From 17e2135600ed109e229d4cd607f345d0b1d4f567 Mon Sep 17 00:00:00 2001 From: GarethLancaster <31533575+Gareth40342@users.noreply.github.com> Date: Sun, 13 Oct 2024 15:34:16 +0100 Subject: [PATCH] Added scenarios --- .../2024_10_20_1047__new_scenario-5.sql | 52 +++++++++++++++++++ .../2024_10_25_1047__new_scenario-6.sql | 52 +++++++++++++++++++ .../V2024_10_20___new_scenario-6.sql | 52 +++++++++++++++++++ .../V202_10_20_1047__new_scenario-4.sql | 52 +++++++++++++++++++ 4 files changed, 208 insertions(+) create mode 100644 src/main/resources/db/migration/2024_10_20_1047__new_scenario-5.sql create mode 100644 src/main/resources/db/migration/2024_10_25_1047__new_scenario-6.sql create mode 100644 src/main/resources/db/migration/V2024_10_20___new_scenario-6.sql create mode 100644 src/main/resources/db/migration/V202_10_20_1047__new_scenario-4.sql diff --git a/src/main/resources/db/migration/2024_10_20_1047__new_scenario-5.sql b/src/main/resources/db/migration/2024_10_20_1047__new_scenario-5.sql new file mode 100644 index 000000000000..f48028e7b611 --- /dev/null +++ b/src/main/resources/db/migration/2024_10_20_1047__new_scenario-5.sql @@ -0,0 +1,52 @@ +/** + * Add scenario + */ +INSERT INTO dbs.scenario (name, notifications_to_delete, notifications_to_create) +VALUES ('Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + '{"Notice.AAA6.ClaimantIntent.CCJ.Requested.Claimant", + "Notice.AAA6.ClaimantIntent.RequestedCCJ.ClaimantAcceptedDefendantPlan.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.NoDefResponse.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.DefPaymentMissed.Claimant"}', + '{"Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant": ["djClaimantNotificationMessage", "djClaimantNotificationMessageCy"]}'); + +/** + * Add notification template + */ +INSERT INTO dbs.dashboard_notifications_templates ( template_name, title_En, title_Cy, description_En, description_Cy + , notification_role) +VALUES ('Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + 'A judgment against the defendant has been made', + 'Mae dyfarniad wedi’i wneud yn erbyn y diffynnydd', + '

The defendant should now pay you according to the terms of the judgment.
Once they do, you should confirm that they’ve paid you the full amount that you’re owed.
If they do not pay you by the date on the judgment, you can ask for enforcement action to be taken against them.
If you need to change the terms of payment within the judgment, such as the instalments you had previously agreed, you can ${djClaimantNotificationMessage}.

', + '

Dylai’r diffynnydd eich talu yn unol â thelerau’r dyfarniad.
Unwaith y byddant yn gwneud hynny, dylech gadarnhau eu bod wedi talu’r swm llawn sy’n ddyledus i chi.
Os na fyddant yn eich talu erbyn y dyddiad ar y dyfarniad, gallwch ofyn am gymryd camau gorfodi yn eu herbyn.
Os oes arnoch angen newid y telerau talu o fewn y dyfarniad, fel y rhandaliadau roeddech wedi cytuno arnynt yn flaenorol, gallwch ${djClaimantNotificationMessageCy}.

', + 'CLAIMANT'); + +/** + * Add task list items claimant + */ +INSERT INTO dbs.task_item_template (task_name_en, category_en, task_name_cy, category_cy, template_name, + scenario_name, task_status_sequence, role, task_order) +VALUES ('View the hearing', 'Hearing', + 'Gweld y gwrandawiad', 'Gwrandawiad', + 'Hearing.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 8), + ('Upload hearing documents', 'Hearing', + 'Llwytho dogfennau''r gwrandawiad', 'Gwrandawiad', + 'Hearing.Document.Upload', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 9), + ('View documents', 'Hearing', + 'Gweld y dogfennau', 'Gwrandawiad', + 'Hearing.Document.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 10), + ('Add the trial arrangements', 'Hearing', + 'Ychwanegu trefniadau''r treial', 'Gwrandawiad', + 'Hearing.Arrangements.Add', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 11), + ('View the bundle', 'Hearing', + 'Gweld y bwndel', 'Gwrandawiad', + 'Hearing.Bundle.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 12), + ('View orders and notices', 'Orders and notices from the court', + 'Gweld gorchmynion a rhybuddion', 'Gorchmynion a rhybuddion gan y llys', + 'Order.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 13), + ('View the judgment', 'Judgments from the court', + 'Gweld y Dyfarniad', 'Dyfarniadau gan y llys', + 'Judgment.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 14), + ('Confirm you''ve paid a judgment (CCJ) debt', 'Judgments from the court', + 'Cadarnhewch eich bod wedi talu dyled dyfarniad (CCJ)', 'Dyfarniadau gan y llys', + 'Judgment.Cosc', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 15); diff --git a/src/main/resources/db/migration/2024_10_25_1047__new_scenario-6.sql b/src/main/resources/db/migration/2024_10_25_1047__new_scenario-6.sql new file mode 100644 index 000000000000..f48028e7b611 --- /dev/null +++ b/src/main/resources/db/migration/2024_10_25_1047__new_scenario-6.sql @@ -0,0 +1,52 @@ +/** + * Add scenario + */ +INSERT INTO dbs.scenario (name, notifications_to_delete, notifications_to_create) +VALUES ('Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + '{"Notice.AAA6.ClaimantIntent.CCJ.Requested.Claimant", + "Notice.AAA6.ClaimantIntent.RequestedCCJ.ClaimantAcceptedDefendantPlan.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.NoDefResponse.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.DefPaymentMissed.Claimant"}', + '{"Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant": ["djClaimantNotificationMessage", "djClaimantNotificationMessageCy"]}'); + +/** + * Add notification template + */ +INSERT INTO dbs.dashboard_notifications_templates ( template_name, title_En, title_Cy, description_En, description_Cy + , notification_role) +VALUES ('Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + 'A judgment against the defendant has been made', + 'Mae dyfarniad wedi’i wneud yn erbyn y diffynnydd', + '

The defendant should now pay you according to the terms of the judgment.
Once they do, you should confirm that they’ve paid you the full amount that you’re owed.
If they do not pay you by the date on the judgment, you can ask for enforcement action to be taken against them.
If you need to change the terms of payment within the judgment, such as the instalments you had previously agreed, you can ${djClaimantNotificationMessage}.

', + '

Dylai’r diffynnydd eich talu yn unol â thelerau’r dyfarniad.
Unwaith y byddant yn gwneud hynny, dylech gadarnhau eu bod wedi talu’r swm llawn sy’n ddyledus i chi.
Os na fyddant yn eich talu erbyn y dyddiad ar y dyfarniad, gallwch ofyn am gymryd camau gorfodi yn eu herbyn.
Os oes arnoch angen newid y telerau talu o fewn y dyfarniad, fel y rhandaliadau roeddech wedi cytuno arnynt yn flaenorol, gallwch ${djClaimantNotificationMessageCy}.

', + 'CLAIMANT'); + +/** + * Add task list items claimant + */ +INSERT INTO dbs.task_item_template (task_name_en, category_en, task_name_cy, category_cy, template_name, + scenario_name, task_status_sequence, role, task_order) +VALUES ('View the hearing', 'Hearing', + 'Gweld y gwrandawiad', 'Gwrandawiad', + 'Hearing.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 8), + ('Upload hearing documents', 'Hearing', + 'Llwytho dogfennau''r gwrandawiad', 'Gwrandawiad', + 'Hearing.Document.Upload', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 9), + ('View documents', 'Hearing', + 'Gweld y dogfennau', 'Gwrandawiad', + 'Hearing.Document.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 10), + ('Add the trial arrangements', 'Hearing', + 'Ychwanegu trefniadau''r treial', 'Gwrandawiad', + 'Hearing.Arrangements.Add', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 11), + ('View the bundle', 'Hearing', + 'Gweld y bwndel', 'Gwrandawiad', + 'Hearing.Bundle.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 12), + ('View orders and notices', 'Orders and notices from the court', + 'Gweld gorchmynion a rhybuddion', 'Gorchmynion a rhybuddion gan y llys', + 'Order.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 13), + ('View the judgment', 'Judgments from the court', + 'Gweld y Dyfarniad', 'Dyfarniadau gan y llys', + 'Judgment.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 14), + ('Confirm you''ve paid a judgment (CCJ) debt', 'Judgments from the court', + 'Cadarnhewch eich bod wedi talu dyled dyfarniad (CCJ)', 'Dyfarniadau gan y llys', + 'Judgment.Cosc', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 15); diff --git a/src/main/resources/db/migration/V2024_10_20___new_scenario-6.sql b/src/main/resources/db/migration/V2024_10_20___new_scenario-6.sql new file mode 100644 index 000000000000..f48028e7b611 --- /dev/null +++ b/src/main/resources/db/migration/V2024_10_20___new_scenario-6.sql @@ -0,0 +1,52 @@ +/** + * Add scenario + */ +INSERT INTO dbs.scenario (name, notifications_to_delete, notifications_to_create) +VALUES ('Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + '{"Notice.AAA6.ClaimantIntent.CCJ.Requested.Claimant", + "Notice.AAA6.ClaimantIntent.RequestedCCJ.ClaimantAcceptedDefendantPlan.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.NoDefResponse.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.DefPaymentMissed.Claimant"}', + '{"Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant": ["djClaimantNotificationMessage", "djClaimantNotificationMessageCy"]}'); + +/** + * Add notification template + */ +INSERT INTO dbs.dashboard_notifications_templates ( template_name, title_En, title_Cy, description_En, description_Cy + , notification_role) +VALUES ('Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + 'A judgment against the defendant has been made', + 'Mae dyfarniad wedi’i wneud yn erbyn y diffynnydd', + '

The defendant should now pay you according to the terms of the judgment.
Once they do, you should confirm that they’ve paid you the full amount that you’re owed.
If they do not pay you by the date on the judgment, you can ask for enforcement action to be taken against them.
If you need to change the terms of payment within the judgment, such as the instalments you had previously agreed, you can ${djClaimantNotificationMessage}.

', + '

Dylai’r diffynnydd eich talu yn unol â thelerau’r dyfarniad.
Unwaith y byddant yn gwneud hynny, dylech gadarnhau eu bod wedi talu’r swm llawn sy’n ddyledus i chi.
Os na fyddant yn eich talu erbyn y dyddiad ar y dyfarniad, gallwch ofyn am gymryd camau gorfodi yn eu herbyn.
Os oes arnoch angen newid y telerau talu o fewn y dyfarniad, fel y rhandaliadau roeddech wedi cytuno arnynt yn flaenorol, gallwch ${djClaimantNotificationMessageCy}.

', + 'CLAIMANT'); + +/** + * Add task list items claimant + */ +INSERT INTO dbs.task_item_template (task_name_en, category_en, task_name_cy, category_cy, template_name, + scenario_name, task_status_sequence, role, task_order) +VALUES ('View the hearing', 'Hearing', + 'Gweld y gwrandawiad', 'Gwrandawiad', + 'Hearing.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 8), + ('Upload hearing documents', 'Hearing', + 'Llwytho dogfennau''r gwrandawiad', 'Gwrandawiad', + 'Hearing.Document.Upload', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 9), + ('View documents', 'Hearing', + 'Gweld y dogfennau', 'Gwrandawiad', + 'Hearing.Document.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 10), + ('Add the trial arrangements', 'Hearing', + 'Ychwanegu trefniadau''r treial', 'Gwrandawiad', + 'Hearing.Arrangements.Add', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 11), + ('View the bundle', 'Hearing', + 'Gweld y bwndel', 'Gwrandawiad', + 'Hearing.Bundle.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 12), + ('View orders and notices', 'Orders and notices from the court', + 'Gweld gorchmynion a rhybuddion', 'Gorchmynion a rhybuddion gan y llys', + 'Order.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 13), + ('View the judgment', 'Judgments from the court', + 'Gweld y Dyfarniad', 'Dyfarniadau gan y llys', + 'Judgment.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 14), + ('Confirm you''ve paid a judgment (CCJ) debt', 'Judgments from the court', + 'Cadarnhewch eich bod wedi talu dyled dyfarniad (CCJ)', 'Dyfarniadau gan y llys', + 'Judgment.Cosc', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 15); diff --git a/src/main/resources/db/migration/V202_10_20_1047__new_scenario-4.sql b/src/main/resources/db/migration/V202_10_20_1047__new_scenario-4.sql new file mode 100644 index 000000000000..f48028e7b611 --- /dev/null +++ b/src/main/resources/db/migration/V202_10_20_1047__new_scenario-4.sql @@ -0,0 +1,52 @@ +/** + * Add scenario + */ +INSERT INTO dbs.scenario (name, notifications_to_delete, notifications_to_create) +VALUES ('Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + '{"Notice.AAA6.ClaimantIntent.CCJ.Requested.Claimant", + "Notice.AAA6.ClaimantIntent.RequestedCCJ.ClaimantAcceptedDefendantPlan.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.NoDefResponse.Claimant", + "Notice.AAA6.ClaimantIntent.RequestCCJ.ClaimantAcceptOrRejectPlan.SettlementRequested.DefPaymentMissed.Claimant"}', + '{"Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant": ["djClaimantNotificationMessage", "djClaimantNotificationMessageCy"]}'); + +/** + * Add notification template + */ +INSERT INTO dbs.dashboard_notifications_templates ( template_name, title_En, title_Cy, description_En, description_Cy + , notification_role) +VALUES ('Notice.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', + 'A judgment against the defendant has been made', + 'Mae dyfarniad wedi’i wneud yn erbyn y diffynnydd', + '

The defendant should now pay you according to the terms of the judgment.
Once they do, you should confirm that they’ve paid you the full amount that you’re owed.
If they do not pay you by the date on the judgment, you can ask for enforcement action to be taken against them.
If you need to change the terms of payment within the judgment, such as the instalments you had previously agreed, you can ${djClaimantNotificationMessage}.

', + '

Dylai’r diffynnydd eich talu yn unol â thelerau’r dyfarniad.
Unwaith y byddant yn gwneud hynny, dylech gadarnhau eu bod wedi talu’r swm llawn sy’n ddyledus i chi.
Os na fyddant yn eich talu erbyn y dyddiad ar y dyfarniad, gallwch ofyn am gymryd camau gorfodi yn eu herbyn.
Os oes arnoch angen newid y telerau talu o fewn y dyfarniad, fel y rhandaliadau roeddech wedi cytuno arnynt yn flaenorol, gallwch ${djClaimantNotificationMessageCy}.

', + 'CLAIMANT'); + +/** + * Add task list items claimant + */ +INSERT INTO dbs.task_item_template (task_name_en, category_en, task_name_cy, category_cy, template_name, + scenario_name, task_status_sequence, role, task_order) +VALUES ('View the hearing', 'Hearing', + 'Gweld y gwrandawiad', 'Gwrandawiad', + 'Hearing.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 8), + ('Upload hearing documents', 'Hearing', + 'Llwytho dogfennau''r gwrandawiad', 'Gwrandawiad', + 'Hearing.Document.Upload', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 9), + ('View documents', 'Hearing', + 'Gweld y dogfennau', 'Gwrandawiad', + 'Hearing.Document.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 10), + ('Add the trial arrangements', 'Hearing', + 'Ychwanegu trefniadau''r treial', 'Gwrandawiad', + 'Hearing.Arrangements.Add', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 11), + ('View the bundle', 'Hearing', + 'Gweld y bwndel', 'Gwrandawiad', + 'Hearing.Bundle.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{2, 2}', 'CLAIMANT', 12), + ('View orders and notices', 'Orders and notices from the court', + 'Gweld gorchmynion a rhybuddion', 'Gorchmynion a rhybuddion gan y llys', + 'Order.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 13), + ('View the judgment', 'Judgments from the court', + 'Gweld y Dyfarniad', 'Dyfarniadau gan y llys', + 'Judgment.View', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 14), + ('Confirm you''ve paid a judgment (CCJ) debt', 'Judgments from the court', + 'Cadarnhewch eich bod wedi talu dyled dyfarniad (CCJ)', 'Dyfarniadau gan y llys', + 'Judgment.Cosc', 'Scenario.AAA6.JudgmentsOnline.IssuedCCJ.Claimant', '{3, 3}', 'CLAIMANT', 15);