Skip to content

Commit

Permalink
Merge pull request #172 from Josmar-jr/fix/adjust-counting-problem-qu…
Browse files Browse the repository at this point in the history
…ickorder

Fix/adjust counting problem quickorder
  • Loading branch information
ataideverton authored Dec 4, 2024
2 parents 484861f + ef4730d commit c399c42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed

- Fixed quickorder listing counter

## [3.16.1] - 2024-11-12
### Fixed
Expand Down
2 changes: 2 additions & 0 deletions react/UploadBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ const UploadBlock: FunctionComponent<

const handleFile = (files: any) => {
doFile(files)
onRefidLoading(false)
}

const handleReset = () => {
Expand Down Expand Up @@ -435,6 +436,7 @@ const UploadBlock: FunctionComponent<
reviewedItems={reviewItems}
hiddenColumns={hiddenColumns ?? []}
onReviewItems={onReviewItems}
refidLoading={refidLoading}
onRefidLoading={onRefidLoading}
backList={backList}
/>
Expand Down
8 changes: 6 additions & 2 deletions react/components/ReviewBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,19 @@ const ReviewBlock: FunctionComponent<WrappedComponentProps & any> = ({

const createSchema = (columnsToBeHidden: string[]) => {
if (columnsToBeHidden.indexOf('line') === -1) {
let count = 0

tableSchema.properties.line = {
type: 'object',
title: intl.formatMessage({
id: 'store/quickorder.review.label.lineNumber',
}),
width: 50,
// eslint-disable-next-line react/display-name
cellRenderer: ({ rowData }: any) => {
return <div>{parseInt(rowData.line, 10) + 1}</div>
cellRenderer: () => {
count++

return <div>{refidLoading ? '-' : count}</div>
},
}
}
Expand Down

0 comments on commit c399c42

Please sign in to comment.