Initial commit: SIBU 2.0 MISSION

This commit is contained in:
2026-02-21 09:53:31 -05:00
commit 0c7aa53c8b
400 changed files with 67708 additions and 0 deletions

View File

@ -0,0 +1,32 @@
import { apiClient } from './apiClient';
export const schedulesService = {
async getRouteSchedules(routeId: string, onlyPublished = true) {
const response = await apiClient.get('/api/schedules', {
params: { route_id: routeId, only_published: onlyPublished }
});
return response.data;
},
async getStopSchedules(stopId: string, onlyPublished = true) {
const response = await apiClient.get('/api/schedules', {
params: { stop_id: stopId, only_published: onlyPublished }
});
return response.data;
},
async createSchedule(scheduleData: any) {
const response = await apiClient.post('/api/schedules', scheduleData);
return response.data;
},
async updateSchedule(scheduleId: string, updateData: any) {
const response = await apiClient.put(`/api/schedules/${scheduleId}`, updateData);
return response.data;
},
async deleteSchedule(scheduleId: string) {
const response = await apiClient.delete(`/api/schedules/${scheduleId}`);
return response.data;
}
};