mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE): Reset transaction subtype when product changes for
RECORDING
This commit is contained in:
@@ -372,6 +372,13 @@ const InventoryAdjustmentForm = ({
|
||||
}
|
||||
}, [selectedTransactionSubtype]);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedTransactionType?.value === 'RECORDING' && selectedProduct) {
|
||||
setSelectedTransactionSubtype(null);
|
||||
formik.setFieldValue('transaction_subtype', '');
|
||||
}
|
||||
}, [selectedProduct, selectedTransactionType]);
|
||||
|
||||
// ===== EVENT HANDLERS =====
|
||||
const locationChangeHandler = (val: OptionType | OptionType[] | null) => {
|
||||
const location = val as OptionType | null;
|
||||
|
||||
Reference in New Issue
Block a user