Skip to content

Commit 0f2fc41

Browse files
build: release v6.272.0 (#8909)
* feat: respondent copy v3 (phase2) (#8869) * enabled email confirmation & pdf response toggle * enabled email confirmation & pdf response toggle fix * betaFlag form status toggle & hiding of email confirmation infobox * added extractRespondentCopyEmails function in mrf utils * implement extractRespondentCopyEmails in submitMultirespondentForm to pass to post actions * created MrfRespondentCopyTemplate * update sendMrfRespondentCopyEmail in mail.service to use MrfRespondentCopyEmail template * create extractRespondentCopyEmails function to obtain autoReplyMailData from mrf submission * update postSubmissionCreateActions to obtain AutoReplyMailData from submission to sendMrfRespondentCopyEmails * update postSubmissionUpdateActions to obtain AutoReplyMailData from submission to sendMrfRespondentCopyEmails * updated extractRespondentCopyEmails to account for active fields in current workflow step * updated sendMrfRespondentCopyEmails to handle multiple autoReplyMailDatas * removed respondent copy email extraction in controller * updated rc flow to account for agencyName * remove default setting of includeFormSummary=false for MRF in email field model * updated rc functions to handle agency names * update editEmail include responses toggle to be updatable in MRF mode * replaced hasRepsondentCopy in snapshotted form def with admin for agencyName * initial fix for mrf service.spec.ts tests * remove toggle and respondent copy multi-input on formpage * removed unused variables after removing respondent copy v2 FE components * fixed tests * removed respondent copy toggle from mrf email settings page * update question title in workflow question block for email fields with autoReply enabled * attempt to use pdf lambda to generate PDF for mrf rc * fixed lint issues * testing extractRepsondenCopyEmails take 2 * fixed custom sender in mail, added formUrl and submission timestamp * replace hypens with divider in mrf respondent copy email * refactored mrf utils to clean up pdf responses for respondent copy * fixed lint * fixed utilsingle field question answer function * bug fix to handle undefined for activeFields * update placeholder text to grey for editMail & stepName default text * updated some variable names and added comments to improve codebase readability * remove respondent copy from mrf workflow completion email * fixed mrf util tests by moveing questionAnswerPair return out of case switch block in questiontitleanswerString function * removed changes from vscode settings * updated disabling of email confirmation toggle only based on beta flag * fixed lint for e2e test file * update email confirmation toggle to be disabled only when mrf mode and no beta flag * Update src/app/modules/submission/multirespondent-submission/multirespondent-submission.service.ts Co-authored-by: Eliot Lim <[email protected]> * Update src/app/modules/submission/multirespondent-submission/multirespondent-submission.service.ts Co-authored-by: Eliot Lim <[email protected]> --------- Co-authored-by: Eliot Lim <[email protected]> * chore: bump version to v6.272.0 --------- Co-authored-by: Eliot Lim <[email protected]>
2 parents 2806fb1 + cb0291c commit 0f2fc41

File tree

25 files changed

+715
-501
lines changed

25 files changed

+715
-501
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [v6.272.0](https://github.com/opengovsg/FormSG/compare/v6.271.0...v6.272.0)
8+
9+
- feat: respondent copy v3 (phase2) [`#8869`](https://github.com/opengovsg/FormSG/pull/8869)
10+
- build: merge release-al2 v6.271.0 back to develop [`#8908`](https://github.com/opengovsg/FormSG/pull/8908)
11+
- build: release v6.271.0 [`#8905`](https://github.com/opengovsg/FormSG/pull/8905)
12+
713
#### [v6.271.0](https://github.com/opengovsg/FormSG/compare/v6.270.0...v6.271.0)
814

15+
> 17 November 2025
16+
917
- feat: respondent copy v3 (phase 1) [`#8854`](https://github.com/opengovsg/FormSG/pull/8854)
1018
- fix: remove noisy chromatic diffs due to dynamic dates and form link [`#8903`](https://github.com/opengovsg/FormSG/pull/8903)
1119
- build: release al2 6.270.0 back to develop [`#8904`](https://github.com/opengovsg/FormSG/pull/8904)
1220
- build: release v6.270.0 [`#8902`](https://github.com/opengovsg/FormSG/pull/8902)
21+
- chore: bump version to v6.271.0 [`43fb858`](https://github.com/opengovsg/FormSG/commit/43fb858a0c8537cddaf2fa362f89899a22785021)
1322

1423
#### [v6.270.0](https://github.com/opengovsg/FormSG/compare/v6.269.0...v6.270.0)
1524

__tests__/e2e/helpers/createForm.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {
4949
getMyInfoAttribute,
5050
getTitleWithQuestionNumber,
5151
} from '../utils'
52+
5253
import { closeModals } from './closeModals';
5354

5455
type CreateFormReturn = {

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "form-frontend",
3-
"version": "6.271.0",
3+
"version": "6.272.0",
44
"homepage": ".",
55
"type": "module",
66
"private": true,

frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditEmail/EditEmail.tsx

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import Input from '~components/Input'
1616
import Textarea from '~components/Textarea'
1717
import Toggle from '~components/Toggle'
1818

19+
import { useUser } from '~features/user/queries'
20+
1921
import { CreatePageDrawerContentContainer } from '../../../../../common'
2022
import { useCreateTabForm } from '../../../../useCreateTabForm'
2123
import { SPLIT_TEXTAREA_TRANSFORM } from '../common/constants'
@@ -87,6 +89,8 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
8789
const watchedHasAllowedEmailDomains = watch('hasAllowedEmailDomains')
8890
const watchedHasAutoReply = watch('autoReplyOptions.hasAutoReply')
8991

92+
const { user } = useUser()
93+
9094
const requiredValidationRule = useMemo(
9195
() =>
9296
createBaseValidationRules<EditEmailInputs, 'title'>({
@@ -139,23 +143,21 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
139143
const isEncryptMode = form?.responseMode === FormResponseMode.Encrypt
140144
const isPaymentDisabledForm =
141145
isEncryptMode &&
142-
form.payments_channel.channel === PaymentChannel.Unconnected
146+
form.payments_channel.channel !== PaymentChannel.Unconnected
143147

144-
const isPdfResponseEnabled =
145-
form?.responseMode === FormResponseMode.Email || isPaymentDisabledForm
146-
147-
const pdfResponseToggleDescription = isPdfResponseEnabled
148+
// For payment forms inclusion of PDF responses are disallowed
149+
const pdfResponseToggleDescription = isPaymentDisabledForm
148150
? t(
149-
'features.adminForm.sidebar.fields.email.emailConfirmation.includeResponseDescription',
151+
'features.adminForm.sidebar.fields.email.emailConfirmation.includePdfResponseWarning',
150152
)
151153
: t(
152-
'features.adminForm.sidebar.fields.email.emailConfirmation.includePdfResponseWarning',
154+
'features.adminForm.sidebar.fields.email.emailConfirmation.includeResponseDescription',
153155
)
154156

155-
// email confirmation is not supported on MRF
157+
// TODO: FRM-2172 Remove when respondent copy is out of beta
156158
const isToggleEmailConfirmationDisabled =
157159
form?.responseMode === FormResponseMode.Multirespondent &&
158-
!field.autoReplyOptions.hasAutoReply
160+
!user?.betaFlags?.respondentCopy
159161

160162
return (
161163
<CreatePageDrawerContentContainer>
@@ -211,7 +213,7 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
211213
'features.adminForm.sidebar.fields.email.emailConfirmation.includeResponse',
212214
)}
213215
description={pdfResponseToggleDescription}
214-
isDisabled={!isPdfResponseEnabled}
216+
isDisabled={isPaymentDisabledForm}
215217
/>
216218
</FormControl>
217219
<FormControl isRequired isReadOnly={isLoading} mt="1.5rem">
@@ -222,7 +224,6 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
222224
'features.adminForm.sidebar.fields.email.emailConfirmation.subject.placeholder',
223225
{ formTitle: form?.title },
224226
)}
225-
_placeholder={{ color: 'secondary.700' }}
226227
{...register('autoReplyOptions.autoReplySubject')}
227228
/>
228229
</FormControl>
@@ -234,7 +235,6 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
234235
</FormLabel>
235236
<Input
236237
placeholder={form?.admin.agency.fullName}
237-
_placeholder={{ color: 'secondary.700' }}
238238
{...register('autoReplyOptions.autoReplySender')}
239239
/>
240240
</FormControl>
@@ -249,12 +249,6 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
249249
'features.adminForm.sidebar.fields.email.emailConfirmation.content.placeholder',
250250
{ agencyName: form?.admin.agency.fullName },
251251
)}
252-
sx={{
253-
'::placeholder': {
254-
color: 'secondary.700',
255-
opacity: 1,
256-
},
257-
}}
258252
{...register('autoReplyOptions.autoReplyMessage')}
259253
/>
260254
</FormControl>

frontend/src/features/admin-form/create/logic/components/LogicContent/utils/getLogicFieldLabel.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ export const getLogicFieldLabel = (field: FormFieldWithQuestionNo) => {
1313
case BasicField.Image:
1414
title = field.name
1515
break
16+
case BasicField.Email:
17+
// Inform admins if email confirmation will be sent
18+
if (field.autoReplyOptions.hasAutoReply) {
19+
title = title + ' (confirmation will be sent)'
20+
}
21+
break
1622
default:
1723
break
1824
}

frontend/src/features/admin-form/create/workflow/components/WorkflowContent/EditStepBlock/StepNameBlock.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export const StepNameBlock = ({
8181
<Input
8282
{...field}
8383
placeholder={displayStepName}
84-
_placeholder={{ color: 'secondary.700' }}
8584
_focus={{
8685
_placeholder: { color: 'transparent' },
8786
}}

frontend/src/features/admin-form/settings/components/FormEmailSection.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ export const FormEmailSection = ({
103103
settings,
104104
isHighContrast = true,
105105
}: EmailFormSectionProps): JSX.Element => {
106-
//TODO: (Respondent Copy): Remove isTest and user when respondent copy is out of beta
107-
const { user } = useUser()
108-
const isTest = import.meta.env.STORYBOOK_NODE_ENV === 'test'
109-
110106
const { t } = useTranslation()
111107
const initialEmailSet = useMemo(
112108
() => new Set(settings.emails),
@@ -169,13 +165,6 @@ export const FormEmailSection = ({
169165
</FormLabel.Description>
170166
) : null}
171167
</FormControl>
172-
{isTest || user?.betaFlags?.respondentCopy ? (
173-
<FormControl isDisabled={isDisabled}>
174-
<Box mt={'1.5rem'}>
175-
<RespondentCopyToggle />
176-
</Box>
177-
</FormControl>
178-
) : null}
179168
</FormProvider>
180169
</>
181170
)

frontend/src/features/admin-form/settings/components/FormStatusToggle.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Flex, Skeleton, Stack, Text, useDisclosure } from '@chakra-ui/react'
55
import { BasicField } from '~shared/types'
66
import {
77
EmailFormDto,
8-
FormAuthType,
98
FormResponseMode,
109
FormStatus,
1110
} from '~shared/types/form/form'
@@ -14,6 +13,7 @@ import InlineMessage from '~components/InlineMessage'
1413
import { Switch } from '~components/Toggle/Switch'
1514

1615
import { useAdminForm } from '~features/admin-form/common/queries'
16+
import { useUser } from '~features/user/queries'
1717

1818
import { useMutateFormSettings } from '../mutations'
1919
import { useAdminFormSettings } from '../queries'
@@ -30,7 +30,7 @@ export const FormStatusToggle = (): JSX.Element => {
3030
} = useAdminForm()
3131
const { data: formSettings, isLoading: isLoadingFormSettings } =
3232
useAdminFormSettings()
33-
33+
const { user } = useUser()
3434
const { status, responseMode, authType, esrvcId } = formSettings ?? {}
3535

3636
const secretKeyActivationModalProps = useDisclosure()
@@ -54,7 +54,8 @@ export const FormStatusToggle = (): JSX.Element => {
5454
form_fields?.some(
5555
(ff) =>
5656
ff.fieldType === BasicField.Email && ff.autoReplyOptions.hasAutoReply,
57-
)
57+
) &&
58+
!user?.betaFlags?.respondentCopy
5859
) {
5960
return t('features.adminForm.settings.general.status.noEmailsInMRF')
6061
}

frontend/src/features/admin-form/settings/components/MrfFormEmailSection.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,6 @@ const MrfEmailNotificationsForm = ({
285285
</FormErrorMessage>
286286
)}
287287
</FormControl>
288-
{isTest || user?.betaFlags?.respondentCopy ? (
289-
<FormControl isDisabled={isDisabled}>
290-
<Box mt={'1.5rem'}>
291-
<RespondentCopyToggle />
292-
</Box>
293-
</FormControl>
294-
) : null}
295288
</Box>
296289
</form>
297290
)

0 commit comments

Comments
 (0)