fix build

This commit is contained in:
2026-04-07 07:07:02 +03:00
parent 11db1e6941
commit 9fd7b61c5a
27 changed files with 74 additions and 64 deletions
@@ -26,7 +26,7 @@ export function DocumentTypeInlineForm({ onSuccess }: InlineCreateFormProps) {
const handleSubmit = async (values: FormValues) => {
try {
const result = await api.vehicleDocuments.createDocumentType({ title: values.title })
const result = await api.vehicleDocuments.createDocumentType({ title: values.title } as any)
toast.success("Document type created")
form.reset()
const item = (result as any)?.data ?? result
@@ -128,8 +128,8 @@ export function VehicleForm({ resourceId, initialData, onSuccess }: VehicleFormP
mutationFn: (values: VehicleFormValues) => {
const payload = mapToPayload(values)
const promise = isEditing && resourceId
? api.vehicles.update(resourceId, payload)
: api.vehicles.create(payload)
? api.vehicles.update(resourceId, payload as any)
: api.vehicles.create(payload as any)
toast.promise(promise, {
loading: isEditing ? "Updating vehicle..." : "Creating vehicle...",
success: isEditing ? "Vehicle updated successfully" : "Vehicle created successfully",