diff --git a/CHANGELOG.md b/CHANGELOG.md index b6d0a5d791..165bdb27b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v6.171.0](https://github.com/opengovsg/FormSG/compare/v6.170.0...v6.171.0) + +- feat(myinfo-children): enable myinfo child on storage admin create page [`#7988`](https://github.com/opengovsg/FormSG/pull/7988) +- build: merge release v6.170.0 to develop [`#8001`](https://github.com/opengovsg/FormSG/pull/8001) +- build: release v6.170.0 [`#7998`](https://github.com/opengovsg/FormSG/pull/7998) + #### [v6.170.0](https://github.com/opengovsg/FormSG/compare/v6.169.1...v6.170.0) +> 16 December 2024 + - fix(sgid): add guard clause to ensure field is present before formatting [`#7997`](https://github.com/opengovsg/FormSG/pull/7997) - fix(deps): bump aws-sdk from 2.1691.0 to 2.1692.0 [`#7951`](https://github.com/opengovsg/FormSG/pull/7951) - fix(deps): bump libphonenumber-js from 1.11.15 to 1.11.16 in /shared [`#7974`](https://github.com/opengovsg/FormSG/pull/7974) @@ -14,6 +22,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build: merge release 6.169.0 to develop [`#7987`](https://github.com/opengovsg/FormSG/pull/7987) - fix(i18n): replace title,desc missed earlier [`#7940`](https://github.com/opengovsg/FormSG/pull/7940) - feat(i18n): replace hardcoded text in FeedbackBlock for i18n [`#7941`](https://github.com/opengovsg/FormSG/pull/7941) +- chore: bump version to v6.170.0 [`91bdef3`](https://github.com/opengovsg/FormSG/commit/91bdef34cd54b347c6ea9a1526b8811e8a6d2c1c) #### [v6.169.1](https://github.com/opengovsg/FormSG/compare/v6.169.0...v6.169.1) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b7cfd8cfd6..ac354fe6a9 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "form-frontend", - "version": "6.170.0", + "version": "6.171.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "form-frontend", - "version": "6.170.0", + "version": "6.171.0", "hasInstallScript": true, "dependencies": { "@chakra-ui/react": "^2.8.2", diff --git a/frontend/package.json b/frontend/package.json index a021f4f9f1..87d81aecc2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "form-frontend", - "version": "6.170.0", + "version": "6.171.0", "homepage": ".", "type": "module", "private": true, diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/MyInfoPanel.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/MyInfoPanel.tsx index ed86c2db7c..1080a918a7 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/MyInfoPanel.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/MyInfoPanel.tsx @@ -244,8 +244,7 @@ export const MyInfoFieldPanel = ({ searchValue }: { searchValue: string }) => { )} - {user?.betaFlags?.children && - form?.responseMode === FormResponseMode.Email ? ( + {user?.betaFlags?.children ? ( {(provided) => ( diff --git a/package-lock.json b/package-lock.json index dc4a8d5d93..fc124f8b29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "FormSG", - "version": "6.170.0", + "version": "6.171.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "FormSG", - "version": "6.170.0", + "version": "6.171.0", "hasInstallScript": true, "dependencies": { "@aws-sdk/client-cloudwatch-logs": "^3.536.0", diff --git a/package.json b/package.json index 8bb3d9452b..479b23adc7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "6.170.0", + "version": "6.171.0", "homepage": "https://form.gov.sg", "authors": [ "FormSG " diff --git a/src/app/modules/myinfo/myinfo.util.ts b/src/app/modules/myinfo/myinfo.util.ts index e8c15fddd8..ce847be7c2 100644 --- a/src/app/modules/myinfo/myinfo.util.ts +++ b/src/app/modules/myinfo/myinfo.util.ts @@ -521,7 +521,7 @@ export const handleMyInfoChildHashResponse = ( // Validate each answer (child) childAnswer.forEach((attrAnswer, subFieldIndex) => { const key = getMyInfoChildHashKey( - field._id as string, + field._id, subFields[subFieldIndex], childIndex, childName, diff --git a/src/app/modules/submission/submission.utils.ts b/src/app/modules/submission/submission.utils.ts index 495fc5f91d..d02d2308c5 100644 --- a/src/app/modules/submission/submission.utils.ts +++ b/src/app/modules/submission/submission.utils.ts @@ -91,7 +91,6 @@ import { MyInfoMissingLoginCookieError, } from '../myinfo/myinfo.errors' import { MyInfoKey } from '../myinfo/myinfo.types' -import { getMyInfoChildHashKey } from '../myinfo/myinfo.util' import { InvalidPaymentProductsError, PaymentNotFoundError, @@ -752,17 +751,12 @@ export const getAnswersForChild = ( return [] } return response.answerArray.flatMap((arr, childIdx) => { - // First array element is always child name - const childName = arr[0] return arr.map((answer, idx) => { const subfield = subFields[idx] return { - _id: getMyInfoChildHashKey( - response._id, - subFields[idx], - childIdx, - childName, - ), + // Recreates the individual _id of the child field based on the parent field's _id and the subfield + // e.g., childrenbirthrecords.67585515e1ced6d790a91e14.childname.0 + _id: `${MyInfoAttribute.ChildrenBirthRecords}.${response._id}.${subFields[idx]}.${childIdx}`, fieldType: response.fieldType, // qnChildIdx represents the index of the MyInfo field // childIdx represents the index of the child in this MyInfo field