feat(cms): implement structured tuition data normalization and editor

Refactor tuition data from a simple numeric array to a structured object
containing time labels and values. This allows for more flexible
charting and precise data entry in the CMS.
- Add `normalizeTuition`, `normalizeTuitionSeries`, and `normalizeTuitionPoint` to `admissionsController.js`
- Update `admissionsConfig.js` to use `objectList` for tuition data points instead of `stringList`
- Migrate existing tuition data in `admissions.json` to the new structured format
- Fix duplicate text in `admissions.json` grant amounts and descriptions
This commit is contained in:
Tống Thành Đạt
2026-04-22 03:48:02 +07:00
parent 5d0fae6d51
commit f26b072954
3 changed files with 112 additions and 19 deletions
+43 -12
View File
@@ -72,22 +72,53 @@
{
"label": "Traditional University",
"color": "#850f0f",
"values": [
25000,
49998,
30000,
100000,
120000
"points": [
{
"time": "Year 1",
"value": 25000
},
{
"time": "Year 2",
"value": 49998
},
{
"time": "Year 3",
"value": 30000
},
{
"time": "Year 4",
"value": 100000
},
{
"time": "Year 5",
"value": 120000
},
{
"time": "Year 6",
"value": 500000
}
]
},
{
"label": "LAMS",
"color": "#a700b3",
"values": [
3588,
7176,
10764,
10000
"points": [
{
"time": "Year 1",
"value": 3588
},
{
"time": "Year 2",
"value": 7176
},
{
"time": "Year 3",
"value": 10764
},
{
"time": "Year 4",
"value": 10000
}
]
}
]
@@ -195,7 +226,7 @@
"items": [
{
"title": "Working Adult GrantWorking Adult GrantWorking Adul",
"amount": "Up to $1,500Up to $1,500",
"amount": "Up to $1,500",
"description": "For students employed full-time while studying.For students employed full-time while studying.For students employed full-time while studying.For students employ"
},
{