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

chore(order): Paid Total and Refunded Total #7373

Merged
merged 11 commits into from
May 20, 2024

Conversation

carlos-r-l-rodrigues
Copy link
Contributor

No description provided.

Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2024 3:24pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) May 20, 2024 3:24pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview May 20, 2024 3:24pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview May 20, 2024 3:24pm

Copy link

changeset-bot bot commented May 20, 2024

⚠️ No Changeset found

Latest commit: e6b9336

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

} as OrderTypes.UpdateOrderTransactionWithSelectorDTO,
]
@InjectTransactionManager("baseRepository_")
// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

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

There are several ts-ignore and any's, let's see if we can resolve those.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it fixed the types but will keep the ignore as these methods are conflicting because TS is recoginizing them as member property and when declaring as member functions it complains.
I won't spend much time in it.

if (!trxs.length) {
return
}
transformPropertiesToBigNumber(trxs)
Copy link
Member

Choose a reason for hiding this comment

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

I thought conversion to BN happens automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This property totals is a generic JSONB object, so the conversion won't happen automatically as it does when the entity is a Big Number instance on the model.
This helper will basically create the raw_ properties of their correspondent values.

Copy link
Member

Choose a reason for hiding this comment

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

Got it 👍

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

These transactions are created under the hood right? Consumers won't really know of them

@carlos-r-l-rodrigues
Copy link
Contributor Author

These transactions are created under the hood right? Consumers won't really know of them

Yeah, in Medusa they will be created when payments are captured or refunded. But the module will have the methods available to be used elsewhere if needed.

@carlos-r-l-rodrigues carlos-r-l-rodrigues merged commit f57dc98 into develop May 20, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants