Skip to content

fix: add purchase_date catch for pending orders, replace created prop… - #1011

Merged
smarcet merged 2 commits into
masterfrom
fix/purchases-date-pending
Jul 17, 2026
Merged

fix: add purchase_date catch for pending orders, replace created prop…#1011
smarcet merged 2 commits into
masterfrom
fix/purchases-date-pending

Conversation

@tomrndom

@tomrndom tomrndom commented Jul 16, 2026

Copy link
Copy Markdown

ref: https://app.clickup.com/t/9014802374/86bay73p5

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Bug Fixes
    • Purchase/order details now show the actual purchase date when available.
    • Purchases without a purchased_date are labeled Pending (localized) instead of “N/A” or formatting an incorrect/placeholder value.
    • Updated both the sponsor purchase list and order details to consistently reflect pending purchase status.
  • Localization
    • Added an i18n string for the Pending label in the sponsor purchase/order details area.

… use

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 511c781a-4b87-4305-81d9-4aeb816c0e60

📥 Commits

Reviewing files that changed from the base of the PR and between 8f3f588 and ffefefd.

📒 Files selected for processing (4)
  • src/i18n/en.json
  • src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/sponsor-order-details.js
  • src/reducers/sponsors/show-purchase-list-reducer.js
  • src/reducers/sponsors/sponsor-page-purchase-list-reducer.js

📝 Walkthrough

Walkthrough

Changes

Purchase status consistency

Layer / File(s) Summary
Purchase list status mapping
src/reducers/sponsors/*purchase-list-reducer.js, src/i18n/en.json
Both purchase reducers format available dates and use the localized “pending” label when purchased_date is absent.
Purchase details date display
src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/sponsor-order-details.js
The details view displays the formatted purchased_date or the localized pending label.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: santipalenque, smarcet

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: handling pending orders via purchase_date and replacing the created fallback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/purchases-date-pending

Comment @coderabbitai help to get the list of available commands.

@tomrndom
tomrndom requested a review from smarcet July 16, 2026 17:03
Comment thread src/reducers/sponsors/show-purchase-list-reducer.js Outdated
Comment thread src/reducers/sponsors/sponsor-page-purchase-list-reducer.js Outdated

@smarcet smarcet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@tomrndom please review

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>

@smarcet smarcet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@smarcet
smarcet merged commit a5d1150 into master Jul 17, 2026
9 checks passed
smarcet pushed a commit that referenced this pull request Jul 20, 2026
#1011)

* fix: add purchase_date catch for pending orders, replace created prop use

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>

* fix: replace const values with i18n strings

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>

---------

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
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.

2 participants