last changes
This commit is contained in:
@ -4,6 +4,8 @@ import { useForm } from "@refinedev/react-hook-form";
|
||||
import { Controller } from "react-hook-form";
|
||||
|
||||
import { VEHICLE_TYPES } from "../../lib/constants";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { languageStore, META_LANGUAGE } from "@stores";
|
||||
|
||||
type VehicleFormValues = {
|
||||
tail_number: number;
|
||||
@ -11,13 +13,16 @@ type VehicleFormValues = {
|
||||
city_id: number;
|
||||
};
|
||||
|
||||
export const VehicleEdit = () => {
|
||||
export const VehicleEdit = observer(() => {
|
||||
const { language } = languageStore;
|
||||
const {
|
||||
saveButtonProps,
|
||||
register,
|
||||
control,
|
||||
formState: { errors },
|
||||
} = useForm<VehicleFormValues>({});
|
||||
} = useForm<VehicleFormValues>({
|
||||
refineCoreProps: META_LANGUAGE(language)
|
||||
});
|
||||
|
||||
const { autocompleteProps: carrierAutocompleteProps } = useAutocomplete({
|
||||
resource: "carrier",
|
||||
@ -136,4 +141,4 @@ export const VehicleEdit = () => {
|
||||
</Box>
|
||||
</Edit>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user