This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The most significant changes in the code involve the parsing of the value
val
from theSpinButton
component and the conditions for returning early from functions. These changes were made in several files and functions, includingColumns.tsx
,useLimit.ts
,index.tsx
,Detail.tsx
,New.tsx
, andQuantity.tsx
. Additionally, theuseLimit
function now returns an additional value,count
, which is used in theProductQuantity
function.Here are the changes in detail:
Columns.tsx
, the parsing ofval
from theSpinButton
component was updated. The early return condition in theonChange
function was also updated to account for a disabled state and the current quantity of the item.useLimit
function inuseLimit.ts
was updated to return an additional value,count
. The early return conditions were updated to include this new value.index.tsx
, theAdminOrder
function was updated to change the condition for running a function based on the parsed value from a component.lodash-es
import was removed fromDetail.tsx
andNew.tsx
as it was no longer needed.AdminProductComboDetail
andAdminProductNewCombo
functions inDetail.tsx
andNew.tsx
respectively were updated to change the parsing ofval
from theSpinButton
component and the condition for setting the stock state.ProductQuantity
function inQuantity.tsx
was updated to use the newcount
value returned from theuseLimit
function and to change the parsing ofval
from theSpinButton
component. The early return condition in theonChange
function was also updated to account for this new value.