Added Emplyee Access missing names
This commit is contained in:
parent
579d4f2a3a
commit
42d10ccb5a
|
|
@ -180,12 +180,20 @@ const CreateTransfer = () => {
|
||||||
variant ? `Already added in the table` : 'This product is already Added'
|
variant ? `Already added in the table` : 'This product is already Added'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (scanner) {
|
||||||
|
setTimeout(() => {
|
||||||
|
productInputRef.current?.focus();
|
||||||
|
setProductSearchText('');
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
formProductRef?.current?.resetFields();
|
formProductRef?.current?.resetFields();
|
||||||
|
if (!scanner) {
|
||||||
setProductSearchText('');
|
setProductSearchText('');
|
||||||
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}, []);
|
}, [scanner]);
|
||||||
|
|
||||||
const focusProductInput = () => {
|
const focusProductInput = () => {
|
||||||
// give React a tick to close modal/input blur before refocusing
|
// give React a tick to close modal/input blur before refocusing
|
||||||
|
|
@ -367,7 +375,13 @@ const CreateTransfer = () => {
|
||||||
setVariantDetails([]);
|
setVariantDetails([]);
|
||||||
setSelectedProductForVariant(null);
|
setSelectedProductForVariant(null);
|
||||||
setSelectedVariants([]);
|
setSelectedVariants([]);
|
||||||
focusProductInput();
|
|
||||||
|
if (scanner) {
|
||||||
|
setTimeout(() => {
|
||||||
|
productInputRef.current?.focus();
|
||||||
|
setProductSearchText('');
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDeleteRow = (index) => {
|
const handleDeleteRow = (index) => {
|
||||||
|
|
@ -618,7 +632,13 @@ const CreateTransfer = () => {
|
||||||
setVariantDetails([]);
|
setVariantDetails([]);
|
||||||
setSelectedProductForVariant(null);
|
setSelectedProductForVariant(null);
|
||||||
setSelectedVariants([]);
|
setSelectedVariants([]);
|
||||||
focusProductInput();
|
|
||||||
|
if (scanner) {
|
||||||
|
setTimeout(() => {
|
||||||
|
productInputRef.current?.focus();
|
||||||
|
setProductSearchText('');
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
onOk={handleAddSelectedVariants}
|
onOk={handleAddSelectedVariants}
|
||||||
okText="Add Selected Variants"
|
okText="Add Selected Variants"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue