Remove API documentation file and update navigation constants with new entries for farm dashboard, water data, soil data, and data section. Enhance sensor hub functionality by adding new sensor payload structure and integrating plant type and name selection in the sensor form. Refactor calendar components to streamline code and improve maintainability.

This commit is contained in:
2026-02-20 20:24:24 +03:30
parent 4424fc8e87
commit 890599b0e7
17 changed files with 822 additions and 1925 deletions
+16
View File
@@ -17,7 +17,23 @@ export interface ListSensorsResponse {
data: Sensor | Sensor[]
}
export interface AddSensorPayload {
name: string
uuid_sensor: string
area_geojson?: Record<string, unknown>
area_m2?: number
}
export const sensorHubService = {
/**
* Add a new sensor
*/
async addSensor(payload: AddSensorPayload): Promise<Sensor> {
const response = await apiClient.post<{ data?: Sensor }>('/api/sensor-hub/', payload)
return (response?.data as Sensor) ?? (payload as unknown as Sensor)
},
/**
* Get list of sensors
*/