refactor(FE): Reset transaction subtype when product changes for

RECORDING
This commit is contained in:
rstubryan
2026-02-26 16:20:00 +07:00
parent 3099588141
commit 6f6f54571f
@@ -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;