-
Notifications
You must be signed in to change notification settings - Fork 5
(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
base: dev
Are you sure you want to change the base?
Conversation
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 = { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1K or 10K @adisa39?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10k should be okay
Nice refactoring 👍 |