Merge branch 'feature/react-query' of https://github.com/abouolia/Ratteb into feature/react-query

This commit is contained in:
a.bouhuolia
2021-02-15 16:37:54 +02:00
3 changed files with 4 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ export default function ItemFormPrimarySection() {
const nameFieldRef = useRef(null);
// Formik context.
const { values: { itemType } } = useFormikContext();
const { values: { type } } = useFormikContext();
useEffect(() => {
// Auto focus item name field once component mount.
@@ -87,7 +87,7 @@ export default function ItemFormPrimarySection() {
form.setFieldValue('type', _value);
})}
selectedValue={value}
disabled={itemType === 'inventory'}
disabled={type === 'inventory'}
>
<Radio label={<T id={'service'} />} value="service" />
<Radio label={<T id={'non_inventory'} />} value="non-inventory" />

View File

@@ -29,6 +29,7 @@ function VendorFormProvider({ vendorId, ...props }) {
const [submitPayload, setSubmitPayload] = useState({});
const provider = {
vendorId,
currencies,
vendor,
submitPayload,