Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: release v6.42.0 #6142

Closed
wants to merge 19 commits into from
Closed

build: release v6.42.0 #6142

wants to merge 19 commits into from

Conversation

LinHuiqing
Copy link
Contributor

New

  • feat: payment mvp #6095
  • build: merge release v6.41.1 to develop #6136
  • chore: make hsts header follow recommendation from csa #6106
  • feat: track nodejs runtime metrics in APM #6120
  • fix: date-picker bug for negative UTC timezones #6096
  • chore: prune error logs for ndi oidc key retrieval error #6098
  • build: merge release v6.40.0 into develop #6072
  • chore: bump version to v6.42.0 39d299f

Dependencies

  • fix(deps): bump xml2js and aws-sdk #6084
  • fix(deps): bump libphonenumber-js from 1.10.26 to 1.10.28 in /shared #6119
  • fix(deps): bump vm2 from 3.9.15 to 3.9.16 #6092
  • fix(deps): bump vm2 from 3.9.11 to 3.9.15 #6075
  • fix(deps): bump type-fest from 3.7.2 to 3.8.0 in /shared #6064

Dev-Dependencies

  • chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.58.0 to 5.59.0 in /shared #6104
  • chore(deps-dev): bump @typescript-eslint/parser from 5.58.0 to 5.59.0 in /shared #6105
  • chore(deps-dev): bump @types/lodash from 4.14.192 to 4.14.194 in /shared #6100
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.58.0 in /shared #6082
  • chore(deps-dev): bump @typescript-eslint/parser from 5.57.1 to 5.58.0 in /shared #6083

Tests

feat: track nodejs runtime metrics in APM #6120

  • Go to the APM FormSG service page in DataDog, enter the tab Node.JS Runtime Metrics and verify data is being reported
  • Check graphs for CPU load after release, to verify we are still in acceptable range

fix: date-picker bug for negative UTC timezones #6096

To ensure that all our bases are covered, try to test the most extreme timezones. Here are the suggested timezones:

  • Most common use case: Singapore - Singapore (UTC +08)
  • Negative: Alofi - Niue (UTC -11)
  • Positive: Wellington - New Zealand (UTC +12)

Preparation:

  • Create a form with a date field and open the form.

For the tests below, timezones A and B refer to the positive and negative timezones mentioned above, in any order.

Ensure that date picker for date field with "Disallow past dates" option exhibits expected behaviour:

    • Set your timezone as A.
    • On the admin panel, refresh, select and save the "Disallow past dates" option for the date field.
    • On the respondent form, refresh and open the date picker. Only the current and future dates of the timezone should be shown.
    • Select a date. The appropriate date should be reflected in the date field.
    • Change your device's timezone to B.
    • Repeat tasks 3-4.
    • Repeat tasks 2-4.
    • Change your device's timezone to A.
    • Repeat tasks 3-4.

Ensure that date picker for date field with "Disallow future dates" option exhibits expected behaviour:

    • Set your timezone as A.
    • On the admin panel, refresh, select and save the "Disallow future dates" option for the date field.
    • On the respondent form, refresh and open the date picker. Only the current and future dates of the timezone should be shown.
    • Select a date. The appropriate date should be reflected in the date field.
    • Change your device's timezone to B.
    • Repeat tasks 3-4.
    • Repeat tasks 2-4.
    • Change your device's timezone to A.
    • Repeat tasks 3-4.

Ensure that date picker for date field with "Custom date range" option exhibits expected behaviour:

    • Set your timezone as A.
    • On the admin panel, refresh and select the "Custom date range" option for the date field.
    • Select a start date.
    • Open the end date field date picker. Only the dates on or after the selected start date should be selectable.
    • Select an end date.
    • Save the selected date range. Optionally, check that the dates saved in the DB are in UTC.
    • On the respondent form, refresh and open the date picker. Only the dates in the selected date range should be selectable.
    • Select a date. The respective date should be reflected in the date field.
    • Change your device's timezone to B.
    • Repeat tasks 7-8.
    • Repeat task 2. Ensure that the start and end dates remain the same.
    • Update the start and end dates for the date field. Save it.
    • Repeat tasks 7-8.
    • Change your device's timezone to A.
    • Repeat tasks 7-8.

Note: Here's how to set your Mac's timezone.

Design/ product question: Should "Disallow past dates" and "Disallow future dates" be taking the past / future based on the admins' timezone, specified timezone or the users' timezone? Also, even when we have decided on the previous question, does it even make sense if the concept of time is not considered? E.g. if the recurring event I want to organise is at 10am, our date picker won't be able to know that so if we have a timezone in mind, it won't "filter" properly. Currently, it's simply implemented based on the users' timezone so its not disorienting.

feat: payment mvp #6095

Refer to Payments QA Google Doc for comprehensive list of manual tests.

justynoh and others added 19 commits April 6, 2023 04:51
build: merge release v6.40.0 into develop
Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 3.7.2 to 3.8.0.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](sindresorhus/type-fest@v3.7.2...v3.8.0)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.15.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.11...3.9.15)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… in /shared (#6083)

chore(deps-dev): bump @typescript-eslint/parser in /shared

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.57.1 to 5.58.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.58.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… 5.58.0 in /shared (#6082)

chore(deps-dev): bump @typescript-eslint/eslint-plugin in /shared

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.57.1 to 5.58.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.58.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.15 to 3.9.16.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.15...3.9.16)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…red (#6100)

Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.192 to 4.14.194.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: prune error logs for oidc key retrieval error

* chore: handle undefined
… in /shared (#6105)

chore(deps-dev): bump @typescript-eslint/parser in /shared

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.58.0 to 5.59.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: remove timezone from datepicker

* fix: datepicker bugs due to timezones

- (FE) normalize dates to UTC before storing in DB
- (FE) load normalized dates to local timezone
- (BE) remove adjustments due to timezone

* docs: futureOnly and pastOnly validators

* refactor: allow null inputs for new date util fns

* fix: date normalization fns to use date as numbers

* refactor: remove unnecessary var assignment

* fix: unset date validation

* fix: compare to dates in earliest & latest tzs
…6119)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.10.26 to 1.10.28.
- [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags)
- [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.10.26...v1.10.28)

---
updated-dependencies:
- dependency-name: libphonenumber-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… 5.59.0 in /shared (#6104)

chore(deps-dev): bump @typescript-eslint/eslint-plugin in /shared

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.58.0 to 5.59.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) to 0.5.0 and updates ancestor dependency [aws-sdk](https://github.com/aws/aws-sdk-js). These dependencies need to be updated together.


Updates `xml2js` from 0.4.19 to 0.5.0
- [Release notes](https://github.com/Leonidas-from-XIV/node-xml2js/releases)
- [Commits](Leonidas-from-XIV/node-xml2js@0.4.19...0.5.0)

Updates `aws-sdk` from 2.1282.0 to 2.1354.0
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.1282.0...v2.1354.0)

---
updated-dependencies:
- dependency-name: xml2js
  dependency-type: indirect
- dependency-name: aws-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: make hsts header follow recommendation from csa

Description of check in csa scanner:
The scanner checks if your website offers HSTS. It checks for the existence of a “strict transport security header“ with max-age >= 1yr, and the existence of "include subdomains“ in your website’s response header.

* fix: fix test with new HSTS value
* build: release v6.41.0 (#6128)

* fix(deps): bump type-fest from 3.7.2 to 3.8.0 in /shared (#6064)

Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 3.7.2 to 3.8.0.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](sindresorhus/type-fest@v3.7.2...v3.8.0)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump vm2 from 3.9.11 to 3.9.15 (#6075)

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.15.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.11...3.9.15)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/parser from 5.57.1 to 5.58.0 in /shared (#6083)

chore(deps-dev): bump @typescript-eslint/parser in /shared

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.57.1 to 5.58.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.58.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.58.0 in /shared (#6082)

chore(deps-dev): bump @typescript-eslint/eslint-plugin in /shared

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.57.1 to 5.58.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.58.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump vm2 from 3.9.15 to 3.9.16 (#6092)

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.15 to 3.9.16.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.15...3.9.16)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/lodash from 4.14.192 to 4.14.194 in /shared (#6100)

Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.192 to 4.14.194.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: prune error logs for ndi oidc key retrieval error (#6098)

* chore: prune error logs for oidc key retrieval error

* chore: handle undefined

* chore(deps-dev): bump @typescript-eslint/parser from 5.58.0 to 5.59.0 in /shared (#6105)

chore(deps-dev): bump @typescript-eslint/parser in /shared

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.58.0 to 5.59.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: date-picker bug for negative UTC timezones (#6096)

* fix: remove timezone from datepicker

* fix: datepicker bugs due to timezones

- (FE) normalize dates to UTC before storing in DB
- (FE) load normalized dates to local timezone
- (BE) remove adjustments due to timezone

* docs: futureOnly and pastOnly validators

* refactor: allow null inputs for new date util fns

* fix: date normalization fns to use date as numbers

* refactor: remove unnecessary var assignment

* fix: unset date validation

* fix: compare to dates in earliest & latest tzs

* fix(deps): bump libphonenumber-js from 1.10.26 to 1.10.28 in /shared (#6119)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.10.26 to 1.10.28.
- [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags)
- [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.10.26...v1.10.28)

---
updated-dependencies:
- dependency-name: libphonenumber-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.58.0 to 5.59.0 in /shared (#6104)

chore(deps-dev): bump @typescript-eslint/eslint-plugin in /shared

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.58.0 to 5.59.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: track nodejs runtime metrics in APM (#6120)

* fix(deps): bump xml2js and aws-sdk (#6084)

Bumps [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) to 0.5.0 and updates ancestor dependency [aws-sdk](https://github.com/aws/aws-sdk-js). These dependencies need to be updated together.


Updates `xml2js` from 0.4.19 to 0.5.0
- [Release notes](https://github.com/Leonidas-from-XIV/node-xml2js/releases)
- [Commits](Leonidas-from-XIV/node-xml2js@0.4.19...0.5.0)

Updates `aws-sdk` from 2.1282.0 to 2.1354.0
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.1282.0...v2.1354.0)

---
updated-dependencies:
- dependency-name: xml2js
  dependency-type: indirect
- dependency-name: aws-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: make hsts header follow recommendation from csa (#6106)

* chore: make hsts header follow recommendation from csa

Description of check in csa scanner:
The scanner checks if your website offers HSTS. It checks for the existence of a "strict transport security header" with max-age >= 1yr, and the existence of "include subdomains" in your website’s response header.

* fix: fix test with new HSTS value

* chore: bump version to v6.41.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Justyn Oh <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tshuli <[email protected]>
Co-authored-by: Lin Huiqing <[email protected]>
Co-authored-by: Timothee Groleau <[email protected]>

* build: release v6.41.1 (#6134)

chore: bump version to 6.41.1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Foo Chi Fa <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tshuli <[email protected]>
Co-authored-by: Lin Huiqing <[email protected]>
Co-authored-by: Timothee Groleau <[email protected]>
Co-authored-by: Ken Lee Shu Ming <[email protected]>
* feat: add stripe as dependency

* feat: get env data from the payment group on startup

* feat: add routes base uri for payments

* feat: update submissions with payment info

* feat: add payment type to shared, and payment model to backend

* fix: update type of webhookLog to be record

* feat: add stripe controller

* feat: skeleton: create payment intent

* feat: add stripe backend routes

* feat: add controller for stripe webhook

* feat: populate payment intent

* feat: update stripe event type definition.

* fix: update IStripeEventWebhookBody

* feat: add webhook validator

* feat: add payments settings to form model

* feat: add description property to payments in form model

* feat: submission controller generates paymentIntent and returns client_secret to frontend

* chore: fix typings for paymentFeatures schema

* chore: add placeholder env vars for stripe payments

* fix: currency should be sgd not sgp

* fix: stripe amount in cents

* chore: log if failed to generate payment client secret

* fix: cast formId and submissionId to string

* chore: save amount as cents integer

* fix: minimum payment of 50 cents

* feat: save Payment to DB once paymentIntent created

* chore: add new config variable stripePublishableKey

* chore: rename as paymentClientSecret, return in PublicFormDto

* deps: install @stripe/stripe-js and @stripe/react-stripe-js

* feat: add webhook controller

* chore: remove local test key

* Revert "chore: remove local test key"

This reverts commit 2d77896.

* chore: remove local test key

* chore: remove console.log

* feat: allow grabpay and paynow methods

* feat: payments page after submission

* chore: add stripe publishable key to docker compose env vars

* feat: reference payment in submission model

* feat: add getReceiptUrl endpoint

* fix(docker-compose): include US and SG SES env vars (#5442)

fix(docker-compose): include both US and SG env vars

* fix: typing

* fix: typing

* feat: update payment model for more specificity in payment status, update config variables for webhook secret

* chore: use back PaymentStatus enum

* fix: import paths

* chore: remove another absolute path

* feat: update express json parser to save raw request body for passing to stripe webhook verifier

* fix: add js.stripe.com/v3 to csp

* feat: stripe payment redirect page

* fix: add js.stripe.com to frameSrc csp

* fix: remove application fee amount from payment intent params

* feat: add logging to getreceiptURL

* feat: add payment settings to builder

* chore: lint

* fix: harden validation for payment data, update payment tab to submit correctly

* chore: typing

* feat: download payment receipt at endpage

* fix: always show footer

* feat: error handling for create payment intent failed

* feat: add mock for payment element in builder

* feat: error handling for credit card

* refactor: DownloadReceiptBlock

* feat: error handling for failed grabpay and paynow

* feat: add payment details to individual responses page

* ref: rename getPaymentSubmissionBySubmissionId query

* [WIP] feat: add Stripe account linking to admin form settings (#5447)

* feat: add initial stripe connect API and placeholder webpage

* feat: update payment tab

* feat: add correct text and icon to Payment tab

* feat: add Stripe redirect to account link url

* feat: return payments object when querying settings

* feat: add Stripe connected and disconnected UI

* feat: add controller/service/model flows for adding account id to form

* feat: add API to validate connected stripe account

TODO: show pending state when pending onboarding completion

* feat: add unlink stripe account from form

* feat: add TODO documentation on Stripe connected account validity

* build: set legacy-peer-deps to true in .npmrc

* feat: add pending onboarding state

* fix: move frontend-only packages to frontend package.json

* fix: helmet tests due to adding stripe related whitelist

* feat: remove unused import

* feat: add initial oauth implementation for stripe

* feat: show correct state based on payment capabilities

* fix: correct app root url

Co-authored-by: Antariksh <[email protected]>

* feat: add stripe connect button with icon

* fix(CreatePaymentIntentFailureBlock): correct invalid destructure

* fix: enable oauth in stripe api calls using pk and account id

* fix: add publishable_key to joi validation

* chore: hardcode success page data for demo

* chore: remove instrumentation for SES migration

* chore: remove unsafe-perm from dockerfile

* feat: push static assets to s3 (#5595)

* feat: upload static assets to s3

* feat: add static asset URL for craco

* chore: did not work, try injecting PUBLIC_URL to .env instead

* feat: copy frontend folder contents as well

* feat: include static asset bucket in CSP headers

* chore: remove unnecessary STATIC_ASSET_URL env var

* feat: add manifestSrc to CSP

* fix: typing

* chore: add trailing backslash to csp

* chore: add config.aws.staticAssetsBucketUrl to workerSrc CSP

* chore: undo changes to csp, do not set craco PUBLIC_URL

* feat: reverse proxy middleware attempt to fetch from s3 bucket

* feat: load env var for STATIC_ASSETS_S3_BUCKET

* fix: extra slash, destructure status

* chore: axios error handling and logging

* docs: log error from s3

* chore: update package-locks

* chore: remove merge conflict marker in .npmrc

* chore: remove merge conflict markers in docker-compose

* chore: remove SES config from docker-compose

* tests: fix broken tests

* feat: popup modal to confirm payment (#5829)

* feat: add some payment details to responses page (#5839)

* feat: add payment status

* feat: use dollars for payment amount

* feat: add created property to payments

* fix: add conditional for paymentData

* fix: use en-GB

* fix: add timezone and submission time to indiv responses page

* fix: revert payoutDate to use Date format

* feat: make payment status uppercase

* feat: implement payment beta (#5831)

* feat: add script to add payment betaflag by email

* feat: update user schema with payment betaflag

* feat: remove rendering of payment settings and sidebar for non payment beta users

* feat: add utility function to verify if user has selected betaflag

* feat: prevent user from accessing payment and stripe apis if beta flag is not enabled

* fix: typo bug in payments flag in user.server.model

* fix: decouple payment response from individual response page (#5861)

* fix: add individual payment response component

* fix: abstracted payment component away from individual response page

* fix: utilise skeleton loading in individual response page for payment response

* feat: add loading and error state for IndividualPaymentResponse

---------

Co-authored-by: wanlingt <[email protected]>

* feat: input and display payment amount in [dollars].[cents] (#5852)

* feat: display payment amount in 2dp

* fix: floating point error due to multiplication

example input that causes this: 34289.73

* feat: add cosmetic changes to align with design

* fix: borderLeftRadius = 0 only if there's a prefix

* refactor: separate MoneyInput from NumberInput

* test: moneyInput unit tests

* fix: test input specific UI features

removed SGD hardcode

* refactor: typing for payment amount and validation

- use FormPayments for internal state, FormPaymentsDeisplay for form fields state
- validate on MoneyInput instead of mutating value to fit requirements

* refactor: clean destructuring for common payment keys

* fix: do string conversion to and from cents

* fix: useMemo currencyFormatter complaint

* refactor: extract shared payment functions to utils

- use cents-dollars converters on PaymentPageBlock + PaymentContent too

* refactor: use of spread operator in objects

* feat: shift payment acc id details from drawer to settings (#5903)

* feat: add account id to payments settings page

* fix: optimise the field to utilise FormLabel element

* feat: add account_id as a parameter to

* fix: remove target_account_id from payment drawer

* feat: only allow card payment from stripe

* fix: remove paynow and grabpay from PaymentMock.png to mirror respondent side

* refactor: simplify payment amount regex (#5921)

* refactor: simplify payment amount regex

* fix: disable steps on payment amount input

* fix: input passed by regex should have >0 digits

* feat: enable receipt download (#5837)

* feat: set up receipt status endpoint

* feat: download receipt endpoint which returns pdf

* chore: use mutation for download

* feat: popup modal to confirm payment (#5829)

* feat: add some payment details to responses page (#5839)

* feat: add payment status

* feat: use dollars for payment amount

* feat: add created property to payments

* fix: add conditional for paymentData

* fix: use en-GB

* fix: add timezone and submission time to indiv responses page

* fix: revert payoutDate to use Date format

* feat: make payment status uppercase

* feat: implement payment beta (#5831)

* feat: add script to add payment betaflag by email

* feat: update user schema with payment betaflag

* feat: remove rendering of payment settings and sidebar for non payment beta users

* feat: add utility function to verify if user has selected betaflag

* feat: prevent user from accessing payment and stripe apis if beta flag is not enabled

* fix: typo bug in payments flag in user.server.model

* fix: decouple payment response from individual response page (#5861)

* fix: add individual payment response component

* fix: abstracted payment component away from individual response page

* fix: utilise skeleton loading in individual response page for payment response

* feat: add loading and error state for IndividualPaymentResponse

---------

Co-authored-by: wanlingt <[email protected]>

* feat: input and display payment amount in [dollars].[cents] (#5852)

* feat: display payment amount in 2dp

* fix: floating point error due to multiplication

example input that causes this: 34289.73

* feat: add cosmetic changes to align with design

* fix: borderLeftRadius = 0 only if there's a prefix

* refactor: separate MoneyInput from NumberInput

* test: moneyInput unit tests

* fix: test input specific UI features

removed SGD hardcode

* refactor: typing for payment amount and validation

- use FormPayments for internal state, FormPaymentsDeisplay for form fields state
- validate on MoneyInput instead of mutating value to fit requirements

* refactor: clean destructuring for common payment keys

* fix: do string conversion to and from cents

* fix: useMemo currencyFormatter complaint

* refactor: extract shared payment functions to utils

- use cents-dollars converters on PaymentPageBlock + PaymentContent too

* refactor: use of spread operator in objects

* feat: shift payment acc id details from drawer to settings (#5903)

* feat: add account id to payments settings page

* fix: optimise the field to utilise FormLabel element

* feat: add account_id as a parameter to

* fix: remove target_account_id from payment drawer

* feat: only allow card payment from stripe

* fix: remove paynow and grabpay from PaymentMock.png to mirror respondent side

* fix: fix conflicts

* feat: add tracer span for generatePdfFromHtml

* fix: set express headers when returning pdf buffer

* fix: set filename in header

* fix: use browser's inbuilt save as function

* fix: return data in downloadPaymentReceipt

* fix: open receipt download in new tab

* feat: set up proxy middleware for local dev

* fix: remove mutation

* fix: clarify comment

* fix: move tracer to generatePdfFromHtml function

* fix: add TODO for rate limiting

* fix: remove generateAutoreplyPdf span

---------

Co-authored-by: wanlingt <[email protected]>
Co-authored-by: Foo Chi Fa <[email protected]>
Co-authored-by: wanlingt <[email protected]>
Co-authored-by: Lin Huiqing <[email protected]>
Co-authored-by: Ken <[email protected]>
Co-authored-by: foochifa <[email protected]>

* feat(db): add pending submissions collection (#5935)

* feat: add pending submissions collection via sharing schemas with submissions collection

* chore: replace magic string with constant

* feat: add email and encrypt mode pending submission model getters

* chore: remove unneeded exported constants

* chore: schema id casing

* feat: add respondent email to receive receipts (#5917)

* feat: add receipt_email to PI creation

temporarily hardcoded with '[email protected]'

* feat: add payment preview at the end of public form

- includes required email field to receive receipts

* feat: update button at the end of payment form

* feat: use email addr input as stripe receipt email

* feat: update copy on payment modal

* chore: remove unused useContext method

* feat: update copy on payment block button

- move paymentReceiptEmail position for Joi due to comment

* feat: make payment description required

* refactor: clean up small inefficiencies in code

* feat: add emails to payment entries

* fix: update error message for payment description

* refactor: remove unnecessary textStyle definitions

* chore: remove angular cookie for payment forms (#5949)

* refactor: separate payments namespace into payment field and payment channel (#5929)

* feat: add payment channel enum to payment.ts

Currently the enum only consists of 'stripe'

* feat: split FormPayments type to FormPaymentsChannel and FormPaymentsField

* fix: make target acc id and publishable key optional in payment_channel

To allow for disconnecting and reconnecting stripe acc

* feat: update payment methods and schema in form.server.model.ts

* feat: update types for payment and stripe update endpoint

* feat: update type of storage mode encrypt submission endpoint

* feat: update types on admin-form payment drawer, settings, response pages

* feat: update validation of stripe payment account

* refactor: update frontend public form components

* refactor: update form server model test cases

* feat: add script to migrate existing payment forms' schema

* fix: casing of Stripe payment channel enum

* fix: remove target_account_id and publishable_key from update payments validation

* fix: shift payments channel and field to storage form settings

* fix: shift payments_field in to only storage public forms

* refactor: associate payment properties with encrypted form over formbase

* refactor: retrieve payment fields at payment tab level

payment field properties will be passed down to payment drawer and content as props

* refactor: add type check to response page before calling payment field

* refactor: add typeguard to payment services and controllers

* refactor: update mutations to use AdminStorageFormDto

* refactor: shifted payment test cases from base schema to encrypted forms

* refactor: add typeguard for stripe controller

* fix: remove reference to payment field in payments settings

This currently blocks the display of payment validation and account id. Which is undesirable as it should still be displayed once account is connected

* fix: updated payment properties in formfields and payment preview

* fix: use retrievefullform in stripe service to utilise shared typeguard

* refactor: extracted out main form document logic to IFormBaseDocument

* refactor: made amount_cents validation more concise

* fix: typeguard angular cookie check

* feat: show transaction fee in individual response page (#5942)

* feat: add stripeTransactionFee to payment model

* feat: add receiptUrl to payment model

* feat: add balance transaction retrieval to getReceiptUrl

* fix: return payment object in getReceiptUrl

* fix: rename getReceiptUrl to getPaymentFromLatestSuccessfulCharge

* feat: add transaction fee to IndividualPaymentResponse

* ref: rename updateReceiptUrl to updateReceiptUrlAndTransactionFee

* ref: add comments for stripe transaction fee

* fix: rename and reformat payments model properties

* feat: add rate limiting for receipt download (#5927)

* fix: add discriminator to pending submission collection, submission confirmation service (#5944)

* fix: add discriminator value to discriminator calls for pending submission collection

* feat: add submission service to convert pending submissions into actual submissions

* feat: add session parameter to confirmation function

* chore: make session arg mandatory, rename function

* chore: update payment schema with document properties

* chore: rename function

* fix: payment type, transaction for updating payment object on completion

* chore: add refs for schema references in payment model

* feat: check that payment has not already been confirmed before confirming

* fix: include session in findPaymentById call

* chore: defer loading of payment schema ref due to circular dependency

* chore: defer schema references in payment model

* feat: payment max and min limit (#5972)

* feat: add paymentMaxLimit env var

* feat: paymentMaxLimit check on frontend

* chore: rename to maxPaymentAmount

* lint: magic string in MACRO_CASE

* chore: create payment.errors file

* feat: add backend check for maxPaymentAmount

* chore: add tests

* chore: max payment amount in cents

* fix: frontend validation in dollars

* feat: add minimum payment limit

* chore: map error route for InvalidPaymentAmountError

* chore: use spread operator for updatedPaymentSettings

* chore: combine min and max payment checks

* nit: dangling import in other file

* chore: use centsToDollars

* chore: no need to convert env var values to string

Co-authored-by: Timothee Groleau <[email protected]>

* chore: keep reference amount in cents for comparator

* chore: fix tests

---------

Co-authored-by: Timothee Groleau <[email protected]>

* feat: add payment description significance (#5998)

* feat: add description significance tooltip

* fix: add divider line to payment drawer as per design

* fix: change description field from textarea to input component

* fix: renamed description field to name in frontend

* feat: change significance description from tooltip to formlabel descriptor

* feat: update encrypt submission controller to use pending submission collection (#5999)

* feat: update encrypt submission controller to use pending submission collection

* fix: use payment config vars for bounds checking

* chore: update error message

* chore: cleanup payment folder (#6010)

* feat: add payment unsupported message in email mode (#6011)

* refactor: abstracted UnsupportedSvgr fromWebhooksUnsupportedMsg

* feat: add payment unsupported message in settings

* fix: payment guide link typo

* fix: remove payments guide as it is currently not ready

* refactor: abstract default PaymentsField

* fix: fix setToInactive in usePaymentStore

previously payment state will always be 'editing'

* feat: render inline messages if form is email mode or stripe isn't connected

* feat: pass in encryption and strip connection check to payment drawer

* feat: refetch form details when payment drawer is activated

To ensure that we have the latest payment channel information

* fix: remove unneeded useAdminForm query

* chore: remove unnecessary comments

* fix: revert changes using isStripeConnected

Will create a different PR to reflect stripe changes disabling

* refactor: remove export of defaultPaymentsField

* fix: change PaymentContent prop to be optional

* fix: allow PaymentInput to handle undefined paymentdata

Also hard set the disabled version of the toggle component

* fix: added isDisabled check to payments mutation

* revert usePaymentStore changes

* fix: use happy path by converting boolean check to email mode

* fix: only unpack amount cents from paymentData

* fix: made data in paymentStore optional

* fix: remove unnecessary if else

* fix: webhook handler for Stripe events (#5937)

* fix: add discriminator value to discriminator calls for pending submission collection

* feat: add submission service to convert pending submissions into actual submissions

* feat: add session parameter to confirmation function

* chore: make session arg mandatory, rename function

* chore: update payment schema with document properties

* chore: rename function

* fix: payment type, transaction for updating payment object on completion

* chore: add refs for schema references in payment model

* fix: update type of webhook log

* fix: support for disputes api

* fix: support charge refunds

* feat: add state machine to recompute state on each received event

* chore: update logging data in webhook handlers

* chore(dev-dep): convert stripe-event-types to dev dep

* feat: add state machine to compute status and move pending submissions to submissions

* chore: add commented TODOs

* feat: update encrypt-submission controller to use pending submission collection

* chore: remove another absolute path

* chore: use placeholder for payment intent id in payment document

* chore: use isValidObjectId instead

* chore: add logging

* fix: explicitly remove injected schema fields when copying over the document

* fix: use submission service helper

* chore: use session default options instead

* chore: revert to using transaction options

* feat: update webhook handling functions to confirm submission and update completed payment metadata, add tests for event handler functions

* feat: update encrypt submission controller to use pending submission collection

* fix: use payment config vars for bounds checking

* chore: remove random comment

* chore: revert payment model type

* chore: update documentation

* chore: comment out secondary for testing

* fix: build errors

* fix: restore confirmPaymentPendingSubmission and use it

* fix: avoid calling stripe API and rely on saved ids in payment document instead

* chore: add better logging

* feat: add support for payout events

* chore: update documentation in code

* chore: add back secondary read preference setting on payment and submission schemas

* chore: remove references to target_account_id from payment types and model

* chore: remove unnecessary undefined

* chore: update error handling cases and some function names

* test: update spec with expect() and non-null assertions

* fix: make typeguard in computePaymentState terser

* chore: factor out nested charge id extraction into util

* chore: reducer-ize state machines for computing payment state and payout state

* chore: enforce payment channel keys to be required (#6029)

chore: remove undefined-ness from payment channel keys

* chore: clean up payments routes, documentation, payments utils (#6035)

* feat: add strong typing for stripe metadata fields, add more metadata fields (#6028)

* feat: shard out stripe metadata fields into type, add more fields as desired

* chore: use relative paths for import

* chore: rename paymentReceiptEmail to paymentContactEmail

* fix: add Unconnected payment channel type to fix mongoose 'feature' (#6036)

* fix: add Unconnected payment channel type to fix mongoose 'feature'

* chore: remove unneeded conditional

* chore: change enum translation for unconnected:

* chore: update default payment channel in form model tests

* feat: prevent payment changes when stripe is unconnected (#6037)

* feat: check if stripe is connected in payment tab

* feat: display payment disabled message when stripe unconnected

* feat: invalidate adminform query when linking stripe

* chore: update stripe connection check

* chore: remove unneeded isLoading check

* refactor: use isdisabled to check for refreshing payment drawer

* refactor: renamed from isDisabled to isPaymentEligible to prevent double negates

* fix: unshard the payment disabled message

* refactor: reduce logic check by relying on paymentDisabledMessage

* feat: dedicated payment page (#6001)

* feat: add new route for payment page

* feat: add fetch payment model from paymentintent id

* refactor(fe): move payment related modules to payment folder

* refactor: update payments/:formid/getInfo url to lowercase

* refactor: refine GetPaymentInfoDto type

* chore: minor url casing update

* feat: receipt block to show after payment

* refactor: move payment elements to payment folder

* refactor: cleanup old payment block

* add refreshkey to refetch stripe PI after payment

* add missing default case in switch

* fix: cleanup suspense flashes

* refactor: receipt loading, download block

* add workaround for transaction; readpreference on operation

* chore: remove debug code

* fix: confirmpayment flow not triggered during receipt query

* fix: test case for readpreference additions

* refactor: remove unused PaymentSubmissionData

* remove unused file

* chore: remove unused imports

* refactor: move payment related features into public-form/payment

* refactor: update payment view types to use enums and more consistent naming

* fix: incorrect file import on AppRouter after refactor

* refactor: remove stray console logs, update comments

* refactor: remove duplicated code

* refactor: move model load to global file scope

* fix: fetch receipt status not retrying after failure

* add doc comments, refactor paymentintent to paymentid usage

* chore: update test name

* address issues in comments

* fix: failing test

* feat: payment browser stm (#6030)

* feat: add new route for payment page

* feat: add fetch payment model from paymentintent id

* refactor(fe): move payment related modules to payment folder

* refactor: update payments/:formid/getInfo url to lowercase

* refactor: refine GetPaymentInfoDto type

* chore: minor url casing update

* feat: receipt block to show after payment

* refactor: move payment elements to payment folder

* refactor: cleanup old payment block

* add refreshkey to refetch stripe PI after payment

* add missing default case in switch

* fix: cleanup suspense flashes

* refactor: receipt loading, download block

* add workaround for transaction; readpreference on operation

* chore: remove debug code

* fix: confirmpayment flow not triggered during receipt query

* fix: test case for readpreference additions

* refactor: remove unused PaymentSubmissionData

* remove unused file

* chore: remove unused imports

* refactor: move payment related features into public-form/payment

* refactor: update payment view types to use enums and more consistent naming

* fix: incorrect file import on AppRouter after refactor

* refactor: extract payment page url generation to separate utils file

* feat: add payment resume modal

* feat: add payment local storage hook

* feat: add modal popup flow

* fix: incorrect jest types definition version

* add test cases for browser stm utils

* refactor: remove side effects, switch to throttle

* refactor: update manual construction of url to utils func

* fix: formid not set after refactor

* fix: restore button not ordered first in mobile mode

* chore: update package.json

* refactor: move utils/url into public-form folder

* fix: Payment Modals styling differences

* fix: processEviction not triggering

* fix: getting payment response through submissionId from completedPayment (#6060)

* fix: find payment data by submissionId in completePayment obj

* fix: individual payment response to retrieve transaction fee from completedPayment

* feat: add payment details to the individual response page and exported CSV (#6061)

* feat: display payment and payout data in individual response page

* feat: add payment details to exported csv

* chore: rename shared type to dto

* chore: remove updates to getEncryptedResponseUsingQueryParams

* chore: update documentation for addPaymentDataStream

* test: add tests, some documentation updates

* feat: update fields to match design, fix comments

* chore: update individual response page to use monospace textstyle

* ref: change location of comment in PaymentSection

* fix: allow disabling payment in payment drawer (#6073)

* feat: add additional subdescription to enable payment toggle

* feat: remove unneeded stack and shift paymentdisabled message

Use FormFieldDrawerActions for buttons

* fix: allow FormFieldDrawerActions to input disabled prop

* chore: update stripe unconnected message

* fix: allow controller to receive amount_cents and description regardless of enabled

* fix: change behaviour of stripe unconnected to display previous values

* chore: change button text

* fix: remove unneeded conditional for toggle component

* fix: make captcha in payment scrollable (#6079)

* fix: close modal before submitting payment

* refactor: abstract close and submit event handler

* chore: add comments to explain closing of modal on submit

* feat: payment invoice (#6074)

* refactor: receipt url

* feat: invoicing support

* chore: remove debug code

* feat: add agency-level tax info support

* refactor: extract stray url to url file

* fix: model typing

* test: payment invoice (#6086)

test: add additional test cases

* feat: add otp verification to payment contact field (#6003)

* docs: update example on verifiable email field

* feat: send otp for payment contact field

* refactor: extract common sendOtp flows

* feat: verify otp for payment contact field

* refactor: sendNewOtp method in verification service

* refactor: verifyOtp method in verification service

* feat: resend otp for payment contact field

* test: fix existing sendNewOtp tests

* chore: remove unnecessary reset payment field

* test: fix + restore resetFieldForTransaction tests

* test: fix + restore verifyOtp tests

* test: payment otp gen and verification controller

* chore: use correct variable on verification routes

* chore: remove unused useState import

* chore: add rate limit for payment otp gen endpoint

* feat: reuse gen and verify otp endpoints for pay

* chore: use BasicField enums instead of raw string for fieldType

Co-authored-by: Justyn Oh <[email protected]>

* chore: fix linting for commit 25c2bd1

* refactor: shift form/payment otp field logic to service

* test: fix verification tests affected by refactor 8b1eed0

* chore: remove unused PaymentContactField error

* chore: remove extra 'form' from comments

* chore: remove another extra 'form' from comments

* chore: remove "Form" from shared otp methods

* chore: remove commented UpdateFieldData import

* chore: remove payment_field.enabled in IFormSchema

* fix: verification createTransactionFromForm logic

* revert: remove unused useState import

This reverts commit 7598b05.

* fix: return null when no otp fields in email mode

* chore: remove "form" from otp verification comment

- also removed other small LOC changes

* chore: remove more "form" comments for otp

* fix: set fields as [] when no form otp but have payment

* test: verification model & service after refactor

* chore: remove commented import

* refactor: extract getVerificationPrefix logic

* fix: payment email missing in BE (#6099)

add fix to reference correct schema field id mapping

* feat: stable submission id (#6088)

* fix: add submission id to metadata and update receipt payment description

* feat: consistent submission id

* chore: clarify receipt description form

* chore: switch order of fields in submission

* chore: remove unnecessary typecheck

* test: add tests for stable submission id flow

* chore: update tests with correct valuse

* fix: add jsdom dependency

* feat: perform post-submission actions when payment is completed (#6089)

* feat: perform post-submission actions when payment is completed

* feat: delete email responses from payment document

* chore: remove responses field from shared payment type

* feat: payment processing and canceled state (#6091)

* feat: add processing, canceled state

* refactor: move edgecase ui up

* refactor: rename enum pending to pendingpayment

* hide feedbackblock on feedback submission, remove feedbackblock on processing

* refactor: cleanup, simplify, and comments for stripe payment elements

* refactor: rename files

* chore: string literals to not use curly braces in props

* refactor: add guard clause to check if form exists

* fix: invoice download 502 (#6129)

* add type hint on populatedForm

* fix: add handling of undefined properties

* fix: update payment received subtitle copy (#6131)

* fix: update subtitle for payment received message block

* fix: amend copy again

* fix: convert from seconds to miliseconds from epoch when saving Stripe dates (#6132)

* fix: convert from seconds to miliseconds from epoch when saving Stripe dates

* test: update test data

* feat: disable description and amount fields for admin when the payment field is disabled (#6130)

* feat: disable description and amount fields for admin when the payment field is disabled

* chore: update copy for some payment drawer fields

* test: update tests

* chore: update model

* fix: update payment page to include submission ID (#6116)

* fix: update payment page to include submission ID

* chore: rename props

* fix: update payment page to include submission ID

* chore: rename props

* fix: check form error on first proceed to pay (#6135)

feat: check form on first proceed to pay

---------

Co-authored-by: Timothee Groleau <[email protected]>
Co-authored-by: wanlingt <[email protected]>
Co-authored-by: Justyn Oh <[email protected]>
Co-authored-by: tshuli <[email protected]>
Co-authored-by: Antariksh Mahajan <[email protected]>
Co-authored-by: Kar Rui Lau <[email protected]>
Co-authored-by: tshuli <[email protected]>
Co-authored-by: wanlingt <[email protected]>
Co-authored-by: Foo Chi Fa <[email protected]>
Co-authored-by: Lin Huiqing <[email protected]>
Co-authored-by: foochifa <[email protected]>
Co-authored-by: LinHuiqing <[email protected]>
@LinHuiqing LinHuiqing marked this pull request as ready for review April 20, 2023 00:21
@LinHuiqing LinHuiqing temporarily deployed to staging-al2 April 20, 2023 00:40 — with GitHub Actions Inactive
@LinHuiqing LinHuiqing closed this Apr 20, 2023
@LinHuiqing LinHuiqing deleted the release_v6.42.0 branch April 20, 2023 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants