mowing modal
This commit is contained in:
@@ -235,6 +235,18 @@ export const adminAPI = {
|
||||
updateSettings: (settings) => apiClient.put('/admin/settings', settings),
|
||||
};
|
||||
|
||||
// Mowing API endpoints
|
||||
export const mowingAPI = {
|
||||
// Plans
|
||||
getPlans: () => apiClient.get('/mowing/plans'),
|
||||
getPlan: (id) => apiClient.get(`/mowing/plans/${id}`),
|
||||
createPlan: (data) => apiClient.post('/mowing/plans', data),
|
||||
updatePlanStatus: (id, status) => apiClient.put(`/mowing/plans/${id}/status`, { status }),
|
||||
// Logs/Sessions
|
||||
createLog: (data) => apiClient.post('/mowing/sessions', data),
|
||||
getLogs: () => apiClient.get('/mowing/logs'),
|
||||
};
|
||||
|
||||
// Utility functions
|
||||
export const handleApiError = (error, defaultMessage = 'An error occurred') => {
|
||||
if (error.response?.data?.message) {
|
||||
|
||||
Reference in New Issue
Block a user