Vehicle Admin improvements
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
"framer-motion": "^11.0.0",
|
||||
"@mui/material": "^5.15.0",
|
||||
"@mui/x-date-pickers": "^6.19.0",
|
||||
"@mui/x-data-grid": "^6.19.1",
|
||||
"@emotion/react": "^11.11.4",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
@@ -58,6 +59,7 @@
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@testing-library/jest-dom": "^6.1.5",
|
||||
"@testing-library/user-event": "^14.5.1"
|
||||
"@testing-library/user-event": "^14.5.1",
|
||||
"patch-package": "^6.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
CreateCatalogModelRequest,
|
||||
UpdateCatalogModelRequest,
|
||||
CreateCatalogYearRequest,
|
||||
UpdateCatalogYearRequest,
|
||||
CreateCatalogTrimRequest,
|
||||
UpdateCatalogTrimRequest,
|
||||
CreateCatalogEngineRequest,
|
||||
@@ -121,6 +122,11 @@ export const adminApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
updateYear: async (id: string, data: UpdateCatalogYearRequest): Promise<CatalogYear> => {
|
||||
const response = await apiClient.put<CatalogYear>(`/admin/catalog/years/${id}`, data);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
deleteYear: async (id: string): Promise<void> => {
|
||||
await apiClient.delete(`/admin/catalog/years/${id}`);
|
||||
},
|
||||
|
||||
@@ -96,6 +96,11 @@ export interface CreateCatalogYearRequest {
|
||||
year: number;
|
||||
}
|
||||
|
||||
export interface UpdateCatalogYearRequest {
|
||||
modelId: string;
|
||||
year: number;
|
||||
}
|
||||
|
||||
export interface CreateCatalogTrimRequest {
|
||||
yearId: string;
|
||||
name: string;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user