fix bugs phase 2 (excel ) , download sample feature
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { ColumnHeader } from '@/shared/data-view/table-view'
|
||||
import FormDialog from '@/shared/components/form-dialog'
|
||||
import { ImportDataButton } from '@/shared/components/import-data-button'
|
||||
import { ExportDataButton } from '@/shared/components/export-data-button'
|
||||
import { DownloadSampleButton } from '@/shared/components/download-sample-button'
|
||||
import { useAuthApi } from '@/shared/useApi'
|
||||
import { VehicleForm } from '@/modules/vehicles/vehicle-form'
|
||||
import { VEHICLE_ROUTES } from '@garage/api'
|
||||
@@ -24,6 +25,10 @@ export default function VehiclesPage() {
|
||||
headerProps={({ selectedItem, invalidateQuery }) => ({
|
||||
actions: (
|
||||
<div className='flex items-center gap-2'>
|
||||
<DownloadSampleButton
|
||||
onDownload={() => api.vehicles.downloadImportSample()}
|
||||
fileName='vehicles-import-sample'
|
||||
/>
|
||||
<ImportDataButton
|
||||
onImport={(file) => api.vehicles.importData(file)}
|
||||
onSuccess={invalidateQuery}
|
||||
|
||||
Reference in New Issue
Block a user