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

fix: add payout pending section to individual response page #6214

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

justynoh
Copy link
Contributor

Problem

We want to display the payout pending section even when payout details have not come in.

Closes #6143

Solution

Change the value of the payout details to "-" when no payout details are sent to the frontend. Display these with the appropriate tag for the payout "status", as per figma.

Breaking Changes

  • No - this PR is backwards compatible

Before & After Screenshots

Payout pending
Screenshot 2023-04-28 at 10 53 24 AM

Payout success
Screenshot 2023-04-28 at 10 53 16 AM

@justynoh justynoh requested a review from foochifa April 28, 2023 03:11
Copy link
Contributor

@foochifa foochifa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm thanks Justyn!

For tests was wondering if we could somehow trigger payouts -> was trying manual payouts but it killed my backend container 😅
image

But firstly maybe can just manually edit the db (which is what I guess was the screenshot)
We can document the steps down too like go to payments doc -> add payout.payoutId && payout.payoutDate.

@@ -66,24 +36,19 @@ export const PaymentSection = ({
? { label: 'Disputed', colorScheme: 'warning' }
: undefined // The remaining options should never appear.

const payoutTagProps =
payment.payoutId || payment.payoutDate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious but payoutId and payoutDate will always exists together right? i.e. 0 || 0 and 1 || 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, this is a bit of a deficiency in the dto. but to avoid complication, i think this is fine. In principle, if any one of them is there, we should consider it successful (since a payout is already "known" to occur by ID or by date).

@justynoh justynoh merged commit 4e4c64e into develop Apr 28, 2023
@justynoh justynoh deleted the fix/add-payout-pending branch April 28, 2023 07:53
@wanlingt wanlingt mentioned this pull request May 3, 2023
55 tasks
wanlingt added a commit that referenced this pull request May 3, 2023
* fix: only return previous payment id (#6210)

* fix: return payment id string instead of payment doc in controller

* fix: update payment route method and comment

* fix: update FE service

* chore: fix name of test files

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

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.59.0 to 5.59.1.
- [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.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  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>

* fix: add payout pending section to individual response page (#6214)

* ci: use different payments secrets for separate staging environments (#6181)

* ci: add new ENV_NAME to create .env file script

* docs: update env vars used in aws systems manager

* fix: update ENV_NAME conditional

* ref: use ENV_SITE_NAME instead of ACTUAL_ENV_NAME

* fix: rename variable

* docs: add example for SSM_PREFIX

* chore(deps-dev): bump @typescript-eslint/parser from 5.59.1 to 5.59.2 in /shared (#6225)

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.59.1 to 5.59.2.
- [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.2/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  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(deps-dev): bump @typescript-eslint/eslint-plugin from 5.59.1 to 5.59.2 in /shared (#6224)

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.59.1 to 5.59.2.
- [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.2/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  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>

* fix(deps): bump date-fns from 2.29.3 to 2.30.0 in /shared (#6220)

Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.29.3 to 2.30.0.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/v2.30.0/CHANGELOG.md)
- [Commits](date-fns/date-fns@v2.29.3...v2.30.0)

---
updated-dependencies:
- dependency-name: date-fns
  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: move payment drawer to Payments tab within builder drawer (#6213)

* fix: move payment drawer into builder drawer

* fix: open payment drawer when payment preview box is clicked

* chore: move FormPaymentPreview into PaymentPreview in frontend templates

* chore: update width of payment preview box in builder

* fix: add dirty modal functionality for payment editing holding state

* fix: add check for email mode when rendering payment input drawer

* fix: update payment modal to be fullpage on mobile (#6219)

* Update FormPaymentModal to be fullpage on mobile

* Update FormPaymentResumeModal and DuplicatePaymentModal to be fullpage on mobile

* add new <ButtonGroup /> that supports full width display

* refactor: remove redundant justifycontent styling

* fix: missing paymentReceiptEmail for fetch fallback submissions (#6252)

* chore: bump version to v6.46.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Lin Huiqing <[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: Justyn Oh <[email protected]>
Co-authored-by: Ken Lee Shu Ming <[email protected]>
Co-authored-by: tshuli <[email protected]>
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.

Make payout status always visible on payments details in response
2 participants