Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emp 431 fe feature crm 7 official use section #251

Merged
merged 6 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions server/services/config/crm7DisplayConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,11 @@
"title": "Office Use Only",
"subsections": [
{
"title": "Quality Control",
"fields": [
{
"label": "Decision",
"apiField": "decisionOfficeUseOnly"
}
]
"title": "Office Use Only",
"customDisplay": {
"name": "crm7OfficeUseOnly",
"apiField": "OfficeUseOnly"
BNmoj marked this conversation as resolved.
Show resolved Hide resolved
}
}
]
},
Expand Down
14 changes: 7 additions & 7 deletions server/views/components/customDisplay/crm5/crm5OfficeUseOnly.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
"Refer": "Refer For ICA"
} %}

{% if data.qualityControl.decision == 'G' %}
{% if data.QualityControl.decision == 'G' %}
{% set reasonLabel = "Notes" %}
{% else %}
{% set reasonLabel = "Reason for decision" %}
{% endif %}

{% set fieldsQualityControl = [
{ label: "Decision", value: decisionOptions[data.qualityControl.decision] },
{ label: reasonLabel, value: data.qualityControl.decisionReason }
{ label: "Decision", value: decisionOptions[data.QualityControl.decision] },
{ label: reasonLabel, value: data.QualityControl.decisionReason }
] %}
{{ formSubsection('Quality Control', fieldsQualityControl) }}

{# Authority Section #}
{% set fieldsAuthority = [
{ label: "New Limit Request", value: data.authority.newLimitRequest | formatCurrency },
{ label: "Upper Limit Extended To", value: data.authority.upperLimitExtended | formatCurrency },
{ label: "Signed Authority", value: data.authority.signedAuth },
{ label: "Decision Date", value: data.authority.signedAuthDate | formatDate }
{ label: "New Limit Request", value: data.Authority.newLimitRequest | formatCurrency },
{ label: "Upper Limit Extended To", value: data.Authority.upperLimitExtended | formatCurrency },
{ label: "Signed Authority", value: data.Authority.signedAuth },
{ label: "Decision Date", value: data.Authority.signedAuthDate | formatDate }
] %}
{{ formSubsection('Authority', fieldsAuthority) }}

Expand Down
28 changes: 28 additions & 0 deletions server/views/components/customDisplay/crm7/crm7OfficeUseOnly.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% from "../../formFieldList.njk" import formFieldList %}
{% from "../../formSubsection.njk" import formSubsection %}
{% from "../../formField.njk" import formField %}

{% macro crm7OfficeUseOnly(data) %}
{# Quality Control Section #}
{% set decisionOptions = {
"G": "Grant",
"PG": "Part Grant",
"R": "Reject",
"Refer": "Refer For ICA"
} %}

{% set fieldsQualityControl = [
{ label: "Decision", value: decisionOptions[data.QualityControl.decision] },
{ label: "Reason for decision", value: data.QualityControl.decisionReason },
{ label: "Destruction Date", value: data.QualityControl.destructionDate | formatDate }
] %}
{{ formSubsection('Quality Control', fieldsQualityControl) }}

{# Authority Section #}
{% set fieldsAuthority = [
{ label: "Signed Authority", value: data.Authority.signedAuth },
{ label: "Decision Date", value: data.Authority.signedAuthDate | formatDate }
] %}
{{ formSubsection('Authority', fieldsAuthority) }}

{% endmacro %}
3 changes: 3 additions & 0 deletions server/views/components/customDisplay/customDisplay.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{% from "./crm7/crm7Disbursements.njk" import crm7Disbursements %}
{% from "./crm7/crm7ClaimForCosts.njk" import crm7ClaimForCosts %}
{% from "./crm7/crm7ScheduleOfTime.njk" import crm7ScheduleOfTime %}
{% from "./crm7/crm7OfficeUseOnly.njk" import crm7OfficeUseOnly %}
{% from "./crm14/crm14AboutTheInformation.njk" import crm14AboutTheInformation %}
{% from "./crm14/crm14InterestsOfJustice.njk" import crm14InterestsOfJustice %}
{% from "./crm14/crm14Declarations.njk" import crm14Declarations %}
Expand Down Expand Up @@ -33,6 +34,8 @@
{{ crm7ClaimForCosts(params.value) }}
{% elif params.name == 'crm7ScheduleOfTime' %}
{{ crm7ScheduleOfTime(params.value) }}
{% elif params.name == 'crm7OfficeUseOnly' %}
{{ crm7OfficeUseOnly(params.value) }}
{% elif params.name == 'crm14InterestsOfJustice' %}
{{ crm14InterestsOfJustice(params.value) }}
{% elif params.name == 'crm14AboutTheInformation' %}
Expand Down
12 changes: 5 additions & 7 deletions server/views/components/formFieldList.njk
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{% from "./formField.njk" import formField %}

{% macro formFieldList(fields) %}

BNmoj marked this conversation as resolved.
Show resolved Hide resolved
<dl class="govuk-summary-list">
{% for field in fields %}
{{ formField(field) }}
{% endfor %}
</dl>

<dl class="govuk-summary-list">
{% for field in fields %}
{{ formField(field) }}
{% endfor %}
</dl>
{% endmacro %}