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

#3748 - Content - Student current year income dynamic year #3791

Merged
merged 2 commits into from
Oct 15, 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
22 changes: 21 additions & 1 deletion sources/packages/forms/src/form-definitions/sfaa2022-23.json
Original file line number Diff line number Diff line change
Expand Up @@ -5447,6 +5447,26 @@
"properties": {},
"lockKey": true,
"defaultValue": "365"
},
{
"input": true,
"tableView": true,
"key": "currentTaxYear",
"label": "Current Tax Year",
"protected": false,
"unique": false,
"persistent": false,
"type": "hidden",
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"properties": {},
"customClass": "",
"lockKey": true,
"calculateValue": "value = data.programYear ? data.programYear: \"\";"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If data.programYear already has the desired value, is there a need to create a second hidden field?

Copy link
Collaborator Author

@bidyashish bidyashish Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have tried to separate data.programYear with 'Current tax Tear', so I have defined new Current tax year hidden value. Just in case if we need know Current tax year is fetched.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the justification "Just in case if we need know Current tax year is fetched", when that would be a benefit since this is only used to be displayed in some labels and is derived from the program year?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, 'data.programYear' gives first year of program year like '2024', which is the required value for Current tax year. I was thinking to use separate variable name of Current tax year rather than use same data.programYear as variable name is not as per the required Current tax year to follow standardization.

}
],
"input": false,
Expand Down Expand Up @@ -23066,7 +23086,7 @@
"value": ""
}
],
"content": "If you have had, or anticipate having a significant decrease in income for {{data.calculatedTaxYear}}, you may request to be assessed using this year's estimated income.",
"content": "If you have had, or anticipate having a significant decrease in income for {{data.currentTaxYear}}, you may request to be assessed using this year's estimated income.",
"refreshOnChange": true,
"customClass": "",
"hidden": false,
Expand Down
21 changes: 20 additions & 1 deletion sources/packages/forms/src/form-definitions/sfaa2023-24.json
Original file line number Diff line number Diff line change
Expand Up @@ -5447,6 +5447,25 @@
"properties": {},
"lockKey": true,
"defaultValue": "365"
},
{
"input": true,
"tableView": true,
"key": "currentTaxYear",
"label": "Current Tax Year",
"protected": false,
"unique": false,
"persistent": false,
"type": "hidden",
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"properties": {},
"lockKey": true,
"calculateValue": "value = data.programYear ? data.programYear: \"\";"
}
],
"input": false,
Expand Down Expand Up @@ -23066,7 +23085,7 @@
"value": ""
}
],
"content": "If you have had, or anticipate having a significant decrease in income for {{data.calculatedTaxYear}}, you may request to be assessed using this year's estimated income.",
"content": "If you have had, or anticipate having a significant decrease in income for {{data.currentTaxYear}}, you may request to be assessed using this year's estimated income.",
"refreshOnChange": true,
"customClass": "",
"hidden": false,
Expand Down
21 changes: 20 additions & 1 deletion sources/packages/forms/src/form-definitions/sfaa2024-25.json
Original file line number Diff line number Diff line change
Expand Up @@ -5447,6 +5447,25 @@
"properties": {},
"lockKey": true,
"defaultValue": "365"
},
{
"input": true,
"tableView": true,
"key": "currentTaxYear",
"label": "Current Tax Year",
"protected": false,
"unique": false,
"persistent": false,
"type": "hidden",
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"properties": {},
"lockKey": true,
"calculateValue": "value = data.programYear ? data.programYear: \"\";"
}
],
"input": false,
Expand Down Expand Up @@ -23066,7 +23085,7 @@
"value": ""
}
],
"content": "If you have had, or anticipate having a significant decrease in income for {{data.calculatedTaxYear}}, you may request to be assessed using this year's estimated income.",
"content": "If you have had, or anticipate having a significant decrease in income for {{data.currentTaxYear}}, you may request to be assessed using this year's estimated income.",
"refreshOnChange": true,
"customClass": "",
"hidden": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,25 @@
"calculateValue": "// From the program year, get the calendar start year of the the program year.\r\n// e.g. program year = 2022-2023, calendar start year is 2022. And tax year should be 2021.\r\nconst [startYear] = data.programYear ? data.programYear.split(\"-\"):[];\r\nconst taxYear = startYear ? (+startYear)-1 : \"\";\r\nvalue = taxYear;",
"lockKey": true
},
{
"input": true,
"tableView": true,
"key": "currentTaxYear",
"label": "Current Tax Year",
"protected": false,
"unique": false,
"persistent": false,
"type": "hidden",
"tags": [],
"conditional": {
"show": "",
"when": null,
"eq": ""
},
"properties": {},
"calculateValue": "// From the program year, get the calendar start year of the the program year.\r\n// e.g. program year = 2022-2023, calendar start year is 2022. And Current tax year should be 2022.\r\nconst [startYear] = data.programYear ? data.programYear.split(\"-\"):[];\r\nvalue = startYear;",
"lockKey": true
},
{
"key": "financialInformation",
"label": "Financial Information",
Expand Down Expand Up @@ -279,7 +298,7 @@
"value": ""
}
],
"content": "If you have had, or anticipate having a significant decrease in income for {{data.calculatedTaxYear}}, you may request to be assessed using this year's estimated income.",
"content": "If you have had, or anticipate having a significant decrease in income for {{data.currentTaxYear}}, you may request to be assessed using this year's estimated income.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use data.programYear, or please explain why this was not used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have tried to separate data.programYear with 'Current tax Tear', so I have defined new Current tax year hidden value. Just in case if we need know Current tax year is being fetched.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data.programYear in this form is not actually the "2024-2025" program year name?
If I am right the question from @guru-aot would not make sense and and reply from @bidyashish should probably mention it. Please let me know if I am missing something.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes thats correct, data.programYear gives '2024-2025' as Program year, I used the the similar logic as calculatedTaxYear to get Current Tax Year.

"refreshOnChange": true,
"customClass": "",
"hidden": false,
Expand Down