fix: Update auto schedule creation
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m29s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 25s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

This commit is contained in:
Eric Gullickson
2026-02-11 20:29:33 -06:00
parent 55a7bcc874
commit 33b489d526
4 changed files with 133 additions and 13 deletions

View File

@@ -20,10 +20,11 @@ export function useCreateSchedulesFromExtraction() {
mutationFn: async ({ vehicleId, items }) => {
const results: MaintenanceScheduleResponse[] = [];
for (const item of items) {
if (item.subtypes.length === 0) continue;
const request: CreateScheduleRequest = {
vehicleId,
category: 'routine_maintenance',
subtypes: item.subtypes.length > 0 ? item.subtypes : [],
subtypes: item.subtypes,
scheduleType: 'interval',
intervalMiles: item.intervalMiles ?? undefined,
intervalMonths: item.intervalMonths ?? undefined,