Skip to content

(Online shop) Sales Item: Updating Stock-level #408

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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

adisa39
Copy link
Collaborator

@adisa39 adisa39 commented Jul 7, 2025

  • Fixed cancel payment callback API endpoint bug.
  • Fixed item sales item price updating bug.
  • limit sales item possible order quantity based on the item stock level.

@@ -130,6 +130,20 @@ export default function OnlineShopping({ dbSeller }: { dbSeller: ISeller }) {
);
};

type ShopeItemType = {
Copy link
Member

@swoocn swoocn Jul 11, 2025

Choose a reason for hiding this comment

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

This can be moved to the types file. Perhaps we could rename this to ShopItemData instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Though it’s only referenced in this single file

case StockLevelType.available_3:
return 3;
default:
return 10000; // Default to 1k if no stock level matches
Copy link
Member

@swoocn swoocn Jul 11, 2025

Choose a reason for hiding this comment

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

1K or 10K @adisa39?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

10k should be okay

@swoocn swoocn added the pending-c/o-feedback Awaiting feedback from Code Owner. label Jul 11, 2025
@adisa39
Copy link
Collaborator Author

adisa39 commented Jul 11, 2025

Nice refactoring 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-c/o-feedback Awaiting feedback from Code Owner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants