Cash payouts auto funding#478
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements cash payout auto-funding functionality by introducing a new "PROCESSING" status for rewards and referrals that are awaiting scheduled payout. The changes update status handling logic, add new status display components, and reorganize story files to separate tax-and-cash-specific examples from general reward flows.
Changes:
- Added PROCESSING status to handle rewards with scheduled future payouts
- Updated status determination logic to check
dateScheduledagainst current time - Created separate story files for tax-and-cash scenarios
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/mint-components/src/components/sqm-stencilbook/sqm-stencilbook.tsx | Added imports for new tax-and-cash story files and swapped import paths for existing stories |
| packages/mint-components/src/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.tsx | Added PROCESSING status with date-based logic and updated status determination to check dateScheduled |
| packages/mint-components/src/components/sqm-rewards-table/cells/readme.md | Updated documentation for new payoutProcessing prop and revised payoutApproved text |
| packages/mint-components/src/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.tsx | New story file demonstrating various tax-and-cash reward status cells |
| packages/mint-components/src/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.tsx | New story file showing complete tax-and-cash rewards table |
| packages/mint-components/src/components/sqm-rewards-table/RewardsTableCell.stories.tsx | Removed tax-related status exports and added cash reward data |
| packages/mint-components/src/components/sqm-rewards-table/RewardsTable.stories.tsx | Removed tax-and-cash-specific story rows |
| packages/mint-components/src/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.tsx | Added PROCESSING status with similar date-based logic and updated status text templates |
| packages/mint-components/src/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.tsx | New story file for tax-and-cash referral table reward cells |
| packages/mint-components/src/components/sqm-referral-table/TaxAndCashReferralTable.stories.tsx | New story file for complete tax-and-cash referral table |
| packages/mint-components/package.json | Version bump to 2.0.10-0 |
Files not reviewed (1)
- packages/mint-components/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/mint-components/src/components/sqm-stencilbook/sqm-stencilbook.tsx
Outdated
Show resolved
Hide resolved
...ges/mint-components/src/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.tsx
Outdated
Show resolved
Hide resolved
...ges/mint-components/src/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.tsx
Outdated
Show resolved
Hide resolved
packages/mint-components/src/components/sqm-rewards-table/cells/readme.md
Outdated
Show resolved
Hide resolved
.../mint-components/src/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.tsx
Outdated
Show resolved
Hide resolved
.../mint-components/src/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.tsx
Outdated
Show resolved
Hide resolved
…s/sqm-rewards-table-status-cell.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s/sqm-rewards-table-status-cell.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ls/sqm-referral-table-rewards-cell.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ls/sqm-referral-table-rewards-cell.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- packages/mint-components/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ges/mint-components/src/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- packages/mint-components/package-lock.json: Language not supported
Comments suppressed due to low confidence (2)
packages/mint-components/src/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.tsx:1
- Corrected spelling from 'based your' to 'based on your' (appears twice in the PAYOUT_APPROVED and PROCESSING messages).
import { Component, h, Prop } from "@stencil/core";
packages/mint-components/src/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.tsx:1
- Inconsistent variable usage - the condition uses
partnerFundsStatusin some checks andpartnerTransferStatusin others, but these reference the same value. Use the same variable name throughout for consistency.
import { Component, h, Prop } from "@stencil/core";
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ges/mint-components/src/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.tsx
Outdated
Show resolved
Hide resolved
...t-components/src/components/sqm-referral-table/columns/referral-table-rewards-column.feature
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 24 changed files in this pull request and generated 7 comments.
Files not reviewed (1)
- packages/mint-components/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.feature
Outdated
Show resolved
Hide resolved
...-components/src/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.tsx
Outdated
Show resolved
Hide resolved
...t-components/src/components/sqm-referral-table/columns/referral-table-rewards-column.feature
Show resolved
Hide resolved
...-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.feature
Outdated
Show resolved
Hide resolved
...-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.feature
Outdated
Show resolved
Hide resolved
.../mint-components/src/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.tsx
Show resolved
Hide resolved
...t-components/src/components/sqm-referral-table/columns/referral-table-rewards-column.feature
Show resolved
Hide resolved
…atch/program-tools into cash-payouts-auto-funding
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 25 changed files in this pull request and generated 6 comments.
Files not reviewed (1)
- packages/mint-components/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...t-components/src/components/sqm-referral-table/columns/referral-table-rewards-column.feature
Show resolved
Hide resolved
...-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.feature
Show resolved
Hide resolved
...-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.feature
Show resolved
Hide resolved
packages/mint-components/src/components/sqm-rewards-table/RewardsTableCell.stories.tsx
Show resolved
Hide resolved
...mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.tsx
Show resolved
Hide resolved
...ges/mint-components/src/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 33 changed files in this pull request and generated 12 comments.
Files not reviewed (1)
- packages/mint-components/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/mint-components/src/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.ts
Outdated
Show resolved
Hide resolved
...-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.feature
Show resolved
Hide resolved
...mint-components/src/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.tsx
Show resolved
Hide resolved
…t-status-alert/usePayoutStatus.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 33 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- packages/mint-components/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| { | ||
| date: DateTime.fromMillis( | ||
| this.reward.partnerFundsTransfer.dateScheduled, |
There was a problem hiding this comment.
For defensive programming, consider adding optional chaining when accessing this.reward.partnerFundsTransfer.dateScheduled. While the code logic ensures this is only called when PROCESSING status is set (which requires partnerFundsTransfer to exist), adding optional chaining (this.reward.partnerFundsTransfer?.dateScheduled) would make the code more robust and consistent with the similar code in sqm-referral-table-rewards-cell.tsx line 277.
| this.reward.partnerFundsTransfer.dateScheduled, | |
| this.reward.partnerFundsTransfer?.dateScheduled, |
Description of the change
Type of change
Links
Checklists
Development
Paperwork
Code review