Added qty edit click funtions
This commit is contained in:
parent
a2bdb67940
commit
167b3196db
|
|
@ -36,8 +36,10 @@ const ComboEditQtyAndRate = (props) => {
|
|||
const formRef = useRef(null);
|
||||
const quantityInputRef = useRef(null);
|
||||
const priceChangeInputRef = useRef(null);
|
||||
const modalRef = useRef(null);
|
||||
const { setIndex = () => {}, setEditQtyCombo = () => {}, setEditRateCombo = () => {} } = props;
|
||||
|
||||
|
||||
const [disableSubmitButton, setDisableSubmitButton] = useState(false);
|
||||
const SessionData = useSelector(StoredSessionData);
|
||||
// const AppId = SessionData?.AppId;
|
||||
|
|
@ -140,11 +142,18 @@ const ComboEditQtyAndRate = (props) => {
|
|||
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (event) => {
|
||||
if (preferenceshortcutkey && event.shiftKey && event.key === 'E') {
|
||||
const navigationKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];
|
||||
if (event.key === 'Escape' || navigationKeys.includes(event.key)) {
|
||||
event.preventDefault();
|
||||
if (PriceChangeaccess && props.Productdata?.Offer <= 0) {
|
||||
onRadioBtnChange('Price');
|
||||
if (props.BSBillingEditQuantity) {
|
||||
props.handleEditQuantityCancel?.();
|
||||
setEditQtyCombo(false);
|
||||
}
|
||||
if (props.BSBillingEditRate) {
|
||||
props.handleEditRateComboCancel?.();
|
||||
setEditRateCombo(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -160,8 +169,12 @@ const ComboEditQtyAndRate = (props) => {
|
|||
preferenceshortcutkey,
|
||||
PriceChangeaccess,
|
||||
props.Productdata?.Offer,
|
||||
props.BSBillingEditQuantity,
|
||||
props.BSBillingEditRate,
|
||||
]);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const BillOrder = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
|
||||
(item) => item.SettingIdName === 'BillItemsOrder'
|
||||
|
|
@ -3203,6 +3216,7 @@ const ComboEditQtyAndRate = (props) => {
|
|||
ref={quantityInputRef}
|
||||
type="number"
|
||||
value={Quantity}
|
||||
min="0"
|
||||
onChange={(e) => setQuantity(e.target.value)}
|
||||
onBlur={() => {
|
||||
if (Quantity && Quantity.trim() !== '') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue