diff --git a/CHANGELOG.md b/CHANGELOG.md
index 686e718090..12bd6efb60 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,27 @@ 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.69.0](https://github.com/opengovsg/FormSG/compare/v6.68.0...v6.69.0)
+
+- fix: updated payment view to follow colour theme [`#6598`](https://github.com/opengovsg/FormSG/pull/6598)
+- feat: toggle issue notification [`#6590`](https://github.com/opengovsg/FormSG/pull/6590)
+- feat: BE endpoint to allow storage submissions before encryption [`#6587`](https://github.com/opengovsg/FormSG/pull/6587)
+- chore(deps-dev): bump eslint-config-prettier from 8.9.0 to 8.10.0 in /shared [`#6593`](https://github.com/opengovsg/FormSG/pull/6593)
+- chore: remove unused toastr dependency for snyk [`#6589`](https://github.com/opengovsg/FormSG/pull/6589)
+- feat: add Country/Region field [`#5132`](https://github.com/opengovsg/FormSG/pull/5132)
+- feat: payments UI/UX clean up [`#6581`](https://github.com/opengovsg/FormSG/pull/6581)
+- feat: remove divider in payments input panel [`#6586`](https://github.com/opengovsg/FormSG/pull/6586)
+- fix(deps): bump type-fest from 3.13.0 to 4.1.0 in /shared [`#6579`](https://github.com/opengovsg/FormSG/pull/6579)
+- fix(deps): bump libphonenumber-js from 1.10.37 to 1.10.38 in /shared [`#6580`](https://github.com/opengovsg/FormSG/pull/6580)
+- ref: remove download receipt URL [`#6577`](https://github.com/opengovsg/FormSG/pull/6577)
+- chore(deps-dev): bump eslint-config-prettier from 8.8.0 to 8.9.0 in /shared [`#6576`](https://github.com/opengovsg/FormSG/pull/6576)
+- build: merge v6.68.0 into develop [`#6572`](https://github.com/opengovsg/FormSG/pull/6572)
+- build: release v6.68.0 [`#6571`](https://github.com/opengovsg/FormSG/pull/6571)
+
#### [v6.68.0](https://github.com/opengovsg/FormSG/compare/v6.67.1...v6.68.0)
+> 27 July 2023
+
- chore(deps-dev): bump @types/lodash from 4.14.195 to 4.14.196 in /shared [`#6570`](https://github.com/opengovsg/FormSG/pull/6570)
- feat: rm bot protection for GSIB users [`#6568`](https://github.com/opengovsg/FormSG/pull/6568)
- chore: lint and update commands in README [`#6567`](https://github.com/opengovsg/FormSG/pull/6567)
@@ -17,6 +36,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge v6.67.1 into develop [`#6559`](https://github.com/opengovsg/FormSG/pull/6559)
- build: release v6.67.1 [`#6557`](https://github.com/opengovsg/FormSG/pull/6557)
- fix: github warning about unused import [`#6558`](https://github.com/opengovsg/FormSG/pull/6558)
+- chore: bump version to v6.68.0 [`c69b1ce`](https://github.com/opengovsg/FormSG/commit/c69b1ce2a1313e0e49d1b94636af2815dc26e2c3)
#### [v6.67.1](https://github.com/opengovsg/FormSG/compare/v6.67.0...v6.67.1)
@@ -26,7 +46,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: release v6.67.0 [`#6555`](https://github.com/opengovsg/FormSG/pull/6555)
- chore: bump version to 6.67.1 [`b641094`](https://github.com/opengovsg/FormSG/commit/b641094d40a67a888e3a8ac967a43f9d1732bd49)
-#### [v6.67.0](https://github.com/opengovsg/FormSG/compare/v6.66.0...v6.67.0)
+#### [v6.67.0](https://github.com/opengovsg/FormSG/compare/v6.66.1...v6.67.0)
> 20 July 2023
@@ -36,16 +56,23 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: release v6.66.0 [`#6550`](https://github.com/opengovsg/FormSG/pull/6550)
- feat: MyInfo Children compound fields beta [`#6523`](https://github.com/opengovsg/FormSG/pull/6523)
- ci: adjust timeouts for playwright pipe [`#6551`](https://github.com/opengovsg/FormSG/pull/6551)
+- fix: use proof-of-payment for payment receipt/invoice [`#6549`](https://github.com/opengovsg/FormSG/pull/6549)
+- build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /frontend [`#6548`](https://github.com/opengovsg/FormSG/pull/6548)
+- fix(deps): bump word-wrap from 1.2.3 to 1.2.4 [`#6547`](https://github.com/opengovsg/FormSG/pull/6547)
+- build(deps): bump winston-cloudwatch to v6.2.0 [`#6545`](https://github.com/opengovsg/FormSG/pull/6545)
+- chore: bump version to v6.66.0 [`0233ba8`](https://github.com/opengovsg/FormSG/commit/0233ba8018532d4978d13717fac065f81e2eb515)
- chore: bump version to v6.67.0 [`6ca03c6`](https://github.com/opengovsg/FormSG/commit/6ca03c68cb162a4ae3af01f172425b3305742ae0)
+#### [v6.66.1](https://github.com/opengovsg/FormSG/compare/v6.66.0...v6.66.1)
+
+> 18 July 2023
+
+- revert: build(deps): bump winston-cloudwatch version to 6.2.0 [`#6542`](https://github.com/opengovsg/FormSG/pull/6542)
+
#### [v6.66.0](https://github.com/opengovsg/FormSG/compare/v6.65.0...v6.66.0)
-> 19 July 2023
+> 18 July 2023
-- fix: use proof-of-payment for payment receipt/invoice [`#6549`](https://github.com/opengovsg/FormSG/pull/6549)
-- build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /frontend [`#6548`](https://github.com/opengovsg/FormSG/pull/6548)
-- fix(deps): bump word-wrap from 1.2.3 to 1.2.4 [`#6547`](https://github.com/opengovsg/FormSG/pull/6547)
-- build(deps): bump winston-cloudwatch to v6.2.0 [`#6545`](https://github.com/opengovsg/FormSG/pull/6545)
- fix(deps): [Snyk] Security upgrade mongoose from 5.13.15 to 5.13.20 [`#6541`](https://github.com/opengovsg/FormSG/pull/6541)
- feat: indicate if GST has been applied to a payment transaction [`#6538`](https://github.com/opengovsg/FormSG/pull/6538)
- chore: reduce max payment limit [`#6543`](https://github.com/opengovsg/FormSG/pull/6543)
@@ -57,7 +84,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge v6.65.0 into develop [`#6531`](https://github.com/opengovsg/FormSG/pull/6531)
- build: release v6.65.0 [`#6528`](https://github.com/opengovsg/FormSG/pull/6528)
- fix: add FE validation rule that email domains must be non empty [`#6529`](https://github.com/opengovsg/FormSG/pull/6529)
-- chore: bump version to v6.66.0 [`0233ba8`](https://github.com/opengovsg/FormSG/commit/0233ba8018532d4978d13717fac065f81e2eb515)
+- chore: bump version to v6.66.0 [`b3a9818`](https://github.com/opengovsg/FormSG/commit/b3a9818762e334bc7126c029cdba63156bac85ed)
#### [v6.65.0](https://github.com/opengovsg/FormSG/compare/v6.64.0...v6.65.0)
@@ -109,13 +136,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.60.0 to 5.60.1 in /shared [`#6487`](https://github.com/opengovsg/FormSG/pull/6487)
- chore(deps-dev): bump @typescript-eslint/parser from 5.60.0 to 5.60.1 in /shared [`#6488`](https://github.com/opengovsg/FormSG/pull/6488)
- build: release v6.62.0 [`#6484`](https://github.com/opengovsg/FormSG/pull/6484)
+- fix: admin feedback capturing wrong local storage value [`#6485`](https://github.com/opengovsg/FormSG/pull/6485)
+- chore: bump version to v6.62.0 [`b5ab2e0`](https://github.com/opengovsg/FormSG/commit/b5ab2e0d1615a5e9b0ed1829adcaf040ef700adc)
- chore: bump version to v6.63.0 [`b474dc7`](https://github.com/opengovsg/FormSG/commit/b474dc76f426ddbb101ba73c50f16e507b51a437)
#### [v6.62.0](https://github.com/opengovsg/FormSG/compare/v6.61.1...v6.62.0)
> 26 June 2023
-- fix: admin feedback capturing wrong local storage value [`#6485`](https://github.com/opengovsg/FormSG/pull/6485)
- fix: escape form title in payment invoice's html content [`#6482`](https://github.com/opengovsg/FormSG/pull/6482)
- feat: admin feedback modal [`#6465`](https://github.com/opengovsg/FormSG/pull/6465)
- fix: potential html script injection [`#6481`](https://github.com/opengovsg/FormSG/pull/6481)
@@ -124,7 +152,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore: update issue feedback mail html [`#6478`](https://github.com/opengovsg/FormSG/pull/6478)
- build: merge v6.61.0 into develop [`#6477`](https://github.com/opengovsg/FormSG/pull/6477)
- fix: account for undefined response code when tracking webhook dd stats [`#6475`](https://github.com/opengovsg/FormSG/pull/6475)
-- chore: bump version to v6.62.0 [`b5ab2e0`](https://github.com/opengovsg/FormSG/commit/b5ab2e0d1615a5e9b0ed1829adcaf040ef700adc)
+- chore: bump version to v6.62.0 [`bafd12a`](https://github.com/opengovsg/FormSG/commit/bafd12a2bc228b606a24c0b65cd284a25d5f7521)
#### [v6.61.1](https://github.com/opengovsg/FormSG/compare/v6.61.0...v6.61.1)
@@ -410,22 +438,23 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix: only return previous payment id [`#6210`](https://github.com/opengovsg/FormSG/pull/6210)
- build: merge release v6.45.0 to develop [`#6205`](https://github.com/opengovsg/FormSG/pull/6205)
- build: release v6.45.0 [`#6200`](https://github.com/opengovsg/FormSG/pull/6200)
+- chore: update payment guide in payment unsupported msg [`#6199`](https://github.com/opengovsg/FormSG/pull/6199)
+- fix(deps): bump type-fest from 3.8.0 to 3.9.0 in /shared [`#6195`](https://github.com/opengovsg/FormSG/pull/6195)
+- chore: bump version to v6.45.0 [`336f4c8`](https://github.com/opengovsg/FormSG/commit/336f4c8ad072d3b582a646e21010eac4b5119ee7)
- chore: bump version to v6.46.0 [`87fda0e`](https://github.com/opengovsg/FormSG/commit/87fda0e0ec4c937350ebd013a4a9762f4acee802)
+- docs: fix CHANGELOG.md to have only 1 section for v6.45.0 [`4fe9d00`](https://github.com/opengovsg/FormSG/commit/4fe9d00234bed21f0943e26cc9d7c2db96afcdd3)
#### [v6.45.0](https://github.com/opengovsg/FormSG/compare/v6.44.1...v6.45.0)
> 26 April 2023
-- chore: update payment guide in payment unsupported msg [`#6199`](https://github.com/opengovsg/FormSG/pull/6199)
-- fix(deps): bump type-fest from 3.8.0 to 3.9.0 in /shared [`#6195`](https://github.com/opengovsg/FormSG/pull/6195)
- chore: update previous payment typing and hooks [`#6191`](https://github.com/opengovsg/FormSG/pull/6191)
- chore: add missed out changelog for 6.44.1 [`#6197`](https://github.com/opengovsg/FormSG/pull/6197)
- build: merge release v6.44.1 to develop [`#6196`](https://github.com/opengovsg/FormSG/pull/6196)
- build: release v6.44.1 [`#6193`](https://github.com/opengovsg/FormSG/pull/6193)
- perf: memoize field row containers [`#6189`](https://github.com/opengovsg/FormSG/pull/6189)
- build: merge release v6.44.0 to develop [`#6187`](https://github.com/opengovsg/FormSG/pull/6187)
-- chore: bump version to v6.45.0 [`336f4c8`](https://github.com/opengovsg/FormSG/commit/336f4c8ad072d3b582a646e21010eac4b5119ee7)
-- docs: fix CHANGELOG.md to have only 1 section for v6.45.0 [`4fe9d00`](https://github.com/opengovsg/FormSG/commit/4fe9d00234bed21f0943e26cc9d7c2db96afcdd3)
+- chore: bump version to v6.45.0 [`df24b16`](https://github.com/opengovsg/FormSG/commit/df24b16f04ba595a53062a309deaf90225b3a2ad)
#### [v6.44.1](https://github.com/opengovsg/FormSG/compare/v6.44.0...v6.44.1)
@@ -531,7 +560,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump type-fest from 3.7.2 to 3.8.0 in /shared [`#6064`](https://github.com/opengovsg/FormSG/pull/6064)
- build: merge release v6.40.0 into develop [`#6072`](https://github.com/opengovsg/FormSG/pull/6072)
- build: release v6.40.0 [`#6071`](https://github.com/opengovsg/FormSG/pull/6071)
+- build: release v6.39.0 [`#6068`](https://github.com/opengovsg/FormSG/pull/6068)
- chore: bump version to v6.41.0 [`5055b51`](https://github.com/opengovsg/FormSG/commit/5055b51c5505aab5e8f2a00907e2ee2a9f793e88)
+- chore: bump version to v6.39.0 [`081515a`](https://github.com/opengovsg/FormSG/commit/081515a2521c950dac7261f4b6c1b1b423c3af16)
#### [v6.40.0](https://github.com/opengovsg/FormSG/compare/v6.39.0...v6.40.0)
@@ -539,7 +570,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge release v6.39.0 into develop [`#6070`](https://github.com/opengovsg/FormSG/pull/6070)
- fix(AttachmentField): correctly clear attachment on upload error [`#6069`](https://github.com/opengovsg/FormSG/pull/6069)
-- build: release v6.39.0 [`#6068`](https://github.com/opengovsg/FormSG/pull/6068)
- chore: bump version to v6.40.0 [`d4441e2`](https://github.com/opengovsg/FormSG/commit/d4441e276a30b373d64dcc7838f1798049ccf105)
#### [v6.39.0](https://github.com/opengovsg/FormSG/compare/v6.38.0...v6.39.0)
@@ -557,13 +587,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix: add staging-alt2 to deployment script [`#6019`](https://github.com/opengovsg/FormSG/pull/6019)
- build: merge release 6.38.0 to develop [`#6017`](https://github.com/opengovsg/FormSG/pull/6017)
- build: release v6.38.0 [`#6004`](https://github.com/opengovsg/FormSG/pull/6004)
+- feat: more logging on fetch fallback [`#6008`](https://github.com/opengovsg/FormSG/pull/6008)
- chore: bump version to v6.39.0 [`081515a`](https://github.com/opengovsg/FormSG/commit/081515a2521c950dac7261f4b6c1b1b423c3af16)
#### [v6.38.0](https://github.com/opengovsg/FormSG/compare/v6.37.0...v6.38.0)
-> 30 March 2023
+> 29 March 2023
-- feat: more logging on fetch fallback [`#6008`](https://github.com/opengovsg/FormSG/pull/6008)
- feat: implement fetch API fallback for network error [`#5948`](https://github.com/opengovsg/FormSG/pull/5948)
- fix: lowercase collaborator endpoint emails [`#5992`](https://github.com/opengovsg/FormSG/pull/5992)
- chore(deps-dev): bump @typescript-eslint/parser from 5.56.0 to 5.57.0 in /shared [`#5995`](https://github.com/opengovsg/FormSG/pull/5995)
@@ -572,6 +602,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump type-fest from 3.7.0 to 3.7.1 in /shared [`#5991`](https://github.com/opengovsg/FormSG/pull/5991)
- build: merge v6.37.0 into develop [`#5989`](https://github.com/opengovsg/FormSG/pull/5989)
- build: release v6.37.0 [`#5988`](https://github.com/opengovsg/FormSG/pull/5988)
+- chore: bump version to v6.38.0 [`d199213`](https://github.com/opengovsg/FormSG/commit/d19921314cae6b79920cf5ec3fb4f396794816d6)
#### [v6.37.0](https://github.com/opengovsg/FormSG/compare/v6.36.0...v6.37.0)
@@ -606,6 +637,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: release v6.36.0 [`#5913`](https://github.com/opengovsg/FormSG/pull/5913)
- chore: bump version to v6.37.0 [`b4d24eb`](https://github.com/opengovsg/FormSG/commit/b4d24eb14f8a80bff56d19e6fa23975d5661cce9)
- chore: bump version to 6.36.1 [`faf75b5`](https://github.com/opengovsg/FormSG/commit/faf75b5a7d0d12745e9a0104c541fb66cca17258)
+- chore: bump version to v6.36.0 [`d8d2b59`](https://github.com/opengovsg/FormSG/commit/d8d2b59db62d195916a8fcc3d84659dd20687de4)
#### [v6.36.0](https://github.com/opengovsg/FormSG/compare/v6.35.0...v6.36.0)
@@ -621,7 +653,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore(deps-dev): bump eslint-config-prettier from 8.6.0 to 8.7.0 in /shared [`#5895`](https://github.com/opengovsg/FormSG/pull/5895)
- chore(deps-dev): bump eslint-plugin-simple-import-sort from 8.0.0 to 10.0.0 [`#5771`](https://github.com/opengovsg/FormSG/pull/5771)
- chore(deps-dev): bump @typescript-eslint/parser from 5.54.0 to 5.54.1 in /shared [`#5892`](https://github.com/opengovsg/FormSG/pull/5892)
-- chore: bump version to v6.36.0 [`d8d2b59`](https://github.com/opengovsg/FormSG/commit/d8d2b59db62d195916a8fcc3d84659dd20687de4)
+- chore: bump version to v6.36.0 [`a51adf1`](https://github.com/opengovsg/FormSG/commit/a51adf1a129ff473e62f38b6836e5282afc5b83f)
#### [v6.35.0](https://github.com/opengovsg/FormSG/compare/v6.34.0...v6.35.0)
@@ -646,13 +678,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore: revert "feat: merge payment-mvp branch into develop" [`#5858`](https://github.com/opengovsg/FormSG/pull/5858)
- build: merge release v6.33.0 into develop [`#5859`](https://github.com/opengovsg/FormSG/pull/5859)
- build: release v6.33.0 [`#5853`](https://github.com/opengovsg/FormSG/pull/5853)
+- feat: merge payment-mvp branch into develop [`#5851`](https://github.com/opengovsg/FormSG/pull/5851)
+- chore: bump version to v6.33.0 [`6508dc0`](https://github.com/opengovsg/FormSG/commit/6508dc09bb519392afbc426c6b68257c4e83515d)
- chore: bump version to v6.34.0 [`4624819`](https://github.com/opengovsg/FormSG/commit/46248191e9b5f69e7400ee9b03dd1decdae43e96)
#### [v6.33.0](https://github.com/opengovsg/FormSG/compare/v6.32.0...v6.33.0)
> 28 February 2023
-- feat: merge payment-mvp branch into develop [`#5851`](https://github.com/opengovsg/FormSG/pull/5851)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.52.0 to 5.54.0 in /shared [`#5847`](https://github.com/opengovsg/FormSG/pull/5847)
- chore(deps-dev): bump @typescript-eslint/parser from 5.53.0 to 5.54.0 in /shared [`#5846`](https://github.com/opengovsg/FormSG/pull/5846)
- fix(deps): bump libphonenumber-js from 1.10.20 to 1.10.21 in /shared [`#5841`](https://github.com/opengovsg/FormSG/pull/5841)
@@ -661,7 +694,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge release v6.32.0 into develop [`#5833`](https://github.com/opengovsg/FormSG/pull/5833)
- [Snyk] Security upgrade @aws-sdk/client-cloudwatch-logs from 3.241.0 to 3.276.0 [`#5835`](https://github.com/opengovsg/FormSG/pull/5835)
- build: release v6.32.0 [`#5832`](https://github.com/opengovsg/FormSG/pull/5832)
-- chore: bump version to v6.33.0 [`6508dc0`](https://github.com/opengovsg/FormSG/commit/6508dc09bb519392afbc426c6b68257c4e83515d)
+- chore: bump version to v6.33.0 [`2e09f10`](https://github.com/opengovsg/FormSG/commit/2e09f1081a6c9f605f3e9ed179330b9b1b162d5e)
#### [v6.32.0](https://github.com/opengovsg/FormSG/compare/v6.31.0...v6.32.0)
@@ -785,13 +818,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump libphonenumber-js from 1.10.15 to 1.10.17 in /shared [`#5690`](https://github.com/opengovsg/FormSG/pull/5690)
- fix(deps): bump type-fest from 3.5.0 to 3.5.1 in /shared [`#5687`](https://github.com/opengovsg/FormSG/pull/5687)
- build: release v6.27.0 [`#5684`](https://github.com/opengovsg/FormSG/pull/5684)
+- fix: add submission time to end page, returned from server [`#5672`](https://github.com/opengovsg/FormSG/pull/5672)
+- chore: bump version to v6.27.0 [`86b31d4`](https://github.com/opengovsg/FormSG/commit/86b31d4bd6959171842112bd7d8227841cbcda66)
- chore: bump version to v6.28.0 [`f982046`](https://github.com/opengovsg/FormSG/commit/f982046d76bfb3b2d8ceec36daaf23dde3ac165b)
#### [v6.27.0](https://github.com/opengovsg/FormSG/compare/v6.26.0...v6.27.0)
> 4 January 2023
-- fix: add submission time to end page, returned from server [`#5672`](https://github.com/opengovsg/FormSG/pull/5672)
- chore: log formAuthType when redirecting user to sp/cp/myinfo/sgid [`#5682`](https://github.com/opengovsg/FormSG/pull/5682)
- chore(deps-dev): bump @typescript-eslint/parser from 5.47.1 to 5.48.0 in /shared [`#5680`](https://github.com/opengovsg/FormSG/pull/5680)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.47.1 to 5.48.0 in /shared [`#5679`](https://github.com/opengovsg/FormSG/pull/5679)
@@ -803,7 +837,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: backport v6.26.0 into develop [`#5669`](https://github.com/opengovsg/FormSG/pull/5669)
- fix(deps): bump zod from 3.19.1 to 3.20.2 [`#5668`](https://github.com/opengovsg/FormSG/pull/5668)
- build: release v6.26.0 [`#5666`](https://github.com/opengovsg/FormSG/pull/5666)
-- chore: bump version to v6.27.0 [`86b31d4`](https://github.com/opengovsg/FormSG/commit/86b31d4bd6959171842112bd7d8227841cbcda66)
+- chore: bump version to v6.27.0 [`3e2a28b`](https://github.com/opengovsg/FormSG/commit/3e2a28b6394b78e02eca138cfe781337cdee10b1)
#### [v6.26.0](https://github.com/opengovsg/FormSG/compare/v6.25.0...v6.26.0)
@@ -837,6 +871,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge release v6.25.0 into develop [`#5632`](https://github.com/opengovsg/FormSG/pull/5632)
- build: release v6.25.0 [`#5630`](https://github.com/opengovsg/FormSG/pull/5630)
- chore: bump version to v6.26.0 [`8a0b8e2`](https://github.com/opengovsg/FormSG/commit/8a0b8e2df75af8d9f59df5feee03f50211c4339d)
+- chore: bump version to v6.25.0 [`8da99f6`](https://github.com/opengovsg/FormSG/commit/8da99f68dbb1ccbebda72ad95729aaf97e93a321)
#### [v6.25.0](https://github.com/opengovsg/FormSG/compare/v6.24.1...v6.25.0)
@@ -851,20 +886,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge release 6.24.1 into develop [`#5622`](https://github.com/opengovsg/FormSG/pull/5622)
- build: Release v6.24.1 hotfix [`#5621`](https://github.com/opengovsg/FormSG/pull/5621)
- build: merge release 6.24.0 into develop [`#5619`](https://github.com/opengovsg/FormSG/pull/5619)
-- chore: bump version to v6.25.0 [`8da99f6`](https://github.com/opengovsg/FormSG/commit/8da99f68dbb1ccbebda72ad95729aaf97e93a321)
+- chore: bump version to v6.25.0 [`6080687`](https://github.com/opengovsg/FormSG/commit/6080687d7d8ee7ce343ac6602ae2853ffde20e62)
#### [v6.24.1](https://github.com/opengovsg/FormSG/compare/v6.24.0...v6.24.1)
> 23 December 2022
- build: release v6.24.0 [`#5615`](https://github.com/opengovsg/FormSG/pull/5615)
-- Revert "fix(deps): bump sqs-producer from 2.1.0 to 3.1.0 (#5590)" [`df3e488`](https://github.com/opengovsg/FormSG/commit/df3e488591c29d63c7c4853fe77b10ffb6f724b7)
-- chore: bump version to v6.24.1 [`e2fd68c`](https://github.com/opengovsg/FormSG/commit/e2fd68cd0ca6ae62318ea33ffd03afdbe1594bd1)
-
-#### [v6.24.0](https://github.com/opengovsg/FormSG/compare/v6.23.3...v6.24.0)
-
-> 23 December 2022
-
- feat: initialise datadog in head [`#5571`](https://github.com/opengovsg/FormSG/pull/5571)
- build: merge 6.23.3 into develop [`#5614`](https://github.com/opengovsg/FormSG/pull/5614)
- ci: separate e2e and backend ci flows [`#5483`](https://github.com/opengovsg/FormSG/pull/5483)
@@ -874,11 +902,15 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump @sentry/browser from 7.21.1 to 7.28.0 [`#5607`](https://github.com/opengovsg/FormSG/pull/5607)
- build: merge release 6.23.2 back to develop [`#5606`](https://github.com/opengovsg/FormSG/pull/5606)
- chore(deps-dev): bump regenerator from 0.14.9 to 0.14.10 [`#5608`](https://github.com/opengovsg/FormSG/pull/5608)
+- build: Release v6.23.2 hotfix [`#5602`](https://github.com/opengovsg/FormSG/pull/5602)
- test: fix race condition in field schema test [`#5604`](https://github.com/opengovsg/FormSG/pull/5604)
- fix: avoid using merge to set query after reordering fields [`#5605`](https://github.com/opengovsg/FormSG/pull/5605)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.46.1 to 5.47.0 in /shared [`#5592`](https://github.com/opengovsg/FormSG/pull/5592)
- fix(deps): bump sqs-producer from 2.1.0 to 3.1.0 [`#5590`](https://github.com/opengovsg/FormSG/pull/5590)
- feat: push static assets to s3 [`#5595`](https://github.com/opengovsg/FormSG/pull/5595)
+- fix: return 404 for unmatched static assets [`#5579`](https://github.com/opengovsg/FormSG/pull/5579)
+- test: fix selectors for tests [`#5597`](https://github.com/opengovsg/FormSG/pull/5597)
+- feat: push static assets to s3 [`#5595`](https://github.com/opengovsg/FormSG/pull/5595)
- fix(deps): bump @aws-sdk/client-cloudwatch-logs from 3.218.0 to 3.234.0 [`#5599`](https://github.com/opengovsg/FormSG/pull/5599)
- fix: return 404 for unmatched static assets [`#5579`](https://github.com/opengovsg/FormSG/pull/5579)
- chore: merge v6.23.1 to develop [`#5594`](https://github.com/opengovsg/FormSG/pull/5594)
@@ -889,14 +921,23 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump libphonenumber-js from 1.10.14 to 1.10.15 [`#5553`](https://github.com/opengovsg/FormSG/pull/5553)
- fix(deps): bump moment-timezone from 0.5.39 to 0.5.40 [`#5586`](https://github.com/opengovsg/FormSG/pull/5586)
- chore(deps-dev): bump @playwright/test from 1.27.1 to 1.29.0 [`#5585`](https://github.com/opengovsg/FormSG/pull/5585)
+- * fix: trim email input in frontend and backend [`#5581`](https://github.com/opengovsg/FormSG/pull/5581)
+- fix(deps): bump formsg-javascript-sdk from 0.9.0 to 0.10.0 [`#5578`](https://github.com/opengovsg/FormSG/pull/5578)
- fix(deps): bump zod from 3.19.1 to 3.20.2 in /shared [`#5562`](https://github.com/opengovsg/FormSG/pull/5562)
- fix(deps): bump type-fest from 3.3.0 to 3.4.0 in /shared [`#5563`](https://github.com/opengovsg/FormSG/pull/5563)
- fix(deps): bump formsg-javascript-sdk from 0.9.0 to 0.10.0 [`#5578`](https://github.com/opengovsg/FormSG/pull/5578)
- fix: remove unecessary import [`#5576`](https://github.com/opengovsg/FormSG/pull/5576)
+- Revert "fix(deps): bump sqs-producer from 2.1.0 to 3.1.0 (#5590)" [`df3e488`](https://github.com/opengovsg/FormSG/commit/df3e488591c29d63c7c4853fe77b10ffb6f724b7)
+- chore: bump version to 6.23.2 [`1256707`](https://github.com/opengovsg/FormSG/commit/1256707db95a30486c2ccfc731d9ff6cbdb7dc40)
+- chore: bump version to v6.24.0 [`13fa4f6`](https://github.com/opengovsg/FormSG/commit/13fa4f6eb7854ef91e632d8e316d180e57bb759b)
+
+#### [v6.24.0](https://github.com/opengovsg/FormSG/compare/v6.23.3...v6.24.0)
+
+> 16 December 2022
+
- feat: upgrade axios to 1.2.1 [`#5568`](https://github.com/opengovsg/FormSG/pull/5568)
- chore: merge v6.23.0 into develop [`#5574`](https://github.com/opengovsg/FormSG/pull/5574)
-- chore: bump version to v6.24.0 [`13fa4f6`](https://github.com/opengovsg/FormSG/commit/13fa4f6eb7854ef91e632d8e316d180e57bb759b)
-- Revert "fix(deps): bump sqs-consumer from 5.7.0 to 6.1.0 (#5591)" [`088902d`](https://github.com/opengovsg/FormSG/commit/088902d74fe8fde365859342aaacc7b735a777a3)
+- chore: bump version to v6.24.0 [`ef21f76`](https://github.com/opengovsg/FormSG/commit/ef21f76703d53d73e61d36e913167be37e48cdf3)
#### [v6.23.3](https://github.com/opengovsg/FormSG/compare/v6.23.2...v6.23.3)
@@ -987,13 +1028,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore: decommission SAML support for Singpass / Corppass [`#5469`](https://github.com/opengovsg/FormSG/pull/5469)
- chore: update chromatic GA to only run in PRs [`#5488`](https://github.com/opengovsg/FormSG/pull/5488)
- build: release v6.19.0 [`#5481`](https://github.com/opengovsg/FormSG/pull/5481)
-- chore: bump version to v6.20.0 [`54131bd`](https://github.com/opengovsg/FormSG/commit/54131bd9c354fbb9aa478ca871817c34b1544aaa)
-- Merge pull request #5490 from opengovsg/release-al2 [`bf0984e`](https://github.com/opengovsg/FormSG/commit/bf0984e8ae74382fd455c0821b16976793990932)
-
-#### [v6.19.0](https://github.com/opengovsg/FormSG/compare/v6.18.5...v6.19.0)
-
-> 29 November 2022
-
- feat: add public form `/use-template` redirection to admin form template page [`#5486`](https://github.com/opengovsg/FormSG/pull/5486)
- fix: remove form title special characters validation [`#5485`](https://github.com/opengovsg/FormSG/pull/5485)
- chore: merge hotfix release v6.18.5 to develop [`#5480`](https://github.com/opengovsg/FormSG/pull/5480)
@@ -1008,15 +1042,28 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix: extend MyInfo login expiry to match env var [`#5464`](https://github.com/opengovsg/FormSG/pull/5464)
- chore: merge hotfix release v6.18.4 back to develop [`#5472`](https://github.com/opengovsg/FormSG/pull/5472)
- feat: improve admin storage mode response printability [`#5460`](https://github.com/opengovsg/FormSG/pull/5460)
+- fix: update field validators with more specific type guarantees [`#5468`](https://github.com/opengovsg/FormSG/pull/5468)
+- build: hotfix release v6.18.4 [`#5470`](https://github.com/opengovsg/FormSG/pull/5470)
+- fix: correctly perform logic validation on MyInfo prefilled fields [`#5467`](https://github.com/opengovsg/FormSG/pull/5467)
+- fix: trim dropdown option answer in backend and in angularjs frontend [`#5466`](https://github.com/opengovsg/FormSG/pull/5466)
- chore(deps-dev): bump @babel/preset-env from 7.19.4 to 7.20.2 [`#5463`](https://github.com/opengovsg/FormSG/pull/5463)
- test: add email submission e2e tests [`#5162`](https://github.com/opengovsg/FormSG/pull/5162)
- feat: allow special chars in form title [`#5436`](https://github.com/opengovsg/FormSG/pull/5436)
+- fix: release v6.18.3 [`#5459`](https://github.com/opengovsg/FormSG/pull/5459)
- chore(deps-dev): bump husky from 8.0.1 to 8.0.2 [`#5457`](https://github.com/opengovsg/FormSG/pull/5457)
- fix(docker-compose): change ports from 5000 to 5001 [`#5455`](https://github.com/opengovsg/FormSG/pull/5455)
- chore(deps-dev): bump @types/lodash from 4.14.189 to 4.14.190 in /shared [`#5454`](https://github.com/opengovsg/FormSG/pull/5454)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.43.0 to 5.44.0 [`#5453`](https://github.com/opengovsg/FormSG/pull/5453)
- fix: update max dimension for image uploads [`#5451`](https://github.com/opengovsg/FormSG/pull/5451)
- fix(deps): bump @sentry/browser from 7.17.3 to 7.20.1 [`#5449`](https://github.com/opengovsg/FormSG/pull/5449)
+- chore: bump version to v6.20.0 [`54131bd`](https://github.com/opengovsg/FormSG/commit/54131bd9c354fbb9aa478ca871817c34b1544aaa)
+- Merge pull request #5490 from opengovsg/release-al2 [`bf0984e`](https://github.com/opengovsg/FormSG/commit/bf0984e8ae74382fd455c0821b16976793990932)
+- fix(deps): bump @aws-sdk/client-cloudwatch-logs to 3.216.0 [`ac812ec`](https://github.com/opengovsg/FormSG/commit/ac812ecdd14b11f9500e3d95aa75050be40d8e24)
+
+#### [v6.19.0](https://github.com/opengovsg/FormSG/compare/v6.18.5...v6.19.0)
+
+> 22 November 2022
+
- fix: disable submission in template mode [`#5443`](https://github.com/opengovsg/FormSG/pull/5443)
- fix(docker-compose): include US and SG SES env vars [`#5442`](https://github.com/opengovsg/FormSG/pull/5442)
- feat: use-template for forms [`#5377`](https://github.com/opengovsg/FormSG/pull/5377)
@@ -1035,7 +1082,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump aws-sdk from 2.1251.0 to 2.1255.0 [`#5415`](https://github.com/opengovsg/FormSG/pull/5415)
- fix(deps): bump loader-utils from 1.4.0 to 1.4.2 [`#5416`](https://github.com/opengovsg/FormSG/pull/5416)
- chore(deps-dev): bump eslint-plugin-jest from 27.1.3 to 27.1.5 [`#5414`](https://github.com/opengovsg/FormSG/pull/5414)
-- chore: bump version to v6.19.0 [`f245c66`](https://github.com/opengovsg/FormSG/commit/f245c66f1dbb133429101574889e55b479591061)
+- chore: bump version to v6.19.0 [`04762a2`](https://github.com/opengovsg/FormSG/commit/04762a268542a70f3b9d10e1f8c7f273d32ac9bc)
- Merge pull request #5435 from opengovsg/release-al2 [`6023bac`](https://github.com/opengovsg/FormSG/commit/6023bac35189418bac8b1bb59cea53661df7fb76)
#### [v6.18.5](https://github.com/opengovsg/FormSG/compare/v6.18.4...v6.18.5)
diff --git a/CREDITS.md b/CREDITS.md
index ba986f91cc..08925dd82f 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -2229,36 +2229,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
-## Project
-toastr
-
-### Source
-https://github.com/CodeSeven/toastr
-
-### License
-MIT License
-
-Copyright (c) 2017 Toastr Maintainers
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-
-------------------------------------------------------------------------------
## Project
diff --git a/__tests__/unit/backend/helpers/generate-form-data.ts b/__tests__/unit/backend/helpers/generate-form-data.ts
index 799dd8bb73..69a3a72c50 100644
--- a/__tests__/unit/backend/helpers/generate-form-data.ts
+++ b/__tests__/unit/backend/helpers/generate-form-data.ts
@@ -13,6 +13,7 @@ import {
IAttachmentFieldSchema,
IAttachmentResponse,
ICheckboxFieldSchema,
+ ICountryRegionFieldSchema,
IDateFieldSchema,
IDecimalFieldSchema,
IDropdownFieldSchema,
@@ -117,6 +118,12 @@ export const generateDefaultField = (
getQuestion: () => defaultParams.title,
...customParams,
} as IDropdownFieldSchema
+ case BasicField.CountryRegion:
+ return {
+ ...defaultParams,
+ getQuestion: () => defaultParams.title,
+ ...customParams,
+ } as ICountryRegionFieldSchema
case BasicField.Decimal:
return {
...defaultParams,
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 60aec3a455..aa2c03e612 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "form-frontend",
- "version": "6.68.0",
+ "version": "6.69.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "form-frontend",
- "version": "6.68.0",
+ "version": "6.69.0",
"hasInstallScript": true,
"dependencies": {
"@chakra-ui/react": "^1.8.6",
diff --git a/frontend/package.json b/frontend/package.json
index f8cbc954ce..612d3f1862 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
- "version": "6.68.0",
+ "version": "6.69.0",
"homepage": ".",
"private": true,
"dependencies": {
diff --git a/frontend/src/constants/links.ts b/frontend/src/constants/links.ts
index 719942d8a0..52b38617d2 100644
--- a/frontend/src/constants/links.ts
+++ b/frontend/src/constants/links.ts
@@ -31,8 +31,7 @@ export const GUIDE_PREVENT_EMAIL_BOUNCE =
export const GUIDE_EMAIL_RELIABILITY =
'https://go.gov.sg/formsg-guide-email-reliability'
export const GUIDE_PREFILL = 'https://go.gov.sg/formsg-guide-prefills'
-export const GUIDE_STRIPE_ONBOARDING =
- 'https://go.gov.sg/formsg-stripe-onboarding'
+export const GUIDE_STRIPE_ONBOARDING = 'https://go.gov.sg/formsg-payments'
export const GUIDE_PAYMENTS_ENTRY = 'https://go.gov.sg/formsg-payment-overview'
export const GUIDE_PAYMENTS_INVOICE_DIFFERENCES =
'https://go.gov.sg/formsg-payments-invoice-differences'
diff --git a/frontend/src/constants/validation.ts b/frontend/src/constants/validation.ts
index 6f788ae951..d9157c8b40 100644
--- a/frontend/src/constants/validation.ts
+++ b/frontend/src/constants/validation.ts
@@ -6,3 +6,6 @@ export const INVALID_EMAIL_DOMAIN_ERROR =
export const INVALID_DROPDOWN_OPTION_ERROR =
'Entered value is not a valid dropdown option'
+
+export const INVALID_COUNTRY_REGION_OPTION_ERROR =
+ 'Please select a valid country/region from the dropdown list'
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/FieldRow/FieldRowContainer.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/FieldRow/FieldRowContainer.tsx
index 3759fc554c..9a362b47e5 100644
--- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/FieldRow/FieldRowContainer.tsx
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/FieldRow/FieldRowContainer.tsx
@@ -25,6 +25,7 @@ import {
AttachmentField,
CheckboxField,
ChildrenCompoundField,
+ CountryRegionField,
DateField,
DecimalField,
DropdownField,
@@ -482,6 +483,8 @@ const FieldRow = ({ field, ...rest }: FieldRowProps) => {
return
case BasicField.Dropdown:
return
+ case BasicField.CountryRegion:
+ return
case BasicField.ShortText:
return
case BasicField.LongText:
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/PaymentView.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/PaymentView.tsx
index e7a738183b..fab0fa421a 100644
--- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/PaymentView.tsx
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignContent/PaymentView.tsx
@@ -11,6 +11,7 @@ import Tooltip from '~components/Tooltip'
import { PaymentPreview } from '~templates/Field/PaymentPreview/PaymentPreview'
import { useAdminForm } from '~features/admin-form/common/queries'
+import { useDesignColorTheme } from '~features/admin-form/create/builder-and-design/utils/useDesignColorTheme'
import {
CreatePageSidebarContextProps,
@@ -59,6 +60,7 @@ export const PaymentView = () => {
})
const paymentRef = useRef(null)
+ const colourTheme = useDesignColorTheme()
useEffect(() => {
if (paymentState === PaymentState.EditingPayment) {
@@ -113,7 +115,7 @@ export const PaymentView = () => {
>
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/EditFieldDrawer.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/EditFieldDrawer.tsx
index 5dbd3889c2..aaddf23aac 100644
--- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/EditFieldDrawer.tsx
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/EditFieldDrawer.tsx
@@ -28,6 +28,7 @@ import {
import {
EditAttachment,
EditCheckbox,
+ EditCountryRegion,
EditDate,
EditDecimal,
EditDropdown,
@@ -130,6 +131,8 @@ export const MemoFieldDrawerContent = memo(
return
case BasicField.Dropdown:
return
+ case BasicField.CountryRegion:
+ return
case BasicField.Mobile:
return
case BasicField.HomeNo:
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.stories.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.stories.tsx
new file mode 100644
index 0000000000..98fe7db376
--- /dev/null
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.stories.tsx
@@ -0,0 +1,51 @@
+import { Meta, Story } from '@storybook/react'
+
+import { CountryRegion } from '~shared/constants/countryRegion'
+import { BasicField, CountryRegionFieldBase } from '~shared/types'
+
+import { createFormBuilderMocks } from '~/mocks/msw/handlers/admin-form'
+
+import { EditFieldDrawerDecorator, StoryRouter } from '~utils/storybook'
+
+import { EditCountryRegion } from './EditCountryRegion'
+
+const DEFAULT_COUNTRY_REGION_FIELD: CountryRegionFieldBase = {
+ title: 'Storybook Country/Region',
+ description: 'Some description about Country/Region',
+ required: true,
+ disabled: false,
+ fieldType: BasicField.CountryRegion,
+ fieldOptions: Object.values(CountryRegion),
+ globalId: 'unused',
+}
+
+export default {
+ title: 'Features/AdminForm/EditFieldDrawer/EditCountryRegion',
+ component: EditCountryRegion,
+ decorators: [
+ StoryRouter({
+ initialEntries: ['/61540ece3d4a6e50ac0cc6ff'],
+ path: '/:formId',
+ }),
+ EditFieldDrawerDecorator,
+ ],
+ parameters: {
+ // Required so skeleton "animation" does not hide content.
+ chromatic: { pauseAnimationAtEnd: true },
+ msw: createFormBuilderMocks({}, 0),
+ },
+ args: {
+ field: DEFAULT_COUNTRY_REGION_FIELD,
+ },
+} as Meta
+
+interface StoryArgs {
+ field: CountryRegionFieldBase
+}
+
+const Template: Story = ({ field }) => {
+ return
+}
+
+export const Default = Template.bind({})
+Default.storyName = 'EditCountryRegion'
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx
new file mode 100644
index 0000000000..76871a0250
--- /dev/null
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx
@@ -0,0 +1,92 @@
+import { useMemo } from 'react'
+import { FormControl } from '@chakra-ui/react'
+import { extend, pick } from 'lodash'
+
+import { CountryRegionFieldBase } from '~shared/types/field'
+
+import { createBaseValidationRules } from '~utils/fieldValidation'
+import FormErrorMessage from '~components/FormControl/FormErrorMessage'
+import FormLabel from '~components/FormControl/FormLabel'
+import Input from '~components/Input'
+import Textarea from '~components/Textarea'
+import Toggle from '~components/Toggle'
+
+import { CreatePageDrawerContentContainer } from '~features/admin-form/create/common'
+
+import { FormFieldDrawerActions } from '../common/FormFieldDrawerActions'
+import { EditFieldProps } from '../common/types'
+import { useEditFieldForm } from '../common/useEditFieldForm'
+
+type EditCountryRegionProps = EditFieldProps
+
+const EDIT_COUNTRY_FIELD_KEYS = ['title', 'description', 'required'] as const
+
+type EditCountryRegionKeys = typeof EDIT_COUNTRY_FIELD_KEYS[number]
+
+type EditCountryRegionInputs = Pick<
+ CountryRegionFieldBase,
+ EditCountryRegionKeys
+>
+
+const transformCountryRegionFieldToEditForm = (
+ field: CountryRegionFieldBase,
+): EditCountryRegionInputs => {
+ return {
+ ...pick(field, EDIT_COUNTRY_FIELD_KEYS),
+ }
+}
+
+const transformCountryRegionEditFormToField = (
+ inputs: EditCountryRegionInputs,
+ originalField: CountryRegionFieldBase,
+): CountryRegionFieldBase => {
+ return extend({}, originalField, inputs, {})
+}
+
+export const EditCountryRegion = ({
+ field,
+}: EditCountryRegionProps): JSX.Element => {
+ const {
+ register,
+ formState: { errors },
+ buttonText,
+ handleUpdateField,
+ isLoading,
+ handleCancel,
+ } = useEditFieldForm({
+ field,
+ transform: {
+ input: transformCountryRegionFieldToEditForm,
+ output: transformCountryRegionEditFormToField,
+ },
+ })
+
+ const requiredValidationRule = useMemo(
+ () => createBaseValidationRules({ required: true }),
+ [],
+ )
+
+ return (
+
+
+ Question
+
+ {errors?.title?.message}
+
+
+ Description
+
+ {errors?.description?.message}
+
+
+
+
+
+
+ )
+}
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/index.ts b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/index.ts
new file mode 100644
index 0000000000..b7639e6ab8
--- /dev/null
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/index.ts
@@ -0,0 +1 @@
+export { EditCountryRegion } from './EditCountryRegion'
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/index.ts b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/index.ts
index e7056479ad..e88b152019 100644
--- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/index.ts
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/index.ts
@@ -1,5 +1,6 @@
export * from './EditAttachment'
export * from './EditCheckbox'
+export * from './EditCountryRegion'
export * from './EditDate'
export * from './EditDecimal'
export * from './EditDropdown'
diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/PaymentsInputPanel/FixedPaymentAmountField.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/PaymentsInputPanel/FixedPaymentAmountField.tsx
index bc9bf363c6..59918f320d 100644
--- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/PaymentsInputPanel/FixedPaymentAmountField.tsx
+++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/PaymentsInputPanel/FixedPaymentAmountField.tsx
@@ -38,7 +38,7 @@ export const FixedPaymentAmountField = ({
isInvalid={!!errors[DISPLAY_AMOUNT_FIELD_KEY]}
isRequired
>
-
+
Payment amount
-
-
- Product/service name
-
-
- {errors.name?.message}
-
-
- Description
-
- {errors.description?.message}
-
+
+
+
+ Product/service name
+
+
+ {errors.name?.message}
+
+
+ Description
+
+ {errors.description?.message}
+
+
{paymentsData?.payment_type === PaymentType.Variable ? (
Payment amount limit
@@ -71,7 +72,7 @@ export const VariablePaymentAmountField = ({
isInvalid={!!errors[MIN_FIELD_KEY]}
isDisabled={isDisabled}
>
- Minimum Amount
+ Minimum amount
- Maximum Amount
+ Maximum amount
{
minimumRows: 2,
}
}
+ case BasicField.CountryRegion: {
+ return {
+ fieldType,
+ ...baseMeta,
+ fieldOptions: [],
+ }
+ }
case BasicField.Children: {
return {
fieldType,
diff --git a/frontend/src/features/admin-form/create/constants.ts b/frontend/src/features/admin-form/create/constants.ts
index 93e8864852..9f67303fe3 100644
--- a/frontend/src/features/admin-form/create/constants.ts
+++ b/frontend/src/features/admin-form/create/constants.ts
@@ -107,6 +107,12 @@ export const BASICFIELD_TO_DRAWER_META: {
isSubmitted: true,
},
+ [BasicField.CountryRegion]: {
+ label: 'Country/Region',
+ icon: BiFlag,
+ isSubmitted: true,
+ },
+
[BasicField.Email]: {
label: 'Email',
icon: BiMailSend,
diff --git a/frontend/src/features/admin-form/responses/common/utils/getPaymentDataView.ts b/frontend/src/features/admin-form/responses/common/utils/getPaymentDataView.ts
index d5df6f1e55..f8dfc0f843 100644
--- a/frontend/src/features/admin-form/responses/common/utils/getPaymentDataView.ts
+++ b/frontend/src/features/admin-form/responses/common/utils/getPaymentDataView.ts
@@ -9,7 +9,8 @@ type PaymentDataViewItem = {
}
/** Utility functions for prettifying the output of the payment data view. */
-const centsToDollarString = (cents: number) => `S$${(cents / 100).toFixed(2)}`
+export const centsToDollarString = (cents: number) =>
+ `S$${(cents / 100).toFixed(2)}`
const toSentenceCase = (str: string) =>
`${str.charAt(0).toUpperCase()}${str.substring(1).toLowerCase()}`
// replace underscores with a space
diff --git a/frontend/src/features/admin-form/settings/SettingsGeneralPage.tsx b/frontend/src/features/admin-form/settings/SettingsGeneralPage.tsx
index 4d2e0cf92e..b9004ed49b 100644
--- a/frontend/src/features/admin-form/settings/SettingsGeneralPage.tsx
+++ b/frontend/src/features/admin-form/settings/SettingsGeneralPage.tsx
@@ -3,6 +3,7 @@ import { Divider } from '@chakra-ui/react'
import { FormCaptchaToggle } from './components/FormCaptchaToggle'
import { FormCustomisationSection } from './components/FormCustomisationSection'
import { FormDetailsSection } from './components/FormDetailsSection'
+import { FormIssueNotificationToggle } from './components/FormIssueNotificationToggle'
import { FormLimitToggle } from './components/FormLimitToggle'
import { FormStatusToggle } from './components/FormStatusToggle'
import { GeneralTabHeader } from './components/GeneralTabHeader'
@@ -17,6 +18,8 @@ export const SettingsGeneralPage = (): JSX.Element => {
+
+
>
)
diff --git a/frontend/src/features/admin-form/settings/SettingsService.ts b/frontend/src/features/admin-form/settings/SettingsService.ts
index 5b8f6b8729..bb1691c9e8 100644
--- a/frontend/src/features/admin-form/settings/SettingsService.ts
+++ b/frontend/src/features/admin-form/settings/SettingsService.ts
@@ -56,6 +56,14 @@ export const updateFormCaptcha: UpdateFormFn<'hasCaptcha'> = async (
return updateFormSettings(formId, { hasCaptcha: newHasCaptcha })
}
+export const updateFormIssueNotification: UpdateFormFn<
+ 'hasIssueNotification'
+> = async (formId, newHasIssueNotifcation) => {
+ return updateFormSettings(formId, {
+ hasIssueNotification: newHasIssueNotifcation,
+ })
+}
+
export const updateFormInactiveMessage: UpdateFormFn<
'inactiveMessage'
> = async (formId, newMessage) => {
diff --git a/frontend/src/features/admin-form/settings/components/FormIssueNotificationToggle.tsx b/frontend/src/features/admin-form/settings/components/FormIssueNotificationToggle.tsx
new file mode 100644
index 0000000000..a4c254bcb5
--- /dev/null
+++ b/frontend/src/features/admin-form/settings/components/FormIssueNotificationToggle.tsx
@@ -0,0 +1,38 @@
+import { useCallback, useMemo } from 'react'
+import { Skeleton } from '@chakra-ui/react'
+
+import Toggle from '~components/Toggle'
+
+import { useMutateFormSettings } from '../mutations'
+import { useAdminFormSettings } from '../queries'
+
+export const FormIssueNotificationToggle = (): JSX.Element => {
+ const { data: settings, isLoading: isLoadingSettings } =
+ useAdminFormSettings()
+
+ const hasIssueNotification = useMemo(
+ () => settings && settings?.hasIssueNotification,
+ [settings],
+ )
+
+ const { mutateFormIssueNotification } = useMutateFormSettings()
+
+ const handleToggleIssueNotification = useCallback(() => {
+ if (!settings || isLoadingSettings || mutateFormIssueNotification.isLoading)
+ return
+ const nextHasIssueNotification = !settings.hasIssueNotification
+ return mutateFormIssueNotification.mutate(nextHasIssueNotification)
+ }, [isLoadingSettings, mutateFormIssueNotification, settings])
+
+ return (
+
+ handleToggleIssueNotification()}
+ />
+
+ )
+}
diff --git a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/BusinessInfoSection.tsx b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/BusinessInfoSection.tsx
index b03a9bceec..55c564fd66 100644
--- a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/BusinessInfoSection.tsx
+++ b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/BusinessInfoSection.tsx
@@ -24,12 +24,10 @@ import { useAdminFormSettings } from '../../queries'
interface BusinessFieldInputProps {
initialValue: string
handleMutation: (newAddress: string) => void
- placeholder: string
}
const BusinessFieldInput = ({
initialValue,
handleMutation,
- placeholder,
}: BusinessFieldInputProps): JSX.Element => {
const [value, setValue] = useState(initialValue)
@@ -66,8 +64,6 @@ const BusinessFieldInput = ({
onChange={handleValueChange}
onKeyDown={handleKeydown}
onBlur={handleBlur}
- placeholder={placeholder}
- _placeholder={{ opacity: 1 }}
/>
)
}
@@ -92,8 +88,9 @@ const BusinessInfoBlock = ({
GST Registration Number
@@ -101,8 +98,9 @@ const BusinessInfoBlock = ({
Business Address
diff --git a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentSettingsSection.tsx b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentSettingsSection.tsx
index 4a503f48e9..02eca3cc8f 100644
--- a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentSettingsSection.tsx
+++ b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentSettingsSection.tsx
@@ -7,6 +7,7 @@ import {
Icon,
Skeleton,
Text,
+ VStack,
} from '@chakra-ui/react'
import { FormResponseMode, PaymentChannel } from '~shared/types'
@@ -40,30 +41,39 @@ const BeforeConnectionInstructions = ({
const { data: paymentGuideLink } = usePaymentGuideLink()
if (isProductionEnv) {
return (
- <>
-
+
+
Read{' '}
our guide
{' '}
- to learn more about onboarding to Stripe. To enjoy bulk tender
- transaction rates,{' '}
-
- use this form
- {' '}
- to submit your Stripe account ID and raise a purchase order to
- Stripe.
+ to set up a Stripe account. If your agency already has a Stripe
+ account, you can connect it to this form.
+
+ Bulk transaction rates
+
+
+ To request bulk transaction rates for your payments, use{' '}
+
+ this form
+ {' '}
+ to contact us for assistance.{' '}
+
+ Without this step, you will be charged default transaction rates.
+
+
+
{/* Stripe connect button should only be enabled when checkbox is checked. */}
setAllowConnect(e.target.checked)}
>
- I understand that if I do not send my Stripe account ID and raise a
- purchase order to Stripe, I will be paying default transaction rates.
+ I understand that I will be paying default transaction rates, unless I
+ have requested bulk transaction rates and received confirmation
- >
+
)
} else {
return (
diff --git a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentsUnsupportedMsg.tsx b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentsUnsupportedMsg.tsx
index 00e22bcd4e..0f91aff3a0 100644
--- a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentsUnsupportedMsg.tsx
+++ b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/PaymentsUnsupportedMsg.tsx
@@ -14,7 +14,7 @@ export const PaymentsUnsupportedMsg = (): JSX.Element => {
Payments are not available in Email mode
- Citizens can now make payment for fees or services directly on your
+ Respondents can now make payment for fees or services directly on your
form. This feature is only available in Storage Mode.
Learn more about payments
diff --git a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/StripeConnectButton.tsx b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/StripeConnectButton.tsx
index 617fe1de7b..5dd89f3662 100644
--- a/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/StripeConnectButton.tsx
+++ b/frontend/src/features/admin-form/settings/components/PaymentSettingsSection/StripeConnectButton.tsx
@@ -41,7 +41,7 @@ export const StripeConnectButton = ({
onClick={onLinkAccountClick}
colorScheme="primary"
>
- Connect with my Stripe account
+ Connect my Stripe account
)
} else {
diff --git a/frontend/src/features/admin-form/settings/mutations.ts b/frontend/src/features/admin-form/settings/mutations.ts
index ce03163b7e..72c8d79ab4 100644
--- a/frontend/src/features/admin-form/settings/mutations.ts
+++ b/frontend/src/features/admin-form/settings/mutations.ts
@@ -32,6 +32,7 @@ import {
updateFormEmails,
updateFormEsrvcId,
updateFormInactiveMessage,
+ updateFormIssueNotification,
updateFormLimit,
updateFormStatus,
updateFormTitle,
@@ -148,6 +149,22 @@ export const useMutateFormSettings = () => {
},
)
+ const mutateFormIssueNotification = useMutation(
+ (nextHasIssueNotification: boolean) =>
+ updateFormIssueNotification(formId, nextHasIssueNotification),
+ {
+ onSuccess: (newData) => {
+ handleSuccess({
+ newData,
+ toastDescription: `Email notifications for reports are now ${
+ newData.hasIssueNotification ? 'enabled' : 'disabled'
+ } on your form.`,
+ })
+ },
+ onError: handleError,
+ },
+ )
+
const mutateFormTitle = useMutation(
(nextTitle: string) => updateFormTitle(formId, nextTitle),
{
@@ -325,6 +342,7 @@ export const useMutateFormSettings = () => {
mutateFormLimit,
mutateFormInactiveMessage,
mutateFormCaptcha,
+ mutateFormIssueNotification,
mutateFormEmails,
mutateFormTitle,
mutateFormAuthType,
diff --git a/frontend/src/features/public-form/PublicFormProvider.tsx b/frontend/src/features/public-form/PublicFormProvider.tsx
index 1e0a06d7b1..afb071f892 100644
--- a/frontend/src/features/public-form/PublicFormProvider.tsx
+++ b/frontend/src/features/public-form/PublicFormProvider.tsx
@@ -20,7 +20,7 @@ import {
PAYMENT_CONTACT_FIELD_ID,
PAYMENT_VARIABLE_INPUT_AMOUNT_FIELD_ID,
} from '~shared/constants'
-import { PaymentType } from '~shared/types'
+import { BasicField, PaymentType } from '~shared/types'
import { CaptchaTypes } from '~shared/types/captcha'
import {
FormAuthType,
@@ -306,6 +306,28 @@ export const PublicFormProvider = ({
},
}
+ const countryRegionFieldIds = new Set(
+ form.form_fields
+ .filter((field) => field.fieldType === BasicField.CountryRegion)
+ .map((field) => field._id),
+ )
+ // We want users to see the country/region options in title-case but we also need the data in the backend to remain in upper-case.
+ // Country/region data in the backend needs to remain in upper-case so that they remain consistent with myinfo-countries.
+ const formInputsWithCountryRegionInUpperCase = Object.keys(
+ formInputs,
+ ).reduce((newFormInputs: typeof formInputs, fieldId) => {
+ const currentInput = formInputs[fieldId]
+ if (
+ countryRegionFieldIds.has(fieldId) &&
+ typeof currentInput === 'string'
+ ) {
+ newFormInputs[fieldId] = currentInput.toUpperCase()
+ } else {
+ newFormInputs[fieldId] = currentInput
+ }
+ return newFormInputs
+ }, {})
+
const logMeta = {
action: 'handleSubmitForm',
useFetchForSubmissions,
@@ -339,7 +361,13 @@ export const PublicFormProvider = ({
})
return submitEmailModeFormFetchMutation
- .mutateAsync(formData, { onSuccess })
+ .mutateAsync(
+ {
+ ...formData,
+ formInputs: formInputsWithCountryRegionInUpperCase,
+ },
+ { onSuccess },
+ )
.catch(async (error) => {
datadogLogs.logger.warn(`handleSubmitForm: ${error.message}`, {
meta: {
@@ -371,7 +399,13 @@ export const PublicFormProvider = ({
return (
submitEmailModeFormMutation
- .mutateAsync(formData, { onSuccess })
+ .mutateAsync(
+ {
+ ...formData,
+ formInputs: formInputsWithCountryRegionInUpperCase,
+ },
+ { onSuccess },
+ )
// Using catch since we are using mutateAsync and react-hook-form will continue bubbling this up.
.catch(async (error) => {
// TODO(#5826): Remove when we have resolved the Network Error
@@ -415,6 +449,7 @@ export const PublicFormProvider = ({
.mutateAsync(
{
...formData,
+ formInputs: formInputsWithCountryRegionInUpperCase,
publicKey: form.publicKey,
captchaResponse,
captchaType,
@@ -484,6 +519,7 @@ export const PublicFormProvider = ({
.mutateAsync(
{
...formData,
+ formInputs: formInputsWithCountryRegionInUpperCase,
publicKey: form.publicKey,
captchaResponse,
captchaType,
diff --git a/frontend/src/features/public-form/components/FormFields/FieldFactory.tsx b/frontend/src/features/public-form/components/FormFields/FieldFactory.tsx
index d8de3e8e76..829530d862 100644
--- a/frontend/src/features/public-form/components/FormFields/FieldFactory.tsx
+++ b/frontend/src/features/public-form/components/FormFields/FieldFactory.tsx
@@ -7,6 +7,7 @@ import {
AttachmentField,
CheckboxField,
ChildrenCompoundField,
+ CountryRegionField,
DateField,
DecimalField,
DropdownField,
@@ -70,6 +71,8 @@ export const FieldFactory = memo(
return
case BasicField.Dropdown:
return
+ case BasicField.CountryRegion:
+ return
case BasicField.Date:
return
case BasicField.Uen:
diff --git a/frontend/src/features/public-form/components/FormPaymentPage/components/PaymentItemNameDescription.tsx b/frontend/src/features/public-form/components/FormPaymentPage/components/PaymentItemNameDescription.tsx
index 0de8fac626..1f3e58523a 100644
--- a/frontend/src/features/public-form/components/FormPaymentPage/components/PaymentItemNameDescription.tsx
+++ b/frontend/src/features/public-form/components/FormPaymentPage/components/PaymentItemNameDescription.tsx
@@ -15,7 +15,9 @@ const PaymentItemNameDescription = ({
{paymentItemName}
) : null}
{paymentDescription ? (
- {paymentDescription}
+
+ {paymentDescription}
+
) : null}
)
diff --git a/frontend/src/features/public-form/components/FormPaymentPage/components/VariablePaymentItemDetailBlock.tsx b/frontend/src/features/public-form/components/FormPaymentPage/components/VariablePaymentItemDetailBlock.tsx
index 634c2cce39..1e3506084a 100644
--- a/frontend/src/features/public-form/components/FormPaymentPage/components/VariablePaymentItemDetailBlock.tsx
+++ b/frontend/src/features/public-form/components/FormPaymentPage/components/VariablePaymentItemDetailBlock.tsx
@@ -1,10 +1,12 @@
import { Controller, useFormContext } from 'react-hook-form'
-import { Box, FormControl, FormErrorMessage } from '@chakra-ui/react'
+import { Box, FormControl, FormErrorMessage, Text } from '@chakra-ui/react'
import { PAYMENT_VARIABLE_INPUT_AMOUNT_FIELD_ID } from '~shared/constants'
import MoneyInput from '~components/MoneyInput'
+import { centsToDollarString } from '~features/admin-form/responses/common/utils/getPaymentDataView'
+
import { usePaymentFieldValidation } from '../../../../../hooks/usePaymentFieldValidation'
import PaymentItemNameDescription from './PaymentItemNameDescription'
@@ -51,6 +53,10 @@ export const VariablePaymentItemDetailsField = ({
/>
)}
/>
+
+ The minimum amount is {centsToDollarString(paymentMin)} and the
+ maximum amount is {centsToDollarString(paymentMax)}.
+
{errors[PAYMENT_VARIABLE_INPUT_AMOUNT_FIELD_ID]?.message}
diff --git a/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/DownloadReceiptBlock.tsx b/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/DownloadReceiptBlock.tsx
index 0304ac64f8..8b16156b2f 100644
--- a/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/DownloadReceiptBlock.tsx
+++ b/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/DownloadReceiptBlock.tsx
@@ -3,10 +3,7 @@ import { BiDownload } from 'react-icons/bi'
import { useToast } from '~hooks/useToast'
import Button from '~components/Button'
-import {
- getPaymentInvoiceDownloadUrl,
- getPaymentReceiptDownloadUrl,
-} from '~features/public-form/utils/urls'
+import { getPaymentInvoiceDownloadUrl } from '~features/public-form/utils/urls'
import { GenericMessageBlock } from './GenericMessageBlock'
@@ -23,13 +20,6 @@ export const DownloadReceiptBlock = ({
}: DownloadReceiptBlockProps) => {
const toast = useToast({ status: 'success', isClosable: true })
- const handleReceiptClick = () => {
- toast({
- description: 'Receipt download started',
- })
- window.location.href = getPaymentReceiptDownloadUrl(formId, paymentId)
- }
-
const handleInvoiceClick = () => {
toast({
description: 'Proof of payment download started',
@@ -43,15 +33,6 @@ export const DownloadReceiptBlock = ({
submissionId={submissionId}
>
<>
- }
- onClick={handleReceiptClick}
- >
- Save payment receipt
-
}
diff --git a/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/PaymentBlock.tsx b/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/PaymentBlock.tsx
index 5ea9ce5031..c7df66919b 100644
--- a/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/PaymentBlock.tsx
+++ b/frontend/src/features/public-form/components/FormPaymentPage/stripe/components/PaymentBlock.tsx
@@ -48,6 +48,7 @@ const StripeCheckoutForm = ({
const [stripeMessage, setStripeMessage] = useState('')
const [isStripeProcessing, setIsStripeProcessing] = useState(false)
const [, , clearPaymentMemory] = useBrowserStm(formId)
+ const [isPaynow, setIsPayNow] = useState(false)
useEffect(() => {
if (isRetry) {
@@ -100,7 +101,15 @@ const StripeCheckoutForm = ({
return (
@@ -160,7 +169,7 @@ export const StripePaymentBlock = ({
{submittedAriaText}
-
+
Payment
{
const transformedResponses = formFields
.map((ff) => transformInputsToOutputs(ff, formInputs[ff._id]))
- .filter((output): output is FieldResponse => output !== undefined)
+ .filter((output): output is FieldResponse => output !== null)
return validateResponses(transformedResponses)
}
@@ -148,6 +148,7 @@ const getAttachmentsMap = (
return attachmentsMap
}
+// TODO (FRM-1232): Remove once encryption boundary has been shifted.
/**
* Utility to filter out responses that should be sent to the server. This includes:
* 1. Email fields that have an autoreply enabled.
diff --git a/frontend/src/features/public-form/utils/inputTransformation.ts b/frontend/src/features/public-form/utils/inputTransformation.ts
index ffc92b3685..86fb0f201f 100644
--- a/frontend/src/features/public-form/utils/inputTransformation.ts
+++ b/frontend/src/features/public-form/utils/inputTransformation.ts
@@ -199,12 +199,12 @@ const transformToChildOutput = (
* Transforms form inputs to their desire output shapes for sending to the server
* @param field schema to retrieve base field info
* @param input the input corresponding to the field in the form
- * @returns If field type does not need an output, `undefined` is returned. Otherwise returns the transformed output.
+ * @returns If field type does not need an output, `null` is returned. Otherwise returns the transformed output.
*/
export const transformInputsToOutputs = (
field: FormFieldDto,
input: FormFieldValue,
-): FieldResponse | undefined => {
+): FieldResponse | null => {
switch (field.fieldType) {
case BasicField.Section:
return transformToSectionOutput(field)
@@ -250,6 +250,7 @@ export const transformInputsToOutputs = (
case BasicField.LongText:
case BasicField.HomeNo:
case BasicField.Dropdown:
+ case BasicField.CountryRegion:
case BasicField.Rating:
case BasicField.Nric:
case BasicField.Uen:
@@ -260,7 +261,7 @@ export const transformInputsToOutputs = (
case BasicField.Statement:
case BasicField.Image:
// No output needed.
- return undefined
+ return null
case BasicField.Children:
return transformToChildOutput(
field,
diff --git a/frontend/src/features/public-form/utils/urls.ts b/frontend/src/features/public-form/utils/urls.ts
index bb56afe563..4bc2075bd9 100644
--- a/frontend/src/features/public-form/utils/urls.ts
+++ b/frontend/src/features/public-form/utils/urls.ts
@@ -6,13 +6,6 @@ export const getPaymentPageUrl = (formId: string, paymentId: string) => {
return `/${formId}/payment/${paymentId}` as const
}
-export const getPaymentReceiptDownloadUrl = (
- formId: string,
- paymentId: string,
-) => {
- return `${API_BASE_URL}/payments/${formId}/${paymentId}/receipt/download` as const
-}
-
export const getPaymentInvoiceDownloadUrl = (
formId: string,
paymentId: string,
diff --git a/frontend/src/features/public-form/utils/validateResponses.ts b/frontend/src/features/public-form/utils/validateResponses.ts
index 0be87d96a1..9443dd5434 100644
--- a/frontend/src/features/public-form/utils/validateResponses.ts
+++ b/frontend/src/features/public-form/utils/validateResponses.ts
@@ -3,6 +3,7 @@ import {
BasicField,
CheckboxResponse,
ChildBirthRecordsResponse,
+ CountryRegionResponse,
DateResponse,
DecimalResponse,
DropdownResponse,
@@ -62,6 +63,8 @@ export const validateResponses = (responses: unknown): FieldResponse[] => {
return DateResponse.parse(response)
case BasicField.Dropdown:
return DropdownResponse.parse(response)
+ case BasicField.CountryRegion:
+ return CountryRegionResponse.parse(response)
case BasicField.Email:
return EmailResponse.parse(response)
case BasicField.HomeNo:
diff --git a/frontend/src/features/rollout-announcement/Announcements.tsx b/frontend/src/features/rollout-announcement/Announcements.tsx
index 362b3f540e..474417ffde 100644
--- a/frontend/src/features/rollout-announcement/Announcements.tsx
+++ b/frontend/src/features/rollout-announcement/Announcements.tsx
@@ -9,7 +9,7 @@ export const NEW_FEATURES = [
// Announcement date: 2023-05-31
title: 'Collect payments on your form',
description:
- 'Citizens can now pay for fees and services directly on your form! We integrate with Stripe to provide reliable payments and hassle-free reconciliations. Payment methods we support include debit / credit cards and PayNow.',
+ 'Respondents can now pay for fees and services directly on your form! We integrate with Stripe to provide reliable payments and hassle-free reconciliations. Payment methods we support include debit / credit cards and PayNow.',
learnMoreLink: GUIDE_PAYMENTS_ENTRY,
animationData: PaymentsAnnouncementGraphic,
},
diff --git a/frontend/src/features/whats-new/FeatureUpdateList.ts b/frontend/src/features/whats-new/FeatureUpdateList.ts
index a0ab0796f8..d60377e32a 100644
--- a/frontend/src/features/whats-new/FeatureUpdateList.ts
+++ b/frontend/src/features/whats-new/FeatureUpdateList.ts
@@ -35,7 +35,7 @@ export const FEATURE_UPDATE_LIST: FeatureUpdateList = {
{
title: 'Collect payments on your form',
date: new Date('31 May 2023 GMT+8'),
- description: `Citizens can now pay for fees and services directly on your form! We integrate with Stripe to provide reliable payments and hassle-free reconciliations. Payment methods we support include debit / credit cards and PayNow. [Learn more](${GUIDE_PAYMENTS_ENTRY})`,
+ description: `Respondents can now pay for fees and services directly on your form! We integrate with Stripe to provide reliable payments and hassle-free reconciliations. Payment methods we support include debit / credit cards and PayNow. [Learn more](${GUIDE_PAYMENTS_ENTRY})`,
image: {
animationData: Animation1,
alt: 'Collect payments on your form',
diff --git a/frontend/src/features/workspace/components/WorkspacePageContent.tsx b/frontend/src/features/workspace/components/WorkspacePageContent.tsx
index 7fcae618e2..4aac02e3c2 100644
--- a/frontend/src/features/workspace/components/WorkspacePageContent.tsx
+++ b/frontend/src/features/workspace/components/WorkspacePageContent.tsx
@@ -40,7 +40,7 @@ export const WorkspacePageContent = ({
[isUserLoading, hasSeenAnnouncement],
)
- const dashboardMessage = `Introducing payments! Citizens can now pay for fees and services directly on your form. [Learn more](${GUIDE_PAYMENTS_ENTRY})`
+ const dashboardMessage = `Introducing payments! Respondents can now pay for fees and services directly on your form. [Learn more](${GUIDE_PAYMENTS_ENTRY})`
return totalFormsCount === 0 ? (
{
<>
@@ -447,7 +447,7 @@ export const LandingPage = (): JSX.Element => {
- Build and share form link with citizens
+ Build and share form link with respondents
diff --git a/frontend/src/pages/Landing/Payments/LandingPaymentsPage.tsx b/frontend/src/pages/Landing/Payments/LandingPaymentsPage.tsx
index dcd90474f5..df0abd5389 100644
--- a/frontend/src/pages/Landing/Payments/LandingPaymentsPage.tsx
+++ b/frontend/src/pages/Landing/Payments/LandingPaymentsPage.tsx
@@ -137,7 +137,7 @@ export const LandingPaymentsPage = (): JSX.Element => {
{
- Each payment reference ID is associated with a form submission ID.
+ Each payment reference ID is associated with a form response ID.
Payment and payout status can be viewed in your form response page
as well as on the Stripe dashboard.
@@ -248,9 +248,9 @@ export const LandingPaymentsPage = (): JSX.Element => {
Collect payments on your form
- Citizens can now pay for fees and services directly on your form.
- Enter your agency email to receive our guide on how to get started
- with payments.
+ Respondents can now pay for fees and services directly on your
+ form. Enter your agency email to receive our guide on how to get
+ started with payments.
diff --git a/frontend/src/templates/Field/CountryField/CountryField.tsx b/frontend/src/templates/Field/CountryField/CountryField.tsx
deleted file mode 100644
index 2021d78a41..0000000000
--- a/frontend/src/templates/Field/CountryField/CountryField.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Country } from '~shared/constants/countries'
-import {
- BasicField,
- DropdownFieldBase,
- FormFieldWithId,
-} from '~shared/types/field'
-
-import DropdownField from '~templates/Field/Dropdown'
-
-import { BaseFieldProps } from '../FieldContainer'
-
-// TODO: Change to CountryFieldBase when the new CountryField type is added in future PRs
-export type CountryFieldSchema = FormFieldWithId
-export interface CountryFieldProps extends BaseFieldProps {
- schema: CountryFieldSchema
-}
-
-export const CountryField = ({ schema }: CountryFieldProps): JSX.Element => {
- return (
-
- )
-}
diff --git a/frontend/src/templates/Field/CountryField/CountryField.stories.tsx b/frontend/src/templates/Field/CountryRegionField/CountryRegionField.stories.tsx
similarity index 76%
rename from frontend/src/templates/Field/CountryField/CountryField.stories.tsx
rename to frontend/src/templates/Field/CountryRegionField/CountryRegionField.stories.tsx
index 037b865497..ce93d376b1 100644
--- a/frontend/src/templates/Field/CountryField/CountryField.stories.tsx
+++ b/frontend/src/templates/Field/CountryRegionField/CountryRegionField.stories.tsx
@@ -8,24 +8,24 @@ import { BasicField } from '~shared/types/field'
import Button from '~components/Button'
import {
- CountryField as CountryFieldComponent,
- CountryFieldProps,
- CountryFieldSchema,
-} from './CountryField'
+ CountryRegionField as CountryRegionFieldComponent,
+ CountryRegionFieldProps,
+ CountryRegionFieldSchema,
+} from './CountryRegionField'
-const baseSchema: CountryFieldSchema = {
- title: 'Country',
- description: 'Type or select your residential country',
+const baseSchema: CountryRegionFieldSchema = {
+ title: 'Country/Region',
+ description: 'Type or select your residential country/region',
required: true,
disabled: false,
- fieldType: BasicField.Dropdown,
+ fieldType: BasicField.CountryRegion,
fieldOptions: [],
_id: 'random-id',
}
export default {
- title: 'Templates/Field/CountryField',
- component: CountryFieldComponent,
+ title: 'Templates/Field/CountryRegionField',
+ component: CountryRegionFieldComponent,
decorators: [],
parameters: {
docs: {
@@ -42,11 +42,14 @@ export default {
},
} as Meta
-interface StoryCountryFieldProps extends CountryFieldProps {
+interface StoryCountryRegionFieldProps extends CountryRegionFieldProps {
defaultValue?: string
}
-const Template: Story = ({ defaultValue, ...args }) => {
+const Template: Story = ({
+ defaultValue,
+ ...args
+}) => {
const formMethods = useForm({
defaultValues: {
[args.schema._id]: defaultValue,
@@ -70,7 +73,7 @@ const Template: Story = ({ defaultValue, ...args }) => {
return (
`
}
diff --git a/src/app/utils/field-validation/answerValidator.factory.ts b/src/app/utils/field-validation/answerValidator.factory.ts
index ff8497722b..032589ccb5 100644
--- a/src/app/utils/field-validation/answerValidator.factory.ts
+++ b/src/app/utils/field-validation/answerValidator.factory.ts
@@ -14,6 +14,7 @@ import {
import { constructAttachmentValidator } from './validators/attachmentValidator'
import { constructCheckboxValidator } from './validators/checkboxValidator'
import { constructChildrenValidator } from './validators/childrenValidator'
+import { constructCountryRegionValidator } from './validators/countryRegionValidator'
import { constructDateValidator } from './validators/dateValidator'
import { constructDecimalValidator } from './validators/decimalValidator'
import { constructDropdownValidator } from './validators/dropdownValidator'
@@ -61,6 +62,8 @@ export const constructSingleAnswerValidator = (
return constructDecimalValidator(formField)
case BasicField.Dropdown:
return constructDropdownValidator(formField)
+ case BasicField.CountryRegion:
+ return constructCountryRegionValidator()
case BasicField.Email:
return constructEmailValidator(formField)
case BasicField.Uen:
diff --git a/src/app/utils/field-validation/validators/__tests__/country-region-validation.spec.ts b/src/app/utils/field-validation/validators/__tests__/country-region-validation.spec.ts
new file mode 100644
index 0000000000..12b0c50811
--- /dev/null
+++ b/src/app/utils/field-validation/validators/__tests__/country-region-validation.spec.ts
@@ -0,0 +1,115 @@
+import {
+ generateDefaultField,
+ generateNewSingleAnswerResponse,
+} from '__tests__/unit/backend/helpers/generate-form-data'
+
+import { ValidateFieldError } from 'src/app/modules/submission/submission.errors'
+import { validateField } from 'src/app/utils/field-validation'
+
+import { CountryRegion } from '../../../../../../shared/constants/countryRegion'
+import { BasicField } from '../../../../../../shared/types'
+
+// We want users to see the country/region options in title-case but we also need the data in the backend to remain in upper-case.
+// As such, in handleSubmitForm, which runs before validation, we change the title-case country/region value into upper-case.
+const simulateTransformationsHandleSubmitForm = (
+ countryRegion: CountryRegion,
+) => (countryRegion as string).toUpperCase()
+
+describe('Country/region validation', () => {
+ it('should allow valid option', () => {
+ const formField = generateDefaultField(BasicField.CountryRegion, {})
+ const response = generateNewSingleAnswerResponse(BasicField.CountryRegion, {
+ answer: simulateTransformationsHandleSubmitForm(CountryRegion.Singapore),
+ })
+
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isOk()).toBe(true)
+ expect(validateResult._unsafeUnwrap()).toEqual(true)
+ })
+
+ it('should disallow invalid option', () => {
+ const formField = generateDefaultField(BasicField.Dropdown, {})
+ const response = generateNewSingleAnswerResponse(BasicField.Dropdown, {
+ answer: 'NOT A COUNTRY/REGION',
+ })
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isErr()).toBe(true)
+ expect(validateResult._unsafeUnwrapErr()).toEqual(
+ new ValidateFieldError('Invalid answer submitted'),
+ )
+ })
+
+ it('should disallow empty answer when required', () => {
+ const formField = generateDefaultField(BasicField.CountryRegion, {})
+ const response = generateNewSingleAnswerResponse(BasicField.CountryRegion, {
+ answer: '',
+ })
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isErr()).toBe(true)
+ expect(validateResult._unsafeUnwrapErr()).toEqual(
+ new ValidateFieldError('Invalid answer submitted'),
+ )
+ })
+
+ it('should allow empty answer when not required', () => {
+ const formField = generateDefaultField(BasicField.CountryRegion, {
+ required: false,
+ })
+ const response = generateNewSingleAnswerResponse(BasicField.CountryRegion, {
+ answer: '',
+ })
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isOk()).toBe(true)
+ expect(validateResult._unsafeUnwrap()).toEqual(true)
+ })
+
+ it('should allow empty answer when it is required but not visible', () => {
+ const formField = generateDefaultField(BasicField.CountryRegion, {})
+ const response = generateNewSingleAnswerResponse(BasicField.CountryRegion, {
+ answer: '',
+ isVisible: false,
+ })
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isOk()).toBe(true)
+ expect(validateResult._unsafeUnwrap()).toEqual(true)
+ })
+
+ it('should disallow empty answer when it is required and visible', () => {
+ const formField = generateDefaultField(BasicField.CountryRegion, {})
+ const response = generateNewSingleAnswerResponse(BasicField.CountryRegion, {
+ answer: '',
+ })
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isErr()).toBe(true)
+ expect(validateResult._unsafeUnwrapErr()).toEqual(
+ new ValidateFieldError('Invalid answer submitted'),
+ )
+ })
+
+ it('should disallow multiple answers', () => {
+ const formField = generateDefaultField(BasicField.CountryRegion, {})
+ const response = generateNewSingleAnswerResponse(BasicField.CountryRegion, {
+ answer: [
+ simulateTransformationsHandleSubmitForm(CountryRegion.Singapore),
+ simulateTransformationsHandleSubmitForm(CountryRegion.Slovak_Republic),
+ ] as unknown as string,
+ })
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isErr()).toBe(true)
+ expect(validateResult._unsafeUnwrapErr()).toEqual(
+ new ValidateFieldError('Response has invalid shape'),
+ )
+ })
+ it('should disallow responses submitted for hidden fields', () => {
+ const formField = generateDefaultField(BasicField.CountryRegion, {})
+ const response = generateNewSingleAnswerResponse(BasicField.CountryRegion, {
+ answer: simulateTransformationsHandleSubmitForm(CountryRegion.Singapore),
+ isVisible: false,
+ })
+ const validateResult = validateField('formId', formField, response)
+ expect(validateResult.isErr()).toBe(true)
+ expect(validateResult._unsafeUnwrapErr()).toEqual(
+ new ValidateFieldError('Attempted to submit response on a hidden field'),
+ )
+ })
+})
diff --git a/src/app/utils/field-validation/validators/countryRegionValidator.ts b/src/app/utils/field-validation/validators/countryRegionValidator.ts
new file mode 100644
index 0000000000..c15a21b515
--- /dev/null
+++ b/src/app/utils/field-validation/validators/countryRegionValidator.ts
@@ -0,0 +1,38 @@
+import { chain, left, right } from 'fp-ts/lib/Either'
+import { flow } from 'fp-ts/lib/function'
+
+import { CountryRegion } from '../../../../../shared/constants/countryRegion'
+import { ResponseValidator } from '../../../../types/field/utils/validation'
+import { ProcessedSingleAnswerResponse } from '../../../modules/submission/submission.types'
+
+import { notEmptySingleAnswerResponse } from './common'
+import { isOneOfOptions } from './options'
+
+type CountryRegionValidator = ResponseValidator
+type CountryRegionValidatorConstructor = () => CountryRegionValidator
+
+/**
+ * Returns a validation function
+ * to check if country/region selection is one of the options.
+ * We need to validate the response against options in upper-case because PublicFormProvider.handleSubmitForm transforms the response into upper-case.
+ * We want users to see the country/region options in title-case but we also need the data in the backend to remain in upper-case.
+ */
+const makeCountryRegionValidator: CountryRegionValidatorConstructor =
+ () => (response) => {
+ const validOptions = Object.values(CountryRegion)
+ const validOptionsInUpperCase = validOptions.map((option) =>
+ option.toUpperCase(),
+ )
+ const { answer } = response
+ return isOneOfOptions(validOptionsInUpperCase, answer)
+ ? right(response)
+ : left(
+ `CountryRegionValidator:\t answer is not a valid country/region option`,
+ )
+ }
+
+/**
+ * Returns a validation function for a country/region field when called.
+ */
+export const constructCountryRegionValidator: CountryRegionValidatorConstructor =
+ () => flow(notEmptySingleAnswerResponse, chain(makeCountryRegionValidator()))
diff --git a/src/types/api/email_submission.ts b/src/types/api/email_submission.ts
index 5e9f2f3232..c52e7f83c7 100644
--- a/src/types/api/email_submission.ts
+++ b/src/types/api/email_submission.ts
@@ -1,23 +1,11 @@
import type { Merge } from 'type-fest'
import {
- AttachmentResponse,
EmailModeSubmissionContentDto,
- FieldResponse,
ResponseMetadata,
} from '../../../shared/types'
-/**
- * AttachmentResponses with additional server injected metadata on email forms.
- */
-export type ParsedEmailAttachmentResponse = AttachmentResponse & {
- filename: string
- content: Buffer
-}
-
-export type ParsedEmailFormFieldResponse =
- | Exclude
- | ParsedEmailAttachmentResponse
+import { ParsedClearFormFieldResponse } from './submission'
/**
* Email submission body after req.body's FormData has passed through the
@@ -26,7 +14,7 @@ export type ParsedEmailFormFieldResponse =
export type ParsedEmailModeSubmissionBody = Merge<
EmailModeSubmissionContentDto,
{
- responses: ParsedEmailFormFieldResponse[]
+ responses: ParsedClearFormFieldResponse[]
responseMetadata?: ResponseMetadata
}
>
diff --git a/src/types/api/encrypt_submission.ts b/src/types/api/encrypt_submission.ts
index 55a948bbfc..0c1afb6c04 100644
--- a/src/types/api/encrypt_submission.ts
+++ b/src/types/api/encrypt_submission.ts
@@ -6,6 +6,8 @@ import {
StorageModeSubmissionContentDto,
} from '../../../shared/types'
+import { ParsedEmailModeSubmissionBody } from './email_submission'
+
export type EncryptSubmissionDto = Merge<
StorageModeSubmissionContentDto,
{ responses: EncryptFormFieldResponse[] }
@@ -19,3 +21,11 @@ export type EncryptAttachmentResponse = AttachmentResponse & {
export type EncryptFormFieldResponse =
| Exclude
| EncryptAttachmentResponse
+
+/**
+ * Storage submission body after req.body's FormData has passed through the
+ * ReceiverMiddleware.receiveStorageSubmission middleware.
+ */
+export type ParsedStorageModeSubmissionBody = ParsedEmailModeSubmissionBody & {
+ version: number
+}
diff --git a/src/types/api/index.ts b/src/types/api/index.ts
index f67633b409..2e91794e1a 100644
--- a/src/types/api/index.ts
+++ b/src/types/api/index.ts
@@ -2,3 +2,4 @@ export * from './field'
export * from './form'
export * from './encrypt_submission'
export * from './email_submission'
+export * from './submission'
diff --git a/src/types/api/submission.ts b/src/types/api/submission.ts
new file mode 100644
index 0000000000..089f7558e2
--- /dev/null
+++ b/src/types/api/submission.ts
@@ -0,0 +1,13 @@
+import { AttachmentResponse, FieldResponse } from '../../../shared/types'
+
+/**
+ * AttachmentResponses with additional server injected metadata on email forms.
+ */
+export type ParsedClearAttachmentResponse = AttachmentResponse & {
+ filename: string
+ content: Buffer
+}
+
+export type ParsedClearFormFieldResponse =
+ | Exclude
+ | ParsedClearAttachmentResponse
diff --git a/src/types/field/countryRegionField.ts b/src/types/field/countryRegionField.ts
new file mode 100644
index 0000000000..517e23caa3
--- /dev/null
+++ b/src/types/field/countryRegionField.ts
@@ -0,0 +1,9 @@
+import { BasicField, CountryRegionFieldBase } from '../../../shared/types'
+
+import { IFieldSchema } from './baseField'
+
+export interface ICountryRegionFieldSchema
+ extends CountryRegionFieldBase,
+ IFieldSchema {
+ fieldType: BasicField.CountryRegion
+}
diff --git a/src/types/field/index.ts b/src/types/field/index.ts
index b68bb2c1b1..7fef28f146 100644
--- a/src/types/field/index.ts
+++ b/src/types/field/index.ts
@@ -4,6 +4,7 @@ import type { ConditionalExcept, Merge } from 'type-fest'
import type { IAttachmentFieldSchema } from './attachmentField'
import type { ICheckboxFieldSchema } from './checkboxField'
import type { IChildrenCompoundFieldSchema } from './childrenCompoundField'
+import type { ICountryRegionFieldSchema } from './countryRegionField'
import type { IDateFieldSchema } from './dateField'
import type { IDecimalFieldSchema } from './decimalField'
import type { IDropdownFieldSchema } from './dropdownField'
@@ -29,6 +30,7 @@ export * from './checkboxField'
export * from './dateField'
export * from './decimalField'
export * from './dropdownField'
+export * from './countryRegionField'
export * from './emailField'
export * from './homeNoField'
export * from './imageField'
@@ -63,6 +65,7 @@ export type FormFieldSchema =
| IDateFieldSchema
| IDecimalFieldSchema
| IDropdownFieldSchema
+ | ICountryRegionFieldSchema
| IEmailFieldSchema
| IHomenoFieldSchema
| IImageFieldSchema
@@ -104,6 +107,7 @@ export type FieldValidationSchema =
| OmitUnusedValidatorProps
| OmitUnusedValidatorProps
| OmitUnusedValidatorProps
+ | OmitUnusedValidatorProps
| OmitUnusedValidatorProps
| OmitUnusedValidatorProps
| OmitUnusedValidatorProps
diff --git a/src/types/form.ts b/src/types/form.ts
index 6f8f520762..86d10af692 100644
--- a/src/types/form.ts
+++ b/src/types/form.ts
@@ -61,6 +61,7 @@ type FormDefaultableKey =
| 'startPage'
| 'endPage'
| 'hasCaptcha'
+ | 'hasIssueNotification'
| 'authType'
| 'status'
| 'inactiveMessage'
@@ -250,6 +251,7 @@ interface IFormBaseDocument {
form_logics: NonNullable
permissionList: NonNullable
hasCaptcha: NonNullable
+ hasIssueNotification: NonNullable
authType: NonNullable
status: NonNullable
inactiveMessage: NonNullable
diff --git a/src/types/response/index.ts b/src/types/response/index.ts
index dd6607b200..4d6f110d0f 100644
--- a/src/types/response/index.ts
+++ b/src/types/response/index.ts
@@ -6,12 +6,12 @@ import {
import {
EncryptAttachmentResponse,
EncryptFormFieldResponse,
- ParsedEmailAttachmentResponse,
- ParsedEmailFormFieldResponse,
+ ParsedClearAttachmentResponse,
+ ParsedClearFormFieldResponse,
} from '../api'
export type IAttachmentResponse =
- | ParsedEmailAttachmentResponse
+ | ParsedClearAttachmentResponse
| EncryptAttachmentResponse
export type SingleAnswerFieldResponse =
@@ -23,7 +23,7 @@ export type SingleAnswerFieldResponse =
| ChildBirthRecordsResponse
>
| Exclude<
- ParsedEmailFormFieldResponse,
+ ParsedClearFormFieldResponse,
| TableResponse
| CheckboxResponse
| IAttachmentResponse
@@ -32,4 +32,4 @@ export type SingleAnswerFieldResponse =
export type FieldResponse =
| EncryptFormFieldResponse
- | ParsedEmailFormFieldResponse
+ | ParsedClearFormFieldResponse