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

feat(pricing, types, utils): Soft delete pricing entities #5858

Merged
merged 40 commits into from
Jan 4, 2024

Conversation

pKorsholm
Copy link
Contributor

@pKorsholm pKorsholm commented Dec 13, 2023

What

  • Add softDeleteMoneyAmount
    • Cascade softdelete to priceSetMoneyAmount and priceRule
  • Add restoreSoftDeletedMoneyAmount
  • Ensure that softDelete cascades across one-to-one relationships

Copy link

changeset-bot bot commented Dec 13, 2023

🦋 Changeset detected

Latest commit: 4234fa3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@medusajs/pricing Patch
@medusajs/types Patch
@medusajs/utils Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Dec 13, 2023

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

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Jan 4, 2024 7:41am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 4, 2024 7:41am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 4, 2024 7:41am

@pKorsholm pKorsholm marked this pull request as ready for review December 13, 2023 12:59
@pKorsholm pKorsholm requested a review from a team as a code owner December 13, 2023 13:00
@pKorsholm pKorsholm changed the title Feat/soft delete pricing entities feat(pricing, types, utils): Soft delete pricing entities Dec 13, 2023
packages/pricing/src/services/pricing-module.ts Outdated Show resolved Hide resolved
packages/types/src/pricing/common/price-rule.ts Outdated Show resolved Hide resolved
Comment on lines +1285 to +1287
* import {
* initialize as initializePricingModule,
* } from "@medusajs/pricing"
Copy link
Member

Choose a reason for hiding this comment

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

comment: At some point we will have to start using the medusa app like:

const { modules } = await MedusaApp({
    modulesConfig,
    servicesConfig: joinerConfig,
    injectedDependencies,
  })

not now but just to say

Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

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

lgtm, this is missing the linkable keys concept, but can also be done as a separate ticket.

@olivermrbl
Copy link
Contributor

@adrien2p can I get you to give this another review?

Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

LGTM, few todo's but nothing major :)

packages/pricing/src/models/price-rule.ts Outdated Show resolved Hide resolved
packages/pricing/src/models/price-set-money-amount.ts Outdated Show resolved Hide resolved
packages/pricing/src/models/price-set-money-amount.ts Outdated Show resolved Hide resolved
@olivermrbl
Copy link
Contributor

this is missing the linkable keys concept, but can also be done as a separate ticket.

What are next steps for this one?

@olivermrbl olivermrbl merged commit 3550750 into develop Jan 4, 2024
15 checks passed
@olivermrbl olivermrbl deleted the feat/soft-delete-pricing-entities branch January 4, 2024 08:02
This was referenced Jan 4, 2024
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.

4 participants