Merge pull request 'Here Add Scanner input cleared' (#193) from print-colors into main
Reviewed-on: Pozomind/pozo-retail-app#193
This commit is contained in:
commit
0d99925584
|
|
@ -81,6 +81,7 @@ import { Global_PromoCodeOffers } from '../../../../Features/Offer/Offer.js';
|
|||
import { validateOffers } from '../BSItemCards/ValidateOffer.jsx';
|
||||
import { useSaleswiseOfferWatcher } from '../BSItemCards/SalesWiseOffer.jsx';
|
||||
import { calculateOverAllQtyLimit } from '../../../../utils/calculations.js';
|
||||
import BarCodeScan from '../../../../Services/BarCodeScan.jsx';
|
||||
const ExpireConfirmModal = lazy(
|
||||
() => import('../BookingFunctionality/ExpireConfirmModal.jsx')
|
||||
);
|
||||
|
|
@ -1137,6 +1138,9 @@ export default function BSC1Search(props) {
|
|||
};
|
||||
ProductSelected(updatedProduct);
|
||||
}
|
||||
// clear input after handling repeated scan
|
||||
formRef.current?.resetFields(['ItemName']);
|
||||
setProductList([]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1164,6 +1168,9 @@ export default function BSC1Search(props) {
|
|||
setLastScannedQr(ApiSearchData);
|
||||
|
||||
ProductSelected(ApiSearchData);
|
||||
// clear input once a QR-based product is selected
|
||||
formRef.current?.resetFields(['ItemName']);
|
||||
setProductList([]);
|
||||
setQuickAdd(false);
|
||||
} else if (!ApiSearchData.ProdId && ApiSearchData?.AppId == 0) {
|
||||
setQuickAdd(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue