Skip to content

Commit

Permalink
Legacy MHR: Year Prop Conversion (#1902)
Browse files Browse the repository at this point in the history
* Mhr Home Year Fix for Legacy Prop

* add comment
  • Loading branch information
cameron-eyds authored May 29, 2024
1 parent 9e217a1 commit 66261bd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.2.0",
"version": "3.2.1",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
8 changes: 7 additions & 1 deletion ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,13 @@ export const useMhrCorrections = () => {
status: getMhrStatusType.value
}),
...(getCorrectionsList().some(value => descriptionGroup.includes(value)) && {
description: mhrState.description
description: {
...mhrState.description,
baseInformation: {
...mhrState.description.baseInformation,
year: Number(mhrState.description.baseInformation.year) // Cast to number to support legacy strings
}
}
}),
...(getCorrectionsList().includes('ownerGroups') && {
addOwnerGroups: mhrState.ownerGroups
Expand Down

0 comments on commit 66261bd

Please sign in to comment.